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
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Provides layer to manipulate customers.
## Constructors
#### constructor
## constructor
`**new CustomerService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Provides layer to manipulate customers.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -141,19 +141,39 @@ Provides layer to manipulate customers.
}
]} />
___
## 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
#### addAddress
### addAddress
`**addAddress**(customerId, address): Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -176,7 +196,7 @@ Provides layer to manipulate customers.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;
@@ -194,7 +214,7 @@ Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;
___
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -202,7 +222,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={[
{
@@ -225,7 +245,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -257,7 +277,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -275,13 +295,13 @@ Promise&#60;TResult&#62;
___
#### count
### count
`**count**(): Promise&#60;number&#62;`
Return the total number of documents in database
##### Returns
#### Returns
Promise&#60;number&#62;
@@ -299,7 +319,7 @@ Promise&#60;number&#62;
___
#### create
### create
`**create**(customer): Promise&#60;[Customer](Customer.mdx)&#62;`
@@ -308,7 +328,7 @@ e.g. to login and view order history, etc. If a password is provided the
customer will automatically get an account, otherwise the customer is just
used to hold details of customers.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -322,7 +342,7 @@ used to hold details of customers.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -340,13 +360,13 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### delete
### delete
`**delete**(customerId): Promise&#60;void \| [Customer](Customer.mdx)&#62;`
Deletes a customer from a given customer id.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -360,7 +380,7 @@ Deletes a customer from a given customer id.
}
]} />
##### Returns
#### Returns
Promise&#60;void \| [Customer](Customer.mdx)&#62;
@@ -378,7 +398,7 @@ Promise&#60;void \| [Customer](Customer.mdx)&#62;
___
#### generateResetPasswordToken
### generateResetPasswordToken
`**generateResetPasswordToken**(customerId): Promise&#60;string&#62;`
@@ -388,7 +408,7 @@ The token will be signed with the customer's 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={[
{
@@ -402,7 +422,7 @@ which is always 15 minutes.
}
]} />
##### Returns
#### Returns
Promise&#60;string&#62;
@@ -420,13 +440,13 @@ Promise&#60;string&#62;
___
#### hashPassword\_
### hashPassword\_
`**hashPassword_**(password): Promise&#60;string&#62;`
Hashes a password
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -440,7 +460,7 @@ Hashes a password
}
]} />
##### Returns
#### Returns
Promise&#60;string&#62;
@@ -458,11 +478,11 @@ Promise&#60;string&#62;
___
#### list
### list
`**list**(selector?, config?): Promise&#60;[Customer](Customer.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -485,7 +505,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)[]&#62;
@@ -503,11 +523,11 @@ Promise&#60;[Customer](Customer.mdx)[]&#62;
___
#### listAndCount
### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Customer](Customer.mdx)[], number]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -530,7 +550,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[[Customer](Customer.mdx)[], number]&#62;
@@ -548,11 +568,11 @@ Promise&#60;[[Customer](Customer.mdx)[], number]&#62;
___
#### listByEmail
### listByEmail
`**listByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -575,7 +595,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)[]&#62;
@@ -593,11 +613,11 @@ Promise&#60;[Customer](Customer.mdx)[]&#62;
___
#### removeAddress
### removeAddress
`**removeAddress**(customerId, addressId): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -620,7 +640,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -638,13 +658,13 @@ Promise&#60;void&#62;
___
#### retrieve
### retrieve
`**retrieve**(customerId, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
Gets a customer by id.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -667,7 +687,7 @@ Gets a customer by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -685,13 +705,13 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieveByEmail
### retrieveByEmail
`**retrieveByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
Gets a registered customer by email.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -714,7 +734,7 @@ Gets a registered customer by email.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -734,13 +754,13 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieveByPhone
### retrieveByPhone
`**retrieveByPhone**(phone, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
Gets a customer by phone.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -763,7 +783,7 @@ Gets a customer by phone.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -781,11 +801,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieveRegisteredByEmail
### retrieveRegisteredByEmail
`**retrieveRegisteredByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -808,7 +828,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -826,11 +846,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieveUnregisteredByEmail
### retrieveUnregisteredByEmail
`**retrieveUnregisteredByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -853,7 +873,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -871,11 +891,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieve\_
### retrieve\_
`Private **retrieve_**(selector, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -898,7 +918,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -916,11 +936,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -934,7 +954,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -952,13 +972,13 @@ ___
___
#### update
### update
`**update**(customerId, update): Promise&#60;[Customer](Customer.mdx)&#62;`
Updates a customer.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -981,7 +1001,7 @@ Updates a customer.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -999,11 +1019,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### updateAddress
### updateAddress
`**updateAddress**(customerId, addressId, address): Promise&#60;[Address](Address.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1035,7 +1055,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Address](Address.mdx)&#62;
@@ -1053,13 +1073,13 @@ Promise&#60;[Address](Address.mdx)&#62;
___
#### updateBillingAddress\_
### updateBillingAddress\_
`**updateBillingAddress_**(customer, addressOrId): Promise&#60;void&#62;`
Updates the customers' billing address.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1082,7 +1102,7 @@ Updates the customers' billing address.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -1100,11 +1120,11 @@ Promise&#60;void&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [CustomerService](CustomerService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1118,7 +1138,7 @@ ___
}
]} />
##### Returns
#### Returns
[CustomerService](CustomerService.mdx)