@endora-commerce/contracts 0.110.0 → 0.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accept-language.d.ts +31 -0
- package/dist/accept-language.js +64 -0
- package/dist/admin-actions.d.ts +2 -0
- package/dist/admin-actions.js +18 -0
- package/dist/admin-contributions.d.ts +37 -5
- package/dist/admin-contributions.js +9 -2
- package/dist/admin-roles.d.ts +9 -0
- package/dist/admin.d.ts +37 -0
- package/dist/admin.js +19 -0
- package/dist/api-keys.d.ts +22 -0
- package/dist/api-keys.js +4 -0
- package/dist/assets-library.d.ts +19 -0
- package/dist/assets-library.js +14 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.js +9 -0
- package/dist/carts.d.ts +30 -1
- package/dist/carts.js +20 -5
- package/dist/catalog.d.ts +61 -22
- package/dist/catalog.js +32 -6
- package/dist/cms.d.ts +33 -3
- package/dist/cms.js +15 -0
- package/dist/command-hooks.d.ts +301 -0
- package/dist/command-hooks.js +248 -0
- package/dist/comparisons.d.ts +14 -14
- package/dist/credit-limits.d.ts +21 -0
- package/dist/credit-limits.js +21 -0
- package/dist/crm.d.ts +81 -55
- package/dist/crm.js +15 -5
- package/dist/custom-fields.d.ts +403 -49
- package/dist/custom-fields.js +127 -0
- package/dist/customer-accounts.d.ts +138 -0
- package/dist/customer-accounts.js +4 -0
- package/dist/customer-notifications.d.ts +143 -0
- package/dist/customer-notifications.js +41 -0
- package/dist/customers.d.ts +52 -0
- package/dist/customers.js +53 -0
- package/dist/dictionary.d.ts +53 -0
- package/dist/dictionary.js +25 -0
- package/dist/document-templates.d.ts +4 -4
- package/dist/email.d.ts +34 -0
- package/dist/email.js +6 -0
- package/dist/errors.d.ts +312 -2
- package/dist/errors.js +377 -2
- package/dist/forms.d.ts +88 -88
- package/dist/i18n.d.ts +34 -0
- package/dist/i18n.js +15 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +12 -1
- package/dist/invoice-ledger.d.ts +6 -6
- package/dist/invoices.d.ts +126 -0
- package/dist/invoices.js +49 -0
- package/dist/line-bounds.d.ts +53 -0
- package/dist/line-bounds.js +65 -0
- package/dist/megamenu.d.ts +27 -27
- package/dist/mfa.d.ts +86 -0
- package/dist/mfa.js +90 -0
- package/dist/modules.d.ts +21 -5
- package/dist/modules.js +60 -3
- package/dist/orders.d.ts +141 -0
- package/dist/orders.js +80 -3
- package/dist/organization-hooks.d.ts +99 -0
- package/dist/organization-hooks.js +22 -0
- package/dist/organization-registry-lookup.d.ts +5 -5
- package/dist/organization-roles.d.ts +1 -0
- package/dist/organization-roles.js +7 -0
- package/dist/organizations.d.ts +954 -17
- package/dist/organizations.js +229 -8
- package/dist/price-books.d.ts +173 -25
- package/dist/price-books.js +41 -0
- package/dist/price-lists.d.ts +5 -2
- package/dist/product-feeds.d.ts +157 -8
- package/dist/product-feeds.js +41 -2
- package/dist/product-scopes.d.ts +17 -0
- package/dist/product-scopes.js +31 -5
- package/dist/projects.d.ts +61 -28
- package/dist/projects.js +47 -9
- package/dist/promotions.d.ts +157 -5
- package/dist/promotions.js +23 -1
- package/dist/pwa.d.ts +39 -0
- package/dist/quick-order.d.ts +9 -3
- package/dist/quick-order.js +4 -3
- package/dist/quote-requests.d.ts +168 -5
- package/dist/quote-requests.js +69 -8
- package/dist/record-references.d.ts +15 -15
- package/dist/returns.d.ts +6 -0
- package/dist/returns.js +4 -2
- package/dist/sales-channels.d.ts +34 -3
- package/dist/sales-channels.js +16 -1
- package/dist/schema-extensions.d.ts +36 -0
- package/dist/schema-extensions.js +29 -0
- package/dist/seo.d.ts +2 -2
- package/dist/settings.d.ts +44 -2
- package/dist/settings.js +17 -2
- package/dist/shopping-lists.d.ts +39 -1
- package/dist/shopping-lists.js +37 -3
- package/dist/storefront-cache-tags.d.ts +10 -0
- package/dist/tasks.d.ts +21 -21
- package/dist/taxes.d.ts +27 -0
- package/dist/taxes.js +4 -0
- package/dist/transactional-emails.d.ts +39 -13
- package/dist/webhooks.d.ts +75 -0
- package/dist/webhooks.js +24 -0
- package/package.json +4 -2
- package/dist/actor.d.ts.map +0 -1
- package/dist/actor.js.map +0 -1
- package/dist/addresses.d.ts.map +0 -1
- package/dist/addresses.js.map +0 -1
- package/dist/admin-actions.d.ts.map +0 -1
- package/dist/admin-actions.js.map +0 -1
- package/dist/admin-contributions.d.ts.map +0 -1
- package/dist/admin-contributions.js.map +0 -1
- package/dist/admin-feedback.d.ts.map +0 -1
- package/dist/admin-feedback.js.map +0 -1
- package/dist/admin-i18n.d.ts.map +0 -1
- package/dist/admin-i18n.js.map +0 -1
- package/dist/admin-name.d.ts.map +0 -1
- package/dist/admin-name.js.map +0 -1
- package/dist/admin-notifications.d.ts.map +0 -1
- package/dist/admin-notifications.js.map +0 -1
- package/dist/admin-preferences.d.ts.map +0 -1
- package/dist/admin-preferences.js.map +0 -1
- package/dist/admin-roles.d.ts.map +0 -1
- package/dist/admin-roles.js.map +0 -1
- package/dist/admin-search.d.ts.map +0 -1
- package/dist/admin-search.js.map +0 -1
- package/dist/admin-users.d.ts.map +0 -1
- package/dist/admin-users.js.map +0 -1
- package/dist/admin.d.ts.map +0 -1
- package/dist/admin.js.map +0 -1
- package/dist/analytics.d.ts.map +0 -1
- package/dist/analytics.js.map +0 -1
- package/dist/api-keys.d.ts.map +0 -1
- package/dist/api-keys.js.map +0 -1
- package/dist/assets-library.d.ts.map +0 -1
- package/dist/assets-library.js.map +0 -1
- package/dist/audit-logs.d.ts.map +0 -1
- package/dist/audit-logs.js.map +0 -1
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/blog.d.ts.map +0 -1
- package/dist/blog.js.map +0 -1
- package/dist/capabilities.d.ts.map +0 -1
- package/dist/capabilities.js.map +0 -1
- package/dist/carts.d.ts.map +0 -1
- package/dist/carts.js.map +0 -1
- package/dist/catalog.d.ts.map +0 -1
- package/dist/catalog.js.map +0 -1
- package/dist/cms-brand.d.ts.map +0 -1
- package/dist/cms-brand.js.map +0 -1
- package/dist/cms-contact-form.d.ts.map +0 -1
- package/dist/cms-contact-form.js.map +0 -1
- package/dist/cms.d.ts.map +0 -1
- package/dist/cms.js.map +0 -1
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/comparisons.d.ts.map +0 -1
- package/dist/comparisons.js.map +0 -1
- package/dist/credentials.d.ts.map +0 -1
- package/dist/credentials.js.map +0 -1
- package/dist/credit-limits.d.ts.map +0 -1
- package/dist/credit-limits.js.map +0 -1
- package/dist/crm-rich-text.d.ts.map +0 -1
- package/dist/crm-rich-text.js.map +0 -1
- package/dist/crm.d.ts.map +0 -1
- package/dist/crm.js.map +0 -1
- package/dist/currencies.d.ts.map +0 -1
- package/dist/currencies.js.map +0 -1
- package/dist/custom-fields.d.ts.map +0 -1
- package/dist/custom-fields.js.map +0 -1
- package/dist/customer-accounts.d.ts.map +0 -1
- package/dist/customer-accounts.js.map +0 -1
- package/dist/customers.d.ts.map +0 -1
- package/dist/customers.js.map +0 -1
- package/dist/dictionary.d.ts.map +0 -1
- package/dist/dictionary.js.map +0 -1
- package/dist/document-templates.d.ts.map +0 -1
- package/dist/document-templates.js.map +0 -1
- package/dist/document-values.d.ts.map +0 -1
- package/dist/document-values.js.map +0 -1
- package/dist/email-address.d.ts.map +0 -1
- package/dist/email-address.js.map +0 -1
- package/dist/email.d.ts.map +0 -1
- package/dist/email.js.map +0 -1
- package/dist/envelopes.d.ts.map +0 -1
- package/dist/envelopes.js.map +0 -1
- package/dist/environment-inputs.d.ts.map +0 -1
- package/dist/environment-inputs.js.map +0 -1
- package/dist/erp-connector.d.ts.map +0 -1
- package/dist/erp-connector.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/forms-logic.d.ts.map +0 -1
- package/dist/forms-logic.fixtures.d.ts.map +0 -1
- package/dist/forms-logic.fixtures.js.map +0 -1
- package/dist/forms-logic.js.map +0 -1
- package/dist/forms.d.ts.map +0 -1
- package/dist/forms.js.map +0 -1
- package/dist/google-analytics.d.ts.map +0 -1
- package/dist/google-analytics.js.map +0 -1
- package/dist/google-tag-manager.d.ts.map +0 -1
- package/dist/google-tag-manager.js.map +0 -1
- package/dist/i18n.d.ts.map +0 -1
- package/dist/i18n.js.map +0 -1
- package/dist/import-export.d.ts.map +0 -1
- package/dist/import-export.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inventory.d.ts.map +0 -1
- package/dist/inventory.js.map +0 -1
- package/dist/invoice-ledger.d.ts.map +0 -1
- package/dist/invoice-ledger.js.map +0 -1
- package/dist/invoices.d.ts.map +0 -1
- package/dist/invoices.js.map +0 -1
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js.map +0 -1
- package/dist/languages.d.ts.map +0 -1
- package/dist/languages.js.map +0 -1
- package/dist/line-groups.d.ts.map +0 -1
- package/dist/line-groups.js.map +0 -1
- package/dist/linkedin-ads.d.ts.map +0 -1
- package/dist/linkedin-ads.js.map +0 -1
- package/dist/localized-name.d.ts.map +0 -1
- package/dist/localized-name.js.map +0 -1
- package/dist/megamenu.d.ts.map +0 -1
- package/dist/megamenu.js.map +0 -1
- package/dist/meta-ads.d.ts.map +0 -1
- package/dist/meta-ads.js.map +0 -1
- package/dist/mfa.d.ts.map +0 -1
- package/dist/mfa.js.map +0 -1
- package/dist/modules.d.ts.map +0 -1
- package/dist/modules.js.map +0 -1
- package/dist/money-decimal.d.ts.map +0 -1
- package/dist/money-decimal.js.map +0 -1
- package/dist/money-input.d.ts.map +0 -1
- package/dist/money-input.js.map +0 -1
- package/dist/newsletter.d.ts.map +0 -1
- package/dist/newsletter.js.map +0 -1
- package/dist/order-minimums.d.ts.map +0 -1
- package/dist/order-minimums.js.map +0 -1
- package/dist/orders.d.ts.map +0 -1
- package/dist/orders.js.map +0 -1
- package/dist/organization-registry-lookup.d.ts.map +0 -1
- package/dist/organization-registry-lookup.js.map +0 -1
- package/dist/organization-roles.d.ts.map +0 -1
- package/dist/organization-roles.js.map +0 -1
- package/dist/organizations.d.ts.map +0 -1
- package/dist/organizations.js.map +0 -1
- package/dist/page-builder-props.d.ts.map +0 -1
- package/dist/page-builder-props.js.map +0 -1
- package/dist/page-builder-values.d.ts.map +0 -1
- package/dist/page-builder-values.js.map +0 -1
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/payment-methods.d.ts.map +0 -1
- package/dist/payment-methods.js.map +0 -1
- package/dist/payment-return-url.d.ts.map +0 -1
- package/dist/payment-return-url.js.map +0 -1
- package/dist/payments.d.ts.map +0 -1
- package/dist/payments.js.map +0 -1
- package/dist/pim-connector.d.ts.map +0 -1
- package/dist/pim-connector.js.map +0 -1
- package/dist/pim-field-path.d.ts.map +0 -1
- package/dist/pim-field-path.js.map +0 -1
- package/dist/pim-locale-mapping.d.ts.map +0 -1
- package/dist/pim-locale-mapping.js.map +0 -1
- package/dist/platform-info.d.ts.map +0 -1
- package/dist/platform-info.js.map +0 -1
- package/dist/platform-language.d.ts.map +0 -1
- package/dist/platform-language.js.map +0 -1
- package/dist/price-book-decimal.d.ts.map +0 -1
- package/dist/price-book-decimal.js.map +0 -1
- package/dist/price-books.d.ts.map +0 -1
- package/dist/price-books.js.map +0 -1
- package/dist/price-lists.d.ts.map +0 -1
- package/dist/price-lists.js.map +0 -1
- package/dist/product-feeds.d.ts.map +0 -1
- package/dist/product-feeds.js.map +0 -1
- package/dist/product-scope-model.d.ts.map +0 -1
- package/dist/product-scope-model.js.map +0 -1
- package/dist/product-scope-overrides.d.ts.map +0 -1
- package/dist/product-scope-overrides.js.map +0 -1
- package/dist/product-scoped-values.d.ts.map +0 -1
- package/dist/product-scoped-values.js.map +0 -1
- package/dist/product-scopes.d.ts.map +0 -1
- package/dist/product-scopes.js.map +0 -1
- package/dist/product-summary-text.d.ts.map +0 -1
- package/dist/product-summary-text.js.map +0 -1
- package/dist/product-tax-rates.d.ts.map +0 -1
- package/dist/product-tax-rates.js.map +0 -1
- package/dist/product-url-keys.d.ts.map +0 -1
- package/dist/product-url-keys.js.map +0 -1
- package/dist/product-value-resolver.d.ts.map +0 -1
- package/dist/product-value-resolver.js.map +0 -1
- package/dist/projects.d.ts.map +0 -1
- package/dist/projects.js.map +0 -1
- package/dist/promotions.d.ts.map +0 -1
- package/dist/promotions.js.map +0 -1
- package/dist/prompt-actions.d.ts.map +0 -1
- package/dist/prompt-actions.js.map +0 -1
- package/dist/pwa.d.ts.map +0 -1
- package/dist/pwa.js.map +0 -1
- package/dist/quick-order.d.ts.map +0 -1
- package/dist/quick-order.js.map +0 -1
- package/dist/quote-requests.d.ts.map +0 -1
- package/dist/quote-requests.js.map +0 -1
- package/dist/record-references.d.ts.map +0 -1
- package/dist/record-references.js.map +0 -1
- package/dist/record-rich-text.d.ts.map +0 -1
- package/dist/record-rich-text.js.map +0 -1
- package/dist/returns.d.ts.map +0 -1
- package/dist/returns.js.map +0 -1
- package/dist/sales-channels.d.ts.map +0 -1
- package/dist/sales-channels.js.map +0 -1
- package/dist/saved-list-views.d.ts.map +0 -1
- package/dist/saved-list-views.js.map +0 -1
- package/dist/scope-notice.d.ts.map +0 -1
- package/dist/scope-notice.js.map +0 -1
- package/dist/scoped-write-encoding.d.ts.map +0 -1
- package/dist/scoped-write-encoding.js.map +0 -1
- package/dist/search.d.ts.map +0 -1
- package/dist/search.js.map +0 -1
- package/dist/seo.d.ts.map +0 -1
- package/dist/seo.js.map +0 -1
- package/dist/settings.d.ts.map +0 -1
- package/dist/settings.js.map +0 -1
- package/dist/shipments.d.ts.map +0 -1
- package/dist/shipments.js.map +0 -1
- package/dist/shipping-methods.d.ts.map +0 -1
- package/dist/shipping-methods.js.map +0 -1
- package/dist/shopping-lists.d.ts.map +0 -1
- package/dist/shopping-lists.js.map +0 -1
- package/dist/storefront-cache-tags.d.ts.map +0 -1
- package/dist/storefront-cache-tags.js.map +0 -1
- package/dist/storefront-language-path.d.ts.map +0 -1
- package/dist/storefront-language-path.js.map +0 -1
- package/dist/storefront-value-overrides.d.ts.map +0 -1
- package/dist/storefront-value-overrides.js.map +0 -1
- package/dist/tasks.d.ts.map +0 -1
- package/dist/tasks.js.map +0 -1
- package/dist/taxes.d.ts.map +0 -1
- package/dist/taxes.js.map +0 -1
- package/dist/text-normalization.d.ts.map +0 -1
- package/dist/text-normalization.js.map +0 -1
- package/dist/transactional-emails.d.ts.map +0 -1
- package/dist/transactional-emails.js.map +0 -1
- package/dist/webhooks.d.ts.map +0 -1
- package/dist/webhooks.js.map +0 -1
package/dist/errors.js
CHANGED
|
@@ -20,6 +20,10 @@ export const ERROR_CODES = {
|
|
|
20
20
|
// Owner ruling of 2026-10-25 — a typed unit price with more than four decimal
|
|
21
21
|
// places (`money-input.ts`). Refused, never rounded.
|
|
22
22
|
UNIT_PRICE_PRECISION_EXCEEDED: 'UNIT_PRICE_PRECISION_EXCEEDED',
|
|
23
|
+
// Issue #351 — a line quantity past `LINE_QUANTITY_MAX` (`line-bounds.ts`):
|
|
24
|
+
// a request schema's tagged issue (400), or a line a merge or a packaging unit
|
|
25
|
+
// would take past the bound (422). Refused, never clamped.
|
|
26
|
+
LINE_QUANTITY_EXCEEDED: 'LINE_QUANTITY_EXCEEDED',
|
|
23
27
|
// Catalog
|
|
24
28
|
FILTER_NOT_ALLOWED: 'FILTER_NOT_ALLOWED',
|
|
25
29
|
PRODUCT_NOT_FOUND: 'PRODUCT_NOT_FOUND',
|
|
@@ -85,6 +89,11 @@ export const ERROR_CODES = {
|
|
|
85
89
|
IMPORT_PROFILE_REQUIRED: 'IMPORT_PROFILE_REQUIRED',
|
|
86
90
|
IMPORT_PROFILE_NOT_FOUND: 'IMPORT_PROFILE_NOT_FOUND',
|
|
87
91
|
IMPORT_PROFILE_NAME_TAKEN: 'IMPORT_PROFILE_NAME_TAKEN',
|
|
92
|
+
/**
|
|
93
|
+
* 405 — the entity is export-only, so its adapter accepts no import
|
|
94
|
+
* (`details.entity`). Raised as `VALIDATION_FAILED` until issue #644 (#86).
|
|
95
|
+
*/
|
|
96
|
+
IMPORT_NOT_SUPPORTED: 'IMPORT_NOT_SUPPORTED',
|
|
88
97
|
// Catalog 002 — Product Links (US4)
|
|
89
98
|
SELF_LINK_NOT_ALLOWED: 'SELF_LINK_NOT_ALLOWED',
|
|
90
99
|
LINK_ALREADY_EXISTS: 'LINK_ALREADY_EXISTS',
|
|
@@ -101,6 +110,57 @@ export const ERROR_CODES = {
|
|
|
101
110
|
MIN_NOT_MET: 'MIN_NOT_MET',
|
|
102
111
|
MAX_EXCEEDED: 'MAX_EXCEEDED',
|
|
103
112
|
UNKNOWN_OPTION: 'UNKNOWN_OPTION',
|
|
113
|
+
// Catalog refusals the stored state makes, raised as `VALIDATION_FAILED`
|
|
114
|
+
// until issue #624 (#86). Declared by the `catalog` manifest. Three more
|
|
115
|
+
// sites reuse a code above with a token: `SKU_ALREADY_EXISTS`
|
|
116
|
+
// (`held_by_product`, `held_by_variant`), `PRODUCT_TYPE_MISMATCH`
|
|
117
|
+
// (`variants_need_configurable`) and `SELF_LINK_NOT_ALLOWED` (`grouped`).
|
|
118
|
+
/** 409 — another attribute already has this key (`details.attributeKey`). */
|
|
119
|
+
ATTRIBUTE_KEY_TAKEN: 'ATTRIBUTE_KEY_TAKEN',
|
|
120
|
+
/**
|
|
121
|
+
* 409 — the value type cannot change while products hold values (`details.attributeKey`);
|
|
122
|
+
* token `page_builder` — never to or from Page Builder content (issue #1218).
|
|
123
|
+
*/
|
|
124
|
+
ATTRIBUTE_VALUE_TYPE_LOCKED: 'ATTRIBUTE_VALUE_TYPE_LOCKED',
|
|
125
|
+
/**
|
|
126
|
+
* 409 — the attribute is still in use, so it is not deleted: token `attribute_sets`
|
|
127
|
+
* (`details.attributeSetCount`) or `products` (`details.productCount`), with `attributeKey`.
|
|
128
|
+
*/
|
|
129
|
+
ATTRIBUTE_IN_USE: 'ATTRIBUTE_IN_USE',
|
|
130
|
+
/** 409 — the attribute already has an option with this value (`details.attributeKey`, `value`). */
|
|
131
|
+
ATTRIBUTE_OPTION_VALUE_TAKEN: 'ATTRIBUTE_OPTION_VALUE_TAKEN',
|
|
132
|
+
/** 409 — a second default option where one is allowed (`details.attributeKey`, `value`). */
|
|
133
|
+
ATTRIBUTE_DEFAULT_OPTION_TAKEN: 'ATTRIBUTE_DEFAULT_OPTION_TAKEN',
|
|
134
|
+
/** 400 — the attribute's type takes no options (`details.attributeKey`, `valueType`). */
|
|
135
|
+
ATTRIBUTE_OPTIONS_NOT_SUPPORTED: 'ATTRIBUTE_OPTIONS_NOT_SUPPORTED',
|
|
136
|
+
/**
|
|
137
|
+
* 409 — products carry the option, so it is not deleted (`details.attributeKey`, `value`;
|
|
138
|
+
* token `products` with `productCount`).
|
|
139
|
+
*/
|
|
140
|
+
ATTRIBUTE_OPTION_IN_USE: 'ATTRIBUTE_OPTION_IN_USE',
|
|
141
|
+
/** 400 — the attribute's stored type cannot be shown as a slider (`details.attributeKey`, `valueType`). */
|
|
142
|
+
ATTRIBUTE_SLIDER_NOT_SUPPORTED: 'ATTRIBUTE_SLIDER_NOT_SUPPORTED',
|
|
143
|
+
/** 400 — the product's attribute set requires values it lacks (`details.attributeKeys`, joined). */
|
|
144
|
+
ATTRIBUTE_VALUES_REQUIRED: 'ATTRIBUTE_VALUES_REQUIRED',
|
|
145
|
+
/**
|
|
146
|
+
* 422 — the product's type takes no minimum order quantity (`details.field`
|
|
147
|
+
* `minOrderQuantity`, `productType`; per channel also `channelId`).
|
|
148
|
+
*/
|
|
149
|
+
MIN_ORDER_QUANTITY_NOT_SUPPORTED_FOR_TYPE: 'MIN_ORDER_QUANTITY_NOT_SUPPORTED_FOR_TYPE',
|
|
150
|
+
/** 409 — a sibling category already has this slug (`details.slug`, `parentCategoryId`). */
|
|
151
|
+
CATEGORY_SLUG_TAKEN: 'CATEGORY_SLUG_TAKEN',
|
|
152
|
+
/** 409 — the category still has subcategories, so it is not deleted (`details.categoryId`, `childCount`). */
|
|
153
|
+
CATEGORY_HAS_CHILDREN: 'CATEGORY_HAS_CHILDREN',
|
|
154
|
+
/** 409 — a category is moved beneath its own descendant (`details.categoryId`, `parentCategoryId`). */
|
|
155
|
+
CATEGORY_MOVE_CYCLE: 'CATEGORY_MOVE_CYCLE',
|
|
156
|
+
/** 409 — the child is already in the group (`details.parentProductId`, `childProductId`, `childSku`). */
|
|
157
|
+
GROUPED_ITEM_ALREADY_EXISTS: 'GROUPED_ITEM_ALREADY_EXISTS',
|
|
158
|
+
/**
|
|
159
|
+
* 400 — a stored Page Builder content attribute is patched to switch on a capability it
|
|
160
|
+
* holds off (`details.attributeKey`, `capabilities` joined). Issue #1218 (#86); on create
|
|
161
|
+
* the same rule judges the request and stays `VALIDATION_FAILED`.
|
|
162
|
+
*/
|
|
163
|
+
CONTENT_ATTRIBUTE_CAPABILITY_LOCKED: 'CONTENT_ATTRIBUTE_CAPABILITY_LOCKED',
|
|
104
164
|
// Quote Requests (RFQ)
|
|
105
165
|
RFQ_NOT_DRAFT: 'RFQ_NOT_DRAFT',
|
|
106
166
|
RFQ_EMPTY: 'RFQ_EMPTY',
|
|
@@ -121,6 +181,14 @@ export const ERROR_CODES = {
|
|
|
121
181
|
// request resolved when none is named (owner decision 2026-10-29 "A") — is not
|
|
122
182
|
// one of the Organization's active channels.
|
|
123
183
|
RFQ_SALES_CHANNEL_NOT_ALLOWED: 'RFQ_SALES_CHANNEL_NOT_ALLOWED',
|
|
184
|
+
// Quick order — one-click buy (issue #641, #86). `422 VALIDATION_FAILED` with
|
|
185
|
+
// `details.code: 'one_click_unavailable'` until then.
|
|
186
|
+
/**
|
|
187
|
+
* 422 — one-click buy is not available to the buyer. `details.code` is the
|
|
188
|
+
* eligibility reason (`setting_disabled`, `missing_defaults`), repeated as
|
|
189
|
+
* `details.reason`.
|
|
190
|
+
*/
|
|
191
|
+
ONE_CLICK_UNAVAILABLE: 'ONE_CLICK_UNAVAILABLE',
|
|
124
192
|
QUOTE_INCOMPLETE: 'QUOTE_INCOMPLETE',
|
|
125
193
|
QUOTE_VALIDITY_ENDED: 'QUOTE_VALIDITY_ENDED',
|
|
126
194
|
// Quote PDF by e-mail (`specs/153-quote-request-pdf-template/`, owner answer
|
|
@@ -139,6 +207,18 @@ export const ERROR_CODES = {
|
|
|
139
207
|
SHOPPING_LIST_CANNOT_DELETE_LAST: 'SHOPPING_LIST_CANNOT_DELETE_LAST',
|
|
140
208
|
// Organizations / customer accounts
|
|
141
209
|
ORGANIZATION_TAX_ID_EXISTS: 'ORGANIZATION_TAX_ID_EXISTS',
|
|
210
|
+
// `specs/177-tax-id-scope/` — switching the tax-ID scope to `global` while a
|
|
211
|
+
// tax ID is on more than one organization (409, `details.code = 'shared_tax_ids'`).
|
|
212
|
+
ORGANIZATION_TAX_ID_SCOPE_DUPLICATES: 'ORGANIZATION_TAX_ID_SCOPE_DUPLICATES',
|
|
213
|
+
// `specs/177-tax-id-scope/` — a personal → company conversion refused (409,
|
|
214
|
+
// `details.code` = `not_personal` | `deleted` | `owner_not_administrator`).
|
|
215
|
+
ORGANIZATION_CONVERSION_REFUSED: 'ORGANIZATION_CONVERSION_REFUSED',
|
|
216
|
+
// Issue #1040 — an operator's tax-ID correction refused (409, `details.code` =
|
|
217
|
+
// `not_company` | `deleted`).
|
|
218
|
+
ORGANIZATION_TAX_ID_CHANGE_REFUSED: 'ORGANIZATION_TAX_ID_CHANGE_REFUSED',
|
|
219
|
+
// `specs/177-tax-id-scope/` — a write of organizations lost a lock to a
|
|
220
|
+
// concurrent one (the tax-ID scope swap, or a racing writer); retry (409).
|
|
221
|
+
ORGANIZATION_WRITE_CONTENDED: 'ORGANIZATION_WRITE_CONTENDED',
|
|
142
222
|
// Feature 056 — deletion of a parent with children is blocked (reassign /
|
|
143
223
|
// remove children first). Backed by the `parent_id ON DELETE RESTRICT` FK.
|
|
144
224
|
ORGANIZATION_HAS_CHILDREN: 'ORGANIZATION_HAS_CHILDREN',
|
|
@@ -192,6 +272,12 @@ export const ERROR_CODES = {
|
|
|
192
272
|
CUSTOMER_NOT_DELETED: 'CUSTOMER_NOT_DELETED',
|
|
193
273
|
CUSTOMER_RESTORE_WINDOW_ELAPSED: 'CUSTOMER_RESTORE_WINDOW_ELAPSED',
|
|
194
274
|
ORG_OWNER_DEPLETION: 'ORG_OWNER_DEPLETION',
|
|
275
|
+
/**
|
|
276
|
+
* Issue #652 (D-292): `PATCH /api/v1/me/customer/preferred-language` names a
|
|
277
|
+
* language the request's sales channel does not offer (422). Owned by
|
|
278
|
+
* `customers`.
|
|
279
|
+
*/
|
|
280
|
+
PREFERRED_LANGUAGE_NOT_OFFERED: 'PREFERRED_LANGUAGE_NOT_OFFERED',
|
|
195
281
|
// Orders + Carts (feature 027)
|
|
196
282
|
CART_EMPTY: 'CART_EMPTY',
|
|
197
283
|
CART_LINE_CAP_EXCEEDED: 'CART_LINE_CAP_EXCEEDED',
|
|
@@ -230,6 +316,24 @@ export const ERROR_CODES = {
|
|
|
230
316
|
CART_ALREADY_TERMINAL: 'CART_ALREADY_TERMINAL',
|
|
231
317
|
STOCK_UNAVAILABLE: 'STOCK_UNAVAILABLE',
|
|
232
318
|
PROMOTION_INVALID: 'PROMOTION_INVALID',
|
|
319
|
+
// Seven `promotions` refusals raised as `VALIDATION_FAILED` with a machine token
|
|
320
|
+
// glued to an English message until issue #628 (#86). Declared by the
|
|
321
|
+
// `promotions` manifest.
|
|
322
|
+
/**
|
|
323
|
+
* 409 — a promotion's usage limit was reached between the cart and placement
|
|
324
|
+
* (`details.promotionId`; with a coupon, token `with_coupon` and `couponCode`).
|
|
325
|
+
*/
|
|
326
|
+
PROMOTION_USAGE_LIMIT_REACHED: 'PROMOTION_USAGE_LIMIT_REACHED',
|
|
327
|
+
/** 409 — another coupon already has this code (`details.couponCode`). */
|
|
328
|
+
PROMOTION_COUPON_CODE_TAKEN: 'PROMOTION_COUPON_CODE_TAKEN',
|
|
329
|
+
/** 400 — the length and format hold fewer unique codes than asked for (`details.requested`, `generated`). */
|
|
330
|
+
PROMOTION_COUPON_SPACE_EXHAUSTED: 'PROMOTION_COUPON_SPACE_EXHAUSTED',
|
|
331
|
+
/** 409 — another named promotion rule already has this name (`details.name`). */
|
|
332
|
+
PROMOTION_RULE_NAME_TAKEN: 'PROMOTION_RULE_NAME_TAKEN',
|
|
333
|
+
/** 409 — a named rule promotions use is not deleted (`details.ruleId`, `promotionCount`). */
|
|
334
|
+
PROMOTION_RULE_IN_USE: 'PROMOTION_RULE_IN_USE',
|
|
335
|
+
/** 400 — a criterion names an attribute not flagged usable in promotion rules (`details.attributeKey`). */
|
|
336
|
+
PROMOTION_ATTRIBUTE_NOT_ELIGIBLE: 'PROMOTION_ATTRIBUTE_NOT_ELIGIBLE',
|
|
233
337
|
ORGANIZATION_SUSPENDED: 'ORGANIZATION_SUSPENDED',
|
|
234
338
|
ORDER_NOT_FOUND: 'ORDER_NOT_FOUND',
|
|
235
339
|
ORDER_NOT_CANCELLABLE: 'ORDER_NOT_CANCELLABLE',
|
|
@@ -250,6 +354,29 @@ export const ERROR_CODES = {
|
|
|
250
354
|
ORDER_COMMENTS_CLOSED: 'ORDER_COMMENTS_CLOSED',
|
|
251
355
|
/** The order has no lines, so there is nothing to copy into a quote request. */
|
|
252
356
|
ORDER_CLONE_NO_LINES: 'ORDER_CLONE_NO_LINES',
|
|
357
|
+
// The admin's order-status configuration and the external API intake (issue
|
|
358
|
+
// #627, #86), raised as `VALIDATION_FAILED` with an English sentence until
|
|
359
|
+
// then. The status code travels as `details.statusCode`: `details.code` is the
|
|
360
|
+
// envelope's refusal-token slot. `returns` mints the `RETURN_STATUS_*` twins.
|
|
361
|
+
/** 409 — another order status already has this code (`details.statusCode`). */
|
|
362
|
+
ORDER_STATUS_CODE_TAKEN: 'ORDER_STATUS_CODE_TAKEN',
|
|
363
|
+
/**
|
|
364
|
+
* 409 / 422 — a terminal status cannot have outgoing transitions: marking a
|
|
365
|
+
* status with them terminal (token `mark_terminal`, `details.outgoingCount`) or
|
|
366
|
+
* adding one from a terminal status (token `add_transition`, `details.toStatusCode`).
|
|
367
|
+
*/
|
|
368
|
+
ORDER_STATUS_TERMINAL_HAS_TRANSITIONS: 'ORDER_STATUS_TERMINAL_HAS_TRANSITIONS',
|
|
369
|
+
/** 409 — the initial (token `initial`) or a system (token `system`) status is not deleted. */
|
|
370
|
+
ORDER_STATUS_NOT_DELETABLE: 'ORDER_STATUS_NOT_DELETABLE',
|
|
371
|
+
/** 409 — orders are in the status, so it is not deleted (`details.statusCode`, `orderCount`). */
|
|
372
|
+
ORDER_STATUS_IN_USE: 'ORDER_STATUS_IN_USE',
|
|
373
|
+
/**
|
|
374
|
+
* 422 — the external API intake refused one or more lines; `details` stays the
|
|
375
|
+
* per-line array of `{ path, issue, sku }` (`SKU_NOT_IN_ASSORTMENT`, `PRICE_UNAVAILABLE`).
|
|
376
|
+
*/
|
|
377
|
+
ORDER_INTAKE_LINES_REFUSED: 'ORDER_INTAKE_LINES_REFUSED',
|
|
378
|
+
/** 409 — another intake for the same API key holds its lock; retry with the same Idempotency-Key. */
|
|
379
|
+
ORDER_INTAKE_BUSY: 'ORDER_INTAKE_BUSY',
|
|
253
380
|
/** 422 — the basket handed to placement belongs to another sales channel (feature 154). */
|
|
254
381
|
ORDER_SALES_CHANNEL_MISMATCH: 'ORDER_SALES_CHANNEL_MISMATCH',
|
|
255
382
|
/**
|
|
@@ -283,6 +410,32 @@ export const ERROR_CODES = {
|
|
|
283
410
|
// invoiced has no sale left to document (issue #417, owner ruling of
|
|
284
411
|
// 2026-10-24), so issuance refuses it.
|
|
285
412
|
INVOICE_ORDER_REFUNDED: 'INVOICE_ORDER_REFUNDED',
|
|
413
|
+
// Invoices — business refusals of issuance and correction (issue #633, #86),
|
|
414
|
+
// `VALIDATION_FAILED` with an English sentence until then.
|
|
415
|
+
/** 422 — the seller's VAT number and company data are not configured (`details.setting`). */
|
|
416
|
+
INVOICE_SELLER_DATA_MISSING: 'INVOICE_SELLER_DATA_MISSING',
|
|
417
|
+
/**
|
|
418
|
+
* 422 — a correction asked for in another currency than the corrected
|
|
419
|
+
* invoice's (`details.requestedCurrency`, `invoiceCurrency`, `originalInvoiceId`).
|
|
420
|
+
*/
|
|
421
|
+
INVOICE_CORRECTION_CURRENCY_MISMATCH: 'INVOICE_CORRECTION_CURRENCY_MISMATCH',
|
|
422
|
+
/**
|
|
423
|
+
* 400 — the correction total is more than its lines add up to, or (token
|
|
424
|
+
* `below_charges`) less than the charges it credits (`details.total`,
|
|
425
|
+
* `linesTotal`, `currency`).
|
|
426
|
+
*/
|
|
427
|
+
INVOICE_CORRECTION_TOTAL_EXCEEDS_LINES: 'INVOICE_CORRECTION_TOTAL_EXCEEDS_LINES',
|
|
428
|
+
/**
|
|
429
|
+
* 422 — the correction credits more goods at one VAT rate than the invoice
|
|
430
|
+
* still charges there (`details.taxRate`, `vatRatePercent`, `remaining`, `currency`).
|
|
431
|
+
*/
|
|
432
|
+
INVOICE_CORRECTION_EXCEEDS_RATE_REMAINING: 'INVOICE_CORRECTION_EXCEEDS_RATE_REMAINING',
|
|
433
|
+
/**
|
|
434
|
+
* 422 — the correction credits more of an order charge than the invoice still
|
|
435
|
+
* charges for it; the token is the charge, `delivery` or `payment_surcharge`
|
|
436
|
+
* (`details.chargeKind`, `remaining`, `currency`).
|
|
437
|
+
*/
|
|
438
|
+
INVOICE_CORRECTION_EXCEEDS_CHARGE_REMAINING: 'INVOICE_CORRECTION_EXCEEDS_CHARGE_REMAINING',
|
|
286
439
|
INVALID_TRANSITION: 'INVALID_TRANSITION',
|
|
287
440
|
// Returns 155 — a `return`-kind case naming an order line recorded as not
|
|
288
441
|
// returnable at purchase (owned and raised by `returns`; complaints are
|
|
@@ -292,9 +445,57 @@ export const ERROR_CODES = {
|
|
|
292
445
|
// admin already holds a view on the return list whose name differs only by
|
|
293
446
|
// case or surrounding spaces.
|
|
294
447
|
RETURN_SAVED_VIEW_NAME_TAKEN: 'RETURN_SAVED_VIEW_NAME_TAKEN',
|
|
448
|
+
// Shipments (issue #637, #86) — the module's first code. Generating a shipment
|
|
449
|
+
// for an order that already has a successful one, and marking a successful
|
|
450
|
+
// shipment failed, were `409 VALIDATION_FAILED` with an English literal.
|
|
451
|
+
/**
|
|
452
|
+
* 409 — the shipment, or the order's latest one, was already generated
|
|
453
|
+
* successfully. `details.code` names the refused write: `generate`
|
|
454
|
+
* (`details.orderId`, `shipmentId`) or `mark_failed` (`details.shipmentId`,
|
|
455
|
+
* `orderId`, `status`).
|
|
456
|
+
*/
|
|
457
|
+
SHIPMENT_ALREADY_GENERATED: 'SHIPMENT_ALREADY_GENERATED',
|
|
295
458
|
// Issue #905 — a consumer withdrawal settled as a credit, a replacement or a
|
|
296
459
|
// repair without the consumer's consent to that resolution on record.
|
|
297
460
|
RETURN_ALTERNATIVE_RESOLUTION_CONSENT_REQUIRED: 'RETURN_ALTERNATIVE_RESOLUTION_CONSENT_REQUIRED',
|
|
461
|
+
// Returns — business-state refusals raised as `VALIDATION_FAILED` until issue
|
|
462
|
+
// #625 (#86): the buyer's request, the closed case, settlement and the
|
|
463
|
+
// admin's return-status configuration. The status code travels as
|
|
464
|
+
// `details.statusCode`: `details.code` is the envelope's refusal-token slot.
|
|
465
|
+
/** 422 — the order is not completed yet, so it takes no return (`details.orderId`). */
|
|
466
|
+
RETURN_ORDER_NOT_ELIGIBLE: 'RETURN_ORDER_NOT_ELIGIBLE',
|
|
467
|
+
/** 422 — more is asked for than the line can still return (`details.orderItemId`, `requested`, `remaining`). */
|
|
468
|
+
RETURN_QUANTITY_EXCEEDS_RETURNABLE: 'RETURN_QUANTITY_EXCEEDS_RETURNABLE',
|
|
469
|
+
/** 422 — the chosen reason exists but is switched off (`details.reasonId`); an unknown one stays `VALIDATION_FAILED`. */
|
|
470
|
+
RETURN_REASON_INACTIVE: 'RETURN_REASON_INACTIVE',
|
|
471
|
+
/** 409 — the case is in a terminal status, so it takes no more comments (`details.returnCaseId`, `statusCode`). */
|
|
472
|
+
RETURN_COMMENTS_CLOSED: 'RETURN_COMMENTS_CLOSED',
|
|
473
|
+
/** 409 — the case is in a terminal status, so it takes no delivery method (`details.returnCaseId`, `statusCode`). */
|
|
474
|
+
RETURN_CASE_CLOSED: 'RETURN_CASE_CLOSED',
|
|
475
|
+
/** 422 — the return delivery method is not offered (`details.returnDeliveryMethodId`). */
|
|
476
|
+
RETURN_DELIVERY_METHOD_UNAVAILABLE: 'RETURN_DELIVERY_METHOD_UNAVAILABLE',
|
|
477
|
+
/** 409 — another return of the order is being settled; retryable (`details.orderId`). */
|
|
478
|
+
RETURN_SETTLEMENT_IN_PROGRESS: 'RETURN_SETTLEMENT_IN_PROGRESS',
|
|
479
|
+
/**
|
|
480
|
+
* 422 — a refund above what may be refunded, for a line (`details.returnCaseItemId`)
|
|
481
|
+
* or a charge (token `delivery` / `surcharge`); `requested`, `maximum` as
|
|
482
|
+
* two-decimal strings and `currency`.
|
|
483
|
+
*/
|
|
484
|
+
RETURN_REFUND_EXCEEDS_PAID: 'RETURN_REFUND_EXCEEDS_PAID',
|
|
485
|
+
/** 502 — the payment gateway refused the refund (`details.settlementState`, `failureReason`, `providerDetails`). */
|
|
486
|
+
RETURN_REFUND_GATEWAY_FAILED: 'RETURN_REFUND_GATEWAY_FAILED',
|
|
487
|
+
/** 409 — another return status already has this code (`details.statusCode`). */
|
|
488
|
+
RETURN_STATUS_CODE_TAKEN: 'RETURN_STATUS_CODE_TAKEN',
|
|
489
|
+
/**
|
|
490
|
+
* 409 / 422 — a terminal status cannot have outgoing transitions: marking a
|
|
491
|
+
* status with them terminal (token `mark_terminal`, `details.outgoingCount`) or
|
|
492
|
+
* adding one from a terminal status (token `add_transition`, `details.toStatusCode`).
|
|
493
|
+
*/
|
|
494
|
+
RETURN_STATUS_TERMINAL_HAS_TRANSITIONS: 'RETURN_STATUS_TERMINAL_HAS_TRANSITIONS',
|
|
495
|
+
/** 409 — the initial status (token `initial`) is not deleted (`details.statusCode`). */
|
|
496
|
+
RETURN_STATUS_NOT_DELETABLE: 'RETURN_STATUS_NOT_DELETABLE',
|
|
497
|
+
/** 409 — cases are in the status, so it is not deleted (`details.statusCode`, `caseCount`). */
|
|
498
|
+
RETURN_STATUS_IN_USE: 'RETURN_STATUS_IN_USE',
|
|
298
499
|
// Credit Limit
|
|
299
500
|
CREDIT_LIMIT_NOT_GRANTED: 'CREDIT_LIMIT_NOT_GRANTED',
|
|
300
501
|
CREDIT_LIMIT_ALREADY_GRANTED: 'CREDIT_LIMIT_ALREADY_GRANTED',
|
|
@@ -304,6 +505,27 @@ export const ERROR_CODES = {
|
|
|
304
505
|
ACTIVE_RESERVATIONS_EXIST: 'ACTIVE_RESERVATIONS_EXIST',
|
|
305
506
|
ALREADY_SUBSCRIBED: 'ALREADY_SUBSCRIBED',
|
|
306
507
|
PRODUCT_IN_STOCK: 'PRODUCT_IN_STOCK',
|
|
508
|
+
// Newsletter — the admin refusals that were `VALIDATION_FAILED` with an
|
|
509
|
+
// English literal until issue #626 (#86). None carries a `details.code`
|
|
510
|
+
// token: each code is one refusal.
|
|
511
|
+
/** 422 — an active automation cannot be edited; pause it first (`details.automationId`, `status`). */
|
|
512
|
+
NEWSLETTER_AUTOMATION_ACTIVE: 'NEWSLETTER_AUTOMATION_ACTIVE',
|
|
513
|
+
/** 422 — only a draft or scheduled campaign can be edited (`details.campaignId`, `status`). */
|
|
514
|
+
NEWSLETTER_CAMPAIGN_NOT_EDITABLE: 'NEWSLETTER_CAMPAIGN_NOT_EDITABLE',
|
|
515
|
+
/** 422 — only a draft or scheduled campaign can be cancelled (`details.campaignId`, `status`). */
|
|
516
|
+
NEWSLETTER_CAMPAIGN_NOT_CANCELLABLE: 'NEWSLETTER_CAMPAIGN_NOT_CANCELLABLE',
|
|
517
|
+
/** 422 — a campaign cannot be sent while no sending provider is configured. */
|
|
518
|
+
NEWSLETTER_PROVIDER_NOT_CONFIGURED: 'NEWSLETTER_PROVIDER_NOT_CONFIGURED',
|
|
519
|
+
/** 409 — a custom field with this key already exists (`details.key`). */
|
|
520
|
+
NEWSLETTER_CUSTOM_FIELD_KEY_TAKEN: 'NEWSLETTER_CUSTOM_FIELD_KEY_TAKEN',
|
|
521
|
+
/** 409 — an email block with this code already exists (`details.blockCode`). */
|
|
522
|
+
NEWSLETTER_EMAIL_BLOCK_CODE_TAKEN: 'NEWSLETTER_EMAIL_BLOCK_CODE_TAKEN',
|
|
523
|
+
/** 422 — a system email block cannot be deleted (`details.blockId`, `blockCode`). */
|
|
524
|
+
NEWSLETTER_EMAIL_BLOCK_SYSTEM: 'NEWSLETTER_EMAIL_BLOCK_SYSTEM',
|
|
525
|
+
/** 409 — a tag with this code already exists (`details.tagCode`). */
|
|
526
|
+
NEWSLETTER_TAG_CODE_TAKEN: 'NEWSLETTER_TAG_CODE_TAKEN',
|
|
527
|
+
/** 409 — a campaign or an automation uses the tag, so it cannot be deleted (`details.tagId`, `tagCode`). */
|
|
528
|
+
NEWSLETTER_TAG_IN_USE: 'NEWSLETTER_TAG_IN_USE',
|
|
307
529
|
// API keys / webhooks / integrations
|
|
308
530
|
API_KEY_OUT_OF_SCOPE: 'API_KEY_OUT_OF_SCOPE',
|
|
309
531
|
/** An administrator asked for an API key scope their own role does not hold. */
|
|
@@ -317,6 +539,14 @@ export const ERROR_CODES = {
|
|
|
317
539
|
// Distributor API (feature 062)
|
|
318
540
|
API_KEY_NOT_BOUND: 'API_KEY_NOT_BOUND',
|
|
319
541
|
API_KEY_CHANNEL_MISMATCH: 'API_KEY_CHANNEL_MISMATCH',
|
|
542
|
+
/**
|
|
543
|
+
* 422 — the bound key's service account exists in the bound organization but
|
|
544
|
+
* is blocked (token `blocked`) or deleted / anonymized (token `removed`)
|
|
545
|
+
* (`details.field`, `customerAccountId`, `organizationId`). Raised only when
|
|
546
|
+
* it is the sole binding problem; otherwise the aggregate `VALIDATION_FAILED`
|
|
547
|
+
* lists it (issue #644, #86).
|
|
548
|
+
*/
|
|
549
|
+
API_KEY_SERVICE_ACCOUNT_INACTIVE: 'API_KEY_SERVICE_ACCOUNT_INACTIVE',
|
|
320
550
|
IDEMPOTENCY_KEY_REQUIRED: 'IDEMPOTENCY_KEY_REQUIRED',
|
|
321
551
|
IDEMPOTENCY_KEY_REUSED: 'IDEMPOTENCY_KEY_REUSED',
|
|
322
552
|
SKU_NOT_IN_ASSORTMENT: 'SKU_NOT_IN_ASSORTMENT',
|
|
@@ -444,7 +674,6 @@ export const ERROR_CODES = {
|
|
|
444
674
|
ASSET_LEGACY_LOCATOR_CANNOT_HARDEN: 'ASSET_LEGACY_LOCATOR_CANNOT_HARDEN',
|
|
445
675
|
ASSET_FILE_MISSING: 'ASSET_FILE_MISSING',
|
|
446
676
|
ASSET_GONE: 'ASSET_GONE',
|
|
447
|
-
ASSET_ACCESS_DENIED: 'ASSET_ACCESS_DENIED',
|
|
448
677
|
// Assets Library — stable asset URLs (specs/156-asset-stable-url/)
|
|
449
678
|
ASSET_REPLACE_KIND_MISMATCH: 'ASSET_REPLACE_KIND_MISMATCH',
|
|
450
679
|
ASSET_LEGACY_CANNOT_REPLACE: 'ASSET_LEGACY_CANNOT_REPLACE',
|
|
@@ -492,6 +721,12 @@ export const ERROR_CODES = {
|
|
|
492
721
|
MEGAMENU_LANGUAGE_NOT_IN_CHANNEL_SCOPE: 'MEGAMENU_LANGUAGE_NOT_IN_CHANNEL_SCOPE',
|
|
493
722
|
MEGAMENU_TARGET_OUT_OF_SCOPE: 'MEGAMENU_TARGET_OUT_OF_SCOPE',
|
|
494
723
|
MEGAMENU_ASSET_KIND_MISMATCH: 'MEGAMENU_ASSET_KIND_MISMATCH',
|
|
724
|
+
/**
|
|
725
|
+
* 400 — a free-URL asset item: importing an asset from a URL is not supported
|
|
726
|
+
* yet, so the asset is uploaded to the Assets Library and referenced by id
|
|
727
|
+
* (`details.itemId`). `VALIDATION_FAILED` until issue #640 (#86).
|
|
728
|
+
*/
|
|
729
|
+
MEGAMENU_ASSET_URL_UNSUPPORTED: 'MEGAMENU_ASSET_URL_UNSUPPORTED',
|
|
495
730
|
MEGAMENU_REFERENCED: 'MEGAMENU_REFERENCED',
|
|
496
731
|
MEGAMENU_DEPTH_EXCEEDED: 'MEGAMENU_DEPTH_EXCEEDED',
|
|
497
732
|
// Feature 168 — the navigation bar's tree rules (data-model §3).
|
|
@@ -541,8 +776,23 @@ export const ERROR_CODES = {
|
|
|
541
776
|
DICTIONARY_FALLBACK_CYCLE: 'DICTIONARY_FALLBACK_CYCLE',
|
|
542
777
|
DICTIONARY_CODE_IMMUTABLE: 'DICTIONARY_CODE_IMMUTABLE',
|
|
543
778
|
DICTIONARY_TRANSLATION_LANGUAGE_INACTIVE: 'DICTIONARY_TRANSLATION_LANGUAGE_INACTIVE',
|
|
779
|
+
// Issue #643 (#86) — raised by `dictionaries` (countries), `currencies` and
|
|
780
|
+
// `languages`, `409 VALIDATION_FAILED` until then. `details.code` names the
|
|
781
|
+
// dictionary (`country`, `currency`, `language`); the entry's own code is
|
|
782
|
+
// `details.entryCode`.
|
|
783
|
+
/** 409 — an entry with this code already exists in the dictionary. */
|
|
784
|
+
DICTIONARY_ENTRY_CODE_TAKEN: 'DICTIONARY_ENTRY_CODE_TAKEN',
|
|
785
|
+
/** 409 — an inactive entry cannot be made the dictionary's default. */
|
|
786
|
+
DICTIONARY_DEFAULT_ENTRY_INACTIVE: 'DICTIONARY_DEFAULT_ENTRY_INACTIVE',
|
|
544
787
|
// Module Lifecycle (feature 018)
|
|
545
788
|
MODULE_DISABLED: 'MODULE_DISABLED',
|
|
789
|
+
// Command hooks (`specs/176-command-hooks-outbox/` P2) — the platform's answer
|
|
790
|
+
// to a misused hook seam; `command-hooks.ts` documents each.
|
|
791
|
+
COMMAND_EXTENSION_UNCLAIMED: 'COMMAND_EXTENSION_UNCLAIMED',
|
|
792
|
+
COMMAND_HOOK_CYCLE: 'COMMAND_HOOK_CYCLE',
|
|
793
|
+
COMMAND_HOOK_DATA_MISSING: 'COMMAND_HOOK_DATA_MISSING',
|
|
794
|
+
/** A retry of a command outbox row that is not dead (176 P4): only a failed delivery can be retried. */
|
|
795
|
+
COMMAND_OUTBOX_NOT_DEAD: 'COMMAND_OUTBOX_NOT_DEAD',
|
|
546
796
|
// Module Lifecycle (feature 073 — operator activation)
|
|
547
797
|
/** No manifest and no registry row answer to this module id. */
|
|
548
798
|
MODULE_NOT_FOUND: 'MODULE_NOT_FOUND',
|
|
@@ -581,8 +831,19 @@ export const ERROR_CODES = {
|
|
|
581
831
|
* same "there is nothing here to switch, ever", same carried reason.
|
|
582
832
|
*/
|
|
583
833
|
TRANSACTIONAL_EMAIL_NOT_DEACTIVATABLE: 'TRANSACTIONAL_EMAIL_NOT_DEACTIVATABLE',
|
|
834
|
+
// A system block or template that cannot be deleted (issue #638, #86).
|
|
835
|
+
// Raised as `VALIDATION_FAILED` with an English sentence until then.
|
|
836
|
+
/** 409 — a system email block cannot be deleted (`details.blockId`, `blockCode`). */
|
|
837
|
+
TRANSACTIONAL_EMAIL_SYSTEM_BLOCK: 'TRANSACTIONAL_EMAIL_SYSTEM_BLOCK',
|
|
838
|
+
/** 409 — a system email template cannot be deleted (`details.templateId`, `templateCode`). */
|
|
839
|
+
TRANSACTIONAL_EMAIL_SYSTEM_TEMPLATE: 'TRANSACTIONAL_EMAIL_SYSTEM_TEMPLATE',
|
|
584
840
|
// Catalog (feature 022 — Products Bulk Edit)
|
|
585
841
|
BULK_TOO_LARGE: 'BULK_TOO_LARGE',
|
|
842
|
+
// Issue #501 — why an undo of a bulk operation is refused (409), one code per
|
|
843
|
+
// reason: still in flight, already undone, or nothing it can restore.
|
|
844
|
+
BULK_OPERATION_RUNNING: 'BULK_OPERATION_RUNNING',
|
|
845
|
+
BULK_OPERATION_ALREADY_REVERTED: 'BULK_OPERATION_ALREADY_REVERTED',
|
|
846
|
+
BULK_OPERATION_NOT_REVERSIBLE: 'BULK_OPERATION_NOT_REVERSIBLE',
|
|
586
847
|
ATTRIBUTE_NOT_MASS_EDITABLE: 'ATTRIBUTE_NOT_MASS_EDITABLE',
|
|
587
848
|
// Catalog (feature 033 — Products collection selection)
|
|
588
849
|
SELECTION_TOO_LARGE: 'SELECTION_TOO_LARGE',
|
|
@@ -618,6 +879,21 @@ export const ERROR_CODES = {
|
|
|
618
879
|
// credential is refused: an account created by a social sign-in holds a
|
|
619
880
|
// random password nobody knows, so the link is the way back in.
|
|
620
881
|
MFA_SOCIAL_LAST_CREDENTIAL: 'MFA_SOCIAL_LAST_CREDENTIAL',
|
|
882
|
+
/**
|
|
883
|
+
* Issue #935 — removing the account's last second factor is refused while
|
|
884
|
+
* a requirement is in force: `mfa.admin.totp_enforced` or a role's
|
|
885
|
+
* `requiresTwoFactor` for an administrator, `mfa.storefront.totp_enforced`
|
|
886
|
+
* at the request's sales channel or the organization's policy for a
|
|
887
|
+
* customer. Raised by the self-service `POST …/mfa/disable`.
|
|
888
|
+
*/
|
|
889
|
+
MFA_LAST_FACTOR_REQUIRED: 'MFA_LAST_FACTOR_REQUIRED',
|
|
890
|
+
/**
|
|
891
|
+
* Issue #1279 — the one answer of `POST /api/v1/auth/customer/oauth/exchange`
|
|
892
|
+
* for a hand-off code it will not redeem: unknown, expired, already used,
|
|
893
|
+
* presented with another browser's binding or on another sales channel, or
|
|
894
|
+
* withdrawn with the account's pending sign-ins.
|
|
895
|
+
*/
|
|
896
|
+
MFA_FEDERATED_HANDOFF_INVALID: 'MFA_FEDERATED_HANDOFF_INVALID',
|
|
621
897
|
// Feature 055 — Custom Fields Layer.
|
|
622
898
|
CUSTOM_FIELD_NOT_FOUND: 'CUSTOM_FIELD_NOT_FOUND',
|
|
623
899
|
CUSTOM_FIELD_KEY_CONFLICT: 'CUSTOM_FIELD_KEY_CONFLICT',
|
|
@@ -686,6 +962,23 @@ export const ERROR_CODES = {
|
|
|
686
962
|
* from `PRODUCT_FEED_ERROR_CODES` (feature 067, FR-087, FR-095, FR-096).
|
|
687
963
|
*/
|
|
688
964
|
PRODUCT_FEED_TAXONOMY_CONFLICT: 'PRODUCT_FEED_TAXONOMY_CONFLICT',
|
|
965
|
+
// The feed form's state refusals (issue #631, #86). Raised as
|
|
966
|
+
// `VALIDATION_FAILED` with an English `field: message` literal until then.
|
|
967
|
+
// Unlike the five above, `product_feeds` declares these itself, and each
|
|
968
|
+
// keeps `details.field` so the form can place the sentence.
|
|
969
|
+
/**
|
|
970
|
+
* 400 — the language exists on the installation but is switched off
|
|
971
|
+
* (`details.field`, `languageCode`).
|
|
972
|
+
*/
|
|
973
|
+
PRODUCT_FEED_LANGUAGE_INACTIVE: 'PRODUCT_FEED_LANGUAGE_INACTIVE',
|
|
974
|
+
/**
|
|
975
|
+
* 400 — the feed's sales channel does not offer the currency
|
|
976
|
+
* (`details.field`, `currencyCode`, `salesChannelId`, `allowed` as a
|
|
977
|
+
* comma-joined string).
|
|
978
|
+
*/
|
|
979
|
+
PRODUCT_FEED_CURRENCY_NOT_OFFERED: 'PRODUCT_FEED_CURRENCY_NOT_OFFERED',
|
|
980
|
+
/** 400 — another feed already uses the slug (`details.field`, `slug`). */
|
|
981
|
+
PRODUCT_FEED_SLUG_TAKEN: 'PRODUCT_FEED_SLUG_TAKEN',
|
|
689
982
|
/**
|
|
690
983
|
* A price binding named a price list that does not exist. Named after the
|
|
691
984
|
* resource rather than the module (admin-api.md § Price bindings): the caller
|
|
@@ -711,6 +1004,19 @@ export const ERROR_CODES = {
|
|
|
711
1004
|
PRICE_BOOK_ROW_LIMIT: 'PRICE_BOOK_ROW_LIMIT',
|
|
712
1005
|
/** Feature 160 — the book changed since the version the write was made against; `details.currentVersion`. */
|
|
713
1006
|
PRICE_BOOK_STALE: 'PRICE_BOOK_STALE',
|
|
1007
|
+
/** Issue #1028 — a base book's rows are base prices, written through `priceBookWritePort` or the base-price API. */
|
|
1008
|
+
PRICE_BOOK_BASE_BOOK: 'PRICE_BOOK_BASE_BOOK',
|
|
1009
|
+
/** Issue #1028 — an expired book prices nothing and takes no row write from another module. */
|
|
1010
|
+
PRICE_BOOK_EXPIRED: 'PRICE_BOOK_EXPIRED',
|
|
1011
|
+
// Two `price_lists` refusals raised as `VALIDATION_FAILED` until issue #636
|
|
1012
|
+
// (#86). Declared by the `price_lists` manifest.
|
|
1013
|
+
/**
|
|
1014
|
+
* 400 — a variant's percentage or amount adjustment would lose the product's own
|
|
1015
|
+
* base price in that currency (`details.productId`, `currency`, `issues`).
|
|
1016
|
+
*/
|
|
1017
|
+
PRICE_BOOK_BASE_PRICE_REQUIRED: 'PRICE_BOOK_BASE_PRICE_REQUIRED',
|
|
1018
|
+
/** 400 — a base book is channel-independent and takes no channel set (`details.priceBookId`, `currency`). */
|
|
1019
|
+
PRICE_BOOK_BASE_HAS_NO_CHANNELS: 'PRICE_BOOK_BASE_HAS_NO_CHANNELS',
|
|
714
1020
|
/** Feature 160 — the precedence is read-only until the change flow ships (FR-023). */
|
|
715
1021
|
PRECEDENCE_CHANGE_UNAVAILABLE: 'PRECEDENCE_CHANGE_UNAVAILABLE',
|
|
716
1022
|
// Shared PIM connector layer (feature 089).
|
|
@@ -723,8 +1029,30 @@ export const ERROR_CODES = {
|
|
|
723
1029
|
INVOICE_LEDGER_CREDENTIALS_MISSING: 'INVOICE_LEDGER_CREDENTIALS_MISSING',
|
|
724
1030
|
/** Delivery is succeeded or otherwise not eligible for operator retry. */
|
|
725
1031
|
INVOICE_LEDGER_DELIVERY_NOT_RETRYABLE: 'INVOICE_LEDGER_DELIVERY_NOT_RETRYABLE',
|
|
1032
|
+
/**
|
|
1033
|
+
* 400 — a routing write changes the stored numbering mode without
|
|
1034
|
+
* `confirm: true` (`details.field: 'confirm'`, `from`, `to`). Raised as
|
|
1035
|
+
* `VALIDATION_FAILED` until issue #644 (#86).
|
|
1036
|
+
*/
|
|
1037
|
+
INVOICE_LEDGER_NUMBERING_CHANGE_UNCONFIRMED: 'INVOICE_LEDGER_NUMBERING_CHANGE_UNCONFIRMED',
|
|
726
1038
|
// `INFAKT_CONNECTION_FAILED` and `INFAKT_WEBHOOK_UNAUTHORIZED` left with the
|
|
727
1039
|
// `infakt` module (feature 134, T069), which declares them as `infaktErrorCodes`.
|
|
1040
|
+
// Delivery methods — a method shipments were created against (issue #632, #86).
|
|
1041
|
+
// Raised as `VALIDATION_FAILED` with an English sentence until then. The
|
|
1042
|
+
// `details.code` token names the write that was refused: `delete` or
|
|
1043
|
+
// `change_adapter`.
|
|
1044
|
+
/**
|
|
1045
|
+
* 409 — shipments reference the method, so it cannot be deleted or rebound to
|
|
1046
|
+
* another adapter (`details.deliveryMethodId`, `deliveryMethodCode`,
|
|
1047
|
+
* `shipmentCount`; `adapter` for `change_adapter`).
|
|
1048
|
+
*/
|
|
1049
|
+
DELIVERY_METHOD_IN_USE: 'DELIVERY_METHOD_IN_USE',
|
|
1050
|
+
/**
|
|
1051
|
+
* 409 — the `shipments` module is off, so nobody can count the shipments that
|
|
1052
|
+
* may reference the method, and the delete or the adapter change is refused
|
|
1053
|
+
* (`details.deliveryMethodId`, `module`).
|
|
1054
|
+
*/
|
|
1055
|
+
DELIVERY_METHOD_USAGE_UNKNOWN: 'DELIVERY_METHOD_USAGE_UNKNOWN',
|
|
728
1056
|
// Shared ERP connector layer (feature 119).
|
|
729
1057
|
/** Another ERP connector is operator-active; activation refused (FR-006). */
|
|
730
1058
|
ERP_CONNECTOR_ALREADY_ACTIVE: 'ERP_CONNECTOR_ALREADY_ACTIVE',
|
|
@@ -745,6 +1073,32 @@ export const ERROR_CODES = {
|
|
|
745
1073
|
* neither claimant.
|
|
746
1074
|
*/
|
|
747
1075
|
PAYMENT_ADAPTER_UNAVAILABLE: 'PAYMENT_ADAPTER_UNAVAILABLE',
|
|
1076
|
+
// Payments — the payment's own state refuses an admin retry or the
|
|
1077
|
+
// `receive_payment` ingress (issue #630, #86). Raised as `VALIDATION_FAILED`
|
|
1078
|
+
// with an English literal until then.
|
|
1079
|
+
/**
|
|
1080
|
+
* 409 — the payment is already paid: a retry (token `retry`) or the ingress
|
|
1081
|
+
* marking it failed (token `mark_failed`); `details.orderId`, `paymentId`, `status`.
|
|
1082
|
+
*/
|
|
1083
|
+
PAYMENT_ALREADY_PAID: 'PAYMENT_ALREADY_PAID',
|
|
1084
|
+
/** 409 — the payment was refunded, so it cannot be retried (`details.orderId`, `paymentId`, `status`). */
|
|
1085
|
+
PAYMENT_REFUNDED: 'PAYMENT_REFUNDED',
|
|
1086
|
+
/** 409 — the order is settled out of band, so there is nothing to retry (`details.orderId`, `paymentId`). */
|
|
1087
|
+
PAYMENT_SETTLED_OUT_OF_BAND: 'PAYMENT_SETTLED_OUT_OF_BAND',
|
|
1088
|
+
// Payment methods — a method payments reference (issue #635, #86). Raised as
|
|
1089
|
+
// `VALIDATION_FAILED` with an English sentence until then; issue #632 gives
|
|
1090
|
+
// the delivery-method guard the same pair.
|
|
1091
|
+
/**
|
|
1092
|
+
* 409 — payments reference the method, so it cannot be deleted
|
|
1093
|
+
* (`details.paymentMethodId`, `paymentMethodCode`, `paymentCount`).
|
|
1094
|
+
*/
|
|
1095
|
+
PAYMENT_METHOD_IN_USE: 'PAYMENT_METHOD_IN_USE',
|
|
1096
|
+
/**
|
|
1097
|
+
* 409 — the `payments` module is off, so nobody can count the payments that
|
|
1098
|
+
* may reference the method, and the delete is refused
|
|
1099
|
+
* (`details.paymentMethodId`, `module`).
|
|
1100
|
+
*/
|
|
1101
|
+
PAYMENT_METHOD_USAGE_UNKNOWN: 'PAYMENT_METHOD_USAGE_UNKNOWN',
|
|
748
1102
|
// CRM — Sales Opportunities (`specs/143-crm-sales-opportunities/`,
|
|
749
1103
|
// `contracts/admin-api.md` §13). Each is declared by the `crm` module's
|
|
750
1104
|
// manifest and joins this block in the change that adds its first raise site.
|
|
@@ -773,6 +1127,12 @@ export const ERROR_CODES = {
|
|
|
773
1127
|
CRM_ASSIGNEE_INVALID: 'CRM_ASSIGNEE_INVALID',
|
|
774
1128
|
/** The uploaded file is larger than an Opportunity attachment may be. */
|
|
775
1129
|
CRM_ATTACHMENT_TOO_LARGE: 'CRM_ATTACHMENT_TOO_LARGE',
|
|
1130
|
+
/**
|
|
1131
|
+
* 422 — an attachment must be a private file of the library (`details.assetId`, `visibility`).
|
|
1132
|
+
* `VALIDATION_FAILED` until issue #639 (#86); the twin of `projects`'
|
|
1133
|
+
* `PROJECT_ATTACHMENT_NOT_PRIVATE` (issue #634).
|
|
1134
|
+
*/
|
|
1135
|
+
CRM_ATTACHMENT_NOT_PRIVATE: 'CRM_ATTACHMENT_NOT_PRIVATE',
|
|
776
1136
|
/** Another CRM tag already has this name, whatever its case. */
|
|
777
1137
|
CRM_TAG_NAME_TAKEN: 'CRM_TAG_NAME_TAKEN',
|
|
778
1138
|
/** A message on an Opportunity cannot be edited or deleted once sent. */
|
|
@@ -808,7 +1168,11 @@ export const ERROR_CODES = {
|
|
|
808
1168
|
TASK_TAG_UNKNOWN: 'TASK_TAG_UNKNOWN',
|
|
809
1169
|
/** A Task tag name already taken, case-insensitively (R-10). */
|
|
810
1170
|
TASK_TAG_NAME_TAKEN: 'TASK_TAG_NAME_TAKEN',
|
|
811
|
-
/**
|
|
1171
|
+
/**
|
|
1172
|
+
* A Task attachment refused: too large, or a document a browser would run (R-7) — or, since
|
|
1173
|
+
* issue #642, a library file that is not private (422, refusal token `not_private`,
|
|
1174
|
+
* `details.assetId`, `visibility`).
|
|
1175
|
+
*/
|
|
812
1176
|
TASK_ATTACHMENT_REFUSED: 'TASK_ATTACHMENT_REFUSED',
|
|
813
1177
|
/** A saved Tasks list view name its owner already uses, case-insensitively (R-13). */
|
|
814
1178
|
TASK_VIEW_NAME_TAKEN: 'TASK_VIEW_NAME_TAKEN',
|
|
@@ -876,6 +1240,17 @@ export const ERROR_CODES = {
|
|
|
876
1240
|
PROJECT_MESSAGE_IMMUTABLE: 'PROJECT_MESSAGE_IMMUTABLE',
|
|
877
1241
|
/** The uploaded file is larger than an attachment of a Project may be; `details.maxMb` names the limit. */
|
|
878
1242
|
PROJECT_ATTACHMENT_TOO_LARGE: 'PROJECT_ATTACHMENT_TOO_LARGE',
|
|
1243
|
+
// Three state refusals raised as `VALIDATION_FAILED` with an English literal
|
|
1244
|
+
// until issue #634 (#86).
|
|
1245
|
+
/** 422 — the Project already has the most Stages it may have (`details.projectId`, `maximum`). */
|
|
1246
|
+
PROJECT_STAGE_LIMIT: 'PROJECT_STAGE_LIMIT',
|
|
1247
|
+
/**
|
|
1248
|
+
* 422 — an attachment must be a private file of the library (`details.assetId`, `visibility`).
|
|
1249
|
+
* `crm`'s twin is to be `CRM_ATTACHMENT_NOT_PRIVATE` (issue #639).
|
|
1250
|
+
*/
|
|
1251
|
+
PROJECT_ATTACHMENT_NOT_PRIVATE: 'PROJECT_ATTACHMENT_NOT_PRIVATE',
|
|
1252
|
+
/** 422 — an archived Role is not added to a Template that does not hold it (`details.roleId`). */
|
|
1253
|
+
PROJECT_TEMPLATE_ROLE_ARCHIVED: 'PROJECT_TEMPLATE_ROLE_ARCHIVED',
|
|
879
1254
|
// SEO — search engine robots (`specs/144-seo-search-engine-robots/`, FR-006).
|
|
880
1255
|
// Declared by the `seo` module's manifest.
|
|
881
1256
|
/**
|