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:
github-actions[bot]
2023-10-20 14:01:27 +03:00
committed by GitHub
co-authored by olivermrbl Shahed nasser
parent 83f46b9b32
commit 9dcd62c731
1604 changed files with 211689 additions and 151746 deletions
@@ -0,0 +1,260 @@
---
displayed_sidebar: jsClientSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
# AuthResource
[auth](../../modules/auth.mdx).AuthResource
## Methods
### authenticate
▸ **authenticate**(`payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storeauthres)\>
#### Parameters
<ParameterTypes parameters={[
{
"name": "payload",
"type": "[`StorePostAuthReq`](../../internal/classes/admin_discounts.internal.internal.StorePostAuthReq.mdx)",
"description": "authentication payload",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "customHeaders",
"type": "Record<`string`, `any`\\>",
"description": "",
"optional": false,
"defaultValue": "`{}`",
"children": []
}
]} />
#### Returns
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storeauthres)\>
<ParameterTypes parameters={[
{
"name": "ResponsePromise",
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storeauthres)\\>",
"optional": false,
"defaultValue": "",
"description": "",
"children": [
{
"name": "StoreAuthRes",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
}
]} />
#### Description
Authenticates a customer using email and password combination
___
### 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
Removes authentication session
___
### exists
▸ **exists**(`email`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreGetAuthEmailRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storegetauthemailres)\>
#### Parameters
<ParameterTypes parameters={[
{
"name": "email",
"type": "`string`",
"description": "is required",
"optional": false,
"defaultValue": "",
"children": []
},
{
"name": "customHeaders",
"type": "Record<`string`, `any`\\>",
"description": "",
"optional": false,
"defaultValue": "`{}`",
"children": []
}
]} />
#### Returns
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreGetAuthEmailRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storegetauthemailres)\>
<ParameterTypes parameters={[
{
"name": "ResponsePromise",
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreGetAuthEmailRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storegetauthemailres)\\>",
"optional": false,
"defaultValue": "",
"description": "",
"children": [
{
"name": "StoreGetAuthEmailRes",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
}
]} />
#### Description
Check if email exists
___
### getSession
▸ **getSession**(`customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storeauthres)\>
#### Parameters
<ParameterTypes parameters={[
{
"name": "customHeaders",
"type": "Record<`string`, `any`\\>",
"description": "",
"optional": false,
"defaultValue": "`{}`",
"children": []
}
]} />
#### Returns
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storeauthres)\>
<ParameterTypes parameters={[
{
"name": "ResponsePromise",
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storeauthres)\\>",
"optional": false,
"defaultValue": "",
"description": "",
"children": [
{
"name": "StoreAuthRes",
"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)<[`StoreBearerAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storebearerauthres)\>
#### Parameters
<ParameterTypes parameters={[
{
"name": "payload",
"type": "[`StorePostAuthReq`](../../internal/classes/admin_discounts.internal.internal.StorePostAuthReq.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)<[`StoreBearerAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storebearerauthres)\>
<ParameterTypes parameters={[
{
"name": "ResponsePromise",
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreBearerAuthRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storebearerauthres)\\>",
"optional": false,
"defaultValue": "",
"description": "",
"children": [
{
"name": "StoreBearerAuthRes",
"type": "`object`",
"description": "",
"optional": false,
"defaultValue": "",
"children": []
}
]
}
]} />
#### Description
Retrieves a new JWT access token