chore: fixed commit branch on generate reference action (#1857)
* fixed commit branch * fixes after yarn upgrade
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
# Class: AuthService
|
||||
|
||||
Can authenticate a user based on email password combination
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `TransactionBaseService`<[`AuthService`](AuthService.md)\>
|
||||
@@ -26,7 +24,7 @@ TransactionBaseService<AuthService\>.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:25](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L25)
|
||||
[services/auth.ts:25](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L25)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -56,7 +54,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:23](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L23)
|
||||
[services/auth.ts:23](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
@@ -70,7 +68,7 @@ TransactionBaseService.manager\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:20](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L20)
|
||||
[services/auth.ts:20](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
@@ -84,7 +82,7 @@ TransactionBaseService.transactionManager\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:21](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L21)
|
||||
[services/auth.ts:21](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +92,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:22](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L22)
|
||||
[services/auth.ts:22](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L22)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -102,10 +100,6 @@ ___
|
||||
|
||||
▸ `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 |
|
||||
@@ -117,23 +111,21 @@ transaction manager is created.
|
||||
|
||||
| Name | Type | 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 |
|
||||
| `work` | (`transactionManager`: `EntityManager`) => `Promise`<`TResult`\> | |
|
||||
| `isolationOrErrorHandler?` | `IsolationLevel` \| (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | |
|
||||
| `maybeErrorHandlerOrDontFail?` | (`error`: `TError`) => `Promise`<`void` \| `TResult`\> | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`TResult`\>
|
||||
|
||||
the result of the transactional work
|
||||
|
||||
#### Inherited from
|
||||
|
||||
TransactionBaseService.atomicPhase\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[interfaces/transaction-base-service.ts:53](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/interfaces/transaction-base-service.ts#L53)
|
||||
[interfaces/transaction-base-service.ts:53](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/interfaces/transaction-base-service.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
@@ -141,27 +133,20 @@ ___
|
||||
|
||||
▸ **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 |
|
||||
| :------ | :------ | :------ |
|
||||
| `email` | `string` | the email of the user |
|
||||
| `password` | `string` | the password of the user |
|
||||
| `email` | `string` | |
|
||||
| `password` | `string` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`AuthenticateResult`\>
|
||||
|
||||
success: whether authentication succeeded
|
||||
user: the user document if authentication succeded
|
||||
error: a string with the error message
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:98](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L98)
|
||||
[services/auth.ts:98](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L98)
|
||||
|
||||
___
|
||||
|
||||
@@ -169,25 +154,19 @@ ___
|
||||
|
||||
▸ **authenticateAPIToken**(`token`): `Promise`<`AuthenticateResult`\>
|
||||
|
||||
Authenticates a given user with an API token
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `token` | `string` | the api_token of the user to authenticate |
|
||||
| `token` | `string` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`AuthenticateResult`\>
|
||||
|
||||
success: whether authentication succeeded
|
||||
user: the user document if authentication succeded
|
||||
error: a string with the error message
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:55](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L55)
|
||||
[services/auth.ts:55](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
@@ -195,27 +174,20 @@ ___
|
||||
|
||||
▸ **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 |
|
||||
| :------ | :------ | :------ |
|
||||
| `email` | `string` | the email of the user |
|
||||
| `password` | `string` | the password of the user |
|
||||
| `email` | `string` | |
|
||||
| `password` | `string` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`AuthenticateResult`\>
|
||||
|
||||
success: whether authentication succeeded
|
||||
user: the user document if authentication succeded
|
||||
error: a string with the error message
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:147](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L147)
|
||||
[services/auth.ts:147](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L147)
|
||||
|
||||
___
|
||||
|
||||
@@ -223,24 +195,20 @@ ___
|
||||
|
||||
▸ `Protected` **comparePassword_**(`password`, `hash`): `Promise`<`boolean`\>
|
||||
|
||||
Verifies if a password is valid given the provided password hash
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `password` | `string` | the raw password to check |
|
||||
| `hash` | `string` | the hash to compare against |
|
||||
| `password` | `string` | |
|
||||
| `hash` | `string` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`boolean`\>
|
||||
|
||||
the result of the comparison
|
||||
|
||||
#### Defined in
|
||||
|
||||
[services/auth.ts:39](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/services/auth.ts#L39)
|
||||
[services/auth.ts:39](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/services/auth.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
@@ -264,7 +232,7 @@ TransactionBaseService.shouldRetryTransaction\_
|
||||
|
||||
#### Defined in
|
||||
|
||||
[interfaces/transaction-base-service.ts:34](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/interfaces/transaction-base-service.ts#L34)
|
||||
[interfaces/transaction-base-service.ts:34](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/interfaces/transaction-base-service.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -288,4 +256,4 @@ TransactionBaseService.withTransaction
|
||||
|
||||
#### Defined in
|
||||
|
||||
[interfaces/transaction-base-service.ts:16](https://github.com/medusajs/medusa/blob/ae5c88b89/packages/medusa/src/interfaces/transaction-base-service.ts#L16)
|
||||
[interfaces/transaction-base-service.ts:16](https://github.com/medusajs/medusa/blob/32b066d92/packages/medusa/src/interfaces/transaction-base-service.ts#L16)
|
||||
|
||||
Reference in New Issue
Block a user