Skip to content

commercetools API

Everything the package exports, by the path you import it from. Open an export for its signature and options.

@evolve-framework/commercetools

The modules, the commercetools client and its configuration, the request context and dataloaders, the subscription handler that turns commercetools events into internal events, the one that keeps an order's payment state in line with its payments, and the one that tells a buyer a quote is ready.

Classes

ApiExtensionModulecommercetools API extensions as a module: the extensions, the client they read with, and the route they answer on, composed like every other capability rather than wired by hand in each project.
import { ApiExtensionModule } from "@evolve-framework/commercetools";

It is transport-free at its core. getHttpConfig() mounts it on the subgraph's own Fastify app, but dispatch and handle are public, so the same module — the same extensions, constructed the same way — is what a serverless entry point hands to toWebHandler or toLambdaHandler. A function that serves extensions therefore constructs this module alone rather than the whole composition, and carries no GraphQL schema into its cold start.

init() is a no-op here, but a serverless entry point must still call it: there is no Application in a function to do it, and a later version of this module may have something to do in it.

Extends AbstractModule<unknown>

new ApiExtensionModule(options: ApiExtensionModuleOptions)
OptionTypeDescription
extensionsApiExtensions

The extensions to run, keyed by resource and action.

clientFactoryClientFactory

Handed to every extension as context.client / context.clientFactory.

secret?string

The bearer token commercetools is configured to send. Absent means the route accepts anything, which is only safe where something in front of it authenticates.

path?string

Route to mount on. Defaults to /api/extension.

timeout?number

Milliseconds an extension is given before context.signal aborts.

