docs: TSDoc + reference of fulfillment service (#5761)

This commit is contained in:
Shahed Nasser
2023-11-29 11:58:08 +00:00
committed by GitHub
parent 8f25ed8a10
commit f802e2460f
1479 changed files with 30259 additions and 16135 deletions

View File

@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Provides layer to manipulate users.
## Constructors
#### constructor
## constructor
`**new UserService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Provides layer to manipulate users.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -159,15 +159,35 @@ Provides layer to manipulate users.
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -175,7 +195,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -198,7 +218,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -230,7 +250,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -248,14 +268,14 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(user, password): Promise&#60;[User](User.mdx)&#62;`
Creates a user with username being validated.
Fails if email is not a valid format.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -278,7 +298,7 @@ Fails if email is not a valid format.
}
]} />
##### Returns
#### Returns
Promise&#60;[User](User.mdx)&#62;
@@ -296,13 +316,13 @@ Promise&#60;[User](User.mdx)&#62;
___
#### delete
### delete
`**delete**(userId): Promise&#60;void&#62;`
Deletes a user from a given user id.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -316,7 +336,7 @@ Deletes a user from a given user id.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -334,7 +354,7 @@ Promise&#60;void&#62;
___
#### generateResetPasswordToken
### generateResetPasswordToken
`**generateResetPasswordToken**(userId): Promise&#60;string&#62;`
@@ -344,7 +364,7 @@ The token will be signed with the users current password hash as a secret
a long side a payload with userId and the expiry time for the token, which
is always 15 minutes.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -358,7 +378,7 @@ is always 15 minutes.
}
]} />
##### Returns
#### Returns
Promise&#60;string&#62;
@@ -376,13 +396,13 @@ Promise&#60;string&#62;
___
#### hashPassword\_
### hashPassword\_
`**hashPassword_**(password): Promise&#60;string&#62;`
Hashes a password
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -396,7 +416,7 @@ Hashes a password
}
]} />
##### Returns
#### Returns
Promise&#60;string&#62;
@@ -414,11 +434,11 @@ Promise&#60;string&#62;
___
#### list
### list
`**list**(selector, config?): Promise&#60;[User](User.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -441,7 +461,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[User](User.mdx)[]&#62;
@@ -459,14 +479,14 @@ Promise&#60;[User](User.mdx)[]&#62;
___
#### retrieve
### retrieve
`**retrieve**(userId, config?): Promise&#60;[User](User.mdx)&#62;`
Gets a user by id.
Throws in case of DB Error and if user was not found.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -489,7 +509,7 @@ Throws in case of DB Error and if user was not found.
}
]} />
##### Returns
#### Returns
Promise&#60;[User](User.mdx)&#62;
@@ -507,14 +527,14 @@ Promise&#60;[User](User.mdx)&#62;
___
#### retrieveByApiToken
### retrieveByApiToken
`**retrieveByApiToken**(apiToken, relations?): Promise&#60;[User](User.mdx)&#62;`
Gets a user by api token.
Throws in case of DB Error and if user was not found.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -537,7 +557,7 @@ Throws in case of DB Error and if user was not found.
}
]} />
##### Returns
#### Returns
Promise&#60;[User](User.mdx)&#62;
@@ -555,14 +575,14 @@ Promise&#60;[User](User.mdx)&#62;
___
#### retrieveByEmail
### retrieveByEmail
`**retrieveByEmail**(email, config?): Promise&#60;[User](User.mdx)&#62;`
Gets a user by email.
Throws in case of DB Error and if user was not found.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -585,7 +605,7 @@ Throws in case of DB Error and if user was not found.
}
]} />
##### Returns
#### Returns
Promise&#60;[User](User.mdx)&#62;
@@ -603,7 +623,7 @@ Promise&#60;[User](User.mdx)&#62;
___
#### setPassword\_
### setPassword\_
`**setPassword_**(userId, password): Promise&#60;[User](User.mdx)&#62;`
@@ -611,7 +631,7 @@ Sets a password for a user
Fails if no user exists with userId and if the hashing of the new
password does not work.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -634,7 +654,7 @@ password does not work.
}
]} />
##### Returns
#### Returns
Promise&#60;[User](User.mdx)&#62;
@@ -652,11 +672,11 @@ Promise&#60;[User](User.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -670,7 +690,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -688,13 +708,13 @@ ___
___
#### update
### update
`**update**(userId, update): Promise&#60;[User](User.mdx)&#62;`
Updates a user.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -717,7 +737,7 @@ Updates a user.
}
]} />
##### Returns
#### Returns
Promise&#60;[User](User.mdx)&#62;
@@ -735,11 +755,11 @@ Promise&#60;[User](User.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [UserService](UserService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -753,7 +773,7 @@ ___
}
]} />
##### Returns
#### Returns
[UserService](UserService.mdx)