Permissions class

Use to create, replace, query, and read all Permissions.

See Permission to read, replace, or delete a specific permission by id.

Properties

user

Methods

create(PermissionDefinition, RequestOptions)

Create a permission.

A permission represents a per-User Permission to access a specific resource e.g. Item or Container.

query(SqlQuerySpec, FeedOptions)

Query all permissions.

query<T>(SqlQuerySpec, FeedOptions)

Query all permissions.

readAll(FeedOptions)

Read all permissions.

Example

Read all permissions to array.

const {body: permissionList} = await user.permissions.readAll().fetchAll();
upsert(PermissionDefinition, RequestOptions)

Upsert a permission.

A permission represents a per-User Permission to access a specific resource e.g. Item or Container.

Property Details

user

user: User

Property Value

Method Details

create(PermissionDefinition, RequestOptions)

Create a permission.

A permission represents a per-User Permission to access a specific resource e.g. Item or Container.

function create(body: PermissionDefinition, options?: RequestOptions): Promise<PermissionResponse>

Parameters

body
PermissionDefinition

Represents the body of the permission.

options
RequestOptions

Returns

query(SqlQuerySpec, FeedOptions)

Query all permissions.

function query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator<any>

Parameters

query
SqlQuerySpec

Query configuration for the operation. See SqlQuerySpec for more info on how to configure a query.

options
FeedOptions

Returns

query<T>(SqlQuerySpec, FeedOptions)

Query all permissions.

function query<T>(query: SqlQuerySpec, options?: FeedOptions): QueryIterator<T>

Parameters

query
SqlQuerySpec

Query configuration for the operation. See SqlQuerySpec for more info on how to configure a query.

options
FeedOptions

Returns

readAll(FeedOptions)

Read all permissions.

Example

Read all permissions to array.

const {body: permissionList} = await user.permissions.readAll().fetchAll();
function readAll(options?: FeedOptions): QueryIterator<PermissionDefinition & Resource>

Parameters

options
FeedOptions

Returns

upsert(PermissionDefinition, RequestOptions)

Upsert a permission.

A permission represents a per-User Permission to access a specific resource e.g. Item or Container.

function upsert(body: PermissionDefinition, options?: RequestOptions): Promise<PermissionResponse>

Parameters

options
RequestOptions

Returns