CustomerModule
The signed-in customer on commercetools: customer and customerExists, registration and deletion, and the mutations for addresses, default addresses, personal details, email and notification preferences.
import { CustomerModule } from "@evolve-framework/commercetools";Serves the Customer part of the GraphQL API: customer, customerExists, customerAddressCreate, customerAddressDelete, customerAddressUpdate, customerCreate, customerDefaultAddressUpdate, customerDelete, customerEmailUpdate, customerInformationUpdate, customerNotificationPreferencesUpdate, customerPersonalDetailsUpdate.
new CustomerModule(options: { config: CustomerModuleConfig; customTypes: CustomerCustomTypeKeys; })| Option | Type | Description |
|---|---|---|
config | CustomerModuleConfig | The commercetools project, auth URL and user API client that customer tokens are requested from: registration signs the new customer in, and deleting a customer starts a guest session in its place. |
customTypes | CustomerCustomTypeKeys | Keys of the custom types this project has provisioned for a customer and, when addresses carry a name, for an address. |
CustomerModuleConfig5The fields of config.
| Field | Type | Description |
|---|---|---|
CTP_PROJECT_KEY | string | |
CTP_AUTH_URL | string | |
CTP_USER_CLIENT_ID? | string | |
CTP_USER_CLIENT_SECRET? | string | |
CTP_USER_SCOPES? | string[] | Falls back to |
Extends AbstractModule<CommercetoolsLoaderContext>.

