Functions
fetchAll
- fetchAll(token: string, options?: QueryOptions): Promise<PaginatedCustomerResult>
-
Parameters
-
token: string
-
Default value options: QueryOptions = {}
Returns Promise<PaginatedCustomerResult>
findById
- findById(customerId: string, token: string): Promise<Customer>
-
Parameters
-
customerId: string
-
token: string
Returns Promise<Customer>
login
- login(email: string, password: string, token?: undefined | string): Promise<TokenizedSignInResult>
-
Parameters
-
email: string
-
password: string
-
Optional token: undefined | string
Returns Promise<TokenizedSignInResult>
loginAnonymously
- loginAnonymously(): Promise<AnonymousSignInResult>
-
Returns Promise<AnonymousSignInResult>
obtainTokenForLoggedInCustomer
- obtainTokenForLoggedInCustomer(email: string, password: string, loginResult: CustomerSignInResult): Promise<TokenizedSignInResult>
-
Parameters
-
email: string
-
password: string
-
loginResult: CustomerSignInResult
Returns Promise<TokenizedSignInResult>
register
- register(customerData: CustomerSignupDraft, token?: undefined | string): Promise<TokenizedSignInResult>
-
Parameters
-
customerData: CustomerSignupDraft
-
Optional token: undefined | string
Returns Promise<TokenizedSignInResult>
remove
- remove(customerId: string, customerVersion: number, token: string): Promise<Customer>
-
Parameters
-
customerId: string
-
customerVersion: number
-
token: string
Returns Promise<Customer>
update
- update(customerId: string, customerVersion: number, actions: UpdateAction[], token: string): Promise<Customer>
-
Parameters
-
customerId: string
-
customerVersion: number
-
actions: UpdateAction[]
-
token: string
Returns Promise<Customer>