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:
co-authored by
olivermrbl
Shahed nasser
parent
83f46b9b32
commit
9dcd62c731
+205
@@ -0,0 +1,205 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# AdminAuthResource
|
||||
|
||||
[admin/auth](../../modules/admin_auth.mdx).AdminAuthResource
|
||||
|
||||
## Methods
|
||||
|
||||
### createSession
|
||||
|
||||
▸ **createSession**(`payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminAuthRes`](../modules/admin_auth.internal.mdx#adminauthres)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminPostAuthReq`](../../internal/classes/admin_auth.internal.AdminPostAuthReq.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminAuthRes`](../modules/admin_auth.internal.mdx#adminauthres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminAuthRes`](../modules/admin_auth.internal.mdx#adminauthres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminAuthRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
Creates an authenticated session
|
||||
|
||||
___
|
||||
|
||||
### deleteSession
|
||||
|
||||
▸ **deleteSession**(`customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"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
|
||||
|
||||
destroys an authenticated session
|
||||
|
||||
___
|
||||
|
||||
### getSession
|
||||
|
||||
▸ **getSession**(`customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminAuthRes`](../modules/admin_auth.internal.mdx#adminauthres)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminAuthRes`](../modules/admin_auth.internal.mdx#adminauthres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminAuthRes`](../modules/admin_auth.internal.mdx#adminauthres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminAuthRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
Retrieves an authenticated session
|
||||
Usually used to check if authenticated session is alive.
|
||||
|
||||
___
|
||||
|
||||
### getToken
|
||||
|
||||
▸ **getToken**(`payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminBearerAuthRes`](../modules/admin_auth.internal.mdx#adminbearerauthres)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`AdminPostAuthReq`](../../internal/classes/admin_auth.internal.AdminPostAuthReq.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminBearerAuthRes`](../modules/admin_auth.internal.mdx#adminbearerauthres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`AdminBearerAuthRes`](../modules/admin_auth.internal.mdx#adminbearerauthres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "AdminBearerAuthRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Description
|
||||
|
||||
Retrieves a new JWT access token
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# internal
|
||||
|
||||
## Enumerations
|
||||
|
||||
- [UserRoles](../../internal/enums/admin_auth.internal.UserRoles.mdx)
|
||||
|
||||
## Classes
|
||||
|
||||
- [AdminPostAuthReq](../../internal/classes/admin_auth.internal.AdminPostAuthReq.mdx)
|
||||
- [BaseEntity](../../internal/classes/admin_auth.internal.BaseEntity.mdx)
|
||||
- [SoftDeletableEntity](../../internal/classes/admin_auth.internal.SoftDeletableEntity.mdx)
|
||||
- [User](../../internal/classes/admin_auth.internal.User.mdx)
|
||||
|
||||
## Type Aliases
|
||||
|
||||
### AdminAuthRes
|
||||
|
||||
Ƭ **AdminAuthRes**: `Object`
|
||||
|
||||
#### Schema
|
||||
|
||||
AdminAuthRes
|
||||
type: object
|
||||
required:
|
||||
- user
|
||||
properties:
|
||||
user:
|
||||
description: User details.
|
||||
$ref: "#/components/schemas/User"
|
||||
|
||||
#### Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "user",
|
||||
"type": "[`Omit`](admin_auth.internal.mdx#omit)<[`User`](../../internal/classes/admin_auth.internal.User.mdx), ``\"password_hash\"``\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### AdminBearerAuthRes
|
||||
|
||||
Ƭ **AdminBearerAuthRes**: `Object`
|
||||
|
||||
#### Schema
|
||||
|
||||
AdminBearerAuthRes
|
||||
type: object
|
||||
properties:
|
||||
accessToken:
|
||||
description: Access token for subsequent authorization.
|
||||
type: string
|
||||
|
||||
#### Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "access_token",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### Exclude
|
||||
|
||||
Ƭ **Exclude**<`T`, `U`\>: `T` extends `U` ? `never` : `T`
|
||||
|
||||
Exclude from T those types that are assignable to U
|
||||
|
||||
#### Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "U",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### Omit
|
||||
|
||||
Ƭ **Omit**<`T`, `K`\>: [`Pick`](admin_auth.internal.mdx#pick)<`T`, [`Exclude`](admin_auth.internal.mdx#exclude)<keyof `T`, `K`\>\>
|
||||
|
||||
Construct a type with the properties of T except for those in type K.
|
||||
|
||||
#### Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "K",
|
||||
"type": "keyof `any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### Pick
|
||||
|
||||
Ƭ **Pick**<`T`, `K`\>: { [P in K]: T[P] }
|
||||
|
||||
From T, pick a set of properties whose keys are in the union K
|
||||
|
||||
#### Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "K",
|
||||
"type": "keyof `T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
Reference in New Issue
Block a user