User class

Used to read, replace, and delete Users.

Additionally, you can access the permissions for a given user via user.permission and user.permissions.

See Users to create, upsert, query, or read all.

Properties

database
id
permissions

Operations for creating, upserting, querying, or reading all operations.

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

url

Returns a reference URL to the resource. Used for linking in Permissions.

Methods

delete(RequestOptions)

Delete the given User.

permission(string)

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

See client.permissions for creating, upserting, querying, or reading all operations.

read(RequestOptions)

Read the UserDefinition for the given User.

replace(UserDefinition, RequestOptions)

Replace the given User's definition with the specified UserDefinition.

Property Details

database

database: Database

Property Value

id

id: string

Property Value

string

permissions

Operations for creating, upserting, querying, or reading all operations.

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

permissions: Permissions

Property Value

url

Returns a reference URL to the resource. Used for linking in Permissions.

string url

Property Value

string

Method Details

delete(RequestOptions)

Delete the given User.

function delete(options?: RequestOptions): Promise<UserResponse>

Parameters

options
RequestOptions

Returns

Promise<UserResponse>

permission(string)

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

See client.permissions for creating, upserting, querying, or reading all operations.

function permission(id: string): Permission

Parameters

id

string

Returns

read(RequestOptions)

Read the UserDefinition for the given User.

function read(options?: RequestOptions): Promise<UserResponse>

Parameters

options
RequestOptions

Returns

Promise<UserResponse>

replace(UserDefinition, RequestOptions)

Replace the given User's definition with the specified UserDefinition.

function replace(body: UserDefinition, options?: RequestOptions): Promise<UserResponse>

Parameters

body
UserDefinition

The specified UserDefinition to replace the definition.

options
RequestOptions

Returns

Promise<UserResponse>