Access
Description
The generate widget is a simplest way to generate images.
Methods
add
Adds access for a resource
Props
Name | Type | Required | Description |
---|---|---|---|
accountId | string | No | The ID of the account to grant access to |
groupId | string | No | The ID of the group to grant access to |
resource | AccessResourceType | Yes | The type of resource to grant access to |
resourceId | string | Yes | The ID of the resource to grant access to |
role | AccessRole | Yes | The role to grant for the resource |
Returns
Promise<void>
Example
await client.access.add({
resource: 'collection',
resourceId: '123',
role: 'reader',
});
remove
Removes access for a resource
Props
Name | Type | Required | Description |
---|---|---|---|
accountId | string | No | The ID of the account to remove access from |
groupId | string | No | The ID of the group to remove access from |
resource | AccessResourceType | Yes | The type of resource to remove access from |
resourceId | string | Yes | The ID of the resource to remove access from |
role | AccessRole | Yes | The role to remove for the resource |
Returns
Promise<void>
Example
await client.access.remove({
resource: 'collection',
resourceId: '123',
role: 'reader',
});
Types
AccessResourceType
collection
stack
AccessRole
maintainer
reader
writer