Constructor Summary
Public Constructor | ||
public |
constructor(client: KintoClient, name: String) Constructor. |
Method Summary
Public Methods | ||
public |
Performs batch operations at the current bucket level. |
|
public |
collection(name: String, options: Object): Collection Selects a collection. |
|
public |
Creates a new collection in current bucket. |
|
public |
createGroup(id: String | undefined, members: Array<String>, options: Object): Promise<Object, Error> Creates a new group in current bucket. |
|
public |
Deletes a collection from the current bucket. |
|
public |
Deletes a group from the current bucket. |
|
public |
Retrieves bucket data. |
|
public |
Creates a new group in current bucket. |
|
public |
getPermissions(options: Object): Promise<Object, Error> Retrieves the list of permissions for this bucket. |
|
public |
Retrieves the list of collections in the current bucket. |
|
public |
Retrieves the list of groups in the current bucket. |
|
public |
Set bucket data. |
|
public |
Recplaces all existing bucket permissions with the ones provided. |
|
public |
Updates an existing group in current bucket. |
Public Constructors
public constructor(client: KintoClient, name: String) source
Constructor.
Params:
Name | Type | Attribute | Description |
client | KintoClient | The client instance. |
|
name | String | The bucket name. |
|
options.headers | Object | The headers object option. |
|
options.safe | Boolean | The safe option. |
Public Methods
public batch(fn: Function, options: Object): Promise<Object, Error> source
Performs batch operations at the current bucket level.
Test:
public createCollection(id: String | undefined, options: Object): Promise<Object, Error> source
Creates a new collection in current bucket.
public createGroup(id: String | undefined, members: Array<String>, options: Object): Promise<Object, Error> source
Creates a new group in current bucket.
Params:
Name | Type | Attribute | Description |
id | String | undefined | The group id. |
|
members | Array<String> | The list of principals. |
|
options | Object | The options object. |
|
options.data | Object | The data object. |
|
options.permissions | Object | The permissions object. |
|
options.safe | Boolean | The safe option. |
|
options.headers | Object | The headers object option. |
Test:
public deleteCollection(collection: Object | String, options: Object): Promise<Object, Error> source
Deletes a collection from the current bucket.
Test:
public deleteGroup(group: Object | String, options: Object): Promise<Object, Error> source
Deletes a group from the current bucket.
public getGroup(id: String, options: Object): Promise<Object, Error> source
Creates a new group in current bucket.
Test:
public getPermissions(options: Object): Promise<Object, Error> source
Retrieves the list of permissions for this bucket.
Test:
public listCollections(options: Object): Promise<Array<Object>, Error> source
Retrieves the list of collections in the current bucket.
public listGroups(options: Object): Promise<Array<Object>, Error> source
Retrieves the list of groups in the current bucket.
Test:
public setPermissions(permissions: Object, options: Object, options: Object): Promise<Object, Error> source
Recplaces all existing bucket permissions with the ones provided.