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.

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 <xref: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 <xref:UserDefinition> for the given <xref:User>.

replace(UserDefinition, RequestOptions)

Replace the given <xref:User>'s definition with the specified <xref: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.

url: string

Property Value

string

Method Details

delete(RequestOptions)

Delete the given <xref:User>.

function delete(options?: RequestOptions)

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)

Parameters

id
string

Returns

read(RequestOptions)

Read the <xref:UserDefinition> for the given <xref:User>.

function read(options?: RequestOptions)

Parameters

options
RequestOptions

Returns

Promise<UserResponse>

replace(UserDefinition, RequestOptions)

Replace the given <xref:User>'s definition with the specified <xref:UserDefinition>.

function replace(body: UserDefinition, options?: RequestOptions)

Parameters

body
UserDefinition

The specified <xref:UserDefinition> to replace the definition.

options
RequestOptions

Returns

Promise<UserResponse>