Skip to main content
Skip to main content

AdminUsersResource

admin/users.AdminUsersResource

Methods

create

create(payload, customHeaders?): ResponsePromise<AdminUserRes>

Parameters

payloadAdminCreateUserPayloadRequired
user creation request body
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminUserRes>

ResponsePromiseResponsePromise<AdminUserRes>Required
created user

Description

creates a user with the provided information


delete

delete(id, customHeaders?): ResponsePromise<DeleteResponse>

Parameters

idstringRequired
id of the user to be deleted
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<DeleteResponse>

ResponsePromiseResponsePromise<DeleteResponse>Required
delete response

Description

deletes a user


list

list(customHeaders?): ResponsePromise<AdminUsersListRes>

Parameters

customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminUsersListRes>

ResponsePromiseResponsePromise<AdminUsersListRes>Required
a list of all users

Description

lists all users


resetPassword

resetPassword(payload, customHeaders?): ResponsePromise<AdminUserRes>

Parameters

reset password information.
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminUserRes>

ResponsePromiseResponsePromise<AdminUserRes>Required

Description

resets the users password given the correct token.


retrieve

retrieve(id, customHeaders?): ResponsePromise<AdminUserRes>

Retrieves a given user

Parameters

idstringRequired
id of the user
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminUserRes>

ResponsePromiseResponsePromise<AdminUserRes>Required
the user

sendResetPasswordToken

sendResetPasswordToken(payload, customHeaders?): ResponsePromise<void>

Parameters

payload for generating reset-password token.
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<void>

ResponsePromiseResponsePromise<void>Required

Description

resets password by re-sending password token.


update

update(id, payload, customHeaders?): ResponsePromise<AdminUserRes>

Parameters

idstringRequired
id of the user to update
payloadAdminUpdateUserPayloadRequired
user update request body
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminUserRes>

ResponsePromiseResponsePromise<AdminUserRes>Required
the updated user

Description

updates a given user

Was this section helpful?