MethodDescription
dispatch(input: ExtensionInput): Promise<ExtensionOutput>No auth and no HTTP: run the extensions for this input, collect their actions.
handle( request: ApiExtensionHttpRequest, ): Promise<ApiExtensionHttpResponse>The secret check, the status codes and the response body.
getTriggers(): ApiExtensionTrigger[]The triggers these extensions have to be registered for.
AuthModuleSign-in for commercetools: the guest session, login and logout, password reset and update, and token refresh mutations.
import { AuthModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new AuthModule(options: WithClientFactory & { config: AuthModuleConfig; customTypes?: Pick<CustomTypeKeys, "order"> | undefined; payments?: PaymentRegistry | undefined; })
BackInStockModule"Mail me when it is back": shoppers sign up for a sold-out variant, are sent a confirmation with a link to withdraw, and createBackInStockHandler mails them once commercetools reports stock.
import { BackInStockModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new BackInStockModule(options: WithClientFactory & { notificationClient?: UserNotificationClient | undefined; })
BusinessUnitModuleThe 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";

Extends AbstractModule<CommercetoolsLoaderContext>

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.

CartModuleThe active cart on commercetools: cart, creating one, adding, updating and removing lines, discount codes, and the cart's B2B fields.
import { CartModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new CartModule(options: CartModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

customTypesCartCustomTypeKeys

Keys of the custom types this project has provisioned for a cart and a line item. Required: a missing one is a configuration error, and the framework has no key of its own to fall back on. The address key is needed only when a cart address carries a name.

minimumQuantityAttribute?string

The variant attribute holding a minimum order quantity. A line asking for less is refused as BELOW_MINIMUM_QUANTITY. Omit it when there is none.

maximumQuantityAttribute?string

The variant attribute holding a maximum per line. A line that would hold more is refused as ABOVE_MAXIMUM_QUANTITY. Omit it when there is none.

packSizeAttribute?string

The variant attribute holding a pack size. A line that would hold a quantity that is not a whole number of packs is refused as NOT_A_MULTIPLE_OF_PACK_SIZE. Omit it when nothing is sold in packs.

payments?PaymentRegistry

The payment providers checkout can use. Required for the availablePaymentMethods resolver to return anything.

vatNumberCheck?VatNumberCheck

How cartSetVatNumber checks a VAT number against the register, such as ViesClient.check from @evolve-framework/vies. Without one a number is stored unverified, and never makes a cart reverse-charged.

nameNewCarts?boolean

Name every cart created without one after the day it was made, through cartCreate or by adding the first line. Set it with MultipleCartModule: the name is written to the cart type's name field, and commercetools refuses the cart where the type has none.

CatalogModuleThe catalog on commercetools: products by id, slug or SKU, categories, a category page by its path, and productSearch.
import { CatalogModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new CatalogModule(options: CatalogModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

search?SearchProvider

Where product search is answered from. Defaults to commercetools' own product search.

More

Any search engine plugs in here by wrapping its adapter:

new CatalogModule({
	clientFactory,
	search: new DocumentSearchProvider({
		adapter: new AlgoliaQueryAdapter({ appId, searchApiKey }),
	}),
});
variantDimensions?VariantDimensionsConfig

Which attributes the variants of a product vary on, keyed by product type key. A project knows its own product types, so pass them here; omitting it falls back to the demo product types.

searchCacheTtl?number

How long commercetools' own product search responses are cached, in milliseconds. Omitted or 0 sends every search to commercetools. A cached search can list a product for up to this long after it left the result set; its price and content are always current. Ignored with search.

identifierAttributes?IdentifierAttributes

The attributes a variant's EAN, MPN and HS code are read from. Default to attributes named ean, mpn and hscode.

productKinds?ProductKindsConfig

Which product types, or which of their variants, are delivered digitally, keyed by product type key. Every other variant is physical.

stock?StockOptions

How a variant's stock is worded: the threshold under which the quantity left is shown, and whether an out-of-stock variant with a restock date can be pre-ordered.

accessoryAttributes?AccessoryAttributes

The variant attributes the accessories, spare parts, complementary products, bundle extras (sets of product references) and sales unit are read from. Default to accessories, spareParts, complementaryProducts, bundleProducts and salesUnit.

lowestPriceField?string

The Money custom field on a price that holds the lowest price of the 30 days before its discount, as EU price-indication rules require beside a reduction. Set by whatever sets the discount. Defaults to lowestPrice.

minimumQuantityAttribute?string

The variant attributes holding a minimum order quantity, a maximum per line and a pack size, for ProductVariant.quantityRule. Give them the names CartModule is given, so the stepper allows what the cart accepts. Without any of them, quantityRule is null.

maximumQuantityAttribute?string
packSizeAttribute?string
CheckoutModulePlacing an order on commercetools: orderPlace, and with revision (on by default) orderRevise and orderCancel for an unpaid order.
import { CheckoutModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new CheckoutModule(options: CheckoutModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

payments?PaymentRegistry

The payment providers checkout can use, which is what orderPlace reads an order's payment block from.

revision?boolean

Compose orderRevise and orderCancel, which reopen and close an unpaid order. On by default: commercetools rebuilds a cart from an order in one call. An engine that cannot do that composes them out rather than answering one of them badly.

orderCreationStrategy?"before-payment" | "after-payment"

When the order is created relative to the payment. Under payment first the money moves against a cart and the order is created from the provider's callback, so nothing exists to gate or to convert a quote into.

quotes?boolean

Compose paying for a quote. On by default. Incompatible with payment first, which is refused at boot.

approvals?boolean

Declare that this deployment composes OrderApprovalModule. A module cannot see its siblings, so this is stated rather than detected; it exists so payment first and approvals cannot be configured together.

ClientContextA storefront client's commercetools session: the federated token it carries, the signed-in customer and business context load() reads for that token, and the clients to call commercetools as the token's holder (getClient) or as an associate of the customer's business unit (getAssociateClient).
import { ClientContext } from "@evolve-framework/commercetools";
new ClientContext(storeContext: StoreContext, loader: ClientContextLoader)
OptionTypeDescription
getToken() => Promise<TokenInfo | undefined>
getClientInfo(storeContext: StoreContext, token: FederatedToken) => Promise<ClientContextInfo | undefined>
getSystemRequestBuilder() => ByProjectKeyRequestBuilder
createClient(token: FederatedToken) => Promise<ByProjectKeyRequestBuilder>
MethodDescription
setAccessToken(token: string): voidSet the access token on the client context.
getProductProjectionParams(): ProductProjectionQueryArgs
hasToken(): boolean
isAuthenticated(): boolean
setCommercetoolsToken(token: TokenInfo): void
hasBusinessContext(): boolean
setBusinessContext( businessUnitKey: string, storeKey: string | undefined, ): void
getClient(): Promise<ByProjectKeyRequestBuilder>Return the active request builder using the client credentials, so the all requests will be made as the client (with their scopes)
getAssociateClient(): AssociateRequestBuilder
load(): Promise<void>Load the customer information.
ClientFactoryBuilds commercetools request builders for one project: a system builder from the API client's credentials and a user builder from a shopper's federated token.
import { ClientFactory } from "@evolve-framework/commercetools";
new ClientFactory()
MethodDescription
close(): voidClears the cached commercetools client.
getSystemRequestBuilder(): ByProjectKeyRequestBuilderA request builder authorized with the API client's credentials.
getUserRequestBuilder( token: FederatedToken, ): UserRequestBuilderA request builder authorized with the shopper's commercetools access token.
CommercetoolsClientLoaderThe ClientContextLoader for commercetools: anonymous sessions from the TokenManager and request builders from the ClientFactory.
import { CommercetoolsClientLoader } from "@evolve-framework/commercetools";
new CommercetoolsClientLoader(clientFactory: ClientFactory, tokenManager: TokenManager)
MethodDescription
getToken(): Promise<TokenInfo | undefined>
getClientInfo( storeContext: StoreContext, token: FederatedToken, ): Promise<ClientContextInfo | undefined>
createClient( token: FederatedToken, ): Promise<UserRequestBuilder>
getSystemRequestBuilder(): ByProjectKeyRequestBuilder
CommercetoolsConfigThe commercetools project a service talks to, and the API clients it uses: one for the service itself, and one for the anonymous and customer tokens a storefront's shoppers get.
import { CommercetoolsConfig } from "@evolve-framework/commercetools";

Extends BaseConfig

new CommercetoolsConfig()
CommercetoolsErrorA 4xx answer from commercetools, with its status code, its error objects and the request that caused it, body redacted.
import { CommercetoolsError } from "@evolve-framework/commercetools";

Extends Error

new CommercetoolsError(err: ErrorResponse, originalRequest: ClientRequest | undefined)
CommercetoolsSearchProduct search, with facets, and category search, answered by commercetools itself rather than an external index.
import { CommercetoolsSearch } from "@evolve-framework/commercetools";

Extends SearchProvider

new CommercetoolsSearch(ctApi: ByProjectKeyRequestBuilder, options?: CommercetoolsSearchOptions)
OptionTypeDescription
cacheTtl?number

How long a product search response is kept in the cache, in milliseconds. Omitted or 0 sends every search to commercetools.

MethodDescription
getFacetSchema(category: Category | undefined): Promise<FacetConfig>
CustomerModuleThe 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";

Extends AbstractModule<CommercetoolsLoaderContext>

new CustomerModule(options: { config: CustomerModuleConfig; customTypes: CustomerCustomTypeKeys; })
OptionTypeDescription
configCustomerModuleConfig

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.

customTypesCustomerCustomTypeKeys

Keys of the custom types this project has provisioned for a customer and, when addresses carry a name, for an address.

DeliveryOptionsModuleDelivery dates, time slots and pickup points on commercetools: listing them on the cart and choosing one, which sets the shipping method that charges for it, and reading the choice back on the order.
import { DeliveryOptionsModule } from "@evolve-framework/commercetools";

Extends AbstractModule<unknown>

new DeliveryOptionsModule(options: DeliveryOptionsModuleOptions)
OptionTypeDescription
customTypesPick<CustomTypeKeys, "order">

Key of the custom type this project has provisioned for a cart, the same one CartModule is given. It needs a deliverySlot String field, which holds the chosen slot, deliverySplit and requestedDeliveryDate String fields for the delivery preference, and a pickupPoint String field when pickup points are offered.

providerDeliveryOptionsProvider

Where the delivery dates and slots come from: shippingMethodSchedule(schedule) for the project's own shipping methods, or a carrier's API behind the same type.

pickupPoints?PickupPointProvider

Where pickup points come from: pickupPointList(points), or a carrier's location API behind the same type. Without it the cart offers none.

DocumentSearchProviderBridges any SearchQueryAdapter to the GraphQL layer.
import { DocumentSearchProvider } from "@evolve-framework/commercetools";

The commerce backend's own search (CommercetoolsSearch) queries the live catalog and returns live products, so it implements SearchProvider directly. Document-based engines return indexed documents instead, and this turns those into the same GraphQL shape — which keeps ProductDocument out of the resolver layer entirely.

Extends SearchProvider

new DocumentSearchProvider(options: DocumentSearchProviderOptions)
OptionTypeDescription
adapterSearchQueryAdapter<ProductDocument>
mappers?Record<string, DocumentGraphQLMapper>

Per document type. default handles types without an entry; omit it and an unknown type falls back to mapProductDocumentToGQL.

categoryMapper?CategoryGraphQLMapper

Override how matched categories are rendered.

InvoiceModuleA customer's and a business unit's invoices on commercetools, read off the payments that carry them.
import { InvoiceModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new InvoiceModule(options?: InvoiceModuleOptions)
OptionTypeDescription
payments?PaymentRegistry

The payment providers an invoice may be settled through. Without them an invoice offers no way to pay, which is the honest answer for a deployment that only reads invoices.

MultipleCartModuleSeveral named carts per customer on commercetools: creating, renaming and deleting a named cart, and choosing which is current.
import { MultipleCartModule } from "@evolve-framework/commercetools";

Extends AbstractModule<unknown>

new MultipleCartModule(options: MultipleCartModuleOptions)
OptionTypeDescription
customTypesMultipleCartCustomTypeKeys

Key of the custom type this project has provisioned for a cart. The same one CartModule is given, which is what verifies it: this module is composed alongside it and writes into the same cart/order type.

archiveCartsAfterDays?number

How many days a cart may go untouched before it is archived. Defaults to 60. commercetools deletes a cart itself after its deleteDaysAfterLastModification, so keep this below that.

OrderApprovalModuleB2B 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.
import { OrderApprovalModule } from "@evolve-framework/commercetools";

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.

Extends AbstractModule<CommercetoolsLoaderContext>

new OrderApprovalModule(options?: OrderApprovalModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

customTypesApprovalRuleCustomTypes

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.

OrderModulePlaced orders on commercetools, including orderByPublicId and orderBySignedLink for an order page reached without signing in.
import { OrderModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new OrderModule(options: OrderModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

payments?PaymentRegistry

The payment providers checkout can use. Required for the availablePaymentMethods resolver to return anything.

trackingUrls?Record<string, string>

Track & trace URLs by carrier name, each with a {trackingId} placeholder, such as { PostNL: "https://jouw.postnl.nl/track-and-trace/{trackingId}" }. A delivery by a carrier without one has no trackingUrl.

orderLinkSecret?string

The secret order links are signed with, the same one passed to createOrderLinkToken from @evolve-framework/core/order-link where the link is made. Without it orderBySignedLink answers null.

PaymentModulePaying on commercetools: paymentCreate, paymentDetailsSubmit and paymentCancel for a payment the provider's component continues, and Apple Pay merchant validation.
import { PaymentModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new PaymentModule(options: PaymentModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

customTypesPaymentCustomTypeKeys

Keys of the custom types this project has provisioned for a payment. Required: a missing one is a configuration error, and the framework has no key of its own to fall back on.

payments?PaymentRegistry

The payment providers checkout can use. Required for payment mutations to resolve a provider.

routePrefix?string

Optional path prefix to mount every provider's webhook/redirect routes under (e.g. /payments). Defaults to the app root, preserving the per-provider /<identifier>/… paths.

PaymentProviderModuleHosts a PaymentAdapter as a Domain Service — the server side of the remote bridge.
import { PaymentProviderModule } from "@evolve-framework/commercetools";

It serves no healthcheck of its own: compose HealthModule alongside it, with graphql: false since this service has no schema.

Extends AbstractModule<CommercetoolsLoaderContext>

new PaymentProviderModule(options: PaymentProviderModuleOptions)
OptionTypeDescription
adapterPaymentAdapter

The payment adapter to host. The module owns its lifecycle: init() initializes the adapter, and getHttpConfig() mounts its routes.

internalRoutes?boolean

Publish the request-level routes (/payment-methods, /create) so remote checkout services can reach this adapter over HTTP. Disable when checkout calls the adapter in-process. Defaults to true.

externalRoutes?boolean

Register the adapter's external routes (webhooks/redirects) via adapter.getRoutes(). Defaults to true.

secret?string

Shared secret required on the internal routes (/payment-methods, /create, ...). When set, remote checkout callers must present authorization: Bearer <secret>; construct the matching RemotePaymentAdapter/Remote(...) with the same secret. Only the internal routes are guarded — the adapter's public webhook/redirect routes stay open.

ProductReviewModuleProduct reviews on commercetools' own reviews: the approved ones and how their ratings spread on a product, and writing one from a delivered order line.
import { ProductReviewModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new ProductReviewModule(options?: ProductReviewModuleOptions)
OptionTypeDescription
customTypeKey?string

The review type with variantSku (String), fit (String), verifiedPurchase (Boolean), photoUrls (Set of String) and, with photos, photoIds (Set of String) fields. Without one, a review keeps only its rating, title and text.

photos?AttachmentStore

Where buyers upload a review's photos, such as storageAttachmentStore; a review takes the image types it accepts. Needs customTypeKey, which keeps their handles. Without one, a review takes no photos.

rejectedStateKey?string

The state a moderator moves a refused review to. Defaults to ReviewRejected.

QuoteModuleB2B quotes on commercetools: a buyer's quote requests and the quotes that answer them, requesting and cancelling one, replying to and declining a quote, and the quote fields on a business unit and an order.
import { QuoteModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new QuoteModule()
RemoteClientContextLoaderThe loader for the clientstomer context.
import { RemoteClientContextLoader } from "@evolve-framework/commercetools";
new RemoteClientContextLoader(endpoint: string, clientFactory: ClientFactoryInterface)
OptionTypeDescription
getSystemRequestBuilder() => ByProjectKeyRequestBuilder
getUserRequestBuilder(token: FederatedToken) => ByProjectKeyRequestBuilder
MethodDescription
getToken(): Promise<TokenInfo | undefined>Fetch a new anonymous commercetools token via the account service.
getClientInfo( storeContext: StoreContext, token: FederatedToken, ): Promise<ClientContextInfo | undefined>Retrieve the client context information for the provided token from the account service.
createClient( token: FederatedToken, ): Promise<UserRequestBuilder>
getSystemRequestBuilder(): ByProjectKeyRequestBuilder
ReturnModuleReturns on commercetools, for consumers and business units: requesting one for delivered lines of an order, with a reason per line, serial numbers and photos where they are needed, a refund method for a consumer and a restocking fee for a late business return; handing it in at a service point or having it collected; and withdrawing it while it has not left.
import { ReturnModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new ReturnModule(options: ReturnModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

customTypesPick<CustomTypeKeys, "order-return-item">

Key of the custom type the project has provisioned for return items (order-return-item). It needs reasonCode, returnStatus, returnRequest and, where returns are approved, returnDecision String fields.

carrierReturnCarrierProvider

Who carries returns back: demoReturnCarrier, or a carrier's API behind the same type. Its methods decide which shipping methods are offered.

reasons?ReturnReasonConfig[]

The reasons a buyer chooses from. Defaults to demoReturnReasons.

windowDays?number | null

Days after delivery a consumer's line can be returned. Defaults to 14, the withdrawal period EU law gives a consumer; null sets no deadline.

businessWindowDays?number | null

Days after delivery a business unit's line can be returned. No deadline by default: a late return costs the restocking fee instead.

restockingFee?RestockingFeeSetting | null

The fee withheld from a business unit's credit for a late return, the same for every unit. Defaults to 15% after 14 free days; null for none.

refundMethods?ReturnRefundMethodType[]

How a consumer's refund may be paid. Defaults to both methods.

returnAddress?BaseAddress

Where a buyer sends a return themselves; without it they cannot.

attachments?AttachmentStore

Where photos are kept; without one a return takes none.

serialNumberAttribute?string

The Boolean variant attribute that marks a device, whose return needs a serial number per unit. Without one no line asks for serial numbers.

messagePublisher?MessagePublisher

Where return-requested is published, for an ERP that approves returns. Its decisions come back as internal events this module handles.

origin?string

The origin of the events this module publishes. Defaults to commercetools.

SearchProviderThe product and category search CatalogModule answers its search queries with.
import { SearchProvider } from "@evolve-framework/commercetools";
new SearchProvider()
MethodDescription
searchProducts( context: ContextValue$1, args: SearchArgs, selection?: SearchSelection, ): Promise<SearchResult<Product>>
searchCategories( context: ContextValue$1, args: QueryCategoriesArgs, ): Promise<ProductCategoriesResult>
supportsCategorySearch(): booleanWhether searchCategories can answer.
maxResults(): number | undefinedThe most hits searchProducts can page to; undefined for no limit.
prefilterKeys( _context: ContextValue$1, _categoryId: string | undefined, ): Promise<string[] | undefined>The keys a prefilter can name when searchProducts lists this category, or undefined where the provider cannot tell and every key is passed on.
sortOrders(): ProductSortOrderType[]The sort orders searchProducts applies, in the order to offer them.
ShoppingListModuleShopping lists on commercetools: creating, updating and deleting a list and its lines, and reading lists, including the lists field on a customer and, for B2B, on a business unit.
import { ShoppingListModule } from "@evolve-framework/commercetools";

Extends AbstractModule<CommercetoolsLoaderContext>

new ShoppingListModule()
StoreContextThe store context indicates the current storefront context.
import { StoreContext } from "@evolve-framework/commercetools";
new StoreContext(args: StoreContextArgs, client: ByProjectKeyRequestBuilder)
OptionTypeDescription
storeKeystring
localestring
currencystring
MethodDescription
getProductProjectionParams(): ProductProjectionQueryArgs
getStore(): Promise<Store>
getDistributionChannelIdentifier(): Promise<ChannelResourceIdentifier | undefined>
getSupplyChannelIdentifier(): Promise<ChannelResourceIdentifier | undefined>
TokenManagerCreates, refreshes and revokes shopper tokens with commercetools' auth API: anonymous sessions, customer sign-in by password, and logout.
import { TokenManager } from "@evolve-framework/commercetools";
new TokenManager()
MethodDescription
configure(options: TokenManagerOptions): void
createAnonymousSession(): Promise<TokenInfo>
createCustomerSession( email: string, password: string, storeKey: string, ): Promise<TokenInfo>
refreshAccessToken(refreshToken: string): Promise<TokenInfo>
logout( token: string, type?: "access_token" | "refresh_token", ): Promise<boolean>

Functions

activeRecurringOrdersDueEvery active recurring order whose next order is placed at or after from and before to, read page by page so the window is never cut off.
import { activeRecurringOrdersDue } from "@evolve-framework/commercetools";
function activeRecurringOrdersDue(
requestBuilder: ByProjectKeyRequestBuilder,
options: { from: Date; to: Date; },
): Promise<RecurringOrder[]>
OptionTypeDescription
fromDate
toDate

Returns Promise<RecurringOrder[]>

configureCityLookupStore the address-lookup provider's spelling of a city on every address write, such as pdokCityLookup() for Dutch addresses.
import { configureCityLookup } from "@evolve-framework/commercetools";
function configureCityLookup(
lookup: CityLookup | undefined,
options?: OfficialCityOptions,
): void
OptionTypeDescription
timeoutMs?number

How long the lookup may take before the input is kept. Defaults to 1.5 seconds.

Returns void

configureUserNotificationClientSets the component name and publisher the shared notification client sends with.
import { configureUserNotificationClient } from "@evolve-framework/commercetools";
function configureUserNotificationClient(
componentName: string,
messagePublisher: MessagePublisher,
): Promise<void>
OptionTypeDescription
publish(message: Message, options?: PublishMessageOptions | undefined) => Promise<void>

Hand a message to the provider.

More

Rejects when the provider would not take it. A publisher that logged the failure and resolved anyway would make awaiting this pointless: the caller has no other way to learn the message is gone, and the places that publish -- a CMS webhook, a payment notification, a queued user notification -- are all ones where losing it silently costs more than failing loudly. A caller that genuinely wants best-effort catches it itself, which is a decision only the caller can make.

close?(() => Promise<void>)

Returns Promise<void>

createBackInStockHandlerMail everyone waiting for a variant once commercetools reports stock for it, on the subscription delivery for an inventory entry.
import { createBackInStockHandler } from "@evolve-framework/commercetools";
function createBackInStockHandler(
options: BackInStockHandlerOptions,
): MessageHandler<SubscriptionDelivery>
OptionTypeDescription
clientFactoryClientFactory
notificationClient?UserNotificationClient

Defaults to the client configureUserNotificationClient configured.

Returns MessageHandler<SubscriptionDelivery>

createDataLoadersEvery loader for one request; each is created on its first use.
import { createDataLoaders } from "@evolve-framework/commercetools";
function createDataLoaders(
commercetoolsClient: ByProjectKeyRequestBuilder,
storeContext: StoreContext,
clientContext: ClientContext$1,
): DataLoaders

Returns DataLoaders

createErrorMiddlewareClient middleware that throws a CommercetoolsError for a 4xx response.
import { createErrorMiddleware } from "@evolve-framework/commercetools";
function createErrorMiddleware(): Middleware

Returns Middleware

createOrderPaymentStateHandlerKeep an order's paymentState in line with its payments, on the commercetools subscription deliveries that can change what they add up to.
import { createOrderPaymentStateHandler } from "@evolve-framework/commercetools";

The order is read back with its payments rather than trusting the delivery, and written only when the derived state differs from the recorded one, so a redelivery or a replay changes nothing. A cancelled order is left as it is: marking it paid would hide a refund somebody has to action.

Any other delivery is ignored, so a service can hand this every delivery it receives. A read or write that fails rejects, which has the transport redeliver; a version conflict resolves itself that way.

function createOrderPaymentStateHandler(
options: OrderPaymentStateHandlerOptions,
): MessageHandler<SubscriptionDelivery>
OptionTypeDescription
clientFactoryClientFactory

Returns MessageHandler<SubscriptionDelivery>

createQuoteReadyHandlerTell the buyer a quote is ready, on the commercetools subscription delivery for a created quote: a seller answers a request in the back office, so the creation is the only moment the shop learns of it.
import { createQuoteReadyHandler } from "@evolve-framework/commercetools";

Only a pending quote is told about, since that is the one a buyer can act on, and only to the customer it is for, within its business unit. Any other delivery is ignored, so a service can hand this every delivery it receives. The notification is the last step, so a failure before it rejects and the transport redelivers without a mail having gone out.

function createQuoteReadyHandler(
options: QuoteReadyHandlerOptions,
): MessageHandler<SubscriptionDelivery>
OptionTypeDescription
clientFactoryClientFactory
notificationClient?UserNotificationClient

Defaults to the client configureUserNotificationClient configured.

Returns MessageHandler<SubscriptionDelivery>

createRecurringOrderHandlerPay an order commercetools created from a recurring order, on the subscription delivery OrderCreatedFromRecurringOrder.
import { createRecurringOrderHandler } from "@evolve-framework/commercetools";

Such an order is placed without a buyer present and without a payment, so it is paid here the way checkout pays one: a payment for the configured provider is created on the order and its transaction started. Settling the order through the adapter is what runs everything a checkout order runs once it exists, such as taking what partial payments reserved.

Idempotent: a settled order is left alone, and a payment of the provider already on the order is started again rather than duplicated. Any other delivery is ignored, so a service can hand this every delivery it receives.

function createRecurringOrderHandler(
options: RecurringOrderHandlerOptions,
): MessageHandler<SubscriptionDelivery>
OptionTypeDescription
clientFactoryClientFactory
paymentsPaymentRegistry

The registry checkout uses, holding the provider that pays the order.

customTypeKeystring

Key of the project's payment type, as checkout is given it.

provider?string

The provider that pays a recurring order. Defaults to pay on account. No buyer is present to redirect, so it has to be a provider that settles without a redirect: one that answers with a payment page leaves the order unpaid.

method?string

The method of that provider. Defaults to invoice.

fallbackLocale?string

The locale methods are asked in when the order carries none.

Returns MessageHandler<SubscriptionDelivery>

createSubscriptionHandlerTurn a commercetools subscription delivery into internal events.
import { createSubscriptionHandler } from "@evolve-framework/commercetools";

This is the producing half of the internal bus, and the reason a CMS or a search index never has to know what commercetools is: what leaves here is a product-category-created, not a ResourceCreated — no version, no masterData, no reference stubs — so any engine that publishes the same type is interchangeable with this one.

Both delivery formats are accepted, so the subscription's format is a free choice rather than something this handler dictates.

The returned handler is a MessageHandler, so it goes straight into whatever transport carries the subscription: createPubSubHandler, createSQSHandler, createServiceBusHandler, or an HTTP route for an HTTP destination.

A delivery nothing here produces an event for is logged and ignored rather than rejected: a subscription usually carries more than one service cares about, and failing would have commercetools redeliver a message no amount of retrying will make interesting. Anything else — a read that fails, a malformed event, a publisher that refuses — rejects, which leaves the delivery unacknowledged so it is retried.

function createSubscriptionHandler(
options: SubscriptionHandlerOptions,
): MessageHandler<SubscriptionDelivery>
OptionTypeDescription
clientFactoryClientFactory
messagePublisherMessagePublisher

Where the internal events go.

originstring

Stamped on every event as its origin, so a subscriber can tell which service published one — and ignore its own.

storeKeysstring[]

The stores a product event names.

More

commercetools does not put them on the product, and a subscriber has to know which storefronts an invalidation is for, so the service publishing states the stores it serves.

Returns MessageHandler<SubscriptionDelivery>

ctMoneyToMoneyA commercetools money value as the contract's Money.
import { ctMoneyToMoney } from "@evolve-framework/commercetools";
function ctMoneyToMoney(money: Money): Money

Returns Money$1

ctTaxedItemPriceToTaxedPriceA line's commercetools taxed price as a TaxedPrice at the line's rate.
import { ctTaxedItemPriceToTaxedPrice } from "@evolve-framework/commercetools";
function ctTaxedItemPriceToTaxedPrice(
taxedPrice: TaxedItemPrice,
taxRate: TaxRate,
): TaxedPrice$1

Returns TaxedPrice$1

ctTaxedPriceToTaxedTotalPriceMaps a commercetools taxed price to a TaxedTotalPrice: its net and gross totals, and one entry per tax portion with that portion's rate and amount.
import { ctTaxedPriceToTaxedTotalPrice } from "@evolve-framework/commercetools";
function ctTaxedPriceToTaxedTotalPrice(taxedPrice: TaxedPrice): TaxedTotalPrice

Returns TaxedTotalPrice

deriveOrderPaymentStateThe payment state an order's payments add up to, or undefined when they say nothing about it and the order is to be left as it is.
import { deriveOrderPaymentState } from "@evolve-framework/commercetools";

Measured by amount rather than by outcome, so a failed attempt followed by a successful one is paid: what was secured against the gross total decides, and only with nothing secured do open and failed attempts count. Refunds and chargebacks are left out, as commercetools has no state for an order paid and then refunded.

An order without a single authorization or charge -- one bought on account, or one whose provider has not reported yet -- is left alone. Requires the payments expanded.

function deriveOrderPaymentState(order: Order): PaymentState | undefined

Returns PaymentState | undefined

generateOrderNumberGenerate a monotonically increasing order number backed by a commercetools custom object.
import { generateOrderNumber } from "@evolve-framework/commercetools";

Runs inside one span, because callers on the order-create API-extension path share commercetools' hard extension timeout with this call.

function generateOrderNumber(
options: GenerateOrderNumberOptions,
): Promise<number>
OptionTypeDescription
requestBuilderByProjectKeyRequestBuilder
container?string
key?string
maxTries?number

Returns Promise<number>

getAttributeThe value of the attribute named name, as T; unchecked.
import { getAttribute } from "@evolve-framework/commercetools";
function getAttribute<T>(
attributes: Attribute[] | undefined,
name: string,
): T | undefined

Returns T | undefined

getBusinessUnitByKeyRead one business unit by its key with the service's own credentials.
import { getBusinessUnitByKey } from "@evolve-framework/commercetools";

This is the read a payment adapter needs: it runs outside a shopper request, so the me() endpoints the dataloaders use are not available to it. A unit that cannot be read comes back absent rather than throwing, because every caller has to decide what an unknown company means anyway.

function getBusinessUnitByKey(
options: { ctApi: ByProjectKeyRequestBuilder; key?: string | undefined; },
): Promise<BusinessUnit | undefined>
OptionTypeDescription
ctApiByProjectKeyRequestBuilder
key?string

Returns Promise<BusinessUnit | undefined>

getClientContextThe signed-in customer a token belongs to, with their business unit and its store when the token names one; undefined for an anonymous token.
import { getClientContext } from "@evolve-framework/commercetools";
function getClientContext(
ctApi: ByProjectKeyRequestBuilder,
storeContext: StoreContext,
token: FederatedToken,
): Promise<ClientContextInfo | undefined>

Returns Promise<ClientContextInfo | undefined>

getClientOptionsThe ClientFactory options for a service's CTP_* configuration.
import { getClientOptions } from "@evolve-framework/commercetools";
function getClientOptions(config: ClientConfig): Promise<ClientFactoryOptions>
OptionTypeDescription
CTP_PROJECT_KEYstring
CTP_API_URLstring
CTP_AUTH_URLstring
CTP_CLIENT_ID?string
CTP_CLIENT_SECRET?string
CTP_SCOPES?string[]

Returns Promise<ClientFactoryOptions>

getLocalizedValueThe value for locale, falling back to nl-NL and then en-GB; undefined when values is.
import { getLocalizedValue } from "@evolve-framework/commercetools";
function getLocalizedValue<T>(
values: { [key: string]: T; } | undefined,
locale: string,
): T | undefined

Returns T | undefined

getTaxedSubTotalPriceThe subtotal of items: net and gross summed over the lines, falling back to a line's total price where it has no taxed price, with one tax entry per rate.
import { getTaxedSubTotalPrice } from "@evolve-framework/commercetools";
function getTaxedSubTotalPrice(
items: LineItem[],
currency: string,
): TaxedTotalPrice

Returns TaxedTotalPrice

getTokenManagerOptionsThe TokenManager options for a service's CTP_* configuration.
import { getTokenManagerOptions } from "@evolve-framework/commercetools";
function getTokenManagerOptions(
config: TokenConfig,
): Promise<TokenManagerOptions>
OptionTypeDescription
CTP_PROJECT_KEYstring
CTP_AUTH_URLstring
CTP_USER_CLIENT_ID?string
CTP_USER_CLIENT_SECRET?string
CTP_USER_CREDENTIALS_SECRET_NAME?string
CTP_USER_SCOPES?string[]

Returns Promise<TokenManagerOptions>

initContextValuePuts the request's data loaders on context.loaders.
import { initContextValue } from "@evolve-framework/commercetools";
function initContextValue(context: ContextValue$1): void
OptionTypeDescription
loadersRecord<string, unknown> & DataLoaders

Optional because the modules contribute it: a context factory returns the request state it owns, and Application merges the loader declarations of the composed modules onto the result. A package narrows this to its own loader type — and back to required — for the context its resolvers read.

storeContextobject & StoreContext
clientContextClientContext & ClientContext$1
requestRequestContext
globalScopedClient() => ByProjectKeyRequestBuilder
configRecord<string, unknown>
federatedToken?FederatedToken

Returns void

isCommercetoolsErrorWhether error is a CommercetoolsError, by name across module copies.
import { isCommercetoolsError } from "@evolve-framework/commercetools";
function isCommercetoolsError(error: unknown): error is CommercetoolsError

Returns error is CommercetoolsError

orderConfirmationAddresseesWho an order confirmation goes to: the buyer, who placed the order, and in cc the business unit's contact, so the company hears about what is bought in its name.
import { orderConfirmationAddressees } from "@evolve-framework/commercetools";

Empty recipients for an order without an email, which no mail can reach.

function orderConfirmationAddressees(
order: Order,
businessUnit?: Pick<BusinessUnit, "contactEmail" | "name">,
): {
recipients: Addressee[];
cc: Addressee[];
}

Returns { recipients: Addressee[]; cc: Addressee[]; }

pickupPointListPickup points from a fixed list.
import { pickupPointList } from "@evolve-framework/commercetools";
function pickupPointList(options: PickupPointListOptions): PickupPointProvider
OptionTypeDescription
pointsPickupPointEntry[]
shippingMethodsRecord<string, string>

Shipping method key per carrier key; a carrier without one offers no points.

timeZone?string

The zone opening hours are read in. Defaults to Europe/Amsterdam.

leadDays?number

Days between ordering and a parcel arriving at the point. Defaults to 1.

readyAt?string

Local time a parcel is ready on the day it arrives. Defaults to 12:00.

Returns PickupPointProvider

publishRecurringOrderRemindersPublish a recurring-order-reminder for every active recurring order that places its next order within two working days of now; run it once per working day, as commercetools sends no message ahead.
import { publishRecurringOrderReminders } from "@evolve-framework/commercetools";
function publishRecurringOrderReminders(
options: RecurringOrderReminderOptions,
): Promise<number>
OptionTypeDescription
clientFactoryClientFactory
publisherMessagePublisher
originstring

Stamped on every event as its origin.

now?Date

The moment the run is for. Defaults to now.

Returns Promise<number>

reconcileCatalogPagesWalk every category and publish it as updated, so a CMS creates the catalog page any of them is missing: one whose created event went unhandled past its retries, or that existed before the CMS listened.
import { reconcileCatalogPages } from "@evolve-framework/commercetools";
function reconcileCatalogPages(
context: Context,
options?: { pageSize?: number | undefined; },
): Promise<number>
OptionTypeDescription
clientFactoryClientFactory
messagePublisherMessagePublisher
originstring
pageSize?number

Returns Promise<number>

shippingMethodScheduleDelivery dates from the project's shipping methods: each method the cart can be shipped with, and that the schedule names, is a carrier delivering in its windows on its weekdays at that method's price.
import { shippingMethodSchedule } from "@evolve-framework/commercetools";
function shippingMethodSchedule(
schedule: DeliverySchedule,
): DeliveryOptionsProvider
OptionTypeDescription
methodsRecord<string, DeliveryScheduleEntry>

Schedule per shipping method key; a method without one offers no slots.

timeZone?string

The zone the windows and the order deadline are read in. Defaults to Europe/Amsterdam.

Returns DeliveryOptionsProvider

storageAttachmentStoreAttachments kept in object storage: the buyer's browser PUTs a file to a signed URL, and reading it back answers another signed URL.
import { storageAttachmentStore } from "@evolve-framework/commercetools";
function storageAttachmentStore(
options: StorageAttachmentStoreOptions,
): AttachmentStore
OptionTypeDescription
clientSignedUrlStorageClient

A cloud adapter's storage client, such as AwsS3StorageClient.

bucketstring
prefix?string

Put before every object key, such as returns/.

contentTypes?string[]

Defaults to JPEG, PNG, WebP, HEIC and PDF.

maxBytes?number

The largest file read back; a larger upload counts as never made. Defaults to 10 MB.

uploadExpiresInSeconds?number

Defaults to 15 minutes.

readExpiresInSeconds?number

Defaults to an hour.

Returns AttachmentStore

taxResultToTaxedPriceA computed tax result as a TaxedPrice in currency.
import { taxResultToTaxedPrice } from "@evolve-framework/commercetools";
function taxResultToTaxedPrice(result: TaxResult, currency: string): TaxedPrice
OptionTypeDescription
totalNetnumber
totalGrossnumber
taxRatenumber
totalTaxnumber

Returns TaxedPrice$1

toAddressA commercetools address as the contract's Address; a missing city or postal code reads as "".
import { toAddress } from "@evolve-framework/commercetools";
function toAddress(ctAddress: Address): Address

Returns Address$1

toDiscountCodesEvery discount code that discounts something on the cart or order, whatever its cart discount targets, with the total it takes off.
import { toDiscountCodes } from "@evolve-framework/commercetools";
function toDiscountCodes(
codes: DiscountCode[],
discounted: Discounted,
): DiscountCode$1[]

Returns DiscountCode$1[]

toGraphQLFacetNormalized facet result → the GraphQL Facet union.
import { toGraphQLFacet } from "@evolve-framework/commercetools";

CategoryFacetResult can nest; the GraphQL CategoryFacet is flat, so only the top level is exposed until the schema grows a hierarchy.

function toGraphQLFacet(facet: FacetResult): Facet
OptionTypeDescription
kind"options"
keystring
labelstring
visibleOptions?number
searchable?boolean
options?FacetValue[]
currency?string

Set where the range is an amount of money: the currency it counts in, with min, max and a filter's bounds in its minor units, such as cents. Absent for a plain number.

min?number
max?number
selectedMin?number
selectedMax?number

Returns Facet

toProductSearchQueryGraphQL search arguments → the neutral query a search adapter takes.
import { toProductSearchQuery } from "@evolve-framework/commercetools";
function toProductSearchQuery(
context: ContextValue$1,
args: SearchArgs,
): ProductSearchQuery
OptionTypeDescription
loadersRecord<string, unknown> & DataLoaders

Optional because the modules contribute it: a context factory returns the request state it owns, and Application merges the loader declarations of the composed modules onto the result. A package narrows this to its own loader type — and back to required — for the context its resolvers read.

storeContextobject & StoreContext
clientContextClientContext & ClientContext$1
requestRequestContext
globalScopedClient() => ByProjectKeyRequestBuilder
configRecord<string, unknown>
sortProductSortOrderType
federatedToken?FederatedToken
categoryId?string
filters?FacetFilterInput[]
prefilters?FilterConditionInput[]
page?number
pageSize?number
searchTerm?string
skus?string[]
exactSearchTerm?boolean | null

Returns ProductSearchQuery

untaxedAsTaxResultAn amount no tax applies to, as a tax result with rate 0.
import { untaxedAsTaxResult } from "@evolve-framework/commercetools";
function untaxedAsTaxResult(centAmount: number): TaxResult

Returns TaxResult

Namespaces

CommercetoolscreateApiBuilderFromCtpClient, ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder, ByProjectKeyMeActiveCartRequestBuilder, ByProjectKeyAgentsRequestBuilder, ByProjectKeyApiClientsByIDRequestBuilder, ByProjectKeyApiClientsRequestBuilder, ApiRoot, ByProjectKeyOrdersEditsByIDApplyRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalRulesByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalRulesKeyByKeyRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalRulesRequestBuilder, ByProjectKeyAsAssociateByAssociateIdRequestBuilder, ByProjectKeyAsAssociateRequestBuilder, ByProjectKeyAssociateRolesByIDRequestBuilder, ByProjectKeyAssociateRolesKeyByKeyRequestBuilder, ByProjectKeyAssociateRolesRequestBuilder, ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder, ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder, ByProjectKeyAttributeGroupsByIDRequestBuilder, ByProjectKeyAttributeGroupsKeyByKeyRequestBuilder, ByProjectKeyAttributeGroupsRequestBuilder, ByProjectKeyVariantsBulkRequestBuilder, ByProjectKeyAsAssociateByAssociateIdBusinessUnitsByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdBusinessUnitsKeyByKeyRequestBuilder, ByProjectKeyAsAssociateByAssociateIdBusinessUnitsRequestBuilder, ByProjectKeyBusinessUnitsByIDRequestBuilder, ByProjectKeyBusinessUnitsKeyByKeyRequestBuilder, ByProjectKeyBusinessUnitsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder, ByProjectKeyMeBusinessUnitsByIDRequestBuilder, ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder, ByProjectKeyMeBusinessUnitsRequestBuilder, ByProjectKeyRequestBuilder, ByProjectKeyCartDiscountsByIDRequestBuilder, ByProjectKeyCartDiscountsKeyByKeyRequestBuilder, ByProjectKeyCartDiscountsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartDiscountsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartDiscountsRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsKeyByKeyRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsRequestBuilder, ByProjectKeyCartsByIDRequestBuilder, ByProjectKeyCartsCustomerIdByCustomerIdRequestBuilder, ByProjectKeyCartsKeyByKeyRequestBuilder, ByProjectKeyCartsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeCartsRequestBuilder, ByProjectKeyMeCartsByIDRequestBuilder, ByProjectKeyMeCartsRequestBuilder, ByProjectKeyCategoriesByIDRequestBuilder, ByProjectKeyCategoriesKeyByKeyRequestBuilder, ByProjectKeyCategoriesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCategoriesByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCategoriesKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCategoriesRequestBuilder, ByProjectKeyChannelsByIDRequestBuilder, ByProjectKeyChannelsKeyByKeyRequestBuilder, ByProjectKeyChannelsRequestBuilder, ByProjectKeyCustomersEmailConfirmRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersEmailConfirmRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeEmailConfirmRequestBuilder, ByProjectKeyMeEmailConfirmRequestBuilder, ByProjectKeyCustomObjectsByContainerByKeyRequestBuilder, ByProjectKeyCustomObjectsByContainerRequestBuilder, ByProjectKeyCustomObjectsRequestBuilder, ByProjectKeyCustomerGroupsByIDRequestBuilder, ByProjectKeyCustomerGroupsKeyByKeyRequestBuilder, ByProjectKeyCustomerGroupsRequestBuilder, ByProjectKeyCustomersByIDRequestBuilder, ByProjectKeyCustomersEmailTokenByEmailTokenRequestBuilder, ByProjectKeyCustomersKeyByKeyRequestBuilder, ByProjectKeyCustomersPasswordTokenByPasswordTokenRequestBuilder, ByProjectKeyCustomersRequestBuilder, ByProjectKeyInBusinessUnitKeyByBusinessUnitKeyMeCustomersRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersEmailTokenByEmailTokenRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordTokenByPasswordTokenRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder, ByProjectKeyDiscountCodesByIDRequestBuilder, ByProjectKeyDiscountCodesKeyByKeyRequestBuilder, ByProjectKeyDiscountCodesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder, ByProjectKeyDiscountGroupsByIDRequestBuilder, ByProjectKeyDiscountGroupsKeyByKeyRequestBuilder, ByProjectKeyDiscountGroupsRequestBuilder, ByProjectKeyOrdersEditsByIDRequestBuilder, ByProjectKeyOrdersEditsKeyByKeyRequestBuilder, ByProjectKeyOrdersEditsRequestBuilder, ByProjectKeyCustomersEmailTokenRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersEmailTokenRequestBuilder, ByProjectKeyExtensionsByIDRequestBuilder, ByProjectKeyExtensionsKeyByKeyRequestBuilder, ByProjectKeyExtensionsRequestBuilder, ByProjectKeyGraphqlRequestBuilder, ByProjectKeySubscriptionsByIDHealthRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder, ByProjectKeyProductsByIDImagesRequestBuilder, ByProjectKeyVariantsByIDImagesRequestBuilder, ByProjectKeyOrdersImportRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyRequestBuilder, ByProjectKeyInBusinessUnitKeyByBusinessUnitKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyRequestBuilder, ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder, ByProjectKeyCustomersSearchIndexingStatusRequestBuilder, ByProjectKeyAgentsIntakeRequestBuilder, ByProjectKeyInventoryByIDRequestBuilder, ByProjectKeyInventoryKeyByKeyRequestBuilder, ByProjectKeyInventoryRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyLoginRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeLoginRequestBuilder, ByProjectKeyLoginRequestBuilder, ByProjectKeyMeLoginRequestBuilder, ByProjectKeyShippingMethodsMatchingCartLocationRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyShippingMethodsMatchingCartRequestBuilder, ByProjectKeyShippingMethodsMatchingCartRequestBuilder, ByProjectKeyShippingMethodsMatchingLocationRequestBuilder, ByProjectKeyShippingMethodsMatchingOrdereditRequestBuilder, ByProjectKeyProductDiscountsMatchingRequestBuilder, ByProjectKeyMcpServersByIDRequestBuilder, ByProjectKeyMcpServersKeyByKeyRequestBuilder, ByProjectKeyMcpServersRequestBuilder, ByProjectKeyInBusinessUnitKeyByBusinessUnitKeyMeRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeRequestBuilder, ByProjectKeyMeRequestBuilder, ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder, ByProjectKeyMessagesByIDRequestBuilder, ByProjectKeyMessagesRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersOrderNumberByOrderNumberRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeOrdersByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeOrdersRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyOrdersByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyOrdersRequestBuilder, ByProjectKeyMeOrdersByIDRequestBuilder, ByProjectKeyMeOrdersRequestBuilder, ByProjectKeyOrdersByIDRequestBuilder, ByProjectKeyOrdersOrderNumberByOrderNumberRequestBuilder, ByProjectKeyOrdersRequestBuilder, ByProjectKeyCustomersPasswordTokenRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordTokenRequestBuilder, ByProjectKeyCustomersPasswordRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMePasswordRequestBuilder, ByProjectKeyMePasswordRequestBuilder, ByProjectKeyPaymentMethodsByIDRequestBuilder, ByProjectKeyPaymentMethodsKeyByKeyRequestBuilder, ByProjectKeyPaymentMethodsRequestBuilder, ByProjectKeyMePaymentsByIDRequestBuilder, ByProjectKeyMePaymentsRequestBuilder, ByProjectKeyPaymentsByIDRequestBuilder, ByProjectKeyPaymentsKeyByKeyRequestBuilder, ByProjectKeyPaymentsRequestBuilder, ByProjectKeyProductDiscountsByIDRequestBuilder, ByProjectKeyProductDiscountsKeyByKeyRequestBuilder, ByProjectKeyProductDiscountsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductProjectionsRequestBuilder, ByProjectKeyProductProjectionsByIDRequestBuilder, ByProjectKeyProductProjectionsKeyByKeyRequestBuilder, ByProjectKeyProductProjectionsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductSelectionAssignmentsRequestBuilder, ByProjectKeyProductSelectionsByIDRequestBuilder, ByProjectKeyProductSelectionsKeyByKeyRequestBuilder, ByProjectKeyProductSelectionsRequestBuilder, ByProjectKeyProductsByIDProductSelectionsRequestBuilder, ByProjectKeyProductsKeyByKeyProductSelectionsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder, ByProjectKeyProductTailoringByIDRequestBuilder, ByProjectKeyProductTailoringKeyByKeyRequestBuilder, ByProjectKeyProductTailoringRequestBuilder, ByProjectKeyProductTypesByIDRequestBuilder, ByProjectKeyProductTypesKeyByKeyRequestBuilder, ByProjectKeyProductTypesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder, ByProjectKeyProductSelectionsByIDProductsRequestBuilder, ByProjectKeyProductSelectionsKeyByKeyProductsRequestBuilder, ByProjectKeyProductsByIDRequestBuilder, ByProjectKeyProductsKeyByKeyRequestBuilder, ByProjectKeyProductsRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequestsByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequestsKeyByKeyRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequestsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyQuoteRequestsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyQuoteRequestsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyQuoteRequestsRequestBuilder, ByProjectKeyMeQuoteRequestsByIDRequestBuilder, ByProjectKeyMeQuoteRequestsKeyByKeyRequestBuilder, ByProjectKeyMeQuoteRequestsRequestBuilder, ByProjectKeyQuoteRequestsByIDRequestBuilder, ByProjectKeyQuoteRequestsKeyByKeyRequestBuilder, ByProjectKeyQuoteRequestsRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersQuotesRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesKeyByKeyRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyQuotesByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyQuotesKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyQuotesRequestBuilder, ByProjectKeyMeOrdersQuotesRequestBuilder, ByProjectKeyMeQuotesByIDRequestBuilder, ByProjectKeyMeQuotesKeyByKeyRequestBuilder, ByProjectKeyMeQuotesRequestBuilder, ByProjectKeyOrdersQuotesRequestBuilder, ByProjectKeyQuotesByIDRequestBuilder, ByProjectKeyQuotesKeyByKeyRequestBuilder, ByProjectKeyQuotesRequestBuilder, ByProjectKeyRecurrencePoliciesByIDRequestBuilder, ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder, ByProjectKeyRecurrencePoliciesRequestBuilder, ByProjectKeyRecurringOrdersByIDRequestBuilder, ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder, ByProjectKeyRecurringOrdersRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsReplicateRequestBuilder, ByProjectKeyCartsReplicateRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCartsReplicateRequestBuilder, ByProjectKeyMeCartsReplicateRequestBuilder, ByProjectKeyCustomersPasswordResetRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordResetRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMePasswordResetRequestBuilder, ByProjectKeyMePasswordResetRequestBuilder, ByProjectKeyAgentsIntakeV1ResponsesRequestBuilder, ByProjectKeyReviewsByIDRequestBuilder, ByProjectKeyReviewsKeyByKeyRequestBuilder, ByProjectKeyReviewsRequestBuilder, ByProjectKeyBusinessUnitsSearchRequestBuilder, ByProjectKeyCustomersSearchRequestBuilder, ByProjectKeyOrdersSearchRequestBuilder, ByProjectKeyProductProjectionsSearchRequestBuilder, ByProjectKeyProductsSearchRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyShippingMethodsRequestBuilder, ByProjectKeyShippingMethodsByIDRequestBuilder, ByProjectKeyShippingMethodsKeyByKeyRequestBuilder, ByProjectKeyShippingMethodsRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder, ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyShoppingListsRequestBuilder, ByProjectKeyMeShoppingListsByIDRequestBuilder, ByProjectKeyMeShoppingListsKeyByKeyRequestBuilder, ByProjectKeyMeShoppingListsRequestBuilder, ByProjectKeyShoppingListsByIDRequestBuilder, ByProjectKeyShoppingListsKeyByKeyRequestBuilder, ByProjectKeyShoppingListsRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyMeSignupRequestBuilder, ByProjectKeyMeSignupRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyStagedQuotesByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyStagedQuotesKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyStagedQuotesRequestBuilder, ByProjectKeyStagedQuotesByIDRequestBuilder, ByProjectKeyStagedQuotesKeyByKeyRequestBuilder, ByProjectKeyStagedQuotesRequestBuilder, ByProjectKeyStandalonePricesByIDRequestBuilder, ByProjectKeyStandalonePricesKeyByKeyRequestBuilder, ByProjectKeyStandalonePricesRequestBuilder, ByProjectKeyStatesByIDRequestBuilder, ByProjectKeyStatesKeyByKeyRequestBuilder, ByProjectKeyStatesRequestBuilder, ByProjectKeyStoresByIDRequestBuilder, ByProjectKeyStoresKeyByKeyRequestBuilder, ByProjectKeyStoresRequestBuilder, ByProjectKeySubscriptionsByIDRequestBuilder, ByProjectKeySubscriptionsKeyByKeyRequestBuilder, ByProjectKeySubscriptionsRequestBuilder, ByProjectKeyProductProjectionsSuggestRequestBuilder, ByProjectKeyTaxCategoriesByIDRequestBuilder, ByProjectKeyTaxCategoriesKeyByKeyRequestBuilder, ByProjectKeyTaxCategoriesRequestBuilder, ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder, ByProjectKeyMcpServersTypesRequestBuilder, ByProjectKeyTypesByIDRequestBuilder, ByProjectKeyTypesKeyByKeyRequestBuilder, ByProjectKeyTypesRequestBuilder, ByProjectKeyAgentsIntakeV1RequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDVariantAttributesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyVariantAttributesRequestBuilder, ByProjectKeyProductProjectionsByIDVariantAttributesRequestBuilder, ByProjectKeyProductProjectionsKeyByKeyVariantAttributesRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsByIDRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsKeyByKeyRequestBuilder, ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsRequestBuilder, ByProjectKeyVariantProjectionsByIDRequestBuilder, ByProjectKeyVariantProjectionsKeyByKeyRequestBuilder, ByProjectKeyVariantProjectionsRequestBuilder, ByProjectKeyVariantsByIDRequestBuilder, ByProjectKeyVariantsKeyByKeyRequestBuilder, ByProjectKeyVariantsRequestBuilder, ByProjectKeyZonesByIDRequestBuilder, ByProjectKeyZonesKeyByKeyRequestBuilder, ByProjectKeyZonesRequestBuilder, AgentResponsesOutputTypeValues, ApprovalFlowStatusValues, ApprovalRuleStatusValues, PermissionValues, AssociateRoleInheritanceModeValues, BusinessUnitApprovalRuleModeValues, BusinessUnitAssociateModeValues, BusinessUnitStatusValues, BusinessUnitStoreModeValues, BusinessUnitTypeValues, CartMergeModeValues, CartOriginValues, CartStateValues, CustomLineItemPriceModeValues, DiscountCodeStateValues, FreezeStrategyValues, InventoryModeValues, LineItemModeValues, LineItemPriceModeValues, PaymentStrategyValues, RoundingModeValues, ShippingMethodStateValues, ShippingModeValues, TaxCalculationModeValues, TaxModeValues, ProductPublishScopeValues, DiscountApplicationModeValues, SelectionModeValues, StackingModeValues, ChannelRoleEnumValues, AddressRoleValues, AttributionSourceValues, MoneyTypeValues, NonStandardCurrencyValues, ReferenceTypeIdValues, AnonymousCartSignInModeValues, AuthenticationModeValues, ExtensionActionValues, ExtensionResourceTypeIdValues, McpServerAuthenticationModeValues, McpServerStateValues, McpServerToolValues, McpServerToolOutputFormattingValues, MyQuoteStateValues, OrderSearchCustomTypeValues, OrderSearchMatchTypeValues, OrderSearchSortModeValues, OrderSearchSortOrderValues, OrderStateValues, PaymentStateValues, ReturnPaymentStateValues, ReturnShipmentStateValues, ShipmentStateValues, TransactionStateValues, TransactionTypeValues, PaymentMethodStatusValues, FacetTypesValues, ProductPriceModeEnumValues, TermFacetResultTypeValues, ProductSearchFacetCountLevelEnumValues, ProductSearchFacetDistinctBucketSortByValues, ProductSearchFacetScopeEnumValues, ProductSelectionModeValues, ProductVariantSelectionTypeEnumValues, AttributeConstraintEnumValues, AttributeConstraintEnumDraftValues, AttributeLevelEnumValues, AttributeReferenceTypeIdValues, TextInputHintValues, BusinessUnitIndexingStatusValues, CustomerIndexingStatusValues, BusinessUnitConfigurationStatusValues, BusinessUnitSearchStatusValues, CustomerSearchStatusValues, DiscountCombinationModeValues, OrderSearchStatusValues, ProductCatalogModelValues, ProductSearchIndexingModeValues, SearchIndexingConfigurationStatusValues, QuoteStateValues, QuoteRequestStateValues, IntervalUnitValues, PriceSelectionModeValues, RecurringOrderStateValues, ReservationStateValues, SearchFieldTypeValues, SearchMatchTypeValues, SearchSortModeValues, SearchSortOrderValues, ShippingRateTierTypeValues, StagedQuoteStateValues, StateRoleEnumValues, StateTypeEnumValues, AwsAuthenticationModeValues, ChangeSubscriptionResourceTypeIdValues, EventSubscriptionResourceTypeIdValues, EventTypeValues, MessageSubscriptionResourceTypeIdValues, SubscriptionHealthStatusValues, TaxRoundingTargetValues, CustomFieldReferenceValueValues, ResourceTypeIdValues, TypeTextInputHintValues, createExecutorFromMiddlewares, ApiRequest, buildRelativeUri
import { Commercetools } from "@evolve-framework/commercetools";
MemberDescription
Commercetools.createApiBuilderFromCtpClient
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder
Commercetools.ByProjectKeyMeActiveCartRequestBuilder
Commercetools.ByProjectKeyAgentsRequestBuilder
Commercetools.ByProjectKeyApiClientsByIDRequestBuilder
Commercetools.ByProjectKeyApiClientsRequestBuilder
Commercetools.ApiRoot
Commercetools.ByProjectKeyOrdersEditsByIDApplyRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalRulesByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalRulesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalRulesRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdRequestBuilder
Commercetools.ByProjectKeyAsAssociateRequestBuilder
Commercetools.ByProjectKeyAssociateRolesByIDRequestBuilder
Commercetools.ByProjectKeyAssociateRolesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAssociateRolesRequestBuilder
Commercetools.ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder
Commercetools.ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder
Commercetools.ByProjectKeyAttributeGroupsByIDRequestBuilder
Commercetools.ByProjectKeyAttributeGroupsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAttributeGroupsRequestBuilder
Commercetools.ByProjectKeyVariantsBulkRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdBusinessUnitsByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdBusinessUnitsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdBusinessUnitsRequestBuilder
Commercetools.ByProjectKeyBusinessUnitsByIDRequestBuilder
Commercetools.ByProjectKeyBusinessUnitsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyBusinessUnitsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder
Commercetools.ByProjectKeyMeBusinessUnitsByIDRequestBuilder
Commercetools.ByProjectKeyMeBusinessUnitsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyMeBusinessUnitsRequestBuilder
Commercetools.ByProjectKeyRequestBuilder
Commercetools.ByProjectKeyCartDiscountsByIDRequestBuilder
Commercetools.ByProjectKeyCartDiscountsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyCartDiscountsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartDiscountsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartDiscountsRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsRequestBuilder
Commercetools.ByProjectKeyCartsByIDRequestBuilder
Commercetools.ByProjectKeyCartsCustomerIdByCustomerIdRequestBuilder
Commercetools.ByProjectKeyCartsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyCartsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeCartsRequestBuilder
Commercetools.ByProjectKeyMeCartsByIDRequestBuilder
Commercetools.ByProjectKeyMeCartsRequestBuilder
Commercetools.ByProjectKeyCategoriesByIDRequestBuilder
Commercetools.ByProjectKeyCategoriesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyCategoriesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCategoriesByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCategoriesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCategoriesRequestBuilder
Commercetools.ByProjectKeyChannelsByIDRequestBuilder
Commercetools.ByProjectKeyChannelsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyChannelsRequestBuilder
Commercetools.ByProjectKeyCustomersEmailConfirmRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersEmailConfirmRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeEmailConfirmRequestBuilder
Commercetools.ByProjectKeyMeEmailConfirmRequestBuilder
Commercetools.ByProjectKeyCustomObjectsByContainerByKeyRequestBuilder
Commercetools.ByProjectKeyCustomObjectsByContainerRequestBuilder
Commercetools.ByProjectKeyCustomObjectsRequestBuilder
Commercetools.ByProjectKeyCustomerGroupsByIDRequestBuilder
Commercetools.ByProjectKeyCustomerGroupsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyCustomerGroupsRequestBuilder
Commercetools.ByProjectKeyCustomersByIDRequestBuilder
Commercetools.ByProjectKeyCustomersEmailTokenByEmailTokenRequestBuilder
Commercetools.ByProjectKeyCustomersKeyByKeyRequestBuilder
Commercetools.ByProjectKeyCustomersPasswordTokenByPasswordTokenRequestBuilder
Commercetools.ByProjectKeyCustomersRequestBuilder
Commercetools.ByProjectKeyInBusinessUnitKeyByBusinessUnitKeyMeCustomersRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersEmailTokenByEmailTokenRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordTokenByPasswordTokenRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder
Commercetools.ByProjectKeyDiscountCodesByIDRequestBuilder
Commercetools.ByProjectKeyDiscountCodesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyDiscountCodesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder
Commercetools.ByProjectKeyDiscountGroupsByIDRequestBuilder
Commercetools.ByProjectKeyDiscountGroupsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyDiscountGroupsRequestBuilder
Commercetools.ByProjectKeyOrdersEditsByIDRequestBuilder
Commercetools.ByProjectKeyOrdersEditsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyOrdersEditsRequestBuilder
Commercetools.ByProjectKeyCustomersEmailTokenRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersEmailTokenRequestBuilder
Commercetools.ByProjectKeyExtensionsByIDRequestBuilder
Commercetools.ByProjectKeyExtensionsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyExtensionsRequestBuilder
Commercetools.ByProjectKeyGraphqlRequestBuilder
Commercetools.ByProjectKeySubscriptionsByIDHealthRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder
Commercetools.ByProjectKeyProductsByIDImagesRequestBuilder
Commercetools.ByProjectKeyVariantsByIDImagesRequestBuilder
Commercetools.ByProjectKeyOrdersImportRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyRequestBuilder
Commercetools.ByProjectKeyInBusinessUnitKeyByBusinessUnitKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyRequestBuilder
Commercetools.ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder
Commercetools.ByProjectKeyCustomersSearchIndexingStatusRequestBuilder
Commercetools.ByProjectKeyAgentsIntakeRequestBuilder
Commercetools.ByProjectKeyInventoryByIDRequestBuilder
Commercetools.ByProjectKeyInventoryKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInventoryRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyLoginRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeLoginRequestBuilder
Commercetools.ByProjectKeyLoginRequestBuilder
Commercetools.ByProjectKeyMeLoginRequestBuilder
Commercetools.ByProjectKeyShippingMethodsMatchingCartLocationRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyShippingMethodsMatchingCartRequestBuilder
Commercetools.ByProjectKeyShippingMethodsMatchingCartRequestBuilder
Commercetools.ByProjectKeyShippingMethodsMatchingLocationRequestBuilder
Commercetools.ByProjectKeyShippingMethodsMatchingOrdereditRequestBuilder
Commercetools.ByProjectKeyProductDiscountsMatchingRequestBuilder
Commercetools.ByProjectKeyMcpServersByIDRequestBuilder
Commercetools.ByProjectKeyMcpServersKeyByKeyRequestBuilder
Commercetools.ByProjectKeyMcpServersRequestBuilder
Commercetools.ByProjectKeyInBusinessUnitKeyByBusinessUnitKeyMeRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeRequestBuilder
Commercetools.ByProjectKeyMeRequestBuilder
Commercetools.ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder
Commercetools.ByProjectKeyMessagesByIDRequestBuilder
Commercetools.ByProjectKeyMessagesRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersOrderNumberByOrderNumberRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeOrdersByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeOrdersRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyOrdersByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyOrdersRequestBuilder
Commercetools.ByProjectKeyMeOrdersByIDRequestBuilder
Commercetools.ByProjectKeyMeOrdersRequestBuilder
Commercetools.ByProjectKeyOrdersByIDRequestBuilder
Commercetools.ByProjectKeyOrdersOrderNumberByOrderNumberRequestBuilder
Commercetools.ByProjectKeyOrdersRequestBuilder
Commercetools.ByProjectKeyCustomersPasswordTokenRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordTokenRequestBuilder
Commercetools.ByProjectKeyCustomersPasswordRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMePasswordRequestBuilder
Commercetools.ByProjectKeyMePasswordRequestBuilder
Commercetools.ByProjectKeyPaymentMethodsByIDRequestBuilder
Commercetools.ByProjectKeyPaymentMethodsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyPaymentMethodsRequestBuilder
Commercetools.ByProjectKeyMePaymentsByIDRequestBuilder
Commercetools.ByProjectKeyMePaymentsRequestBuilder
Commercetools.ByProjectKeyPaymentsByIDRequestBuilder
Commercetools.ByProjectKeyPaymentsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyPaymentsRequestBuilder
Commercetools.ByProjectKeyProductDiscountsByIDRequestBuilder
Commercetools.ByProjectKeyProductDiscountsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyProductDiscountsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductProjectionsRequestBuilder
Commercetools.ByProjectKeyProductProjectionsByIDRequestBuilder
Commercetools.ByProjectKeyProductProjectionsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyProductProjectionsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductSelectionAssignmentsRequestBuilder
Commercetools.ByProjectKeyProductSelectionsByIDRequestBuilder
Commercetools.ByProjectKeyProductSelectionsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyProductSelectionsRequestBuilder
Commercetools.ByProjectKeyProductsByIDProductSelectionsRequestBuilder
Commercetools.ByProjectKeyProductsKeyByKeyProductSelectionsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder
Commercetools.ByProjectKeyProductTailoringByIDRequestBuilder
Commercetools.ByProjectKeyProductTailoringKeyByKeyRequestBuilder
Commercetools.ByProjectKeyProductTailoringRequestBuilder
Commercetools.ByProjectKeyProductTypesByIDRequestBuilder
Commercetools.ByProjectKeyProductTypesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyProductTypesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductsRequestBuilder
Commercetools.ByProjectKeyProductSelectionsByIDProductsRequestBuilder
Commercetools.ByProjectKeyProductSelectionsKeyByKeyProductsRequestBuilder
Commercetools.ByProjectKeyProductsByIDRequestBuilder
Commercetools.ByProjectKeyProductsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyProductsRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequestsByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequestsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuoteRequestsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyQuoteRequestsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyQuoteRequestsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyQuoteRequestsRequestBuilder
Commercetools.ByProjectKeyMeQuoteRequestsByIDRequestBuilder
Commercetools.ByProjectKeyMeQuoteRequestsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyMeQuoteRequestsRequestBuilder
Commercetools.ByProjectKeyQuoteRequestsByIDRequestBuilder
Commercetools.ByProjectKeyQuoteRequestsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyQuoteRequestsRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersQuotesRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyQuotesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyQuotesByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyQuotesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyQuotesRequestBuilder
Commercetools.ByProjectKeyMeOrdersQuotesRequestBuilder
Commercetools.ByProjectKeyMeQuotesByIDRequestBuilder
Commercetools.ByProjectKeyMeQuotesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyMeQuotesRequestBuilder
Commercetools.ByProjectKeyOrdersQuotesRequestBuilder
Commercetools.ByProjectKeyQuotesByIDRequestBuilder
Commercetools.ByProjectKeyQuotesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyQuotesRequestBuilder
Commercetools.ByProjectKeyRecurrencePoliciesByIDRequestBuilder
Commercetools.ByProjectKeyRecurrencePoliciesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyRecurrencePoliciesRequestBuilder
Commercetools.ByProjectKeyRecurringOrdersByIDRequestBuilder
Commercetools.ByProjectKeyRecurringOrdersKeyByKeyRequestBuilder
Commercetools.ByProjectKeyRecurringOrdersRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyCartsReplicateRequestBuilder
Commercetools.ByProjectKeyCartsReplicateRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCartsReplicateRequestBuilder
Commercetools.ByProjectKeyMeCartsReplicateRequestBuilder
Commercetools.ByProjectKeyCustomersPasswordResetRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyCustomersPasswordResetRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMePasswordResetRequestBuilder
Commercetools.ByProjectKeyMePasswordResetRequestBuilder
Commercetools.ByProjectKeyAgentsIntakeV1ResponsesRequestBuilder
Commercetools.ByProjectKeyReviewsByIDRequestBuilder
Commercetools.ByProjectKeyReviewsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyReviewsRequestBuilder
Commercetools.ByProjectKeyBusinessUnitsSearchRequestBuilder
Commercetools.ByProjectKeyCustomersSearchRequestBuilder
Commercetools.ByProjectKeyOrdersSearchRequestBuilder
Commercetools.ByProjectKeyProductProjectionsSearchRequestBuilder
Commercetools.ByProjectKeyProductsSearchRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyShippingMethodsRequestBuilder
Commercetools.ByProjectKeyShippingMethodsByIDRequestBuilder
Commercetools.ByProjectKeyShippingMethodsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyShippingMethodsRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeShoppingListsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyShoppingListsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyShoppingListsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyShoppingListsRequestBuilder
Commercetools.ByProjectKeyMeShoppingListsByIDRequestBuilder
Commercetools.ByProjectKeyMeShoppingListsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyMeShoppingListsRequestBuilder
Commercetools.ByProjectKeyShoppingListsByIDRequestBuilder
Commercetools.ByProjectKeyShoppingListsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyShoppingListsRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyMeSignupRequestBuilder
Commercetools.ByProjectKeyMeSignupRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyStagedQuotesByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyStagedQuotesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyStagedQuotesRequestBuilder
Commercetools.ByProjectKeyStagedQuotesByIDRequestBuilder
Commercetools.ByProjectKeyStagedQuotesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyStagedQuotesRequestBuilder
Commercetools.ByProjectKeyStandalonePricesByIDRequestBuilder
Commercetools.ByProjectKeyStandalonePricesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyStandalonePricesRequestBuilder
Commercetools.ByProjectKeyStatesByIDRequestBuilder
Commercetools.ByProjectKeyStatesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyStatesRequestBuilder
Commercetools.ByProjectKeyStoresByIDRequestBuilder
Commercetools.ByProjectKeyStoresKeyByKeyRequestBuilder
Commercetools.ByProjectKeyStoresRequestBuilder
Commercetools.ByProjectKeySubscriptionsByIDRequestBuilder
Commercetools.ByProjectKeySubscriptionsKeyByKeyRequestBuilder
Commercetools.ByProjectKeySubscriptionsRequestBuilder
Commercetools.ByProjectKeyProductProjectionsSuggestRequestBuilder
Commercetools.ByProjectKeyTaxCategoriesByIDRequestBuilder
Commercetools.ByProjectKeyTaxCategoriesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyTaxCategoriesRequestBuilder
Commercetools.ByProjectKeyMcpServersTypesByMcpServerTypeRequestBuilder
Commercetools.ByProjectKeyMcpServersTypesRequestBuilder
Commercetools.ByProjectKeyTypesByIDRequestBuilder
Commercetools.ByProjectKeyTypesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyTypesRequestBuilder
Commercetools.ByProjectKeyAgentsIntakeV1RequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDVariantAttributesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyVariantAttributesRequestBuilder
Commercetools.ByProjectKeyProductProjectionsByIDVariantAttributesRequestBuilder
Commercetools.ByProjectKeyProductProjectionsKeyByKeyVariantAttributesRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsByIDRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyInStoreKeyByStoreKeyVariantProjectionsRequestBuilder
Commercetools.ByProjectKeyVariantProjectionsByIDRequestBuilder
Commercetools.ByProjectKeyVariantProjectionsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyVariantProjectionsRequestBuilder
Commercetools.ByProjectKeyVariantsByIDRequestBuilder
Commercetools.ByProjectKeyVariantsKeyByKeyRequestBuilder
Commercetools.ByProjectKeyVariantsRequestBuilder
Commercetools.ByProjectKeyZonesByIDRequestBuilder
Commercetools.ByProjectKeyZonesKeyByKeyRequestBuilder
Commercetools.ByProjectKeyZonesRequestBuilder
Commercetools.AgentResponsesOutputTypeValuesEntity that the Intake Agent creates from a /responses request.
Commercetools.ApprovalFlowStatusValuesIndicates whether the Approval Flow is under review, approved, or rejected.
Commercetools.ApprovalRuleStatusValuesIndicates whether the Approval Rule should be matched against Orders or not.
Commercetools.PermissionValuesPermissions grant granular access to Approval Rules, Approval Flows, Business Units, Carts, Orders, Quotes, Quote Requests, and Shopping Lists.
Commercetools.AssociateRoleInheritanceModeValuesDetermines whether an AssociateRoleAssignment can be inherited by child Business Units.
Commercetools.BusinessUnitApprovalRuleModeValuesDetermines whether a Business Unit can inherit Approval Rules from a parent.
Commercetools.BusinessUnitAssociateModeValuesDetermines whether a Business Unit can inherit Associates from a parent.
Commercetools.BusinessUnitStatusValuesIndicates whether the Business Unit can be edited and used in Carts, Orders, Quote Requests, or Quotes.
Commercetools.BusinessUnitStoreModeValuesDefines whether the Stores of the Business Unit are set directly on the Business Unit or are inherited from its parent unit.
Commercetools.BusinessUnitTypeValuesThe type of the Business Unit indicating its position in a hierarchy.
Commercetools.CartMergeModeValuesDetermines how to manually merge an anonymous Cart with an existing Customer Cart.
Commercetools.CartOriginValuesIndicates who created the Cart.
Commercetools.CartStateValuesIndicates the current status of a Cart.
Commercetools.CustomLineItemPriceModeValuesDetermines if Cart Discounts can be applied to a Custom Line Item in the Cart.
Commercetools.DiscountCodeStateValuesIndicates the state of a Discount Code in a Cart.
Commercetools.FreezeStrategyValuesIndicates how a Cart freeze behaves.
Commercetools.InventoryModeValuesIndicates how Line Items in a Cart are tracked.
Commercetools.LineItemModeValuesIndicates how a Line Item was added to a Cart.
Commercetools.LineItemPriceModeValuesThis mode indicates how the price is set for the Line Item.
Commercetools.PaymentStrategyValuesDetermines how payment for the Orders generated by a RecurringOrder is collected.
Commercetools.RoundingModeValuesDetermines how monetary values are rounded.
Commercetools.ShippingMethodStateValuesDetermines whether the selected ShippingMethod is allowed for the Cart.
Commercetools.ShippingModeValues
Commercetools.TaxCalculationModeValuesDetermines in which Tax calculation mode taxed prices are calculated.
Commercetools.TaxModeValuesIndicates how taxes are set on the Cart.
Commercetools.ProductPublishScopeValuesThe scope controls which part of the product information is published.
Commercetools.DiscountApplicationModeValuesThis mode determines how Discounts are distributed among items in a Cart.
Commercetools.SelectionModeValuesDefines which matching items are to be discounted.
Commercetools.StackingModeValuesDescribes how the Cart Discount interacts with other Discounts.
Commercetools.ChannelRoleEnumValuesDescribes how a Channel is used.
Commercetools.AddressRoleValuesIndicates the role of an address.
Commercetools.AttributionSourceValues
Commercetools.MoneyTypeValuesDetermines the type of money used.
Commercetools.NonStandardCurrencyValuesCurrencies whose fraction digits are not compliant with ISO 4217.
Commercetools.ReferenceTypeIdValuesType of resource the value should reference.
Commercetools.AnonymousCartSignInModeValuesDetermines how an anonymous Cart is handled when a Customer signs in.
Commercetools.AuthenticationModeValues
Commercetools.ExtensionActionValuesAn Extension gets called during any of the following requests of an API call, but before the result is persisted.
Commercetools.ExtensionResourceTypeIdValuesExtensions are available for:
Commercetools.McpServerAuthenticationModeValuesDetermines how AI agents authenticate when connecting to the MCP Server.
Commercetools.McpServerStateValuesState of the MCP Server.
Commercetools.McpServerToolValuesIdentifies a tool that can be enabled on an MCP Server.
Commercetools.McpServerToolOutputFormattingValuesOutput formatting applied to every tools/call response on the MCP Server.
Commercetools.MyQuoteStateValuesQuoteStates that can be set using the Change My Quote State update action.
Commercetools.OrderSearchCustomTypeValuesPossible values for the customType property on simple expressions indicating the data type of the field.
Commercetools.OrderSearchMatchTypeValues
Commercetools.OrderSearchSortModeValues
Commercetools.OrderSearchSortOrderValues
Commercetools.OrderStateValuesIndicates the state of the Order.
Commercetools.PaymentStateValuesIndicates the payment status for the Order.
Commercetools.ReturnPaymentStateValues
Commercetools.ReturnShipmentStateValues
Commercetools.ShipmentStateValuesIndicates the shipment status of the Order.
Commercetools.TransactionStateValuesTransactions can be in one of the following States:
Commercetools.TransactionTypeValues
Commercetools.PaymentMethodStatusValues
Commercetools.FacetTypesValues
Commercetools.ProductPriceModeEnumValuesThis mode determines the type of Prices used for price selection by Line Items and Products.
Commercetools.TermFacetResultTypeValuesData type to which the facet is applied.
Commercetools.ProductSearchFacetCountLevelEnumValues
Commercetools.ProductSearchFacetDistinctBucketSortByValues
Commercetools.ProductSearchFacetScopeEnumValues
Commercetools.ProductSelectionModeValuesProduct Selections can have the following modes:
Commercetools.ProductVariantSelectionTypeEnumValues
Commercetools.AttributeConstraintEnumValuesSpecifies how an Attribute (or a set of Attributes) should be validated across all variants of a Product:
Commercetools.AttributeConstraintEnumDraftValues
Commercetools.AttributeLevelEnumValues
Commercetools.AttributeReferenceTypeIdValuesName of the resource type that the value should reference.
Commercetools.TextInputHintValuesA text input hint is a string with one of the following values:
Commercetools.BusinessUnitIndexingStatusValuesThe current indexing status of Business Unit Search.
Commercetools.CustomerIndexingStatusValuesThe current indexing status of Customer Search.
Commercetools.BusinessUnitConfigurationStatusValuesDefault value for Business Unit Status configured though Project settings.
Commercetools.BusinessUnitSearchStatusValuesSpecifies the status of the Business Unit Search index.
Commercetools.CustomerSearchStatusValuesSpecifies the status of the Customer Search index.
Commercetools.DiscountCombinationModeValuesDefines how Product Discounts and Cart Discounts are combined for Line Items in every Cart of the Project.
Commercetools.OrderSearchStatusValuesSpecifies the status of the Order Search index.
Commercetools.ProductCatalogModelValuesDetermines how Product Variants are managed in the Project.
Commercetools.ProductSearchIndexingModeValues
Commercetools.SearchIndexingConfigurationStatusValuesStatus of resource indexing.
Commercetools.QuoteStateValuesPredefined states tracking the status of the Quote.
Commercetools.QuoteRequestStateValuesPredefined states tracking the status of the Quote Request in the negotiation process.
Commercetools.IntervalUnitValuesSupported interval units for Recurrence Policies which are used in Recurring Orders.
Commercetools.PriceSelectionModeValuesIndicates how the price of a Line Item or Custom Line Item is selected during Order creation.
Commercetools.RecurringOrderStateValuesIndicates the state of the RecurringOrder.
Commercetools.ReservationStateValuesStatus of the Reservation.
Commercetools.SearchFieldTypeValuesPossible values for the fieldType property on simple expressions indicating the data type of the field.
Commercetools.SearchMatchTypeValues
Commercetools.SearchSortModeValuesFor set-type fields, only a single value of the set is taken into account for sorting.
Commercetools.SearchSortOrderValues
Commercetools.ShippingRateTierTypeValues
Commercetools.StagedQuoteStateValuesPredefined states tracking the status of the Staged Quote.
Commercetools.StateRoleEnumValuesFor some resource types, a State can fulfill the following predefined roles:
Commercetools.StateTypeEnumValuesResource or object type the State can be assigned to.
Commercetools.AwsAuthenticationModeValuesDefines the method of authentication for AWS SQS and SNS Destinations.
Commercetools.ChangeSubscriptionResourceTypeIdValuesResource types supported by ChangeSubscriptions:
Commercetools.EventSubscriptionResourceTypeIdValuesResource types supported by EventSubscriptions.
Commercetools.EventTypeValuesType of events supported by EventSubscriptions.
Commercetools.MessageSubscriptionResourceTypeIdValuesResource types supported by MessageSubscriptions:
Commercetools.SubscriptionHealthStatusValuesThe health status of the Subscription that indicates whether notifications are being delivered.
Commercetools.TaxRoundingTargetValuesFor a TaxRate that is included in the price, this value determines which of the two derived amounts the RoundingMode set by taxRoundingMode is applied to.
Commercetools.CustomFieldReferenceValueValuesDefines which resource type a CustomFieldReferenceType can reference.
Commercetools.ResourceTypeIdValuesWith Types, you can model your own Custom Fields on the following resources and data types.
Commercetools.TypeTextInputHintValuesProvides a visual representation type for this field.
Commercetools.createExecutorFromMiddlewares
Commercetools.ApiRequest
Commercetools.buildRelativeUri

Constants

BUNDLE_EXTRA_PREDICATEThe line-item predicate a project's cart discount for bundles targets: the extras still linked to their main line.
import { BUNDLE_EXTRA_PREDICATE } from "@evolve-framework/commercetools";
const BUNDLE_EXTRA_PREDICATE: "custom.lineRole = \"bundle-extra\""
commercetoolsDataLoadersThe loaders every commercetools module contributes.
import { commercetoolsDataLoaders } from "@evolve-framework/commercetools";
const commercetoolsDataLoaders: DataLoaderDefinition<CommercetoolsLoaderContext, { associateRoleByKey: DataLoader<string, AssociateRole | null, string>; brandByKey: DataLoader<string, CustomOb…
DEFAULT_USER_SCOPESThe scopes requested for anonymous and customer sessions when a project does not name its own.
import { DEFAULT_USER_SCOPES } from "@evolve-framework/commercetools";
const DEFAULT_USER_SCOPES: string[]
demoDeliveryScheduleA schedule for demo shipping methods, the way a Dutch shop offers its days.
import { demoDeliverySchedule } from "@evolve-framework/commercetools";
const demoDeliverySchedule: DeliverySchedule
demoPickupPointsPickup points around Utrecht Centraal, for demo shipping methods per carrier.
import { demoPickupPoints } from "@evolve-framework/commercetools";
const demoPickupPoints: PickupPointListOptions
demoReturnCarrierA carrier for demos and tests: a drop-off code made from the return number and valid for 28 days, and a collection on the asked day or the first day after today, never on a Sunday.
import { demoReturnCarrier } from "@evolve-framework/commercetools";
const demoReturnCarrier: ReturnCarrierProvider
demoReturnReasonsReasons a fashion or general webshop offers, in Dutch and English.
import { demoReturnReasons } from "@evolve-framework/commercetools";
const demoReturnReasons: ReturnReasonConfig[]

Types

ApiRequest
import { type ApiRequest } from "@evolve-framework/commercetools";
type ApiRequest$1<T> = ApiRequest<T>;
AssociateRequestBuilderA request builder acting as an associate within one business unit.
import { type AssociateRequestBuilder } from "@evolve-framework/commercetools";
export type AssociateRequestBuilder = ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyRequestBuilder;
AttachmentStoreWhere files a buyer uploads are kept, such as a return's photos or a review's: an upload URL the buyer's browser PUTs the file to, and a link to read it back.
import { type AttachmentStore } from "@evolve-framework/commercetools";
export type AttachmentStore = {
contentTypes: string[];
createUpload(request: {
filename: string;
contentType: string;
customerId: string;
}): Promise<{
attachmentId: string;
uploadUrl: string;
expiresAt: string;
}>;
read(attachmentId: string, customerId: string): Promise<StoredAttachment | undefined>;
};
AuthModuleConfigThe commercetools project and the API client shopper tokens are issued with.
import { type AuthModuleConfig } from "@evolve-framework/commercetools";
export interface AuthModuleConfig {
CTP_PROJECT_KEY: string;
CTP_AUTH_URL: string;
CTP_USER_CLIENT_ID?: string;
CTP_USER_CLIENT_SECRET?: string;
CTP_USER_SCOPES?: string[];
}
ClientContextInfo
import { type ClientContextInfo } from "@evolve-framework/commercetools";
export type ClientContextInfo = {
id: string;
familyName: string;
givenName: string;
email: string;
customerGroupId: string | undefined;
defaultPaymentMethod: string | undefined;
businessContext?: {
businessUnitId: string;
businessUnitKey: string;
storeKey?: string;
storeId?: string;
channelId?: string;
};
};
ClientContextLoaderWhat a client context needs from the commerce engine: an anonymous token, the customer a token belongs to, and request builders.
import { type ClientContextLoader } from "@evolve-framework/commercetools";
export interface ClientContextLoader {
getToken(): Promise<TokenInfo | undefined>;
getClientInfo(storeContext: StoreContext, token: FederatedToken): Promise<ClientContextInfo | undefined>;
getSystemRequestBuilder(): RequestBuilder;
createClient(token: FederatedToken): Promise<UserRequestBuilder>;
}
ClientFactoryOptionsThe project and API client credentials ClientFactory connects with.
import { type ClientFactoryOptions } from "@evolve-framework/commercetools";
export type ClientFactoryOptions = {
projectKey: string;
apiUrl: string;
authUrl: string;
scopes?: string[];
clientId?: string;
clientSecret?: string;
};
CommercetoolsLoaderContextWhat these loaders read off the request context.
import { type CommercetoolsLoaderContext } from "@evolve-framework/commercetools";

The service owns all three: it knows which backend it composes, and the client context in particular has to be the very instance the useClientContext plugin loads the federated token into. A module that built its own would hold an unauthenticated copy while the resolvers hold the real one.

export type CommercetoolsLoaderContext = {
globalScopedClient: () => RequestBuilder;
storeContext: StoreContext;
clientContext: ClientContext;
};
ContextValueWhat resolvers read: the service's context plus the modules' loaders.
import { type ContextValue } from "@evolve-framework/commercetools";
type ContextValue$1 = RequestContextValue & {
loaders: DataLoaders;
};
CustomerModuleConfigThe commercetools project and the API client shopper tokens are issued with, for the sessions that registration and account deletion start.
import { type CustomerModuleConfig } from "@evolve-framework/commercetools";
export interface CustomerModuleConfig {
CTP_PROJECT_KEY: string;
CTP_AUTH_URL: string;
CTP_USER_CLIENT_ID?: string;
CTP_USER_CLIENT_SECRET?: string;
CTP_USER_SCOPES?: string[];
}
DataLoadersThe request-scoped loaders resolvers batch commercetools reads through.
import { type DataLoaders } from "@evolve-framework/commercetools";
export type DataLoaders = {
associateRoleByKey: ReturnType<typeof createAssociateRoleByKeyLoader>;
brandByKey: ReturnType<typeof createBrandByKeyLoader>;
businessUnitByKey: ReturnType<typeof createBusinessUnitByKeyLoader>;
storeByKey: ReturnType<typeof createStoreByKeyLoader>;
shoppingListById: ReturnType<typeof createShoppingListByIdLoader>;
customerById: ReturnType<typeof createCustomerByIdLoader>;
cartById: ReturnType<typeof createCartByIdLoader>;
orderById: ReturnType<typeof createOrderByIdLoader>;
orderByQuoteId: ReturnType<typeof createOrderByQuoteIdLoader>;
quoteById: ReturnType<typeof createQuoteByIdLoader>;
quoteRequestById: ReturnType<typeof createQuoteRequestByIdLoader>;
categoryById: ReturnType<typeof createCategoryByIdLoader>;
categoryByKey: ReturnType<typeof createCategoryByKeyLoader>;
categoryBySlug: ReturnType<typeof createCategoryBySlugLoader>;
categoryChildrenById: ReturnType<typeof createCategoryChildrenByIdLoader>;
customObjectById: ReturnType<typeof createCustomObjectByIdLoader>;
highlightedAttributesByProductTypeId: ReturnType<typeof createHighlightedAttributesByProductTypeIdLoader>;
productDiscountById: ReturnType<typeof createProductDiscountByIdLoader>;
productTypeById: ReturnType<typeof createProductTypeByIdLoader>;
productSlugsById: ReturnType<typeof createProductSlugsByIdLoader>;
productProjectionById: ReturnType<typeof createProductProjectionByIdLoader>;
productProjectionBySlug: ReturnType<typeof createProductProjectionBySlugLoader>;
productProjectionBySKU: ReturnType<typeof createProductProjectionBySKULoader>;
shippingMethodById: ReturnType<typeof createShippingMethodByIdLoader>;
discountCodeById: ReturnType<typeof createDiscountCodeByIdLoader>;
cartDiscountById: ReturnType<typeof createCartDiscountByIdLoader>;
bundleDiscountPercent: ReturnType<typeof createBundleDiscountPercentLoader>;
};
DeliveryOptionsProviderThe source of a cart's delivery dates and slots.
import { type DeliveryOptionsProvider } from "@evolve-framework/commercetools";
export type DeliveryOptionsProvider = {
deliveryDates(request: DeliveryRequest, range: {
from?: string;
days: number;
}): Promise<DeliveryDate[]>;
deliveryPromise?(request: DeliveryPromiseRequest): Promise<DeliveryPromise>;
shippingMethodDelivery?(request: ShippingMethodDeliveryRequest): Promise<ShippingMethodDelivery>;
findSlot(request: DeliveryRequest, slotId: string): Promise<DeliverySlotChoice | undefined>;
};
DeliveryPromiseRequestWhat a product page asks a delivery provider: one variant, to one place.
import { type DeliveryPromiseRequest } from "@evolve-framework/commercetools";
export type DeliveryPromiseRequest = {
client: UserRequestBuilder;
storeKey: string;
currency: string;
country: string;
postalCode?: string;
availableFrom?: string;
now: Date;
};
DeliveryRequestWhat a delivery provider is asked about: one cart, read in one store.
import { type DeliveryRequest } from "@evolve-framework/commercetools";
export type DeliveryRequest = {
cart: Cart;
client: UserRequestBuilder;
storeKey: string;
locale: string;
now: Date;
};
DeliveryScheduleWhen each shipping method delivers, keyed by shipping method key.
import { type DeliverySchedule } from "@evolve-framework/commercetools";
export type DeliverySchedule = {
timeZone?: string;
methods: Record<string, DeliveryScheduleEntry>;
};
DeliveryScheduleEntryWhen the carrier behind one shipping method delivers.
import { type DeliveryScheduleEntry } from "@evolve-framework/commercetools";
export type DeliveryScheduleEntry = {
carrier: {
key: string;
name: string;
};
windows: Array<{
from: string;
until: string;
}>;
weekdays: number[];
leadDays?: number;
orderBefore?: string;
countries?: Record<string, Partial<Omit<DeliveryScheduleEntry, "countries">>>;
};
DeliverySlotChoiceA slot a cart can be given, with the shipping method that charges for it.
import { type DeliverySlotChoice } from "@evolve-framework/commercetools";
export type DeliverySlotChoice = {
slot: DeliverySlot;
shippingMethodId: string;
};
DocumentGraphQLMapperRenders a document.
import { type DocumentGraphQLMapper } from "@evolve-framework/commercetools";
export type DocumentGraphQLMapper = (document: ProductDocument, context: ContextValue) => Product;
IdentifierAttributesThe attributes a variant's product identifiers are read from.
import { type IdentifierAttributes } from "@evolve-framework/commercetools";
export type IdentifierAttributes = {
ean?: string;
mpn?: string;
hscode?: string;
};
OrderModuleConfigThe custom line items that mark an order's VAT treatment.
import { type OrderModuleConfig } from "@evolve-framework/commercetools";
export interface OrderModuleConfig {
customLineItemTaxShiftingSlug: string;
customLineItemTaxExemptionSlug?: string;
}
PickupPointChoiceA pickup point a cart can be given, with the shipping method that charges for it.
import { type PickupPointChoice } from "@evolve-framework/commercetools";
export type PickupPointChoice = {
pickupPoint: PickupPoint;
shippingMethodId: string;
};
PickupPointEntryA pickup point as a list describes it.
import { type PickupPointEntry } from "@evolve-framework/commercetools";
export type PickupPointEntry = {
id: string;
name: string;
carrier: {
key: string;
name: string;
};
type: "SHOP" | "LOCKER";
address: {
streetName: string;
streetNumber: string;
postalCode: string;
city: string;
country: string;
};
coordinates: {
latitude: number;
longitude: number;
};
openingHours: "always" | Partial<Record<number, Window[]>>;
unavailable?: DeliveryUnavailable;
};
PickupPointProviderThe source of a cart's pickup points.
import { type PickupPointProvider } from "@evolve-framework/commercetools";
export type PickupPointProvider = {
pickupPoints(request: DeliveryRequest, query: PickupPointQuery): Promise<PickupPoint[]>;
findPickupPoint(request: DeliveryRequest, pickupPointId: string): Promise<PickupPointChoice | undefined>;
};
PickupPointQueryWhere and for which carriers a cart's pickup points are searched.
import { type PickupPointQuery } from "@evolve-framework/commercetools";
export type PickupPointQuery = {
country: string;
postalCode?: string;
coordinates?: {
latitude: number;
longitude: number;
};
carrierKeys?: string[];
limit: number;
};
ProductKindsConfigWhich variants of a product type are digital: all of them, or those whose attribute holds one of the given values (an enum's key, or a text value), compared without case.
import { type ProductKindsConfig } from "@evolve-framework/commercetools";
export type ProductKindsConfig = {
[productTypeKey: string]: {
digital: true;
} | {
attribute: string;
digitalValues: string[];
};
};
RequestBuilderA request builder for the project, authorized with the service's credentials.
import { type RequestBuilder } from "@evolve-framework/commercetools";
export type RequestBuilder = ByProjectKeyRequestBuilder;
RequestContextValueThe part of the context a service builds per request.
import { type RequestContextValue } from "@evolve-framework/commercetools";

Split out from ContextValue because loaders is contributed by the modules, not by the service: a context factory returns this, and Application merges the modules' loader declarations onto it. Omit<ContextValue, "loaders"> does not express that — the base context carries an index signature, so Omit keeps only that and silently drops every named property.

export type RequestContextValue = ContextValue & {
storeContext: StoreContext;
clientContext: ClientContext$1;
federatedToken?: FederatedToken;
globalScopedClient: () => RequestBuilder;
config: Record<string, unknown>;
};
RestockingFeeSettingWhat a business unit pays for returning goods late: a percentage of what it paid for them, once the free-return period after delivery has passed.
import { type RestockingFeeSetting } from "@evolve-framework/commercetools";
export type RestockingFeeSetting = {
percentage: number;
freeReturnDays: number;
};
ReturnAttachmentStoreThe store a return's attachments are kept in.
import { type ReturnAttachmentStore } from "@evolve-framework/commercetools";
export type ReturnAttachmentStore = AttachmentStore;
ReturnCarrierWho carries a return back.
import { type ReturnCarrier } from "@evolve-framework/commercetools";
export type ReturnCarrier = {
key: string;
name: string;
};
ReturnCarrierProviderThe carrier behind a consumer's return.
import { type ReturnCarrierProvider } from "@evolve-framework/commercetools";
export type ReturnCarrierProvider = {
dropOff?(request: ReturnShipmentRequest): Promise<ReturnDropOffShipment>;
pickup?(request: ReturnShipmentRequest & {
address: BaseAddress;
date?: string;
}): Promise<ReturnPickupShipment>;
cancel?(returnNumber: string): Promise<void>;
};
ReturnDropOffShipmentA code to hand a parcel in with at a service point.
import { type ReturnDropOffShipment } from "@evolve-framework/commercetools";
export type ReturnDropOffShipment = {
carrier: ReturnCarrier;
code: string;
expiresAt?: string;
labelUrl?: string;
};
ReturnPickupShipmentA collection booked at the buyer's address.
import { type ReturnPickupShipment } from "@evolve-framework/commercetools";
export type ReturnPickupShipment = {
carrier: ReturnCarrier;
pickupDate: string;
labelUrl?: string;
};
ReturnReasonConfigA reason a buyer may give, labelled per locale.
import { type ReturnReasonConfig } from "@evolve-framework/commercetools";
export type ReturnReasonConfig = {
code: string;
label: Record<string, string>;
requiresPhotos?: boolean;
};
ReturnShipmentRequestWhat a carrier is asked to arrange for one return.
import { type ReturnShipmentRequest } from "@evolve-framework/commercetools";
export type ReturnShipmentRequest = {
returnNumber: string;
returnAddress?: BaseAddress;
now: Date;
};
SearchResultA page of search hits, with the facets and redirect the search produced.
import { type SearchResult } from "@evolve-framework/commercetools";
export type SearchResult<T> = {
facets: NonNullable<Facet | undefined>[] | undefined;
items: T[];
pagination: Pagination;
queryId?: string;
correctedSearchTerm?: string;
redirect?: SearchRedirect;
};
ShippingMethodDeliveryWho delivers with a shipping method and when, each absent when unknown.
import { type ShippingMethodDelivery } from "@evolve-framework/commercetools";
export type ShippingMethodDelivery = {
carrier?: Carrier;
estimate?: DeliveryEstimate;
};
ShippingMethodDeliveryRequestWhat the delivery step asks a delivery provider about one shipping method.
import { type ShippingMethodDeliveryRequest } from "@evolve-framework/commercetools";
export type ShippingMethodDeliveryRequest = {
client: UserRequestBuilder;
storeKey: string;
shippingMethod: {
id: string;
key: string;
};
country?: string;
postalCode?: string;
now: Date;
};
StoreContextValues
import { type StoreContextValues } from "@evolve-framework/commercetools";
export type StoreContextValues = {
storeKey: string;
locale: string;
currency: string;
};
StoredAttachmentA photo or document a buyer uploaded, readable through url.
import { type StoredAttachment } from "@evolve-framework/commercetools";
export type StoredAttachment = {
id: string;
filename: string;
contentType: string;
url: string;
expiresAt?: string;
};
SubscriptionDeliveryWhat a subscription delivers, in either format commercetools offers.
import { type SubscriptionDelivery } from "@evolve-framework/commercetools";

The format is a property of the subscription rather than of its destination, so both arrive on Pub/Sub, on SQS and on Service Bus alike, and a project is free to leave it at the default.

export type SubscriptionDelivery = CloudEventsPayload | DeliveryPayload;
TokenInfoA token commercetools issued, with whom it is for and when it expires.
import { type TokenInfo } from "@evolve-framework/commercetools";
export type TokenInfo = {
subject: string;
refreshToken?: string;
accessToken: string;
expiresAt: number;
};
TradeInEstimateA provider's offer for a traded-in device.
import { type TradeInEstimate } from "@evolve-framework/commercetools";
export type TradeInEstimate = {
amount: Money;
validUntil?: string;
};
TradeInProviderThe source of trade-in estimates.
import { type TradeInProvider } from "@evolve-framework/commercetools";
export type TradeInProvider = {
estimate(request: TradeInRequest): Promise<TradeInEstimate | undefined>;
};
TradeInRequestWhat a trade-in provider is asked to value.
import { type TradeInRequest } from "@evolve-framework/commercetools";
export type TradeInRequest = {
sku: string;
deviceId: string;
answers: Record<string, string>;
currency: string;
country: string;
};
UserRequestBuilderA request builder for the project, authorized with a shopper's token.
import { type UserRequestBuilder } from "@evolve-framework/commercetools";
export type UserRequestBuilder = ByProjectKeyRequestBuilder;
VariantDimensionAttribute
import { type VariantDimensionAttribute } from "@evolve-framework/commercetools";
export type VariantDimensionAttribute = {
name: string;
type: "text" | "color" | "image";
};
VariantDimensionsConfigWhich attributes the variants of a product vary on, keyed by product type key.
import { type VariantDimensionsConfig } from "@evolve-framework/commercetools";
export type VariantDimensionsConfig = {
[productTypeKey: string]: VariantDimensionAttribute[];
};
VatNumberCheckAsks the register whether a VAT number is registered in country.
import { type VatNumberCheck } from "@evolve-framework/commercetools";
export type VatNumberCheck = (country: string, vatNumber: string) => Promise<{
status: VatNumberStatus;
}>;

@evolve-framework/commercetools/api-extension

Building blocks for commercetools API extensions, and ready-made ones such as order numbers, default shipping and the EU VAT rules.

Classes

ApiExtensionValidationErrorThrown by an extension that wants commercetools to refuse the write — a line the customer may not order, an address the ERP rejects.
import { ApiExtensionValidationError } from "@evolve-framework/commercetools/api-extension";

Any other error is an outage: the extension answers 500, and commercetools retries and then fails the operation with an extension error of its own. Keeping the two apart is the point of this class — before it, an extension could only throw, and every refusal looked like a broken service.

Extends Error

new ApiExtensionValidationError(errors: string | ErrorObject[])

Functions

applyDefaultShippingMethodPut the project's default shipping method on a cart that has an address but no shipping yet, so the shopper is shown a shipping cost and an order total before choosing anything.
import { applyDefaultShippingMethod } from "@evolve-framework/commercetools/api-extension";

The method is matched to the address in the payload rather than to the stored cart, which does not hold the update that brought the address yet. A method that cannot be read leaves the cart without one, and checkout asks.

function applyDefaultShippingMethod(
cart: Cart,
options: ApiExtensionContext<CartUpdateAction>,
): Promise<CartUpdateAction[]>
OptionTypeDescription
actionApiExtensionAction

The action being extended, for an extension registered on both.

clientByProjectKeyRequestBuilder

The system request builder. A getter, so an extension that never reads from commercetools costs no client.

clientFactoryClientFactory

For the rare extension that needs an associate or user request builder.

loggerLogger

Bound to the resource and the action, so an extension logs no context of its own.

signalAbortSignal

Aborts ahead of the deadline commercetools gives the extension. An extension that passes it to its own calls fails itself, with its own message, rather than being cut off mid-flight by a caller that reports only a timeout.

actionsreadonly CartUpdateAction[]

The actions the extensions before this one returned. Reading it is how an extension avoids contradicting an earlier one; it is live, so it grows as the invocation proceeds.

Returns Promise<CartUpdateAction[]>

applyVatRulesApply the standard EU VAT rules to a cart.
import { applyVatRules } from "@evolve-framework/commercetools/api-extension";

The rate follows the delivery country through the project's tax categories, or the seller's country where the goods count as supplied there. A reverse-charged or exported cart is set to an external 0% rate on every item at its current price, so its taxed price shows no VAT. It records why in the cart's vatReason field for Cart.vatOutcome, with the company's EORI number on an export. A business unit's cart follows the company's VAT registrations instead of the cart's own number. The billing country plays no part.

function applyVatRules(
options: ApplyVatRulesOptions,
): ApiExtension<Cart, CartUpdateAction>
OptionTypeDescription
sellerCountrystring

Where the seller is established, such as "NL".

reverseChargeRateName?string

What the 0% rate of a reverse-charged cart is called.

exportRateName?string

What the 0% rate of a cart delivered outside the EU is called.

legacyLineSlugs?string[]

Slugs of custom line items a cart may still carry to take its VAT off, such as "vat-shifting". They are removed, since the 0% rates do that.

pickupShippingMethods?string[]

Keys of the shipping methods whose goods the buyer collects at the seller's own premises, such as a warehouse counter. A cart shipped by one is taxed as a sale in the seller's member state, whatever its address.

Returns ApiExtension<Cart, CartUpdateAction>

createDispatcherRun the extensions registered for this input and collect their actions.
import { createDispatcher } from "@evolve-framework/commercetools/api-extension";

Transport-free by construction: no headers, no status codes, no secret. Every binding — Fastify, a web handler, a Lambda — reaches the extensions through this.

function createDispatcher(
options: DispatchOptions,
): ((input: ExtensionInput) => Promise<ExtensionOutput>)
OptionTypeDescription
extensionsApiExtensions
clientFactory?ClientFactory
timeout?number

Milliseconds an extension is given before context.signal aborts.

Returns ((input: ExtensionInput) => Promise<ExtensionOutput>)

createExtensionContext
import { createExtensionContext } from "@evolve-framework/commercetools/api-extension";
function createExtensionContext(
options: ExtensionContextOptions,
): ApiExtensionContext
OptionTypeDescription
actionApiExtensionAction
resourcekeyof ReferenceTypeToResourceMap
signalAbortSignal
actionsUpdateAction[]

The live action list, so context.actions grows as extensions run.

clientFactory?ClientFactory

Absent only on the legacy handler entry points, which have no module to take a client factory from. Reading context.client then throws with the fix in the message rather than a TypeError deep inside an extension.

Returns ApiExtensionContext

createHttpHandlerThe HTTP half of an extension: authorize, hand the body to dispatch, and turn what comes back into a status and a body.
import { createHttpHandler } from "@evolve-framework/commercetools/api-extension";

Neutral in both directions — it takes a header and a parsed body, and answers with a status and a body. Fastify, the web Request/Response pair and an API Gateway event all reduce to that, so each binding is a shape conversion and nothing else.

function createHttpHandler(
options: HttpHandlerOptions,
): ((request: ApiExtensionHttpRequest) => Promise<ApiExtensionHttpResponse>)
OptionTypeDescription
dispatch(input: ExtensionInput) => Promise<ExtensionOutput>
secret?string

The bearer token commercetools is configured to send. Checked here rather than in each binding, so no transport can be added that forgets to.

Returns ((request: ApiExtensionHttpRequest) => Promise<ApiExtensionHttpResponse>)

setCustomTypeAttach a custom type to the resource being created, or, where it already carries one, write only the given fields it does not hold yet.
import { setCustomType } from "@evolve-framework/commercetools/api-extension";

An order takes its cart's custom type and fields, and setting the type again would empty them. Reads only the resource, so it fits every resource's extension signature: each of them carries custom the same way.

function setCustomType(
options: SetCustomTypeOptions,
): (resource?: {
custom?: CustomFields;
}) => (SetCustomTypeAction | SetCustomFieldAction)[]
OptionTypeDescription
keystring

The key of the custom type, as the project provisioned it.

fields?FieldContainer

Field values to write along with it.

Returns (resource?: { custom?: CustomFields; }) => (SetCustomTypeAction | SetCustomFieldAction)[]

setOrderCustomerEmailMake sure an order carries the email of the customer who placed it.
import { setOrderCustomerEmail } from "@evolve-framework/commercetools/api-extension";

An order placed by an authenticated customer carries the customer id but not necessarily the email, and commercetools derives one from the other in neither direction. Every order needs it: it is what an order confirmation is sent to, and what a guest order is looked up by.

function setOrderCustomerEmail(
order: Order,
options: ApiExtensionContext<OrderUpdateAction>,
): Promise<OrderUpdateAction[]>
OptionTypeDescription
actionApiExtensionAction

The action being extended, for an extension registered on both.

clientByProjectKeyRequestBuilder

The system request builder. A getter, so an extension that never reads from commercetools costs no client.

clientFactoryClientFactory

For the rare extension that needs an associate or user request builder.

loggerLogger

Bound to the resource and the action, so an extension logs no context of its own.

signalAbortSignal

Aborts ahead of the deadline commercetools gives the extension. An extension that passes it to its own calls fails itself, with its own message, rather than being cut off mid-flight by a caller that reports only a timeout.

actionsreadonly OrderUpdateAction[]

The actions the extensions before this one returned. Reading it is how an extension avoids contradicting an earlier one; it is live, so it grows as the invocation proceeds.

Returns Promise<OrderUpdateAction[]>

setOrderNumberGive an order its order number, counted up in a commercetools custom object.
import { setOrderNumber } from "@evolve-framework/commercetools/api-extension";

The number is what a customer, an invoice and the ERP all refer to the order by, and commercetools generates none of its own — an order without one is identified by a uuid, which nobody can read out over the phone.

A project that needs something this cannot express — a number that carries the date, or a counter per store — writes its own extension around generateOrderNumber rather than growing this one an escape hatch.

function setOrderNumber(
options?: SetOrderNumberOptions,
): (_order: Order, { client }: ApiExtensionContext<OrderUpdateAction>) => Promise<OrderUpdateAction[]>
OptionTypeDescription
prefix?string

Put in front of the counter, e.g. NL- or WEB.

suffix?string

Put behind it.

padding?number

Zero-pad the counter to this many digits, so the first order reads 000001 rather than 1 and the numbers stay the same width for a while.

container?string

The custom object the counter is kept in.

key?string

Returns (_order: Order, { client }: ApiExtensionContext<OrderUpdateAction>) => Promise<OrderUpdateAction[]>

toFastifyHandlerMount an extension on a Fastify route.
import { toFastifyHandler } from "@evolve-framework/commercetools/api-extension";
function toFastifyHandler(
runtime: Pick<ApiExtensionRuntime, "handle">,
): FastifyHandler
OptionTypeDescription
handle(request: ApiExtensionHttpRequest) => Promise<ApiExtensionHttpResponse>

The secret check, the status codes and the response body.

Returns FastifyHandler

toLambdaHandlerServe an extension from a Lambda commercetools invokes directly — the AWSLambda destination, where the event is the extension input and the response carries a responseType instead of a status code.
import { toLambdaHandler } from "@evolve-framework/commercetools/api-extension";

There is no secret to check: that destination authenticates with IAM, so the bearer token an HTTP destination sends does not exist here. The check is skipped by choice, not by omission, which is why this binding reaches for dispatch rather than handle.

Generally prefer running extensions over HTTP: one container answers many invocations concurrently and has no cold start. Direct invocation is for a deployment that has no container to answer from.

function toLambdaHandler(
runtime: Pick<ApiExtensionRuntime, "dispatch">,
): ((input: ExtensionInput) => Promise<LambdaResponse>)
OptionTypeDescription
dispatch(input: ExtensionInput) => Promise<ExtensionOutput>

No auth and no HTTP: resolve the extensions, run them, collect the actions.

Returns ((input: ExtensionInput) => Promise<LambdaResponse>)

toWebHandlerServe an extension as a web-standard handler: Request in, Response out.
import { toWebHandler } from "@evolve-framework/commercetools/api-extension";

This is the binding for everything that is not the subgraph's own Fastify app — an Azure Functions HTTP trigger, a Cloud Run function, a Lambda behind a function URL. All of them either speak this pair or convert to it in a few lines, so the framework carries one HTTP binding instead of one per platform.

For a Lambda commercetools invokes directly, use toLambdaHandler: that destination sends no HTTP request at all.

function toWebHandler(
runtime: Pick<ApiExtensionRuntime, "handle">,
): ((request: Request) => Promise<Response>)
OptionTypeDescription
handle(request: ApiExtensionHttpRequest) => Promise<ApiExtensionHttpResponse>

The secret check, the status codes and the response body.

Returns ((request: Request) => Promise<Response>)

Types

ApiExtensionOne extension: given the resource, it returns the update actions to apply.
import { type ApiExtension } from "@evolve-framework/commercetools/api-extension";
export type ApiExtension<TResource extends _BaseResource, TAction extends UpdateAction> = (resource: TResource, context: ApiExtensionContext<TAction>) => Promise<TAction[]> | TAction[];
ApiExtensionActionThe two actions commercetools triggers an extension on.
import { type ApiExtensionAction } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionAction = "Create" | "Update";
ApiExtensionContextWhat an extension is given besides the resource: a commercetools client to read with, and the invocation it is part of.
import { type ApiExtensionContext } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionContext<TAction extends UpdateAction = UpdateAction> = {
readonly action: ApiExtensionAction;
readonly client: RequestBuilder;
readonly clientFactory: ClientFactory;
readonly logger: Logger;
readonly signal: AbortSignal;
readonly actions: readonly TAction[];
};
ApiExtensionHttpRequestThe parts of commercetools' HTTP call an extension reads.
import { type ApiExtensionHttpRequest } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionHttpRequest = {
headers: {
authorization?: string | undefined;
};
body: unknown;
};
ApiExtensionHttpResponseThe status and body an extension answers commercetools' call with.
import { type ApiExtensionHttpResponse } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionHttpResponse = {
status: number;
body?: ExtensionOutput;
};
ApiExtensionResourceThe resource type ids an extension can run on.
import { type ApiExtensionResource } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionResource = keyof ReferenceTypeToResourceMap;
ApiExtensionRuntimeWhat a transport binding needs of an extension.
import { type ApiExtensionRuntime } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionRuntime = {
dispatch(input: ExtensionInput): Promise<ExtensionOutput>;
handle(request: ApiExtensionHttpRequest): Promise<ApiExtensionHttpResponse>;
};
ApiExtensionsThe extensions an extension runs, keyed by resource and action.
import { type ApiExtensions } from "@evolve-framework/commercetools/api-extension";

Resource keys are disjoint, so a split deployment can mount a subset.

export type ApiExtensions = { [K in ApiExtensionResource]?: ResourceExtensions<ReferenceTypeToResourceMap[K][0], ReferenceTypeToResourceMap[K][1]>; };
ApiExtensionTriggerA trigger an extension has to be registered for to receive anything.
import { type ApiExtensionTrigger } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionTrigger = {
resourceTypeId: ApiExtensionResource;
actions: ApiExtensionAction[];
};
ExtensionOutputWhat an extension answers commercetools: update actions, or errors.
import { type ExtensionOutput } from "@evolve-framework/commercetools/api-extension";
export type ExtensionOutput = {
actions?: UpdateAction[];
errors?: ErrorObject[];
};
FastifyHandler
import { type FastifyHandler } from "@evolve-framework/commercetools/api-extension";
export type FastifyHandler = (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
ReferenceTypeToResourceMapEach resource an extension can run on, with its update action type.
import { type ReferenceTypeToResourceMap } from "@evolve-framework/commercetools/api-extension";
export type ReferenceTypeToResourceMap = {
cart: [Cart, CartUpdateAction];
order: [Order, OrderUpdateAction];
product: [Product, ProductUpdateAction];
payment: [Payment, PaymentUpdateAction];
customer: [Customer, CustomerUpdateAction];
};

@evolve-framework/commercetools/catalog

The product source a search index is built from, and the mapper from products to search documents.

Classes

CategoryResolverResolves a category to its full root → leaf path, caching what it has seen.
import { CategoryResolver } from "@evolve-framework/commercetools/catalog";

The cache has no TTL and never invalidates, so an instance must not outlive one sync operation — CommercetoolsCatalogSource constructs a fresh one per operation for that reason. Held longer, it would keep serving a renamed category's old name and path until the process restarted.

Instance-scoped rather than static, too: the previous implementation was a singleton bound to whichever ctApi first constructed it, so a second client (a different store projection, or a test) silently reused the first one's connection and cache.

new CategoryResolver(ctApi: ByProjectKeyRequestBuilder)
MethodDescription
getPath(id: string): Promise<Category[]>The category and its ancestors, ordered root → leaf.
CommercetoolsCatalogSourceFeeds search documents from commercetools.
import { CommercetoolsCatalogSource } from "@evolve-framework/commercetools/catalog";

Owns the commercetools half of the sync: which stores map to which scopes, what to fetch for a product, and which mapper turns it into documents. The search provider is not visible from here.

new CommercetoolsCatalogSource(options: CommercetoolsCatalogSourceOptions<TDoc>)
OptionTypeDescription
clientFactoryClientFactory
mappers?ProductDocumentMapper<TDoc>[]

Document mappers, most specific first. The first one whose match accepts a product wins. Defaults to a single DefaultProductDocumentMapper.

enrich?DocumentEnricher<TDoc>[]

Applied to every document a mapper produces, in order.

scopes?IndexScope[]

Scopes to sync. Overrides scopeGranularity entirely.

scopeGranularity?"store" | "language" | "locale"

How many targets a store maps to. This is a business decision as much as a technical one, so it is a setting rather than an assumption.

More

"language" (the default) gives one target per store and language, folding a language's regional variants together — nl-NL and nl-BE share one Dutch target. Each target can then have language-correct index-time processing (Dutch compound splitting via indexLanguages and decompoundedAttributes cannot be scoped to only the Dutch fields of a shared index) plus its own synonyms, Rules, merchandising and analytics.

"locale" keeps every locale separate, so nl-NL and nl-BE get their own targets. Only worth it when the regional variants really differ in content; pair it with localeIndexName so their index names differ too.

"store" gives one target per store holding every language. That keeps a single event stream, so Recommend models, Dynamic Re-Ranking and analytics see all the traffic instead of a fraction each, and curation lives in one place. In exchange, queries must filter by language and pass queryLanguages per request, and index-time processing is shared.

Per-language is the default because index-time language processing cannot be recovered at query time, while most of the rest can — and because regional variants of one language rarely justify separate relevance tuning.

perPage?number

Products fetched per page during a reindex.

standalonePrices?boolean | "auto"

Where prices come from.

More

"auto" (the default) follows each product's own priceMode, which is what commercetools itself does — a project can mix embedded and standalone pricing per product. Force it with a boolean only to override that.

Getting this wrong is quiet and severe: a standalone-priced product read as embedded has no prices, and a product with no price in scope is treated as "not indexable" and removed from the target.

relatedProducts?boolean

Follow the related-products attribute so a product's variant dimensions can span sibling products (each colour modelled as its own product).

More

Costs one extra request per page to load the siblings, and makes a product's document depend on its siblings — see CommercetoolsCatalogSource.getAffectedEntities. Defaults to false.

scopeCacheTtlMs?number

How long resolved scopes stay cached, in milliseconds. Defaults to five minutes; 0 disables caching.

More

Resolving scopes costs a project read plus a paged store read, and getScopes() is called once per synced entity — so an event-driven indexer would spend most of its requests on it. Cached for the whole process lifetime instead, a new store or a new store language would never be picked up until a redeploy, so this is a lifetime rather than a permanent memo.

MethodDescription
getScopes(): Promise<IndexScope[]>One scope per store.
getDocuments(scope: IndexScope, sourceId: string): Promise<TDoc[]>Build every document for one source entity in one scope.
iterate(scope: IndexScope): AsyncIterable<TDoc[]>Every document for a scope, batched per source entity.
getAffectedEntities(sourceId: string): Promise<string[]>Sibling products whose documents embed this one.
DefaultProductDocumentMapperMaps a commercetools product projection to the standard ProductDocument: one document per product, carrying every locale in the scope and prices resolved per currency and country.
import { DefaultProductDocumentMapper } from "@evolve-framework/commercetools/catalog";

Registered last (no match), so it handles whatever no other mapper claims.

new DefaultProductDocumentMapper(options?: DefaultProductDocumentMapperOptions)
OptionTypeDescription
documentType?string
dimensions?DimensionConfigResolver

Which attributes the variants vary on, per product. Defaults to the built-in product-type map; supply your own to configure product types without changing the framework. Return [] to skip dimension indexing.

minimumQuantityAttribute?string

The variant attributes holding a minimum order quantity, a maximum per line and a pack size, for each variant's quantityRule. Give them the names CatalogModule and CartModule are given, so a search hit allows what the cart accepts. Without any of them, no variant carries one.

maximumQuantityAttribute?string
packSizeAttribute?string
MethodDescription
build( product: ProductProjection, context: ProductBuildContext, ): Promise<ProductDocument[]>Build the documents for one product.
VariantDocumentMapperOne document per variant, or per group of variants.
import { VariantDocumentMapper } from "@evolve-framework/commercetools/catalog";

Both are Algolia's answer to variants, and both rely on distinct + attributeForDistinct at query time so a listing still shows one row per product. What they buy over nesting variants in a product record is accuracy: Algolia's own guidance is that with per-variant records "a filter like color: green AND size: 40 returns only matching variants, not entire products with partial matches" — the product-level model needs the frontend to post-process hits to achieve the same thing. Ranking also becomes per variant, so the best-matching one surfaces rather than whichever is first in the array.

The cost is duplication: product-level fields repeat on every document, which is why grouping usually beats one-per-variant. A bike in two colours and five sizes is ten records ungrouped, two grouped by colour.

Every document keeps the product's sourceId: it is the deduplication key and how the sync engine removes the whole set when the product changes.

Extends DefaultProductDocumentMapper

new VariantDocumentMapper(options?: VariantDocumentMapperOptions)
OptionTypeDescription
documentType?string
dimensions?DimensionConfigResolver

Which attributes the variants vary on, per product. Defaults to the built-in product-type map; supply your own to configure product types without changing the framework. Return [] to skip dimension indexing.

minimumQuantityAttribute?string

The variant attributes holding a minimum order quantity, a maximum per line and a pack size, for each variant's quantityRule. Give them the names CatalogModule and CartModule are given, so a search hit allows what the cart accepts. Without any of them, no variant carries one.

maximumQuantityAttribute?string
packSizeAttribute?string
groupBy?string | ((product: ProductProjection) => string | undefined)

Attribute whose distinct values become one document each — Algolia's "variation-group-level" model, and the one they recommend as the compromise between a record per product and a record per variant.

More

Typically the axis a shopper browses by: "colour" gives one card per colour, with that colour's sizes nested inside it.

Omit for the variant-level model: one document per variant.

A function receives the product, so the axis can differ per product type — see primaryDimensionAxis.

documentId?((product: ProductProjection, group: string[]) => string)

Build a document's id. Defaults to the SKU of the group's first variant (so, the SKU itself when there is no grouping) — unique per project and stable across reindexes.

Functions

getCategoryById
import { getCategoryById } from "@evolve-framework/commercetools/catalog";
function getCategoryById(
ctApi: ByProjectKeyRequestBuilder,
id: string,
): Promise<Category | undefined>

Returns Promise<Category | undefined>

getProductProjectionFetch one product projection, optionally projected onto a store.
import { getProductProjection } from "@evolve-framework/commercetools/catalog";

Returns undefined when the product does not exist (or is not in the store), which the sync engine treats as "remove it from this target". Any other failure throws, so a provider outage retries instead of silently emptying an index.

function getProductProjection(
ctApi: ByProjectKeyRequestBuilder,
productId: string,
options?: { storeKey?: string | undefined; expand?: readonly string[] | undefined; },
): Promise<ProductProjection | undefined>
OptionTypeDescription
storeKey?string
expand?readonly string[]

Returns Promise<ProductProjection | undefined>

getProject
import { getProject } from "@evolve-framework/commercetools/catalog";
function getProject(ctApi: ByProjectKeyRequestBuilder): Promise<Project>

Returns Promise<Project>

getStandalonePricesStandalone prices for one product, keyed by SKU.
import { getStandalonePrices } from "@evolve-framework/commercetools/catalog";
function getStandalonePrices(
ctApi: ByProjectKeyRequestBuilder,
product: ProductProjection,
): Promise<Map<string, StandalonePrice[]>>

Returns Promise<Map<string, StandalonePrice[]>>

getStandalonePricesForProductsStandalone prices for several products at once, keyed by SKU.
import { getStandalonePricesForProducts } from "@evolve-framework/commercetools/catalog";

A reindex walks products a page at a time; fetching prices per product would add one request per product on top of the page itself. SKUs are queried in chunks and each chunk is paged, so a page of products with many variants cannot silently exceed the query limit and lose prices.

function getStandalonePricesForProducts(
ctApi: ByProjectKeyRequestBuilder,
products: ProductProjection[],
): Promise<Map<string, StandalonePrice[]>>

Returns Promise<Map<string, StandalonePrice[]>>

getStoresEvery store in the project, paged through by a (createdAt, id) keyset cursor.
import { getStores } from "@evolve-framework/commercetools/catalog";

createdAt alone is not unique, so a strict createdAt > cursor would skip whichever stores share the boundary timestamp with the last row of a full page — and a provisioning script that creates stores in one batch produces exactly that. Dropping a store here drops its whole index from the sync, not just some documents.

function getStores(ctApi: ByProjectKeyRequestBuilder): Promise<Store[]>

Returns Promise<Store[]>

iterateProductPagesIterate product projections a page at a time.
import { iterateProductPages } from "@evolve-framework/commercetools/catalog";

Pages rather than single products so a document mapper's load hook can batch its own lookups (stock, ratings) once per page instead of once per product.

Paging is by keyset cursor rather than offset: offset paging drifts when the catalog changes underneath a long-running reindex.

The cursor is (createdAt, id), not createdAt alone. createdAt is not unique — a bulk import or a scripted create writes many products in the same millisecond — so a strict createdAt > cursor silently drops every product that shares the boundary timestamp with the last row of a full page, and sort: "createdAt asc" on its own does not even order those rows stably between requests. Adding id makes the sort total and the predicate exact.

function iterateProductPages(
ctApi: ByProjectKeyRequestBuilder,
options?: IterateProductsOptions,
): AsyncGenerator<ProductProjection[], void, unknown>
OptionTypeDescription
perPage?number
storeKey?string
expand?readonly string[]

Returns AsyncGenerator<ProductProjection[], void, unknown>

iterateProductsIterate product projections one at a time.
import { iterateProducts } from "@evolve-framework/commercetools/catalog";
function iterateProducts(
ctApi: ByProjectKeyRequestBuilder,
perPage?: number,
): AsyncGenerator<ProductProjection, void, unknown>

Returns AsyncGenerator<ProductProjection, void, unknown>

primaryDimensionAxisThe product type's primary variant axis — the first attribute its dimension configuration lists, which by convention is the one a shopper browses by (colour, rather than size).
import { primaryDimensionAxis } from "@evolve-framework/commercetools/catalog";

Use as groupBy to group by that axis whatever the product type calls it: colour for a bike, color for clothing.

function primaryDimensionAxis(product: ProductProjection): string | undefined

Returns string | undefined

selectMapperThe first mapper that claims this product, or undefined.
import { selectMapper } from "@evolve-framework/commercetools/catalog";
function selectMapper<TDoc>(
mappers: ProductDocumentMapper<TDoc>[],
product: ProductProjection,
): ProductDocumentMapper<TDoc> | undefined

Returns ProductDocumentMapper<TDoc> | undefined

Constants

productExpandExpands a product projection needs before it can be turned into a search document: categories for the hierarchy, productType so a document mapper can be selected by product type key, and taxCategory so prices can be resolved to net/gross at index time instead of at query time.
import { productExpand } from "@evolve-framework/commercetools/catalog";
const productExpand: readonly ["categories[*]", "productType", "taxCategory"]

Types

CommercetoolsCatalogSourceOptions
import { type CommercetoolsCatalogSourceOptions } from "@evolve-framework/commercetools/catalog";
export type CommercetoolsCatalogSourceOptions<TDoc extends SearchDocument> = {
clientFactory: ClientFactory;
mappers?: ProductDocumentMapper<TDoc>[];
enrich?: DocumentEnricher<TDoc>[];
scopes?: IndexScope[];
scopeGranularity?: "language" | "locale" | "store";
perPage?: number;
standalonePrices?: boolean | "auto";
relatedProducts?: boolean;
scopeCacheTtlMs?: number;
};
DocumentEnricherAdditive customisation: adjust every document without replacing a mapper.
import { type DocumentEnricher } from "@evolve-framework/commercetools/catalog";
export type DocumentEnricher<TDoc extends SearchDocument> = (document: TDoc, product: ProductProjection, context: ProductBuildContext) => TDoc | Promise<TDoc>;
ProductBuildContextEverything a mapper gets handed to build documents for one product.
import { type ProductBuildContext } from "@evolve-framework/commercetools/catalog";
export type ProductBuildContext = {
ctApi: RequestBuilder;
scope: IndexScope;
categories: CategoryResolver;
discounts: ProductDiscountResolver;
standalonePrices?: Map<string, StandalonePrice[]>;
relatedProducts?: ProductProjection[];
data?: unknown;
};
ProductDocumentMapperHow one kind of product becomes search documents.
import { type ProductDocumentMapper } from "@evolve-framework/commercetools/catalog";

Consumers register a mapper per product type — a bundle indexes its components, a spare part indexes its fitment data, a gift card may not be indexed at all. The first mapper whose match accepts a product wins; a mapper without match is the fallback.

export type ProductDocumentMapper<TDoc extends SearchDocument> = {
readonly documentType: string;
readonly match?: string[] | ((product: ProductProjection) => boolean);
readonly expand?: readonly string[];
readonly fansOut?: boolean;
load?(products: ProductProjection[], context: Omit<ProductBuildContext, "data">): Promise<unknown>;
build(product: ProductProjection, context: ProductBuildContext): Promise<TDoc[]>;
};

@evolve-framework/commercetools/sitemap

The product source for sitemap generation.

Classes

CommercetoolsProductSitemapSourceFeeds product URLs from commercetools.
import { CommercetoolsProductSitemapSource } from "@evolve-framework/commercetools/sitemap";

Pages by an id cursor rather than the createdAt cursor iterateProductPages uses: createdAt is not unique, so a bulk import writes many products in the same millisecond and a strict > cursor drops every one of them that shares the boundary. Ids are unique, so the cursor cannot skip a product however they are ordered.

It does not follow that a partition can be expressed as an id range — see CommercetoolsProductSitemapSource.supportsIdRange, which is off.

No expand: a sitemap needs the id, the slug and a timestamp, all of which the projection already carries. Expanding categories or prices here would cost a lookup per page for data that never reaches the file.

new CommercetoolsProductSitemapSource(options: CommercetoolsProductSitemapSourceOptions)
OptionTypeDescription
clientFactoryClientFactory
scopes?SitemapScope[]

Overrides store-derived scopes. Mostly for tests and single-store setups.

perPage?number

Products per request. commercetools allows up to 500.

lastModifiedAt?((product: ProductProjection) => string | undefined)

When a product last changed in a way a visitor can see.

More

Defaults to lastModifiedAt, which is the only signal available without extra requests — and which moves on any write: an internal attribute correction, a nightly price feed, a bulk touch during a migration. If a scheduled job writes every product, every lastmod advances daily and the field stops carrying information. Return undefined to omit it, or derive it from a narrower signal such as a custom field the PIM only sets on customer-visible edits.

MethodDescription
getScopes(): Promise<SitemapScope[]>One scope per store language, falling back to the project languages.
iterate( scope: SitemapScope, range?: IdRange, ): AsyncIterable<SitemapEntry[]>Every entry for one scope, batched, so a source pages its backend once per batch rather than once per entry.

@evolve-framework/commercetools/algolia

Helpers that write products straight to an Algolia index; @evolve-framework/search-algolia with the catalog source is the replacement.

Functions

configureAlgoliaConfigSets the app id and write key createAlgoliaClient connects with.
import { configureAlgoliaConfig } from "@evolve-framework/commercetools/algolia";
function configureAlgoliaConfig(config: AlgoliaConfig): void
OptionTypeDescription
ALGOLIA_APP_IDstring
ALGOLIA_WRITE_API_KEYstring

Returns void

createAlgoliaClientAn Algolia client; throws until configureAlgoliaConfig has run.
import { createAlgoliaClient } from "@evolve-framework/commercetools/algolia";
function createAlgoliaClient(): Algoliasearch

Returns Algoliasearch

createCategoryPageIdThe deepest entry of the category path, such as men > shoes, keyed by category key.
import { createCategoryPageId } from "@evolve-framework/commercetools/algolia";
function createCategoryPageId(categories: Category[]): string

Returns string

createCategoryPathTransforms an array of category objects to an array of category paths.
import { createCategoryPath } from "@evolve-framework/commercetools/algolia";
function createCategoryPath(categories: Category[]): string[]

Returns string[]

createIndexNameCreates an index name for a store.
import { createIndexName } from "@evolve-framework/commercetools/algolia";
function createIndexName(storeKey: string, suffix?: string | undefined): string

Returns string

deleteProductDeletes the product's record from indexName; a failure is logged.
import { deleteProduct } from "@evolve-framework/commercetools/algolia";
function deleteProduct(indexName: string, productID: string): Promise<void>

Returns Promise<void>

getCategoryByIdReturn a commercetools Category instance by its ID.
import { getCategoryById } from "@evolve-framework/commercetools/algolia";
function getCategoryById(
ctApi: ByProjectKeyRequestBuilder,
id: string,
): Promise<Category>

Returns Promise<Category>

getProductProjectionByID
import { getProductProjectionByID } from "@evolve-framework/commercetools/algolia";
function getProductProjectionByID(
ctApi: ByProjectKeyRequestBuilder,
productId: string,
storeKey?: string,
): Promise<ProductProjection | undefined>

Returns Promise<ProductProjection | undefined>

getProjectConfigurationFetches the project configuration.
import { getProjectConfiguration } from "@evolve-framework/commercetools/algolia";
function getProjectConfiguration(
ctApi: ByProjectKeyRequestBuilder,
): Promise<Project>

Returns Promise<Project>

getStandalonePricesStandalone prices for one product, keyed by SKU.
import { getStandalonePrices } from "@evolve-framework/commercetools/algolia";
function getStandalonePrices(
ctApi: ByProjectKeyRequestBuilder,
product: ProductProjection,
): Promise<Map<string, StandalonePrice[]>>

Returns Promise<Map<string, StandalonePrice[]>>

getStoresFetches all stores.
import { getStores } from "@evolve-framework/commercetools/algolia";
function getStores(ctApi: ByProjectKeyRequestBuilder): Promise<Store[]>

Returns Promise<Store[]>

iterateProductsIterate product projections one at a time.
import { iterateProducts } from "@evolve-framework/commercetools/algolia";
function iterateProducts(
ctApi: ByProjectKeyRequestBuilder,
perPage?: number,
): AsyncGenerator<ProductProjection, void, unknown>

Returns AsyncGenerator<ProductProjection, void, unknown>

mapProductProjectionToAlgoliaRecordThe product's Algolia record for one store, its localized fields limited to locales.
import { mapProductProjectionToAlgoliaRecord } from "@evolve-framework/commercetools/algolia";
function mapProductProjectionToAlgoliaRecord(
ctApi: ByProjectKeyRequestBuilder,
product: ProductProjection,
prices: Map<string, StandalonePrice[]> | undefined,
storeKey: string,
locales: string[],
): Promise<AlgoliaProductRecord | undefined>

Returns Promise<AlgoliaProductRecord | undefined>

updateProductWrites the product's record to the index of every store it has a price in.
import { updateProduct } from "@evolve-framework/commercetools/algolia";
function updateProduct(
ctApi: ByProjectKeyRequestBuilder,
productId: string,
): Promise<void>

Returns Promise<void>

upsertProductWrites the records to indexName, creating those it lacks.
import { upsertProduct } from "@evolve-framework/commercetools/algolia";
function upsertProduct(
indexName: string,
algoliaProductRecords: AlgoliaProductRecord[],
): Promise<void>

Returns Promise<void>

Types

AlgoliaProductPrice
import { type AlgoliaProductPrice } from "@evolve-framework/commercetools/algolia";
export type AlgoliaProductPrice = {
currency: string;
centAmount: number;
};
AlgoliaProductRecordA product as written to an Algolia index, one record per store.
import { type AlgoliaProductRecord } from "@evolve-framework/commercetools/algolia";
export type AlgoliaProductRecord = {
objectID: string;
name: LocalizedString;
slug: LocalizedString;
description: LocalizedString;
variants: AlgoliaProductVariant[];
categoryPageId: string[];
hierarchicalCategories: ProductCategoryHierarchy;
startingPrice: AlgoliaProductPrice;
image: string | undefined;
};
AlgoliaProductVariantA variant with a price in the store, as part of an Algolia record.
import { type AlgoliaProductVariant } from "@evolve-framework/commercetools/algolia";
export type AlgoliaProductVariant = {
id: string;
sku: string;
image: string | undefined;
price: AlgoliaProductPrice;
attributes: Record<string, AlgoliaAttributeValue>;
};
ProductCategoryHierarchyCategory paths per depth, as Algolia's hierarchical facets read them.
import { type ProductCategoryHierarchy } from "@evolve-framework/commercetools/algolia";
export type ProductCategoryHierarchy = {
lvl0: string | undefined;
lvl1: string | undefined;
lvl2: string | undefined;
lvl3: string | undefined;
};

@evolve-framework/commercetools/payments

The payment adapter contract and registry that payment packages implement, and the remote adapter that reaches a payment service over HTTP.

Classes

BasePaymentAdapterBase class for in-process payment providers.
import { BasePaymentAdapter } from "@evolve-framework/commercetools/payments";
new BasePaymentAdapter(clientFactory: ClientFactory)
MethodDescription
init(): Promise<void>One-shot, idempotent initialization (build SDK clients, etc.).
getRoutes(): ((app: FastifyInstance) => void) | undefinedProvider-specific external routes to publish when this adapter is hosted as a service — principally the webhook endpoint the PSP calls with async payment updates, plus any redirect-return routes.
getPaymentMethods( args: { targetId?: string | undefined; locale: string; targetType: "cart" | "order" | "invoice"; currency: string; country: string; device: "WEB" | "IOS" | "ANDROID"; }, ): Promise<PaymentMethod[]>Resolve the available payment methods for a cart/order.
createTransaction( req: { collected?: { currency: string; centAmount: number; } | undefined; customer: { ipAddress: string; }; locale: string; targetId: string; targetType: "cart" | "order" | "invoice"; amount: { currency: string; centAmount: number; }; paymentId: string; paymentMethod: string; paymentMethodArgs: { [x: string]: any; }; successUrl: string; failureUrl: string; }, ): Promise<TransactionResponse>Create (start) a transaction for a payment.
onOrderCreated(listener: OrderCreatedListener): voidRegisters what the adapter calls once an order exists for a cart it settled, or an order it settled was placed before it was paid.
PaymentErrorThrown by a payment adapter when a transaction cannot be started.
import { PaymentError } from "@evolve-framework/commercetools/payments";

Extends Error

new PaymentError(message?: string)
PaymentRegistryHolds the payment providers a service knows about, keyed by adapter.identifier.
import { PaymentRegistry } from "@evolve-framework/commercetools/payments";
const payments = new PaymentRegistry()
  .register(new AdyenPaymentAdapter({ … }))     // in-process
  .register(Remote("paypal", "https://…/paypal")); // remote bridge
new PaymentRegistry()
MethodDescription
register(adapter: PaymentAdapter): PaymentRegistry
get(identifier: string): PaymentAdapter | undefined
list(): PaymentAdapter[]
init(): Promise<void>Initialize every registered adapter once (idempotent).
getRoutes(): (app: FastifyInstance) => voidAggregate the external (webhook/redirect) routes of every registered adapter into one Fastify callback, each provider encapsulated under a /<identifier> prefix.
RemotePaymentAdapterA PaymentAdapter that forwards every call over HTTP to a remote payment service (one hosting the real adapter behind a RemotePaymentPublisher).
import { RemotePaymentAdapter } from "@evolve-framework/commercetools/payments";
new RemotePaymentAdapter(identifier: string, endpoint: string, options?: RemotePaymentAdapterOptions)
OptionTypeDescription
timeoutMs?number

Per-request timeout in ms (defaults to DEFAULT_REMOTE_TIMEOUT_MS).

secret?string

Shared secret sent as authorization: Bearer <secret> on every request. Must match the secret configured on the remote RemotePaymentPublisher.

inFlightWindowMs?((payment: Payment) => number | undefined)

How long a transaction the remote adapter started may stay open, as that adapter's inFlightWindowMs would answer. Given here because the answer is read on every payability check, which is no place for a round trip.

MethodDescription
inFlightWindowMs(payment: Payment): number | undefinedHow long, in milliseconds, a transaction this adapter started may stay open before it counts as abandoned rather than in flight.
init(): Promise<void>One-shot, idempotent initialization (build SDK clients, etc.).
getRoutes(): undefinedProvider-specific external routes to publish when this adapter is hosted as a service — principally the webhook endpoint the PSP calls with async payment updates, plus any redirect-return routes.
getPaymentMethods( args: { targetId?: string | undefined; locale: string; targetType: "cart" | "order" | "invoice"; currency: string; country: string; device: "WEB" | "IOS" | "ANDROID"; }, ): Promise<PaymentMethod[]>Resolve the available payment methods for a cart/order.
createTransaction( req: { collected?: { currency: string; centAmount: number; } | undefined; customer: { ipAddress: string; }; locale: string; targetId: string; targetType: "cart" | "order" | "invoice"; amount: { currency: string; centAmount: number; }; paymentId: string; paymentMethod: string; paymentMethodArgs: { [x: string]: any; }; successUrl: string; failureUrl: string; }, ): Promise<TransactionResponse>Create (start) a transaction for a payment.
validateApplePaySession( args: { cartId: string; displayName: string; domainName: string; merchantIdentifier: string; }, ): Promise<{ data: string; }>Validate an Apple Pay session.
updateExpressCheckout( args: { amount: { currency: string; centAmount: number; }; paymentId: string; paymentData: string; deliveryMethods: { reference: string; amount: { currency: string; centAmount: number; }; description: string; selected: boolean; }[]; }, ): Promise<{ paymentData: string; }>Bring a wallet payment in progress up to date with the cart, for a wallet whose own sheet changes the address or shipping, such as PayPal Express.
submitPaymentDetails( args: { targetId: string; targetType: "cart" | "order" | "invoice"; paymentId: string; details: { [x: string]: any; }; }, ): Promise<TransactionResponse>Continue a transaction whose start answered with an action for the provider's component, with what that component reported.
cancelPayment( args: { targetId: string; targetType: "cart" | "order" | "invoice"; paymentId: string; }, ): Promise<{ cancelled: boolean; }>Withdraw a payment the shopper abandoned in the provider's component, and release its target.

Functions

RemoteConstruct a RemotePaymentAdapter for a provider that runs in a separate service, reachable over HTTP at endpoint.
import { Remote } from "@evolve-framework/commercetools/payments";
RemotePaymentPublisherThe server half of the remote bridge: takes a PaymentAdapter and exposes it over HTTP so a RemotePaymentAdapter in another process can call it.
import { RemotePaymentPublisher } from "@evolve-framework/commercetools/payments";

The routes are registered in an encapsulated Fastify context, so the optional shared-secret guard applies only to these internal routes — never to a co-hosted healthcheck or the provider's public webhook/redirect routes.

Returns a Fastify routes callback so the caller decides where to mount it (e.g. PaymentProviderModule under the service root).

PropTypeDescription
identifierstring
getPaymentMethods(args: { targetId?: string | undefined; locale: string; targetType: "cart" | "order" | "invoice"; currency: string; country: string; device: "WEB" | "IOS" | "AN…

Resolve the available payment methods for a cart/order.

createTransaction(req: { collected?: { currency: string; centAmount: number; } | undefined; customer: { ipAddress: string; }; locale: string; targetId: string; targetType: "cart…

Create (start) a transaction for a payment.

init() => Promise<void>

One-shot, idempotent initialization (build SDK clients, etc.).

getRoutes() => ((app: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProviderDefault>) => void) | unde…

Provider-specific external routes to publish when this adapter is hosted as a service — principally the webhook endpoint the PSP calls with async payment updates, plus any redirect-return routes. Returns a Fastify callback the host mounts, or undefined when there are none.

More

A RemotePaymentAdapter returns undefined: it is only a client bridge, so the webhook routes live on the remote service that hosts the real adapter, not here.

inFlightWindowMs?((payment: Payment) => number | undefined)

How long, in milliseconds, a transaction this adapter started may stay open before it counts as abandoned rather than in flight. Undefined -- or no method at all -- means it may stay open indefinitely.

More

Only the adapter can say, because the answer depends on the method: a redirect the provider itself expires within the hour is abandoned long before a bank transfer that is still legitimately on its way. The window has to outlast the provider's own, since a transaction counted as abandoned no longer stops the buyer paying again.

openPaymentRedirect?((payment: Payment) => Promise<string | undefined>)

The page where the shopper can still complete a payment this adapter started, while the provider holds it open. Undefined -- or no method at all -- when there is no such page to send them back to. Asked on every read, so the answer is the provider's current one rather than a guess at when it expires.

partialAmount?((target: Cart | Order, methodArgs: Record<string, unknown>) => Promise<number>)

The most this method can cover of what the target still owes, for a method that pays only part of it, such as a gift card. Its presence is what marks a method as partial: the payment is planned for the smaller of this and what is left to pay, several such payments may sit on one cart, and the cart is not frozen until the payment that completes the coverage starts.

captureReserved?((payment: Payment) => Promise<void>)

Take the money a partial payment reserved, called once the order exists. Idempotent: it may be called again after a failure, and it must not capture twice. A failure leaves the order's balance due and is logged, never undone.

releaseReserved?((payment: Payment, centAmount?: number | undefined) => Promise<void>)

Give back what a partial payment reserved, up to centAmount or all of it when absent. Called when the buyer removes the payment, when a cart change leaves it covering more than is owed, and when the order is never created.

reservationExpiresAt?((payment: Payment) => Date | undefined)

When what a partial payment reserved lapses at the provider, if it does. A reservation past that moment stops counting as secured on a read, and is recorded as cancelled when its cart is next paid. Absent for a provider whose reservations do not lapse.

onOrderCreated?((listener: OrderCreatedListener) => void)

Registers what the adapter calls once an order exists for a cart it settled, or an order it settled was placed before it was paid. The registry sets it to take the money partial payments reserved; an adapter that does not extend BasePaymentAdapter may ignore it.

validateApplePaySession?((args: { cartId: string; displayName: string; domainName: string; merchantIdentifier: string; }) => Promise<{ data: string; }>)

Validate an Apple Pay session. Optional — not every provider supports it.

updateExpressCheckout?((args: { amount: { currency: string; centAmount: number; }; paymentId: string; paymentData: string; deliveryMethods: { reference: string; amount: { currency: s…

Bring a wallet payment in progress up to date with the cart, for a wallet whose own sheet changes the address or shipping, such as PayPal Express. Optional — not every provider supports it.

submitPaymentDetails?((args: { targetId: string; targetType: "cart" | "order" | "invoice"; paymentId: string; details: { [x: string]: any; }; }) => Promise<{ status: string; payload…

Continue a transaction whose start answered with an action for the provider's component, with what that component reported. Answers like createTransaction and settles the target as a provider notification would. Optional — only a provider that answers with an action needs it.

cancelPayment?((args: { targetId: string; targetType: "cart" | "order" | "invoice"; paymentId: string; }) => Promise<{ cancelled: boolean; }>)

Withdraw a payment the shopper abandoned in the provider's component, and release its target. Answers false, changing nothing, once the provider has taken money or is deciding on it. Optional, like submitPaymentDetails.

amountToPayWhat the buyer still has to pay: the gross total less everything secured.
import { amountToPay } from "@evolve-framework/commercetools/payments";
function amountToPay(
target: Cart | Order,
): {
currencyCode: string;
centAmount: number;
}

Returns { currencyCode: string; centAmount: number; }

createFailureUrlCreates a failure redirect URL with error context parameters.
import { createFailureUrl } from "@evolve-framework/commercetools/payments";
function createFailureUrl(
failureUrl: string,
reason: string | undefined,
targetId: string,
targetType: string,
): string

Returns string

createInvoiceSuccessUrlCreates a success redirect URL for a settled invoice.
import { createInvoiceSuccessUrl } from "@evolve-framework/commercetools/payments";

Named apart from the order parameter rather than reusing it. What was paid is an invoice, and an invoice may bill several orders or none -- a client reading orderId and being handed an invoice id has no way to tell.

function createInvoiceSuccessUrl(successUrl: string, invoiceId: string): string

Returns string

createSuccessUrlCreates a success redirect URL with order confirmation parameters.
import { createSuccessUrl } from "@evolve-framework/commercetools/payments";
function createSuccessUrl(successUrl: string, orderId: string): string

Returns string

getRedirectServiceUrlbuild up an url for the /redirect route 'successUrl' is the url to redirect to after the payment is handled 'failureUrl' is the url to redirect to if the payment fails
import { getRedirectServiceUrl } from "@evolve-framework/commercetools/payments";
function getRedirectServiceUrl(
serverUrl: string,
data: { collected?: { currency: string; centAmount: number; } | undefined; customer: { ipAddress: string; }; locale: string; targetId: string; targetType: "cart" | "order" | "invoice"; amount: { currency: string; centAmount: number; }; paymentId: string; paymentMethod: string; paymentMethodArgs: { [x: string]: any; }; successUrl: string; failureUrl: string; },
): string

Returns string

Constants

DEFAULT_REMOTE_TIMEOUT_MSDefault per-request timeout for calls to a remote payment service.
import { DEFAULT_REMOTE_TIMEOUT_MS } from "@evolve-framework/commercetools/payments";
const DEFAULT_REMOTE_TIMEOUT_MS: 5000
PAYMENT_STATE_KEYSEvery state key a project has to provision, so it has something to provision against rather than a grep.
import { PAYMENT_STATE_KEYS } from "@evolve-framework/commercetools/payments";
const PAYMENT_STATE_KEYS: readonly string[]
PAYMENT_STATESThe payment states the framework moves payments through.
import { PAYMENT_STATES } from "@evolve-framework/commercetools/payments";

This is the framework's state machine, not the project's. Which states exist and what a transition into one means is behaviour: a project renaming PaymentSuccess would not be configuring anything, it would be editing this logic from the outside. So the keys are fixed here, and a project provisions states carrying exactly them.

That is the opposite of a custom type, whose key a project genuinely owns -- the framework only writes fields into a type, and a project may already have one on a resource for reasons that have nothing to do with this framework.

const PAYMENT_STATES: { readonly initial: "PaymentInitial"; readonly pending: "PaymentPending"; readonly success: "PaymentSuccess"; readonly failure: "PaymentFailure"; readonly refun…

Types

CancelPaymentArgs
import { type CancelPaymentArgs } from "@evolve-framework/commercetools/payments";
export type CancelPaymentArgs = Static<typeof CancelPaymentArgsSchema>;
PaymentAdapterThe single payment-provider API.
import { type PaymentAdapter } from "@evolve-framework/commercetools/payments";

The methods are request-level: getPaymentMethods/createTransaction take the same request payloads that cross the HTTP boundary, so the local and remote implementations are exact mirrors.

export interface PaymentAdapter {
readonly identifier: string;
getPaymentMethods(args: PaymentMethodArgs): Promise<PaymentMethod[]>;
createTransaction(req: TransactionRequest): Promise<TransactionResponse>;
inFlightWindowMs?(payment: Payment): number | undefined;
openPaymentRedirect?(payment: Payment): Promise<string | undefined>;
partialAmount?(target: Cart | Order, methodArgs: Record<string, unknown>): Promise<number>;
captureReserved?(payment: Payment): Promise<void>;
releaseReserved?(payment: Payment, centAmount?: number): Promise<void>;
reservationExpiresAt?(payment: Payment): Date | undefined;
onOrderCreated?(listener: OrderCreatedListener): void;
validateApplePaySession?(args: ValidateApplePaySessionArgs): Promise<{
data: string;
}>;
updateExpressCheckout?(args: UpdateExpressCheckoutArgs): Promise<{
paymentData: string;
}>;
submitPaymentDetails?(args: SubmitPaymentDetailsArgs): Promise<TransactionResponse>;
cancelPayment?(args: CancelPaymentArgs): Promise<{
cancelled: boolean;
}>;
init(): Promise<void>;
getRoutes(): ((app: FastifyInstance) => void) | undefined;
}
PaymentMethod
import { type PaymentMethod } from "@evolve-framework/commercetools/payments";
export type PaymentMethod = Static<typeof PaymentMethodSchema>;
PaymentMethodArgs
import { type PaymentMethodArgs } from "@evolve-framework/commercetools/payments";
export type PaymentMethodArgs = Static<typeof PaymentMethodArgsSchema>;
PaymentMethodImage
import { type PaymentMethodImage } from "@evolve-framework/commercetools/payments";
export type PaymentMethodImage = Static<typeof PaymentMethodImageSchema>;
PaymentMethodOption
import { type PaymentMethodOption } from "@evolve-framework/commercetools/payments";
export type PaymentMethodOption = Static<typeof PaymentMethodOptionSchema>;
RemotePaymentPublisherOptions
import { type RemotePaymentPublisherOptions } from "@evolve-framework/commercetools/payments";
export type RemotePaymentPublisherOptions = {
secret?: string;
};
SubmitPaymentDetailsArgs
import { type SubmitPaymentDetailsArgs } from "@evolve-framework/commercetools/payments";
export type SubmitPaymentDetailsArgs = Static<typeof SubmitPaymentDetailsArgsSchema>;
TransactionRequest
import { type TransactionRequest } from "@evolve-framework/commercetools/payments";
export type TransactionRequest = Static<typeof TransactionRequestSchema>;
TransactionResponse
import { type TransactionResponse } from "@evolve-framework/commercetools/payments";
export type TransactionResponse = Static<typeof TransactionResponseSchema>;
UpdateExpressCheckoutArgs
import { type UpdateExpressCheckoutArgs } from "@evolve-framework/commercetools/payments";
export type UpdateExpressCheckoutArgs = Static<typeof UpdateExpressCheckoutArgsSchema>;
ValidateApplePaySessionArgs
import { type ValidateApplePaySessionArgs } from "@evolve-framework/commercetools/payments";
export type ValidateApplePaySessionArgs = Static<typeof ValidateApplePaySessionArgsSchema>;

@evolve-framework/commercetools/gift-card

Paying with gift cards, a partial method: GiftCardPaymentAdapter, the giftCardBalance query in GiftCardModule, and the GiftCardStore they are written against with its reference implementation, CustomObjectGiftCardStore, which keeps cards as custom objects with a hashed PIN. createGiftCard makes a card for demo data.

Classes

CustomObjectGiftCardStoreGift cards kept as commercetools custom objects: container gift-cards, key the card number, value { pinHash, balance, currency, holds, failedAttempts, lockedUntil } with money in cents.
import { CustomObjectGiftCardStore } from "@evolve-framework/commercetools/gift-card";

Every change is written with the object's version, so two carts spending the same balance cannot both succeed: the second write meets a version conflict, reads the card again and checks the balance against what is left. A wrong PIN counts against the card, and the card locks after maxAttempts; a locked card is refused like any other invalid one. The count lives on the card, so it holds across service instances.

new CustomObjectGiftCardStore(options: CustomObjectGiftCardStoreOptions)
OptionTypeDescription
requestBuilder() => ByProjectKeyRequestBuilder

A builder authorized for manage_key_value_documents, so the service's own, never a shopper's: a card's value holds its PIN hash.

container?string

Container the cards live in. Defaults to gift-cards.

holdTtlMs?number

How long a hold lasts before it stops counting, in milliseconds. It has to outlast the longest time a transaction may stay open, or a payment still in progress loses its money. Defaults to 48 hours.

maxAttempts?number

Wrong PINs a card takes before it locks. Defaults to 5.

lockMs?number

How long a locked card stays locked, in milliseconds. Defaults to 15 minutes.

maxTries?number

Tries a write gets against concurrent changes. Defaults to 10.

now?(() => number)

The clock, for tests.

MethodDescription
checkBalance(card: GiftCardCredentials): Promise<GiftCardBalance>The balance available to spend.
reserve( card: GiftCardCredentials & { holdId: string; centAmount: number; currency: string; }, ): Promise<void>Hold centAmount of the card for holdId.
capture(args: { number: string; holdId: string; }): Promise<void>Take what holdId holds off the card.
release( args: { number: string; holdId: string; centAmount?: number | undefined; }, ): Promise<void>Give back centAmount of what holdId holds, or all of it.
GiftCardModuleQuery.giftCardBalance: what is left on a card, from its number and PIN.
import { GiftCardModule } from "@evolve-framework/commercetools/gift-card";

Extends AbstractModule<unknown>

new GiftCardModule(options: GiftCardModuleOptions)
OptionTypeDescription
storeGiftCardStore

Where the cards live.

GiftCardPaymentAdapterPaying with a gift card, a partial method: it covers the smaller of the card's balance and what is left to pay, and several cards can sit on one cart beside the method that pays the rest.
import { GiftCardPaymentAdapter } from "@evolve-framework/commercetools/gift-card";

Extends BasePaymentAdapter

new GiftCardPaymentAdapter(options: GiftCardPaymentAdapterOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

storeGiftCardStore

Where the cards live.

MethodDescription
partialAmount( target: Cart | Order, methodArgs: Record<string, unknown>, ): Promise<number>How much of the cart the card can pay.
captureReserved(payment: Payment): Promise<void>Takes the amount held for this payment off the card it was reserved on.
releaseReserved( payment: Payment, centAmount?: number, ): Promise<void>Gives back centAmount of the amount held for this payment to the card, or all of it when centAmount is omitted.
InsufficientBalanceErrorRaised when a reservation asks for more than the card has left.
import { InsufficientBalanceError } from "@evolve-framework/commercetools/gift-card";

Extends Error

new InsufficientBalanceError()
InvalidGiftCardErrorRaised for every way a card can be refused: an unknown number, a wrong PIN, a card locked after too many wrong PINs, a currency that does not match.
import { InvalidGiftCardError } from "@evolve-framework/commercetools/gift-card";

Extends Error

new InvalidGiftCardError()

Functions

createGiftCardCreate a gift card, for demo data and test environments: the same call a test-data script makes.
import { createGiftCard } from "@evolve-framework/commercetools/gift-card";
function createGiftCard(
requestBuilder: ByProjectKeyRequestBuilder,
card: GiftCardCredentials & { pin: string; balance: number; currency: string; },
container?: string,
): Promise<void>

Returns Promise<void>

hashPinHash a PIN for storage, as scrypt$<salt>$<hash> in base64.
import { hashPin } from "@evolve-framework/commercetools/gift-card";
function hashPin(pin: string): Promise<string>

Returns Promise<string>

Constants

GIFT_CARD_NUMBER_FIELDThe String field on the project's payment type that holds the card number.
import { GIFT_CARD_NUMBER_FIELD } from "@evolve-framework/commercetools/gift-card";
const GIFT_CARD_NUMBER_FIELD: "giftCardNumber"

Types

GiftCardBalanceWhat can still be spent on a card, in cents of its currency.
import { type GiftCardBalance } from "@evolve-framework/commercetools/gift-card";
export type GiftCardBalance = {
available: number;
currency: string;
};
GiftCardCredentialsA gift card as a buyer presents it.
import { type GiftCardCredentials } from "@evolve-framework/commercetools/gift-card";
export type GiftCardCredentials = {
number: string;
pin?: string;
};
GiftCardStoreWhere gift card balances live.
import { type GiftCardStore } from "@evolve-framework/commercetools/gift-card";

Money moves in two steps. reserve holds an amount for a payment so that no other cart can spend it, capture takes it once the order exists and release gives it back. A hold must outlive the checkout it was made for, so an implementation expires holds after a lifetime longer than the longest time a transaction may stay open (inFlightWindowMs), and a repeated capture or release of the same hold must change nothing.

export interface GiftCardStore {
checkBalance(card: GiftCardCredentials): Promise<GiftCardBalance>;
reserve(card: GiftCardCredentials & {
holdId: string;
centAmount: number;
currency: string;
}): Promise<void>;
capture(args: {
number: string;
holdId: string;
}): Promise<void>;
release(args: {
number: string;
holdId: string;
centAmount?: number;
}): Promise<void>;
}

@evolve-framework/commercetools/shopping-list

Shopping list reads, writes and mappers, for a project extending shopping lists.

Functions

createShoppingListCreate a shopping list with the given input
import { createShoppingList } from "@evolve-framework/commercetools/shopping-list";
function createShoppingList(
ctx: ShoppingListRequestBuilder,
data: ShoppingListDraft,
): Promise<ShoppingList>
OptionTypeDescription
args{ pathArgs: { projectKey: string; associateId: string; businessUnitKey: string; }; executeRequest: executeRequest; baseUri?: string | undefined; }
withKey(childPathArgs: { key: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
withId(childPathArgs: { ID: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
get(methodArgs?: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; sort?: string | string[] | undefined; limit?: number | undefine…

Retrieves ShoppingLists in a BusinessUnit.

head(methodArgs?: { queryArgs?: { [key: string]: QueryParam; where?: string | string[] | undefined; } | undefined; headers?: { [key: string]: string | string[]; } |…

Checks if one or more ShoppingLists exist for the provided query predicate in a BusinessUnit. Returns a 200 status if any ShoppingLists match the query predicate, or a 404 status otherwise.

post(methodArgs: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; } | undefined; body: ShoppingListDraft; headers?: { [key: string…

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

Returns Promise<ShoppingList>

getShoppingListRetrieves a shopping list either by ID (b2b) or fetch the first one (b2c)
import { getShoppingList } from "@evolve-framework/commercetools/shopping-list";
function getShoppingList(
ctx: ShoppingListRequestBuilder,
id?: string,
): Promise<ShoppingList | undefined>
OptionTypeDescription
args{ pathArgs: { projectKey: string; associateId: string; businessUnitKey: string; }; executeRequest: executeRequest; baseUri?: string | undefined; }
withKey(childPathArgs: { key: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
withId(childPathArgs: { ID: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
get(methodArgs?: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; sort?: string | string[] | undefined; limit?: number | undefine…

Retrieves ShoppingLists in a BusinessUnit.

head(methodArgs?: { queryArgs?: { [key: string]: QueryParam; where?: string | string[] | undefined; } | undefined; headers?: { [key: string]: string | string[]; } |…

Checks if one or more ShoppingLists exist for the provided query predicate in a BusinessUnit. Returns a 200 status if any ShoppingLists match the query predicate, or a 404 status otherwise.

post(methodArgs: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; } | undefined; body: ShoppingListDraft; headers?: { [key: string…

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

Returns Promise<ShoppingList | undefined>

getShoppingListByIdRetrieves a shopping list by ID
import { getShoppingListById } from "@evolve-framework/commercetools/shopping-list";
function getShoppingListById(
ctx: ShoppingListRequestBuilder,
id: string,
): Promise<ShoppingList>
OptionTypeDescription
args{ pathArgs: { projectKey: string; associateId: string; businessUnitKey: string; }; executeRequest: executeRequest; baseUri?: string | undefined; }
withKey(childPathArgs: { key: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
withId(childPathArgs: { ID: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
get(methodArgs?: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; sort?: string | string[] | undefined; limit?: number | undefine…

Retrieves ShoppingLists in a BusinessUnit.

head(methodArgs?: { queryArgs?: { [key: string]: QueryParam; where?: string | string[] | undefined; } | undefined; headers?: { [key: string]: string | string[]; } |…

Checks if one or more ShoppingLists exist for the provided query predicate in a BusinessUnit. Returns a 200 status if any ShoppingLists match the query predicate, or a 404 status otherwise.

post(methodArgs: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; } | undefined; body: ShoppingListDraft; headers?: { [key: string…

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

Returns Promise<ShoppingList>

getShoppingListClientCreates and returns a shopping list request builder instance based on the provided context.
import { getShoppingListClient } from "@evolve-framework/commercetools/shopping-list";
function getShoppingListClient(
options: ShoppingListClientParams,
): Promise<ShoppingListRequestBuilder>
OptionTypeDescription
clientContextClientContext$1
storeContextStoreContext

Returns Promise<ShoppingListRequestBuilder>

getShoppingListsRetrieves a paginated list of shopping lists based on arguments.
import { getShoppingLists } from "@evolve-framework/commercetools/shopping-list";
function getShoppingLists(
ctx: ShoppingListRequestBuilder,
args: { offset: number; limit: number; },
): Promise<ShoppingListPagedQueryResponse>
OptionTypeDescription
args{ pathArgs: { projectKey: string; associateId: string; businessUnitKey: string; }; executeRequest: executeRequest; baseUri?: string | undefined; }
withKey(childPathArgs: { key: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
withId(childPathArgs: { ID: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
get(methodArgs?: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; sort?: string | string[] | undefined; limit?: number | undefine…

Retrieves ShoppingLists in a BusinessUnit.

head(methodArgs?: { queryArgs?: { [key: string]: QueryParam; where?: string | string[] | undefined; } | undefined; headers?: { [key: string]: string | string[]; } |…

Checks if one or more ShoppingLists exist for the provided query predicate in a BusinessUnit. Returns a 200 status if any ShoppingLists match the query predicate, or a 404 status otherwise.

post(methodArgs: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; } | undefined; body: ShoppingListDraft; headers?: { [key: string…

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

offsetnumber
limitnumber

Returns Promise<ShoppingListPagedQueryResponse>

isBusinessContextValidate if the customer is in the context of B2B
import { isBusinessContext } from "@evolve-framework/commercetools/shopping-list";
function isBusinessContext(clientContext: ClientContext$1): boolean

Returns boolean

removeShoppingListLineItemsRemoves line items from a shopping list.
import { removeShoppingListLineItems } from "@evolve-framework/commercetools/shopping-list";
function removeShoppingListLineItems(
ctx: ShoppingListRequestBuilder,
shoppingList: ShoppingList,
itemIds: string[],
): Promise<ShoppingList>
OptionTypeDescription
args{ pathArgs: { projectKey: string; associateId: string; businessUnitKey: string; }; executeRequest: executeRequest; baseUri?: string | undefined; }
withKey(childPathArgs: { key: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
withId(childPathArgs: { ID: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
get(methodArgs?: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; sort?: string | string[] | undefined; limit?: number | undefine…

Retrieves ShoppingLists in a BusinessUnit.

head(methodArgs?: { queryArgs?: { [key: string]: QueryParam; where?: string | string[] | undefined; } | undefined; headers?: { [key: string]: string | string[]; } |…

Checks if one or more ShoppingLists exist for the provided query predicate in a BusinessUnit. Returns a 200 status if any ShoppingLists match the query predicate, or a 404 status otherwise.

post(methodArgs: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; } | undefined; body: ShoppingListDraft; headers?: { [key: string…

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

Returns Promise<ShoppingList>

toShoppingList
import { toShoppingList } from "@evolve-framework/commercetools/shopping-list";
function toShoppingList(
shoppingList: ShoppingList,
storeContext: StoreContext,
): ShoppingList$1

Returns ShoppingList$1

toShoppingListActions
import { toShoppingListActions } from "@evolve-framework/commercetools/shopping-list";
function toShoppingListActions(
context: ContextValue$1,
shoppingList: ShoppingList,
data: Record<string, string | null>,
): ShoppingListUpdateAction$1[]
OptionTypeDescription
loadersRecord<string, unknown> & DataLoaders

Optional because the modules contribute it: a context factory returns the request state it owns, and Application merges the loader declarations of the composed modules onto the result. A package narrows this to its own loader type — and back to required — for the context its resolvers read.

storeContextobject & StoreContext
clientContextClientContext & ClientContext$1
requestRequestContext
globalScopedClient() => ByProjectKeyRequestBuilder
configRecord<string, unknown>
federatedToken?FederatedToken

Returns ShoppingListUpdateAction$1[]

toShoppingListDraft
import { toShoppingListDraft } from "@evolve-framework/commercetools/shopping-list";
function toShoppingListDraft(
data: ShoppingListCreateInput,
storeContext: StoreContext,
clientContext: ClientContext$1,
): ShoppingListDraft
OptionTypeDescription
namestring
description?string

Returns ShoppingListDraft

toShoppingListLineItem
import { toShoppingListLineItem } from "@evolve-framework/commercetools/shopping-list";
function toShoppingListLineItem(
storeContext: StoreContext,
line: ShoppingListLineItem,
): ShoppingListLineItem$1

Returns ShoppingListLineItem$1

updateShoppingListUpdates a shopping list with the provided actions.
import { updateShoppingList } from "@evolve-framework/commercetools/shopping-list";
function updateShoppingList(
ctx: ShoppingListRequestBuilder,
shoppingList: ShoppingList,
actions: ShoppingListUpdateAction[] & MyShoppingListUpdateAction[],
): Promise<ShoppingList>
OptionTypeDescription
args{ pathArgs: { projectKey: string; associateId: string; businessUnitKey: string; }; executeRequest: executeRequest; baseUri?: string | undefined; }
withKey(childPathArgs: { key: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
withId(childPathArgs: { ID: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
get(methodArgs?: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; sort?: string | string[] | undefined; limit?: number | undefine…

Retrieves ShoppingLists in a BusinessUnit.

head(methodArgs?: { queryArgs?: { [key: string]: QueryParam; where?: string | string[] | undefined; } | undefined; headers?: { [key: string]: string | string[]; } |…

Checks if one or more ShoppingLists exist for the provided query predicate in a BusinessUnit. Returns a 200 status if any ShoppingLists match the query predicate, or a 404 status otherwise.

post(methodArgs: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; } | undefined; body: ShoppingListDraft; headers?: { [key: string…

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

Returns Promise<ShoppingList>

updateShoppingListLineItemQuantitiesUpdates the quantities of line items in a shopping list.
import { updateShoppingListLineItemQuantities } from "@evolve-framework/commercetools/shopping-list";
function updateShoppingListLineItemQuantities(
ctx: ShoppingListRequestBuilder,
shoppingList: ShoppingList,
items: { id: string; quantity?: number | undefined; }[],
): Promise<ShoppingList>
OptionTypeDescription
args{ pathArgs: { projectKey: string; associateId: string; businessUnitKey: string; }; executeRequest: executeRequest; baseUri?: string | undefined; }
withKey(childPathArgs: { key: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyRequestBuilder
withId(childPathArgs: { ID: string; }) => ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDRequestBuilder
get(methodArgs?: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; sort?: string | string[] | undefined; limit?: number | undefine…

Retrieves ShoppingLists in a BusinessUnit.

head(methodArgs?: { queryArgs?: { [key: string]: QueryParam; where?: string | string[] | undefined; } | undefined; headers?: { [key: string]: string | string[]; } |…

Checks if one or more ShoppingLists exist for the provided query predicate in a BusinessUnit. Returns a 200 status if any ShoppingLists match the query predicate, or a 404 status otherwise.

post(methodArgs: { queryArgs?: { [key: string]: QueryParam; expand?: string | string[] | undefined; } | undefined; body: ShoppingListDraft; headers?: { [key: string…

Creates a ShoppingList in the BusinessUnit referenced by businessUnitKey. As such, the businessUnit field on ShoppingListDraft is ignored for this request.

Returns Promise<ShoppingList>

Constants

ErrorMessages
import { ErrorMessages } from "@evolve-framework/commercetools/shopping-list";
const ErrorMessages: { NOT_FOUND: string; CREATE_FAILED: string; DELETE_FAILED: string; UPDATE_FAILED: string; MULTIPLE_UNSUPPORTED: string; }
shoppingListItemAddSchema
import { shoppingListItemAddSchema } from "@evolve-framework/commercetools/shopping-list";
const shoppingListItemAddSchema: ZodObject<{ id: ZodOptional<ZodString>; lineItems: ZodArray<ZodObject<{ sku: ZodString; quantity: ZodDefault<ZodNumber>; }, $strip>>; }, $strip>
shoppingListItemRemoveSchema
import { shoppingListItemRemoveSchema } from "@evolve-framework/commercetools/shopping-list";
const shoppingListItemRemoveSchema: ZodObject<{ id: ZodString; lineItemIds: ZodArray<ZodString>; }, $strip>
shoppingListItemUpdateSchema
import { shoppingListItemUpdateSchema } from "@evolve-framework/commercetools/shopping-list";
const shoppingListItemUpdateSchema: ZodObject<{ id: ZodString; lineItems: ZodArray<ZodObject<{ sku: ZodOptional<ZodString>; quantity: ZodDefault<ZodNumber>; id: ZodString; }, $strip>>; }, $strip>
shoppingListSchema
import { shoppingListSchema } from "@evolve-framework/commercetools/shopping-list";
const shoppingListSchema: ZodObject<{ name: ZodString; description: ZodOptional<ZodString>; }, $strip>

@evolve-framework/commercetools/product-specifications

Zod schemas for typed product specifications (text, number, date, enum and the like), and a helper to read one off a product.

Functions

getProductSpecification
import { getProductSpecification } from "@evolve-framework/commercetools/product-specifications";
function getProductSpecification<T>(
data: Record<string, { key: string; name: string; specifications: ({ key: string; name: string; type: "number"; value: number; description?: string | undefined; } | { key: string; name: string; type: "boolean"; value: boolean; description?: string | undefined; } | { key: string; name: string; type: "text"; value: string; description?: string | undefined; } | { key: string; name: string; type: "date"; value: Date; description?: string | undefined; } | { key: string; name: string; type: "datetime"; value: Date; description?: string | undefined; } | { key: string; name: string; type: "time"; value: string; description?: string | undefined; } | { key: string; name: string; type: "enum"; value: { key: string; label: string; }; description?: string | undefined; } | { key: string; name: string; type: "lenum"; value: { key: string; label: string; }[]; description?: string | undefined; })[]; description?: string | undefined; }[]>,
locale: string,
key: string,
): T | undefined

Returns T | undefined

Constants

baseSpecificationSchema
import { baseSpecificationSchema } from "@evolve-framework/commercetools/product-specifications";
const baseSpecificationSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; }, $strip>
booleanSchema
import { booleanSchema } from "@evolve-framework/commercetools/product-specifications";
const booleanSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"boolean">; value: ZodBoolean; }, $strip>
dateSchema
import { dateSchema } from "@evolve-framework/commercetools/product-specifications";
const dateSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"date">; value: ZodDate; }, $strip>
dateTimeSchema
import { dateTimeSchema } from "@evolve-framework/commercetools/product-specifications";
const dateTimeSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"datetime">; value: ZodDate; }, $strip>
enumSchema
import { enumSchema } from "@evolve-framework/commercetools/product-specifications";
const enumSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"enum">; value: ZodObject<{ key: ZodString; label: ZodString;…
enumValueSchema
import { enumValueSchema } from "@evolve-framework/commercetools/product-specifications";
const enumValueSchema: ZodObject<{ key: ZodString; label: ZodString; }, $strip>
listEnumSchema
import { listEnumSchema } from "@evolve-framework/commercetools/product-specifications";
const listEnumSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"lenum">; value: ZodArray<ZodObject<{ key: ZodString; label: …
numberSchema
import { numberSchema } from "@evolve-framework/commercetools/product-specifications";
const numberSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"number">; value: ZodNumber; }, $strip>
specificationGroupSchema
import { specificationGroupSchema } from "@evolve-framework/commercetools/product-specifications";
const specificationGroupSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; specifications: ZodArray<ZodDiscriminatedUnion<[ZodObject<{ key: ZodString; na…
specificationSchema
import { specificationSchema } from "@evolve-framework/commercetools/product-specifications";
const specificationSchema: ZodDiscriminatedUnion<[ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"number">; value: ZodNumber; }, $strip…
textSchema
import { textSchema } from "@evolve-framework/commercetools/product-specifications";
const textSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"text">; value: ZodString; }, $strip>
timeSchema
import { timeSchema } from "@evolve-framework/commercetools/product-specifications";
const timeSchema: ZodObject<{ key: ZodString; name: ZodString; description: ZodOptional<ZodString>; type: ZodLiteral<"time">; value: ZodString; }, $strip>

Types

ProductBaseSpecification
import { type ProductBaseSpecification } from "@evolve-framework/commercetools/product-specifications";
export type ProductBaseSpecification = z.infer<typeof baseSpecificationSchema>;
ProductSpecification
import { type ProductSpecification } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecification = z.infer<typeof specificationSchema>;
ProductSpecificationBoolean
import { type ProductSpecificationBoolean } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationBoolean = z.infer<typeof booleanSchema>;
ProductSpecificationData
import { type ProductSpecificationData } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationData = z.infer<typeof specificationData>;
ProductSpecificationDate
import { type ProductSpecificationDate } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationDate = z.infer<typeof dateSchema>;
ProductSpecificationDateTime
import { type ProductSpecificationDateTime } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationDateTime = z.infer<typeof dateTimeSchema>;
ProductSpecificationEnum
import { type ProductSpecificationEnum } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationEnum = z.infer<typeof enumSchema>;
ProductSpecificationEnumValue
import { type ProductSpecificationEnumValue } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationEnumValue = z.infer<typeof enumValueSchema>;
ProductSpecificationGroup
import { type ProductSpecificationGroup } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationGroup = z.infer<typeof specificationGroupSchema>;
ProductSpecificationGroups
import { type ProductSpecificationGroups } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationGroups = ProductSpecificationGroup[];
ProductSpecificationListEnum
import { type ProductSpecificationListEnum } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationListEnum = z.infer<typeof listEnumSchema>;
ProductSpecificationNumber
import { type ProductSpecificationNumber } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationNumber = z.infer<typeof numberSchema>;
ProductSpecificationText
import { type ProductSpecificationText } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationText = z.infer<typeof textSchema>;
ProductSpecificationTime
import { type ProductSpecificationTime } from "@evolve-framework/commercetools/product-specifications";
export type ProductSpecificationTime = z.infer<typeof timeSchema>;

Deprecated

Still exported so existing code keeps working. Each one says what replaces it.

copyCustomerDefaultsToCartCopy the customer's default billing and shipping address and their email onto a cart they just started.
import { copyCustomerDefaultsToCart } from "@evolve-framework/commercetools/api-extension";
function copyCustomerDefaultsToCart(
cart: Cart,
options: ApiExtensionContext<CartUpdateAction>,
): Promise<CartUpdateAction[]>
OptionTypeDescription
actionApiExtensionAction

The action being extended, for an extension registered on both.

clientByProjectKeyRequestBuilder

The system request builder. A getter, so an extension that never reads from commercetools costs no client.

clientFactoryClientFactory

For the rare extension that needs an associate or user request builder.

loggerLogger

Bound to the resource and the action, so an extension logs no context of its own.

signalAbortSignal

Aborts ahead of the deadline commercetools gives the extension. An extension that passes it to its own calls fails itself, with its own message, rather than being cut off mid-flight by a caller that reports only a timeout.

actionsreadonly CartUpdateAction[]

The actions the extensions before this one returned. Reading it is how an extension avoids contradicting an earlier one; it is live, so it grows as the invocation proceeds.

Returns Promise<CartUpdateAction[]>

createApiExtension
import { createApiExtension } from "@evolve-framework/commercetools/api-extension";
function createApiExtension(
extensions: ApiExtensions,
): ((action: ExtensionAction, resource: Reference) => Promise<ExtensionOutput>)
OptionTypeDescription
cart?any
order?any
product?any
payment?any
customer?any

Returns ((action: ExtensionAction, resource: Reference) => Promise<ExtensionOutput>)

createAWSLambdaHandler
import { createAWSLambdaHandler } from "@evolve-framework/commercetools/api-extension";
function createAWSLambdaHandler(
extensions: ApiExtensions,
): ((input: ExtensionInput) => Promise<LambdaResponse>)
OptionTypeDescription
cart?any
order?any
product?any
payment?any
customer?any

Returns ((input: ExtensionInput) => Promise<LambdaResponse>)

createFastifyHandler
import { createFastifyHandler } from "@evolve-framework/commercetools/api-extension";
function createFastifyHandler(
extensions: ApiExtensions,
options?: HttpExtensionOptions,
): FastifyHandler
OptionTypeDescription
cart?any
order?any
product?any
payment?any
customer?any
secret?string

The bearer token commercetools sends in Authorization; any other is answered 401. Unset, every call is accepted.

Returns FastifyHandler

ApiExtensionHandlers
import { type ApiExtensionHandlers } from "@evolve-framework/commercetools/api-extension";
export type ApiExtensionHandlers = ApiExtensions;

Not listed: 43 options types. They appear as the tables under the constructors and functions they type.