Skip to main content

Access

Description

The generate widget is a simplest way to generate images.

Methods

add

Adds access for a resource

Props

NameTypeRequiredDescription
accountIdstringNoThe ID of the account to grant access to
groupIdstringNoThe ID of the group to grant access to
resourceAccessResourceTypeYesThe type of resource to grant access to
resourceIdstringYesThe ID of the resource to grant access to
roleAccessRoleYesThe 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

NameTypeRequiredDescription
accountIdstringNoThe ID of the account to remove access from
groupIdstringNoThe ID of the group to remove access from
resourceAccessResourceTypeYesThe type of resource to remove access from
resourceIdstringYesThe ID of the resource to remove access from
roleAccessRoleYesThe 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