docs: TSDoc + reference of fulfillment service (#5761)
This commit is contained in:
@@ -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<[Customer](Customer.mdx) \| [Address](Address.mdx)>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -176,7 +196,7 @@ Provides layer to manipulate customers.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx) \| [Address](Address.mdx)>
|
||||
|
||||
@@ -194,7 +214,7 @@ Promise<[Customer](Customer.mdx) \| [Address](Address.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### atomicPhase\_
|
||||
### atomicPhase\_
|
||||
|
||||
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>`
|
||||
|
||||
@@ -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<TResult>
|
||||
|
||||
@@ -275,13 +295,13 @@ Promise<TResult>
|
||||
|
||||
___
|
||||
|
||||
#### count
|
||||
### count
|
||||
|
||||
`**count**(): Promise<number>`
|
||||
|
||||
Return the total number of documents in database
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<number>
|
||||
|
||||
@@ -299,7 +319,7 @@ Promise<number>
|
||||
|
||||
___
|
||||
|
||||
#### create
|
||||
### create
|
||||
|
||||
`**create**(customer): Promise<[Customer](Customer.mdx)>`
|
||||
|
||||
@@ -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<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -340,13 +360,13 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### delete
|
||||
### delete
|
||||
|
||||
`**delete**(customerId): Promise<void \| [Customer](Customer.mdx)>`
|
||||
|
||||
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<void \| [Customer](Customer.mdx)>
|
||||
|
||||
@@ -378,7 +398,7 @@ Promise<void \| [Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### generateResetPasswordToken
|
||||
### generateResetPasswordToken
|
||||
|
||||
`**generateResetPasswordToken**(customerId): Promise<string>`
|
||||
|
||||
@@ -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<string>
|
||||
|
||||
@@ -420,13 +440,13 @@ Promise<string>
|
||||
|
||||
___
|
||||
|
||||
#### hashPassword\_
|
||||
### hashPassword\_
|
||||
|
||||
`**hashPassword_**(password): Promise<string>`
|
||||
|
||||
Hashes a password
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -440,7 +460,7 @@ Hashes a password
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<string>
|
||||
|
||||
@@ -458,11 +478,11 @@ Promise<string>
|
||||
|
||||
___
|
||||
|
||||
#### list
|
||||
### list
|
||||
|
||||
`**list**(selector?, config?): Promise<[Customer](Customer.mdx)[]>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -485,7 +505,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)[]>
|
||||
|
||||
@@ -503,11 +523,11 @@ Promise<[Customer](Customer.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
#### listAndCount
|
||||
### listAndCount
|
||||
|
||||
`**listAndCount**(selector, config?): Promise<[[Customer](Customer.mdx)[], number]>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -530,7 +550,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[[Customer](Customer.mdx)[], number]>
|
||||
|
||||
@@ -548,11 +568,11 @@ Promise<[[Customer](Customer.mdx)[], number]>
|
||||
|
||||
___
|
||||
|
||||
#### listByEmail
|
||||
### listByEmail
|
||||
|
||||
`**listByEmail**(email, config?): Promise<[Customer](Customer.mdx)[]>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -575,7 +595,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)[]>
|
||||
|
||||
@@ -593,11 +613,11 @@ Promise<[Customer](Customer.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
#### removeAddress
|
||||
### removeAddress
|
||||
|
||||
`**removeAddress**(customerId, addressId): Promise<void>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -620,7 +640,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<void>
|
||||
|
||||
@@ -638,13 +658,13 @@ Promise<void>
|
||||
|
||||
___
|
||||
|
||||
#### retrieve
|
||||
### retrieve
|
||||
|
||||
`**retrieve**(customerId, config?): Promise<[Customer](Customer.mdx)>`
|
||||
|
||||
Gets a customer by id.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -667,7 +687,7 @@ Gets a customer by id.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -685,13 +705,13 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### retrieveByEmail
|
||||
### retrieveByEmail
|
||||
|
||||
`**retrieveByEmail**(email, config?): Promise<[Customer](Customer.mdx)>`
|
||||
|
||||
Gets a registered customer by email.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -714,7 +734,7 @@ Gets a registered customer by email.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -734,13 +754,13 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### retrieveByPhone
|
||||
### retrieveByPhone
|
||||
|
||||
`**retrieveByPhone**(phone, config?): Promise<[Customer](Customer.mdx)>`
|
||||
|
||||
Gets a customer by phone.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -763,7 +783,7 @@ Gets a customer by phone.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -781,11 +801,11 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### retrieveRegisteredByEmail
|
||||
### retrieveRegisteredByEmail
|
||||
|
||||
`**retrieveRegisteredByEmail**(email, config?): Promise<[Customer](Customer.mdx)>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -808,7 +828,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -826,11 +846,11 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### retrieveUnregisteredByEmail
|
||||
### retrieveUnregisteredByEmail
|
||||
|
||||
`**retrieveUnregisteredByEmail**(email, config?): Promise<[Customer](Customer.mdx)>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -853,7 +873,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -871,11 +891,11 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### retrieve\_
|
||||
### retrieve\_
|
||||
|
||||
`Private **retrieve_**(selector, config?): Promise<[Customer](Customer.mdx)>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -898,7 +918,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -916,11 +936,11 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### 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<[Customer](Customer.mdx)>`
|
||||
|
||||
Updates a customer.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -981,7 +1001,7 @@ Updates a customer.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Customer](Customer.mdx)>
|
||||
|
||||
@@ -999,11 +1019,11 @@ Promise<[Customer](Customer.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### updateAddress
|
||||
### updateAddress
|
||||
|
||||
`**updateAddress**(customerId, addressId, address): Promise<[Address](Address.mdx)>`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1035,7 +1055,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<[Address](Address.mdx)>
|
||||
|
||||
@@ -1053,13 +1073,13 @@ Promise<[Address](Address.mdx)>
|
||||
|
||||
___
|
||||
|
||||
#### updateBillingAddress\_
|
||||
### updateBillingAddress\_
|
||||
|
||||
`**updateBillingAddress_**(customer, addressOrId): Promise<void>`
|
||||
|
||||
Updates the customers' billing address.
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1082,7 +1102,7 @@ Updates the customers' billing address.
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
Promise<void>
|
||||
|
||||
@@ -1100,11 +1120,11 @@ Promise<void>
|
||||
|
||||
___
|
||||
|
||||
#### withTransaction
|
||||
### withTransaction
|
||||
|
||||
`**withTransaction**(transactionManager?): [CustomerService](CustomerService.mdx)`
|
||||
|
||||
##### Parameters
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1118,7 +1138,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
##### Returns
|
||||
#### Returns
|
||||
|
||||
[CustomerService](CustomerService.mdx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user