Skip to main content

Class: AdminUsersResource

Hierarchy

  • default

    AdminUsersResource

Methods

create

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

Description

creates a user with the provided information

Parameters

NameTypeDescription
payloadAdminCreateUserPayloaduser creation request body
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminUserRes>

created user

Defined in

medusa-js/src/resources/admin/users.ts:64


delete

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

Description

deletes a user

Parameters

NameTypeDescription
idstringid of the user to be deleted
customHeadersRecord<string, any>

Returns

ResponsePromise<DeleteResponse>

delete response

Defined in

medusa-js/src/resources/admin/users.ts:94


list

list(customHeaders?): ResponsePromise<AdminUsersListRes>

Description

lists all users

Parameters

NameType
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminUsersListRes>

a list of all users

Defined in

medusa-js/src/resources/admin/users.ts:106


resetPassword

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

Description

resets the users password given the correct token.

Parameters

NameTypeDescription
payloadAdminResetPasswordRequestreset password information.
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminUserRes>

Defined in

medusa-js/src/resources/admin/users.ts:36


retrieve

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

Retrieves a given user

Parameters

NameTypeDescription
idstringid of the user
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminUserRes>

the user

Defined in

medusa-js/src/resources/admin/users.ts:50


sendResetPasswordToken

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

Description

resets password by re-sending password token.

Parameters

NameTypeDescription
payloadAdminResetPasswordTokenRequestpayload for generating reset-password token.
customHeadersRecord<string, any>

Returns

ResponsePromise<void>

Defined in

medusa-js/src/resources/admin/users.ts:22


update

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

Description

updates a given user

Parameters

NameTypeDescription
idstringid of the user to update
payloadAdminUpdateUserPayloaduser update request body
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminUserRes>

the updated user

Defined in

medusa-js/src/resources/admin/users.ts:79