chore(docs): Generated References (#5516)

Generated the following references:
- `js-client`
- `pricing`
- `services`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-11-02 09:16:47 +00:00
committed by GitHub
parent 80fe362f33
commit aa2bb7a31b
271 changed files with 38146 additions and 9809 deletions
@@ -1,4 +1,4 @@
# Class: AuthService
# AuthService
Can authenticate a user based on email password combination
@@ -12,12 +12,12 @@ Can authenticate a user based on email password combination
### constructor
**new AuthService**(`«destructured»`)
**new AuthService**(`«destructured»`)
#### Parameters
| Name | Type |
| :------ | :------ |
| Name |
| :------ |
| `«destructured»` | `InjectedDependencies` |
#### Overrides
@@ -26,13 +26,13 @@ TransactionBaseService.constructor
#### Defined in
[medusa/src/services/auth.ts:22](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/services/auth.ts#L22)
[medusa/src/services/auth.ts:22](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/services/auth.ts#L22)
## Properties
### \_\_configModule\_\_
`Protected` `Optional` `Readonly` **\_\_configModule\_\_**: `Record`<`string`, `unknown`\>
`Protected` `Optional` `Readonly` **\_\_configModule\_\_**: Record<`string`, `unknown`\>
#### Inherited from
@@ -40,13 +40,13 @@ TransactionBaseService.\_\_configModule\_\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:14](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L14)
[medusa/src/interfaces/transaction-base-service.ts:14](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L14)
___
### \_\_container\_\_
`Protected` `Readonly` **\_\_container\_\_**: `any`
`Protected` `Readonly` **\_\_container\_\_**: `any`
#### Inherited from
@@ -54,13 +54,13 @@ TransactionBaseService.\_\_container\_\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:13](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L13)
[medusa/src/interfaces/transaction-base-service.ts:13](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L13)
___
### \_\_moduleDeclaration\_\_
`Protected` `Optional` `Readonly` **\_\_moduleDeclaration\_\_**: `Record`<`string`, `unknown`\>
`Protected` `Optional` `Readonly` **\_\_moduleDeclaration\_\_**: Record<`string`, `unknown`\>
#### Inherited from
@@ -68,23 +68,23 @@ TransactionBaseService.\_\_moduleDeclaration\_\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:15](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L15)
[medusa/src/interfaces/transaction-base-service.ts:15](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L15)
___
### customerService\_
`Protected` `Readonly` **customerService\_**: [`CustomerService`](CustomerService.md)
`Protected` `Readonly` **customerService\_**: [`CustomerService`](CustomerService.md)
#### Defined in
[medusa/src/services/auth.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/services/auth.ts#L20)
[medusa/src/services/auth.ts:20](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/services/auth.ts#L20)
___
### manager\_
`Protected` **manager\_**: `EntityManager`
`Protected` **manager\_**: `EntityManager`
#### Inherited from
@@ -92,13 +92,13 @@ TransactionBaseService.manager\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:5](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L5)
[medusa/src/interfaces/transaction-base-service.ts:5](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L5)
___
### transactionManager\_
`Protected` **transactionManager\_**: `undefined` \| `EntityManager`
`Protected` **transactionManager\_**: `undefined` \| `EntityManager`
#### Inherited from
@@ -106,57 +106,57 @@ TransactionBaseService.transactionManager\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:6](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L6)
[medusa/src/interfaces/transaction-base-service.ts:6](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L6)
___
### userService\_
`Protected` `Readonly` **userService\_**: [`UserService`](UserService.md)
`Protected` `Readonly` **userService\_**: [`UserService`](UserService.md)
#### Defined in
[medusa/src/services/auth.ts:19](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/services/auth.ts#L19)
[medusa/src/services/auth.ts:19](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/services/auth.ts#L19)
## Accessors
### activeManager\_
`Protected` `get` **activeManager_**(): `EntityManager`
`Protected` `get` **activeManager_**(): `EntityManager`
#### Returns
`EntityManager`
-`EntityManager`:
#### Inherited from
TransactionBaseService.activeManager\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:8](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L8)
[medusa/src/interfaces/transaction-base-service.ts:8](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L8)
## Methods
### atomicPhase\_
`Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
`Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
#### Type parameters
| Name |
| :------ |
| `TResult` |
| `TError` |
| `TResult` | `object` |
| `TError` | `object` |
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Description |
| :------ | :------ |
| `work` | (`transactionManager`: `EntityManager`) => `Promise`<`TResult`\> | the transactional work to be done |
| `isolationOrErrorHandler?` | `IsolationLevel` \| (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | the isolation level to be used for the work. |
| `maybeErrorHandlerOrDontFail?` | (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | Potential error handler |
@@ -165,7 +165,7 @@ transaction manager is created.
`Promise`<`TResult`\>
the result of the transactional work
-`Promise`: the result of the transactional work
#### Inherited from
@@ -173,21 +173,21 @@ TransactionBaseService.atomicPhase\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:56](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L56)
[medusa/src/interfaces/transaction-base-service.ts:56](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L56)
___
### authenticate
**authenticate**(`email`, `password`): `Promise`<`AuthenticateResult`\>
**authenticate**(`email`, `password`): `Promise`<`AuthenticateResult`\>
Authenticates a given user based on an email, password combination. Uses
scrypt to match password with hashed value.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Description |
| :------ | :------ |
| `email` | `string` | the email of the user |
| `password` | `string` | the password of the user |
@@ -195,53 +195,53 @@ scrypt to match password with hashed value.
`Promise`<`AuthenticateResult`\>
success: whether authentication succeeded
-`Promise`: success: whether authentication succeeded
user: the user document if authentication succeeded
error: a string with the error message
#### Defined in
[medusa/src/services/auth.ts:81](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/services/auth.ts#L81)
[medusa/src/services/auth.ts:81](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/services/auth.ts#L81)
___
### authenticateAPIToken
**authenticateAPIToken**(`token`): `Promise`<`AuthenticateResult`\>
**authenticateAPIToken**(`token`): `Promise`<`AuthenticateResult`\>
Authenticates a given user with an API token
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Description |
| :------ | :------ |
| `token` | `string` | the api_token of the user to authenticate |
#### Returns
`Promise`<`AuthenticateResult`\>
success: whether authentication succeeded
-`Promise`: success: whether authentication succeeded
user: the user document if authentication succeeded
error: a string with the error message
#### Defined in
[medusa/src/services/auth.ts:52](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/services/auth.ts#L52)
[medusa/src/services/auth.ts:52](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/services/auth.ts#L52)
___
### authenticateCustomer
**authenticateCustomer**(`email`, `password`): `Promise`<`AuthenticateResult`\>
**authenticateCustomer**(`email`, `password`): `Promise`<`AuthenticateResult`\>
Authenticates a customer based on an email, password combination. Uses
scrypt to match password with hashed value.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Description |
| :------ | :------ |
| `email` | `string` | the email of the user |
| `password` | `string` | the password of the user |
@@ -249,26 +249,26 @@ scrypt to match password with hashed value.
`Promise`<`AuthenticateResult`\>
success: whether authentication succeeded
-`Promise`: success: whether authentication succeeded
customer: the customer document if authentication succeded
error: a string with the error message
#### Defined in
[medusa/src/services/auth.ts:130](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/services/auth.ts#L130)
[medusa/src/services/auth.ts:130](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/services/auth.ts#L130)
___
### comparePassword\_
`Protected` **comparePassword_**(`password`, `hash`): `Promise`<`boolean`\>
`Protected` **comparePassword_**(`password`, `hash`): `Promise`<`boolean`\>
Verifies if a password is valid given the provided password hash
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| Name | Description |
| :------ | :------ |
| `password` | `string` | the raw password to check |
| `hash` | `string` | the hash to compare against |
@@ -276,56 +276,61 @@ Verifies if a password is valid given the provided password hash
`Promise`<`boolean`\>
the result of the comparison
-`Promise`: the result of the comparison
-`boolean`: (optional)
#### Defined in
[medusa/src/services/auth.ts:36](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/services/auth.ts#L36)
[medusa/src/services/auth.ts:36](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/services/auth.ts#L36)
___
### shouldRetryTransaction\_
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
#### Parameters
| Name | Type |
| :------ | :------ |
| `err` | `Record`<`string`, `unknown`\> \| { `code`: `string` } |
| Name |
| :------ |
| `err` | Record<`string`, `unknown`\> \| { `code`: `string` } |
#### Returns
`boolean`
-`boolean`: (optional)
#### Inherited from
TransactionBaseService.shouldRetryTransaction\_
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:37](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L37)
[medusa/src/interfaces/transaction-base-service.ts:37](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L37)
___
### withTransaction
**withTransaction**(`transactionManager?`): [`AuthService`](AuthService.md)
**withTransaction**(`transactionManager?`): [`AuthService`](AuthService.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| Name |
| :------ |
| `transactionManager?` | `EntityManager` |
#### Returns
[`AuthService`](AuthService.md)
-`AuthService`:
#### Inherited from
TransactionBaseService.withTransaction
#### Defined in
[medusa/src/interfaces/transaction-base-service.ts:20](https://github.com/medusajs/medusa/blob/b38f73726/packages/medusa/src/interfaces/transaction-base-service.ts#L20)
[medusa/src/interfaces/transaction-base-service.ts:20](https://github.com/medusajs/medusa/blob/0af6e5534/packages/medusa/src/interfaces/transaction-base-service.ts#L20)