chore(docs): Generated JS Client Reference (#5334)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-10-10 17:47:07 +00:00
committed by GitHub
parent 378ca1b36e
commit daea35fe73
1091 changed files with 140791 additions and 25954 deletions

View File

@@ -1,3 +1,7 @@
---
displayed_sidebar: jsClientSidebar
---
# Class: AdminAuthResource
## Hierarchy
@@ -10,72 +14,97 @@
### createSession
**createSession**(`payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
**`Description`**
Creates an authenticated session
**createSession**(`payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal-12.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`AdminPostAuthReq`](internal-1.AdminPostAuthReq.md) |
| `customHeaders` | `Record`<`string`, `any`\> |
| `customHeaders` | [`Record`](../modules/internal.md#record)<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
[`ResponsePromise`](../modules/internal-12.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
**`Description`**
Creates an authenticated session
#### Defined in
[medusa-js/src/resources/admin/auth.ts:37](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/auth.ts#L37)
[packages/medusa-js/src/resources/admin/auth.ts:38](https://github.com/medusajs/medusa/blob/c4ac5e6959/packages/medusa-js/src/resources/admin/auth.ts#L38)
___
### deleteSession
**deleteSession**(`customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<`void`\>
**`Description`**
destroys an authenticated session
**deleteSession**(`customHeaders?`): [`ResponsePromise`](../modules/internal-12.md#responsepromise)<`void`\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `customHeaders` | `Record`<`string`, `any`\> |
| `customHeaders` | [`Record`](../modules/internal.md#record)<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<`void`\>
[`ResponsePromise`](../modules/internal-12.md#responsepromise)<`void`\>
**`Description`**
destroys an authenticated session
#### Defined in
[medusa-js/src/resources/admin/auth.ts:24](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/auth.ts#L24)
[packages/medusa-js/src/resources/admin/auth.ts:25](https://github.com/medusajs/medusa/blob/c4ac5e6959/packages/medusa-js/src/resources/admin/auth.ts#L25)
___
### getSession
**getSession**(`customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
**getSession**(`customHeaders?`): [`ResponsePromise`](../modules/internal-12.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `customHeaders` | [`Record`](../modules/internal.md#record)<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal-12.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
**`Description`**
Retrieves an authenticated session
Usually used to check if authenticated session is alive.
#### Defined in
[packages/medusa-js/src/resources/admin/auth.ts:13](https://github.com/medusajs/medusa/blob/c4ac5e6959/packages/medusa-js/src/resources/admin/auth.ts#L13)
___
### getToken
**getToken**(`payload`, `customHeaders?`): [`ResponsePromise`](../modules/internal-12.md#responsepromise)<[`AdminBearerAuthRes`](../modules/internal-1.md#adminbearerauthres)\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `customHeaders` | `Record`<`string`, `any`\> |
| `payload` | [`AdminPostAuthReq`](internal-1.AdminPostAuthReq.md) |
| `customHeaders` | [`Record`](../modules/internal.md#record)<`string`, `any`\> |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`AdminAuthRes`](../modules/internal-1.md#adminauthres)\>
[`ResponsePromise`](../modules/internal-12.md#responsepromise)<[`AdminBearerAuthRes`](../modules/internal-1.md#adminbearerauthres)\>
**`Description`**
Retrieves a new JWT access token
#### Defined in
[medusa-js/src/resources/admin/auth.ts:12](https://github.com/medusajs/medusa/blob/29135c051/packages/medusa-js/src/resources/admin/auth.ts#L12)
[packages/medusa-js/src/resources/admin/auth.ts:52](https://github.com/medusajs/medusa/blob/c4ac5e6959/packages/medusa-js/src/resources/admin/auth.ts#L52)