Skip to content

BusinessUnitModule

Module in @evolve-framework/commercetools

The B2B company account on commercetools: businessUnit and businessUnits, and the mutations managing a unit's addresses, its default address and its associates.

import { BusinessUnitModule } from "@evolve-framework/commercetools";

Serves the Business units part of the GraphQL API: businessUnit, businessUnits, businessUnitAddressCreate, businessUnitAddressDelete, businessUnitAddressUpdate, businessUnitAssociateActivate, businessUnitAssociateDeactivate, businessUnitAssociateInvite, businessUnitAssociateRemove, businessUnitAssociateRolesUpdate, businessUnitDefaultAddressUpdate, businessUnitSwitch.

new BusinessUnitModule(options?: BusinessUnitModuleConfig)
OptionTypeDescription
roleCapabilities?RoleCapabilityOverrides

Override the framework's default role -> capability mapping, keyed by associate-role key. Overrides win over the shipped defaults, which in turn win over capabilities derived from commercetools role permissions.

customTypes?Partial<Pick<CustomTypeKeys, "address">>

Key of the custom type this project has provisioned for an address. Only needed when addresses carry a name.

Extends AbstractModule<CommercetoolsLoaderContext>.

The same module on medusa and sfcc.