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(Permission |
Create a permission. A permission represents a per-User Permission to access a specific resource e.g. Item or Container. |
query(Sql |
Query all permissions. |
query<T>(Sql |
Query all permissions. |
read |
Read all permissions. Example Read all permissions to array.
|
upsert(Permission |
Upsert a permission. A permission represents a per-User Permission to access a specific resource e.g. Item or Container. |
Property Details
user
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
Promise<PermissionResponse>
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
QueryIterator<any>
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
- body
- PermissionDefinition
- options
- RequestOptions
Returns
Promise<PermissionResponse>