Class: AdminUsersResource
Hierarchy
default
↳
AdminUsersResource
Methods
create
▸ create(payload
, customHeaders?
): ResponsePromise
<AdminUserRes
>
Description
creates a user with the provided information
Parameters
Name | Type | Description |
---|---|---|
payload | AdminCreateUserPayload | user creation request body |
customHeaders | Record <string , any > |
Returns
created user
Defined in
medusa-js/src/resources/admin/users.ts:64
delete
▸ delete(id
, customHeaders?
): ResponsePromise
<DeleteResponse
>
Description
deletes a user
Parameters
Name | Type | Description |
---|---|---|
id | string | id of the user to be deleted |
customHeaders | Record <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
Name | Type |
---|---|
customHeaders | Record <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
Name | Type | Description |
---|---|---|
payload | AdminResetPasswordRequest | reset password information. |
customHeaders | Record <string , any > |
Returns
Defined in
medusa-js/src/resources/admin/users.ts:36
retrieve
▸ retrieve(id
, customHeaders?
): ResponsePromise
<AdminUserRes
>
Retrieves a given user
Parameters
Name | Type | Description |
---|---|---|
id | string | id of the user |
customHeaders | Record <string , any > |
Returns
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
Name | Type | Description |
---|---|---|
payload | AdminResetPasswordTokenRequest | payload for generating reset-password token. |
customHeaders | Record <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
Name | Type | Description |
---|---|---|
id | string | id of the user to update |
payload | AdminUpdateUserPayload | user update request body |
customHeaders | Record <string , any > |
Returns
the updated user