OrderApprovalModule
B2B order approval on commercetools: approving or rejecting an order that needs it, and reading, creating, changing and turning off the approval rules of a business unit.
Constructed without options it serves the schema only, for a shop without
approvals whose storefront still selects them: Order.approval is null,
writing a rule is refused, and nothing is checked at startup.
import { OrderApprovalModule } from "@evolve-framework/commercetools";Serves the Order approval part of the GraphQL API: orderApprovalRuleCreate, orderApprovalRuleDelete, orderApprovalRuleStatusUpdate, orderApprovalRuleUpdate, orderApprovalStatusUpdate.
new OrderApprovalModule(options?: OrderApprovalModuleOptions)| Option | Type | Description |
|---|---|---|
clientFactory | ClientFactory | The commercetools client its requests to the project go through, built
with |
customTypes | ApprovalRuleCustomTypes | Keys of the project's custom types for an approval rule, which stores the condition a rule was built from, and for an order, whose fields a custom-field clause names. Required: the framework has no key of its own. |
Extends AbstractModule<CommercetoolsLoaderContext>.

