chore(docs): Generated JS Client Reference (#5421)
* chore(docs): Generated JS Client Reference (automated) * fix js client reference * fix links --------- Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com> Co-authored-by: Shahed nasser <shahednasser@gmail.com>
This commit is contained in:
committed by
GitHub
parent
83f46b9b32
commit
9dcd62c731
+383
@@ -0,0 +1,383 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AdminUsersResource
|
||||
|
||||
[admin/users](../../modules/admin_users.mdx).AdminUsersResource
|
||||
|
||||
## Methods
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminCreateUserPayload`](../modules/admin_users.internal.mdx#admincreateuserpayload)",
|
||||
"description": "user creation request body",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "created user",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminUserRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
creates a user with the provided information
|
||||
|
||||
___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`id`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`DeleteResponse`](../../internal/modules/admin_discounts.internal.internal.mdx#deleteresponse)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "id of the user to be deleted",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`DeleteResponse`](../../internal/modules/admin_discounts.internal.internal.mdx#deleteresponse)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`DeleteResponse`](../../internal/modules/admin_discounts.internal.internal.mdx#deleteresponse)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "delete response",
|
||||
"children": [
|
||||
{
|
||||
"name": "DeleteResponse",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
deletes a user
|
||||
|
||||
___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUsersListRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserslistres)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUsersListRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserslistres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUsersListRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserslistres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "a list of all users",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminUsersListRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
lists all users
|
||||
|
||||
___
|
||||
|
||||
### resetPassword
|
||||
|
||||
▸ **resetPassword**(`payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminResetPasswordRequest`](../../internal/classes/admin_discounts.internal.internal.AdminResetPasswordRequest.mdx)",
|
||||
"description": "reset password information.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminUserRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
resets the users password given the correct token.
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`id`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
Retrieves a given user
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "id of the user",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the user",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminUserRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### sendResetPasswordToken
|
||||
|
||||
▸ **sendResetPasswordToken**(`payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminResetPasswordTokenRequest`](../../internal/classes/admin_discounts.internal.internal.AdminResetPasswordTokenRequest.mdx)",
|
||||
"description": "payload for generating reset-password token.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<`void`\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
resets password by re-sending password token.
|
||||
|
||||
___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "id of the user to update",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminUpdateUserPayload`](../modules/admin_users.internal.mdx#adminupdateuserpayload)",
|
||||
"description": "user update request body",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminUserRes`](../../internal/modules/admin_discounts.internal.internal.mdx#adminuserres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the updated user",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminUserRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
updates a given user
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# internal
|
||||
|
||||
## Type Aliases
|
||||
|
||||
### AdminCreateUserPayload
|
||||
|
||||
Ƭ **AdminCreateUserPayload**: [`Omit`](../../admin_auth/modules/admin_auth.internal.mdx#omit)<[`AdminCreateUserRequest`](../../internal/classes/admin_discounts.internal.internal.AdminCreateUserRequest.mdx), ``"role"``\> \| { `role?`: [`CreateUserRoles`](admin_users.internal.mdx#createuserroles) }
|
||||
|
||||
___
|
||||
|
||||
### AdminUpdateUserPayload
|
||||
|
||||
Ƭ **AdminUpdateUserPayload**: [`Omit`](../../admin_auth/modules/admin_auth.internal.mdx#omit)<[`AdminUpdateUserRequest`](../../internal/classes/admin_discounts.internal.internal.AdminUpdateUserRequest.mdx), ``"role"``\> & { `role?`: [`UpdateUserRoles`](admin_users.internal.mdx#updateuserroles) }
|
||||
|
||||
___
|
||||
|
||||
### CreateUserRoles
|
||||
|
||||
Ƭ **CreateUserRoles**: \`${CreateUserRolesEnum}\`
|
||||
|
||||
___
|
||||
|
||||
### CreateUserRolesEnum
|
||||
|
||||
Ƭ **CreateUserRolesEnum**: [`NoUndefined`](admin_users.internal.mdx#noundefined)<[`AdminCreateUserRequest`](../../internal/classes/admin_discounts.internal.internal.AdminCreateUserRequest.mdx)[``"role"``]\>
|
||||
|
||||
___
|
||||
|
||||
### NoUndefined
|
||||
|
||||
Ƭ **NoUndefined**<`T`\>: `T` extends `undefined` ? `never` : `T`
|
||||
|
||||
#### Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### UpdateUserRoles
|
||||
|
||||
Ƭ **UpdateUserRoles**: \`${UpdateUserRolesEnum}\`
|
||||
|
||||
___
|
||||
|
||||
### UpdateUserRolesEnum
|
||||
|
||||
Ƭ **UpdateUserRolesEnum**: [`NoUndefined`](admin_users.internal.mdx#noundefined)<[`AdminUpdateUserRequest`](../../internal/classes/admin_discounts.internal.internal.AdminUpdateUserRequest.mdx)[``"role"``]\>
|
||||
Reference in New Issue
Block a user