@endora-commerce/contracts 0.109.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/actor.d.ts +16 -0
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.js +8 -1
- package/dist/admin-actions.d.ts +2 -0
- package/dist/admin-actions.js +18 -0
- package/dist/admin-contributions.d.ts +99 -12
- package/dist/admin-contributions.js +36 -10
- package/dist/admin-roles.d.ts +17 -2
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin.d.ts +114 -4
- package/dist/admin.js +98 -3
- package/dist/api-keys.d.ts +22 -0
- package/dist/api-keys.js +4 -0
- package/dist/assets-library.d.ts +45 -0
- package/dist/assets-library.js +20 -3
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.js +12 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.js +9 -0
- package/dist/blog.d.ts +382 -22
- package/dist/blog.js +199 -17
- package/dist/carts.d.ts +423 -36
- package/dist/carts.js +150 -12
- package/dist/catalog.d.ts +379 -208
- package/dist/catalog.js +241 -163
- package/dist/cms-brand.d.ts +14 -14
- package/dist/cms.d.ts +71 -16
- package/dist/cms.js +15 -0
- package/dist/command-hooks.d.ts +301 -0
- package/dist/command-hooks.js +248 -0
- package/dist/common.d.ts +23 -6
- package/dist/common.js +25 -2
- package/dist/comparisons.d.ts +21 -14
- package/dist/comparisons.js +2 -1
- package/dist/credit-limits.d.ts +22 -0
- package/dist/credit-limits.js +35 -0
- package/dist/crm.d.ts +134 -78
- package/dist/crm.js +21 -5
- package/dist/custom-fields.d.ts +417 -49
- package/dist/custom-fields.js +142 -1
- package/dist/customer-accounts.d.ts +324 -22
- package/dist/customer-accounts.js +43 -0
- package/dist/customer-notifications.d.ts +143 -0
- package/dist/customer-notifications.js +41 -0
- package/dist/customers.d.ts +92 -73
- package/dist/customers.js +98 -10
- package/dist/dictionary.d.ts +53 -0
- package/dist/dictionary.js +25 -0
- package/dist/document-templates.d.ts +12 -12
- package/dist/email.d.ts +34 -0
- package/dist/email.js +6 -0
- package/dist/errors.d.ts +431 -3
- package/dist/errors.js +523 -3
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.js +827 -0
- package/dist/i18n.d.ts +34 -0
- package/dist/i18n.js +15 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.js +60 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +30 -1
- package/dist/inventory.d.ts +9 -9
- package/dist/invoice-ledger.d.ts +13 -13
- package/dist/invoices.d.ts +126 -0
- package/dist/invoices.js +53 -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 +210 -4
- package/dist/mfa.js +136 -0
- package/dist/modules.d.ts +56 -8
- package/dist/modules.js +128 -3
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.js +95 -0
- package/dist/newsletter.d.ts +4 -4
- package/dist/orders.d.ts +246 -12
- package/dist/orders.js +140 -7
- package/dist/organization-hooks.d.ts +99 -0
- package/dist/organization-hooks.js +22 -0
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-roles.d.ts +341 -0
- package/dist/organization-roles.js +218 -0
- package/dist/organizations.d.ts +1074 -103
- package/dist/organizations.js +293 -28
- package/dist/page-builder-props.d.ts +56 -56
- package/dist/pim-connector.d.ts +7 -3
- package/dist/pim-connector.js +6 -2
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/price-books.d.ts +215 -63
- package/dist/price-books.js +47 -2
- package/dist/price-lists.d.ts +13 -10
- package/dist/product-feeds.d.ts +249 -100
- package/dist/product-feeds.js +46 -2
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scopes.d.ts +199 -64
- package/dist/product-scopes.js +120 -23
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-url-keys.d.ts +51 -45
- package/dist/product-url-keys.js +73 -39
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.js +36 -96
- package/dist/projects.d.ts +76 -28
- package/dist/projects.js +53 -9
- package/dist/promotions.d.ts +163 -11
- package/dist/promotions.js +23 -1
- package/dist/pwa.d.ts +41 -2
- package/dist/quick-order.d.ts +159 -9
- package/dist/quick-order.js +79 -4
- package/dist/quote-requests.d.ts +231 -17
- package/dist/quote-requests.js +111 -9
- package/dist/record-references.d.ts +15 -15
- package/dist/record-references.js +2 -3
- package/dist/record-rich-text.js +2 -1
- package/dist/returns.d.ts +214 -52
- package/dist/returns.js +143 -28
- package/dist/sales-channels.d.ts +34 -3
- package/dist/sales-channels.js +16 -1
- package/dist/saved-list-views.d.ts +28 -0
- package/dist/saved-list-views.js +14 -1
- package/dist/schema-extensions.d.ts +36 -0
- package/dist/schema-extensions.js +29 -0
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/search.d.ts +18 -16
- package/dist/seo.d.ts +83 -30
- package/dist/seo.js +8 -1
- package/dist/settings.d.ts +173 -2
- package/dist/settings.js +53 -2
- package/dist/shopping-lists.d.ts +63 -4
- package/dist/shopping-lists.js +57 -3
- package/dist/storefront-cache-tags.d.ts +22 -0
- package/dist/storefront-cache-tags.js +12 -0
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/tasks.d.ts +27 -27
- package/dist/taxes.d.ts +27 -0
- package/dist/taxes.js +4 -0
- package/dist/transactional-emails.d.ts +48 -22
- package/dist/webhooks.d.ts +75 -0
- package/dist/webhooks.js +24 -0
- package/package.json +5 -3
- 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/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/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/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-overrides.d.ts.map +0 -1
- package/dist/product-scope-overrides.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-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-translations.d.ts +0 -48
- package/dist/scoped-translations.d.ts.map +0 -1
- package/dist/scoped-translations.js +0 -78
- package/dist/scoped-translations.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/cms-brand.d.ts
CHANGED
|
@@ -330,11 +330,11 @@ export declare const cmsBrandTokensSchema: z.ZodObject<{
|
|
|
330
330
|
}>;
|
|
331
331
|
}, z.core.$strip>;
|
|
332
332
|
spacing: z.ZodObject<{
|
|
333
|
-
|
|
333
|
+
none: z.ZodObject<{
|
|
334
334
|
mobilePx: z.ZodNumber;
|
|
335
335
|
desktopPx: z.ZodNumber;
|
|
336
336
|
}, z.core.$strip>;
|
|
337
|
-
|
|
337
|
+
l: z.ZodObject<{
|
|
338
338
|
mobilePx: z.ZodNumber;
|
|
339
339
|
desktopPx: z.ZodNumber;
|
|
340
340
|
}, z.core.$strip>;
|
|
@@ -684,11 +684,11 @@ export declare const putCmsBrandTokensRequestSchema: z.ZodObject<{
|
|
|
684
684
|
}>;
|
|
685
685
|
}, z.core.$strip>;
|
|
686
686
|
spacing: z.ZodObject<{
|
|
687
|
-
|
|
687
|
+
none: z.ZodObject<{
|
|
688
688
|
mobilePx: z.ZodNumber;
|
|
689
689
|
desktopPx: z.ZodNumber;
|
|
690
690
|
}, z.core.$strip>;
|
|
691
|
-
|
|
691
|
+
l: z.ZodObject<{
|
|
692
692
|
mobilePx: z.ZodNumber;
|
|
693
693
|
desktopPx: z.ZodNumber;
|
|
694
694
|
}, z.core.$strip>;
|
|
@@ -992,11 +992,11 @@ export declare const cmsBrandTokensScopeStateSchema: z.ZodObject<{
|
|
|
992
992
|
}>;
|
|
993
993
|
}, z.core.$strip>;
|
|
994
994
|
spacing: z.ZodObject<{
|
|
995
|
-
|
|
995
|
+
none: z.ZodObject<{
|
|
996
996
|
mobilePx: z.ZodNumber;
|
|
997
997
|
desktopPx: z.ZodNumber;
|
|
998
998
|
}, z.core.$strip>;
|
|
999
|
-
|
|
999
|
+
l: z.ZodObject<{
|
|
1000
1000
|
mobilePx: z.ZodNumber;
|
|
1001
1001
|
desktopPx: z.ZodNumber;
|
|
1002
1002
|
}, z.core.$strip>;
|
|
@@ -1291,11 +1291,11 @@ export declare const cmsBrandTokensAdminReadSchema: z.ZodObject<{
|
|
|
1291
1291
|
}>;
|
|
1292
1292
|
}, z.core.$strip>;
|
|
1293
1293
|
spacing: z.ZodObject<{
|
|
1294
|
-
|
|
1294
|
+
none: z.ZodObject<{
|
|
1295
1295
|
mobilePx: z.ZodNumber;
|
|
1296
1296
|
desktopPx: z.ZodNumber;
|
|
1297
1297
|
}, z.core.$strip>;
|
|
1298
|
-
|
|
1298
|
+
l: z.ZodObject<{
|
|
1299
1299
|
mobilePx: z.ZodNumber;
|
|
1300
1300
|
desktopPx: z.ZodNumber;
|
|
1301
1301
|
}, z.core.$strip>;
|
|
@@ -1587,11 +1587,11 @@ export declare const cmsBrandTokensAdminReadSchema: z.ZodObject<{
|
|
|
1587
1587
|
}>;
|
|
1588
1588
|
}, z.core.$strip>;
|
|
1589
1589
|
spacing: z.ZodObject<{
|
|
1590
|
-
|
|
1590
|
+
none: z.ZodObject<{
|
|
1591
1591
|
mobilePx: z.ZodNumber;
|
|
1592
1592
|
desktopPx: z.ZodNumber;
|
|
1593
1593
|
}, z.core.$strip>;
|
|
1594
|
-
|
|
1594
|
+
l: z.ZodObject<{
|
|
1595
1595
|
mobilePx: z.ZodNumber;
|
|
1596
1596
|
desktopPx: z.ZodNumber;
|
|
1597
1597
|
}, z.core.$strip>;
|
|
@@ -1883,11 +1883,11 @@ export declare const cmsBrandTokensAdminReadSchema: z.ZodObject<{
|
|
|
1883
1883
|
}>;
|
|
1884
1884
|
}, z.core.$strip>;
|
|
1885
1885
|
spacing: z.ZodObject<{
|
|
1886
|
-
|
|
1886
|
+
none: z.ZodObject<{
|
|
1887
1887
|
mobilePx: z.ZodNumber;
|
|
1888
1888
|
desktopPx: z.ZodNumber;
|
|
1889
1889
|
}, z.core.$strip>;
|
|
1890
|
-
|
|
1890
|
+
l: z.ZodObject<{
|
|
1891
1891
|
mobilePx: z.ZodNumber;
|
|
1892
1892
|
desktopPx: z.ZodNumber;
|
|
1893
1893
|
}, z.core.$strip>;
|
|
@@ -2185,11 +2185,11 @@ export declare const cmsBrandTokensStorefrontResponseSchema: z.ZodObject<{
|
|
|
2185
2185
|
}>;
|
|
2186
2186
|
}, z.core.$strip>;
|
|
2187
2187
|
spacing: z.ZodObject<{
|
|
2188
|
-
|
|
2188
|
+
none: z.ZodObject<{
|
|
2189
2189
|
mobilePx: z.ZodNumber;
|
|
2190
2190
|
desktopPx: z.ZodNumber;
|
|
2191
2191
|
}, z.core.$strip>;
|
|
2192
|
-
|
|
2192
|
+
l: z.ZodObject<{
|
|
2193
2193
|
mobilePx: z.ZodNumber;
|
|
2194
2194
|
desktopPx: z.ZodNumber;
|
|
2195
2195
|
}, z.core.$strip>;
|
package/dist/cms.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type ChannelUrlFacts } from './storefront-language-path.js';
|
|
3
3
|
export declare const cmsPageStatusSchema: z.ZodEnum<{
|
|
4
|
+
archived: "archived";
|
|
4
5
|
draft: "draft";
|
|
5
6
|
published: "published";
|
|
6
|
-
archived: "archived";
|
|
7
7
|
}>;
|
|
8
8
|
/**
|
|
9
9
|
* One language's own name, slug and description of a CMS page
|
|
@@ -35,9 +35,9 @@ export declare const cmsPageSummarySchema: z.ZodObject<{
|
|
|
35
35
|
name: z.ZodString;
|
|
36
36
|
slug: z.ZodString;
|
|
37
37
|
status: z.ZodEnum<{
|
|
38
|
+
archived: "archived";
|
|
38
39
|
draft: "draft";
|
|
39
40
|
published: "published";
|
|
40
|
-
archived: "archived";
|
|
41
41
|
}>;
|
|
42
42
|
active: z.ZodBoolean;
|
|
43
43
|
description: z.ZodNullable<z.ZodString>;
|
|
@@ -71,9 +71,9 @@ export declare const cmsPageDetailSchema: z.ZodObject<{
|
|
|
71
71
|
name: z.ZodString;
|
|
72
72
|
slug: z.ZodString;
|
|
73
73
|
status: z.ZodEnum<{
|
|
74
|
+
archived: "archived";
|
|
74
75
|
draft: "draft";
|
|
75
76
|
published: "published";
|
|
76
|
-
archived: "archived";
|
|
77
77
|
}>;
|
|
78
78
|
active: z.ZodBoolean;
|
|
79
79
|
description: z.ZodNullable<z.ZodString>;
|
|
@@ -331,8 +331,8 @@ export type CmsHookAttachmentRequest = z.infer<typeof cmsHookAttachmentRequestSc
|
|
|
331
331
|
* document blocks — never reach the CMS or e-mail palettes.
|
|
332
332
|
*/
|
|
333
333
|
export declare const pageBuilderContextSchema: z.ZodEnum<{
|
|
334
|
-
cms: "cms";
|
|
335
334
|
email: "email";
|
|
335
|
+
cms: "cms";
|
|
336
336
|
invoice: "invoice";
|
|
337
337
|
newsletter: "newsletter";
|
|
338
338
|
document: "document";
|
|
@@ -348,11 +348,11 @@ export declare const cmsFieldDescriptorSchema: z.ZodObject<{
|
|
|
348
348
|
number: "number";
|
|
349
349
|
object: "object";
|
|
350
350
|
array: "array";
|
|
351
|
-
uuid: "uuid";
|
|
352
351
|
text: "text";
|
|
352
|
+
select: "select";
|
|
353
353
|
external: "external";
|
|
354
|
+
uuid: "uuid";
|
|
354
355
|
textarea: "textarea";
|
|
355
|
-
select: "select";
|
|
356
356
|
radio: "radio";
|
|
357
357
|
richtext: "richtext";
|
|
358
358
|
}>;
|
|
@@ -472,8 +472,8 @@ export declare const BlockDefinitionSchema: z.ZodObject<{
|
|
|
472
472
|
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
473
473
|
category: z.ZodString;
|
|
474
474
|
contexts: z.ZodArray<z.ZodEnum<{
|
|
475
|
-
cms: "cms";
|
|
476
475
|
email: "email";
|
|
476
|
+
cms: "cms";
|
|
477
477
|
invoice: "invoice";
|
|
478
478
|
newsletter: "newsletter";
|
|
479
479
|
document: "document";
|
|
@@ -483,11 +483,11 @@ export declare const BlockDefinitionSchema: z.ZodObject<{
|
|
|
483
483
|
number: "number";
|
|
484
484
|
object: "object";
|
|
485
485
|
array: "array";
|
|
486
|
-
uuid: "uuid";
|
|
487
486
|
text: "text";
|
|
487
|
+
select: "select";
|
|
488
488
|
external: "external";
|
|
489
|
+
uuid: "uuid";
|
|
489
490
|
textarea: "textarea";
|
|
490
|
-
select: "select";
|
|
491
491
|
radio: "radio";
|
|
492
492
|
richtext: "richtext";
|
|
493
493
|
}>;
|
|
@@ -544,8 +544,8 @@ export declare const BlockCategorySchema: z.ZodObject<{
|
|
|
544
544
|
key: z.ZodString;
|
|
545
545
|
titleKey: z.ZodString;
|
|
546
546
|
contexts: z.ZodArray<z.ZodEnum<{
|
|
547
|
-
cms: "cms";
|
|
548
547
|
email: "email";
|
|
548
|
+
cms: "cms";
|
|
549
549
|
invoice: "invoice";
|
|
550
550
|
newsletter: "newsletter";
|
|
551
551
|
document: "document";
|
|
@@ -826,11 +826,11 @@ export declare const cmsPageBuilderDescriptorSchema: z.ZodObject<{
|
|
|
826
826
|
}>;
|
|
827
827
|
}, z.core.$strip>;
|
|
828
828
|
spacing: z.ZodObject<{
|
|
829
|
-
|
|
829
|
+
none: z.ZodObject<{
|
|
830
830
|
mobilePx: z.ZodNumber;
|
|
831
831
|
desktopPx: z.ZodNumber;
|
|
832
832
|
}, z.core.$strip>;
|
|
833
|
-
|
|
833
|
+
l: z.ZodObject<{
|
|
834
834
|
mobilePx: z.ZodNumber;
|
|
835
835
|
desktopPx: z.ZodNumber;
|
|
836
836
|
}, z.core.$strip>;
|
|
@@ -877,11 +877,11 @@ export declare const cmsPageBuilderDescriptorSchema: z.ZodObject<{
|
|
|
877
877
|
number: "number";
|
|
878
878
|
object: "object";
|
|
879
879
|
array: "array";
|
|
880
|
-
uuid: "uuid";
|
|
881
880
|
text: "text";
|
|
881
|
+
select: "select";
|
|
882
882
|
external: "external";
|
|
883
|
+
uuid: "uuid";
|
|
883
884
|
textarea: "textarea";
|
|
884
|
-
select: "select";
|
|
885
885
|
radio: "radio";
|
|
886
886
|
richtext: "richtext";
|
|
887
887
|
}>;
|
|
@@ -895,8 +895,8 @@ export declare const cmsPageBuilderDescriptorSchema: z.ZodObject<{
|
|
|
895
895
|
}, z.core.$strip>>;
|
|
896
896
|
previewIcon: z.ZodOptional<z.ZodString>;
|
|
897
897
|
contexts: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
898
|
-
cms: "cms";
|
|
899
898
|
email: "email";
|
|
899
|
+
cms: "cms";
|
|
900
900
|
invoice: "invoice";
|
|
901
901
|
newsletter: "newsletter";
|
|
902
902
|
document: "document";
|
|
@@ -920,8 +920,8 @@ export declare const cmsPageBuilderDescriptorSchema: z.ZodObject<{
|
|
|
920
920
|
key: z.ZodString;
|
|
921
921
|
titleKey: z.ZodString;
|
|
922
922
|
contexts: z.ZodArray<z.ZodEnum<{
|
|
923
|
-
cms: "cms";
|
|
924
923
|
email: "email";
|
|
924
|
+
cms: "cms";
|
|
925
925
|
invoice: "invoice";
|
|
926
926
|
newsletter: "newsletter";
|
|
927
927
|
document: "document";
|
|
@@ -1028,6 +1028,26 @@ export declare const cmsResolvedPageSchema: z.ZodObject<{
|
|
|
1028
1028
|
languages: z.ZodArray<z.ZodString>;
|
|
1029
1029
|
}, z.core.$strip>;
|
|
1030
1030
|
export type CmsResolvedPage = z.infer<typeof cmsResolvedPageSchema>;
|
|
1031
|
+
/** `GET /api/v1/cms/blocks/by-code`: the block, with the assets it embeds. */
|
|
1032
|
+
export declare const cmsResolvedBlockByCodeSchema: z.ZodObject<{
|
|
1033
|
+
id: z.ZodString;
|
|
1034
|
+
code: z.ZodString;
|
|
1035
|
+
language: z.ZodString;
|
|
1036
|
+
content: z.ZodObject<{
|
|
1037
|
+
data: z.ZodUnknown;
|
|
1038
|
+
}, z.core.$strip>;
|
|
1039
|
+
assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1040
|
+
url: z.ZodString;
|
|
1041
|
+
mimeType: z.ZodString;
|
|
1042
|
+
filename: z.ZodString;
|
|
1043
|
+
label: z.ZodNullable<z.ZodString>;
|
|
1044
|
+
visibility: z.ZodEnum<{
|
|
1045
|
+
public: "public";
|
|
1046
|
+
private: "private";
|
|
1047
|
+
}>;
|
|
1048
|
+
}, z.core.$strip>>>;
|
|
1049
|
+
}, z.core.$strip>;
|
|
1050
|
+
export type CmsResolvedBlockByCode = z.infer<typeof cmsResolvedBlockByCodeSchema>;
|
|
1031
1051
|
export declare const cmsResolvedHookSchema: z.ZodObject<{
|
|
1032
1052
|
hookCode: z.ZodString;
|
|
1033
1053
|
blocks: z.ZodArray<z.ZodObject<{
|
|
@@ -1038,6 +1058,16 @@ export declare const cmsResolvedHookSchema: z.ZodObject<{
|
|
|
1038
1058
|
data: z.ZodUnknown;
|
|
1039
1059
|
}, z.core.$strip>;
|
|
1040
1060
|
}, z.core.$strip>>;
|
|
1061
|
+
assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1062
|
+
url: z.ZodString;
|
|
1063
|
+
mimeType: z.ZodString;
|
|
1064
|
+
filename: z.ZodString;
|
|
1065
|
+
label: z.ZodNullable<z.ZodString>;
|
|
1066
|
+
visibility: z.ZodEnum<{
|
|
1067
|
+
public: "public";
|
|
1068
|
+
private: "private";
|
|
1069
|
+
}>;
|
|
1070
|
+
}, z.core.$strip>>>;
|
|
1041
1071
|
}, z.core.$strip>;
|
|
1042
1072
|
export type CmsResolvedHook = z.infer<typeof cmsResolvedHookSchema>;
|
|
1043
1073
|
/**
|
|
@@ -1313,6 +1343,31 @@ export interface CmsPageReadPort {
|
|
|
1313
1343
|
* and its parent's path (R19D). Pages the channel does not serve are absent.
|
|
1314
1344
|
*/
|
|
1315
1345
|
findStorefrontLinks(ids: readonly string[], scope: CmsPageStorefrontLinkScope): Promise<CmsPageStorefrontLink[]>;
|
|
1346
|
+
/**
|
|
1347
|
+
* Feature 171 — the lower-case first slug segment of every page the channel serves,
|
|
1348
|
+
* in every language (its own slug and each translation's), so another module can
|
|
1349
|
+
* refuse an address a page already holds.
|
|
1350
|
+
*/
|
|
1351
|
+
firstSegmentsInChannel(salesChannelId: string): Promise<string[]>;
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Feature 171 (`specs/171-blog-i18n-authors/` research R5) — a module that serves
|
|
1355
|
+
* first path segments of its own on the storefront (the blog's prefix) claims them
|
|
1356
|
+
* here, and CMS refuses a page slug that starts with a claimed segment, as it does a
|
|
1357
|
+
* language prefix (feature 167). CMS never names the contributor.
|
|
1358
|
+
*/
|
|
1359
|
+
export interface CmsReservedSegmentContributor {
|
|
1360
|
+
/** The contributing module — a switched-off contributor claims nothing. */
|
|
1361
|
+
readonly contributorModuleId: string;
|
|
1362
|
+
/** The lower-case first segments the module serves in this channel. */
|
|
1363
|
+
segmentsFor(salesChannelId: string): Promise<string[]>;
|
|
1364
|
+
}
|
|
1365
|
+
/**
|
|
1366
|
+
* Container name: `cmsReservedSegmentRegistry`. Owner: `cms`. An ungated contribution
|
|
1367
|
+
* registry: a module pushes a contributor once, from a boot hook.
|
|
1368
|
+
*/
|
|
1369
|
+
export interface CmsReservedSegmentRegistryPort {
|
|
1370
|
+
register(contributor: CmsReservedSegmentContributor): void;
|
|
1316
1371
|
}
|
|
1317
1372
|
/** Where a {@link CmsPageReadPort.findStorefrontLinks} link is served. */
|
|
1318
1373
|
export interface CmsPageStorefrontLinkScope {
|
package/dist/cms.js
CHANGED
|
@@ -581,9 +581,24 @@ export const cmsResolvedPageSchema = z.object({
|
|
|
581
581
|
*/
|
|
582
582
|
languages: z.array(z.string()),
|
|
583
583
|
});
|
|
584
|
+
/**
|
|
585
|
+
* The details of the library assets a hook's or a block's tree embeds, keyed by
|
|
586
|
+
* id — the map a page answers as `assets`, so the storefront renders each image
|
|
587
|
+
* at its versioned `?v=` URL rather than at a bare `/assets/file/<id>`, which is
|
|
588
|
+
* `public, no-cache` and revalidated on every visit.
|
|
589
|
+
*
|
|
590
|
+
* Optional only for an answer cached before the field existed; read it as `{}`.
|
|
591
|
+
*/
|
|
592
|
+
const cmsStandaloneAssetsSchema = z.record(uuidSchema, cmsAssetEmbedResolutionSchema).optional();
|
|
593
|
+
/** `GET /api/v1/cms/blocks/by-code`: the block, with the assets it embeds. */
|
|
594
|
+
export const cmsResolvedBlockByCodeSchema = cmsResolvedBlockSchema.extend({
|
|
595
|
+
assets: cmsStandaloneAssetsSchema,
|
|
596
|
+
});
|
|
584
597
|
export const cmsResolvedHookSchema = z.object({
|
|
585
598
|
hookCode: z.string(),
|
|
586
599
|
blocks: z.array(cmsResolvedBlockSchema),
|
|
600
|
+
/** Every asset any of `blocks` embeds, in one map. */
|
|
601
|
+
assets: cmsStandaloneAssetsSchema,
|
|
587
602
|
});
|
|
588
603
|
/**
|
|
589
604
|
* One published CMS page, as a crawler needs to be told about it
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** When a hook runs relative to the Command's commit. */
|
|
3
|
+
export type CommandHookPhase = 'beforeCommit' | 'afterCommit';
|
|
4
|
+
export declare const COMMAND_HOOK_PHASES: readonly ["beforeCommit", "afterCommit"];
|
|
5
|
+
/**
|
|
6
|
+
* A scalar allowed in outbox data: `specs/conventions/audit-state.md` list 1
|
|
7
|
+
* only — ids, codes, booleans, counts and dates. Never free text, money,
|
|
8
|
+
* personal data or a custom-field value (FR-031).
|
|
9
|
+
*/
|
|
10
|
+
export type OutboxScalar = string | number | boolean | null;
|
|
11
|
+
/** The data an `afterCommit` row carries. Stored in `command_outbox` (P3). */
|
|
12
|
+
export type OutboxData = Readonly<Record<string, OutboxScalar | readonly OutboxScalar[]>>;
|
|
13
|
+
/**
|
|
14
|
+
* The longest string an outbox value may be. Long enough for a UUID, an ISO
|
|
15
|
+
* timestamp, a dictionary code and a dotted field name
|
|
16
|
+
* (`extensions.<moduleId>.changedFields`); short of anything a sentence needs.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OUTBOX_STRING_MAX_LENGTH = 128;
|
|
19
|
+
/** One outbox data key that is not `audit-state.md` list 1, and why. Never carries the value. */
|
|
20
|
+
export interface OutboxDataViolation {
|
|
21
|
+
readonly key: string;
|
|
22
|
+
readonly issue: 'nested' | 'too-long' | 'not-code-shaped' | 'not-finite' | 'not-a-scalar';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The keys of `data` that an outbox row may not store (FR-031): a nested
|
|
26
|
+
* object, a string longer than {@link OUTBOX_STRING_MAX_LENGTH} or with
|
|
27
|
+
* whitespace or an `@` in it, a non-finite number, anything that is not a scalar. An
|
|
28
|
+
* array is allowed when every member is. Sorted by key, and the value is never
|
|
29
|
+
* repeated: the answer is what an error message may print.
|
|
30
|
+
*
|
|
31
|
+
* A **structural** guard — it cannot tell a one-word name from a code, and the
|
|
32
|
+
* owner's `outboxData` remains the place list 1 is decided. What it refuses is
|
|
33
|
+
* the shape free text, an address or a snapshot has, so the common mistake
|
|
34
|
+
* fails the Command (and the owner's `expectHookableCommand`) instead of
|
|
35
|
+
* landing in a platform-global table.
|
|
36
|
+
*/
|
|
37
|
+
export declare function outboxDataViolations(data: Readonly<Record<string, unknown>>): OutboxDataViolation[];
|
|
38
|
+
/**
|
|
39
|
+
* A hookable action, published by the module that owns the Command.
|
|
40
|
+
*
|
|
41
|
+
* `TData` is what a `beforeCommit` hook receives (in memory, never stored);
|
|
42
|
+
* `TOutbox` is what an `afterCommit` handler receives (stored, list 1 only).
|
|
43
|
+
* Both are carried by the phantom `__types` member, which is never set at run
|
|
44
|
+
* time — it exists so a hook registered with this ref is typed by it.
|
|
45
|
+
*/
|
|
46
|
+
export interface HookableActionRef<TData = unknown, TOutbox extends OutboxData = OutboxData> {
|
|
47
|
+
/** The Command's audit action, e.g. `organization.create`. */
|
|
48
|
+
readonly action: string;
|
|
49
|
+
/** The Command's audit object type, e.g. `organization`. */
|
|
50
|
+
readonly objectType: string;
|
|
51
|
+
/** The phases the owner offers. A hook for any other phase fails composition. */
|
|
52
|
+
readonly phases: readonly CommandHookPhase[];
|
|
53
|
+
/** Phantom carrier for the two data types; never set at run time. */
|
|
54
|
+
readonly __types?: {
|
|
55
|
+
readonly data: TData;
|
|
56
|
+
readonly outbox: TOutbox;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** A Command action: dot-separated lower-case segments, at least two. */
|
|
60
|
+
export declare const hookableActionRe: RegExp;
|
|
61
|
+
/**
|
|
62
|
+
* Declare a hookable action. The owner calls this once per action, in
|
|
63
|
+
* `@endora-commerce/contracts`, and exports the result.
|
|
64
|
+
*
|
|
65
|
+
* Refuses a malformed action or object type, and an empty or repeated phase
|
|
66
|
+
* list, at module load — a ref is a public contract and is never built at run
|
|
67
|
+
* time from data.
|
|
68
|
+
*/
|
|
69
|
+
export declare function hookableAction<TData, TOutbox extends OutboxData = OutboxData>(action: string, objectType: string, phases: readonly CommandHookPhase[]): HookableActionRef<TData, TOutbox>;
|
|
70
|
+
/** The manifest entry for one hookable action, derived from its ref. */
|
|
71
|
+
export declare const HookableActionDeclarationSchema: z.ZodObject<{
|
|
72
|
+
action: z.ZodString;
|
|
73
|
+
objectType: z.ZodString;
|
|
74
|
+
phases: z.ZodArray<z.ZodEnum<{
|
|
75
|
+
beforeCommit: "beforeCommit";
|
|
76
|
+
afterCommit: "afterCommit";
|
|
77
|
+
}>>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
export type HookableActionDeclaration = z.infer<typeof HookableActionDeclarationSchema>;
|
|
80
|
+
/** What an owner writes in its manifest's `hookableActions`. */
|
|
81
|
+
export declare function toHookableActionDeclaration(ref: HookableActionRef<unknown, OutboxData>): HookableActionDeclaration;
|
|
82
|
+
/**
|
|
83
|
+
* The codes the platform answers a command-hook misuse with. Owned by the
|
|
84
|
+
* platform vocabulary (`_i18n`, translated pl + en under `errors.<CODE>`).
|
|
85
|
+
*
|
|
86
|
+
* - `COMMAND_EXTENSION_UNCLAIMED` (422) — a Command's `extensions` carries a
|
|
87
|
+
* key no present hook module on that action claims; refused before any
|
|
88
|
+
* write, `details: [{ path: 'extensions.<key>', issue }]` (FR-019).
|
|
89
|
+
* - `COMMAND_HOOK_CYCLE` (500) — a hookable action reappears in its own
|
|
90
|
+
* ancestor chain, or hook-induced nesting passed its bound (FR-022).
|
|
91
|
+
* - `COMMAND_HOOK_DATA_MISSING` (500) — a Command declared hookable did not
|
|
92
|
+
* supply its hook data (FR-023).
|
|
93
|
+
*/
|
|
94
|
+
export declare const COMMAND_HOOK_ERROR_CODES: {
|
|
95
|
+
readonly EXTENSION_UNCLAIMED: "COMMAND_EXTENSION_UNCLAIMED";
|
|
96
|
+
readonly CYCLE: "COMMAND_HOOK_CYCLE";
|
|
97
|
+
readonly DATA_MISSING: "COMMAND_HOOK_DATA_MISSING";
|
|
98
|
+
};
|
|
99
|
+
/** How deep hook-induced Command nesting may go: the ninth Command in one chain is refused. */
|
|
100
|
+
export declare const COMMAND_HOOK_MAX_DEPTH = 8;
|
|
101
|
+
/**
|
|
102
|
+
* One registered hook. A `beforeCommit` hook carries its position in its
|
|
103
|
+
* action's execution order; an `afterCommit` handler carries `null`, because
|
|
104
|
+
* each one is an outbox row of its own and the outbox promises no order across
|
|
105
|
+
* rows (`contracts/outbox-and-admin-api.md`, amendment 3). Handlers are listed
|
|
106
|
+
* by module id, then registration order — for a stable screen, not a sequence.
|
|
107
|
+
*/
|
|
108
|
+
export declare const CommandHookPlanItemSchema: z.ZodObject<{
|
|
109
|
+
action: z.ZodString;
|
|
110
|
+
phase: z.ZodEnum<{
|
|
111
|
+
beforeCommit: "beforeCommit";
|
|
112
|
+
afterCommit: "afterCommit";
|
|
113
|
+
}>;
|
|
114
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
115
|
+
module: z.ZodString;
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
moduleEnabled: z.ZodBoolean;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
export type CommandHookPlanItem = z.infer<typeof CommandHookPlanItemSchema>;
|
|
120
|
+
/** One action some module declares hookable, whether or not anything hooks it. */
|
|
121
|
+
export declare const CommandHookPlanActionSchema: z.ZodObject<{
|
|
122
|
+
action: z.ZodString;
|
|
123
|
+
objectType: z.ZodString;
|
|
124
|
+
owner: z.ZodString;
|
|
125
|
+
phases: z.ZodArray<z.ZodEnum<{
|
|
126
|
+
beforeCommit: "beforeCommit";
|
|
127
|
+
afterCommit: "afterCommit";
|
|
128
|
+
}>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type CommandHookPlanAction = z.infer<typeof CommandHookPlanActionSchema>;
|
|
131
|
+
export declare const CommandHookPlanResponseSchema: z.ZodObject<{
|
|
132
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
133
|
+
action: z.ZodString;
|
|
134
|
+
objectType: z.ZodString;
|
|
135
|
+
owner: z.ZodString;
|
|
136
|
+
phases: z.ZodArray<z.ZodEnum<{
|
|
137
|
+
beforeCommit: "beforeCommit";
|
|
138
|
+
afterCommit: "afterCommit";
|
|
139
|
+
}>>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
items: z.ZodArray<z.ZodObject<{
|
|
142
|
+
action: z.ZodString;
|
|
143
|
+
phase: z.ZodEnum<{
|
|
144
|
+
beforeCommit: "beforeCommit";
|
|
145
|
+
afterCommit: "afterCommit";
|
|
146
|
+
}>;
|
|
147
|
+
position: z.ZodNullable<z.ZodNumber>;
|
|
148
|
+
module: z.ZodString;
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
moduleEnabled: z.ZodBoolean;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export type CommandHookPlanResponse = z.infer<typeof CommandHookPlanResponseSchema>;
|
|
154
|
+
/** Where an outbox row is in its delivery (`data-model.md` §4). */
|
|
155
|
+
export declare const COMMAND_OUTBOX_STATUSES: readonly ["pending", "in_flight", "delivered", "dead"];
|
|
156
|
+
export declare const CommandOutboxStatusSchema: z.ZodEnum<{
|
|
157
|
+
pending: "pending";
|
|
158
|
+
in_flight: "in_flight";
|
|
159
|
+
delivered: "delivered";
|
|
160
|
+
dead: "dead";
|
|
161
|
+
}>;
|
|
162
|
+
export type CommandOutboxStatus = z.infer<typeof CommandOutboxStatusSchema>;
|
|
163
|
+
/**
|
|
164
|
+
* The statuses an operator lists. A delivered row needs nobody's attention and
|
|
165
|
+
* is purged after seven days, so the list does not offer it.
|
|
166
|
+
*/
|
|
167
|
+
export declare const COMMAND_OUTBOX_LISTED_STATUSES: readonly ["dead", "pending", "in_flight"];
|
|
168
|
+
/** The largest page `GET /api/v1/admin/command-outbox` serves. */
|
|
169
|
+
export declare const COMMAND_OUTBOX_PAGE_MAX = 100;
|
|
170
|
+
/**
|
|
171
|
+
* `GET /api/v1/admin/command-outbox` — filtered by status (dead rows by
|
|
172
|
+
* default: they are the ones an operator acts on), keyset-paginated by the
|
|
173
|
+
* row's `sequence`, newest first. `cursor` is the previous page's
|
|
174
|
+
* `nextCursor`, opaque to the client.
|
|
175
|
+
*/
|
|
176
|
+
export declare const CommandOutboxListQuerySchema: z.ZodObject<{
|
|
177
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
178
|
+
pending: "pending";
|
|
179
|
+
in_flight: "in_flight";
|
|
180
|
+
dead: "dead";
|
|
181
|
+
}>>;
|
|
182
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
183
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
export type CommandOutboxListQuery = z.infer<typeof CommandOutboxListQuerySchema>;
|
|
186
|
+
/**
|
|
187
|
+
* One outbox row as an operator sees it: names, ids, codes, counts and dates
|
|
188
|
+
* only. The row's `data` is **never** served, and neither is anything a
|
|
189
|
+
* failure said — only its code and the error's class are stored — so this list
|
|
190
|
+
* shows nothing the audit log would not (FR-040).
|
|
191
|
+
*
|
|
192
|
+
* `lastErrorCode` is the raw stored string; the screen translates it when the
|
|
193
|
+
* hook module or the platform has a sentence for it, and shows it as it is
|
|
194
|
+
* otherwise.
|
|
195
|
+
*/
|
|
196
|
+
export declare const CommandOutboxListItemSchema: z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
action: z.ZodString;
|
|
199
|
+
objectType: z.ZodString;
|
|
200
|
+
objectId: z.ZodString;
|
|
201
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
202
|
+
hookModule: z.ZodString;
|
|
203
|
+
hookId: z.ZodString;
|
|
204
|
+
status: z.ZodEnum<{
|
|
205
|
+
pending: "pending";
|
|
206
|
+
in_flight: "in_flight";
|
|
207
|
+
delivered: "delivered";
|
|
208
|
+
dead: "dead";
|
|
209
|
+
}>;
|
|
210
|
+
attempts: z.ZodNumber;
|
|
211
|
+
lastErrorCode: z.ZodNullable<z.ZodString>;
|
|
212
|
+
lastErrorClass: z.ZodNullable<z.ZodString>;
|
|
213
|
+
createdAt: z.ZodString;
|
|
214
|
+
availableAt: z.ZodString;
|
|
215
|
+
deadAt: z.ZodNullable<z.ZodString>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
export type CommandOutboxListItem = z.infer<typeof CommandOutboxListItemSchema>;
|
|
218
|
+
/** One page; `nextCursor` is `null` on the last. */
|
|
219
|
+
export declare const CommandOutboxListResponseSchema: z.ZodObject<{
|
|
220
|
+
items: z.ZodArray<z.ZodObject<{
|
|
221
|
+
id: z.ZodString;
|
|
222
|
+
action: z.ZodString;
|
|
223
|
+
objectType: z.ZodString;
|
|
224
|
+
objectId: z.ZodString;
|
|
225
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
226
|
+
hookModule: z.ZodString;
|
|
227
|
+
hookId: z.ZodString;
|
|
228
|
+
status: z.ZodEnum<{
|
|
229
|
+
pending: "pending";
|
|
230
|
+
in_flight: "in_flight";
|
|
231
|
+
delivered: "delivered";
|
|
232
|
+
dead: "dead";
|
|
233
|
+
}>;
|
|
234
|
+
attempts: z.ZodNumber;
|
|
235
|
+
lastErrorCode: z.ZodNullable<z.ZodString>;
|
|
236
|
+
lastErrorClass: z.ZodNullable<z.ZodString>;
|
|
237
|
+
createdAt: z.ZodString;
|
|
238
|
+
availableAt: z.ZodString;
|
|
239
|
+
deadAt: z.ZodNullable<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
export type CommandOutboxListResponse = z.infer<typeof CommandOutboxListResponseSchema>;
|
|
244
|
+
/**
|
|
245
|
+
* `POST /api/v1/admin/command-outbox/:id/retry` — the path parameter. Any
|
|
246
|
+
* string, on purpose: a value that is not a uuid names no row, so the route
|
|
247
|
+
* answers it with the same `404` as an unknown id (issue #781, owner ruling of
|
|
248
|
+
* 2026-11-05), where a uuid params schema would answer `400` (issue #1269).
|
|
249
|
+
*/
|
|
250
|
+
export declare const CommandOutboxRetryParamsSchema: z.ZodObject<{
|
|
251
|
+
id: z.ZodString;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
/** `POST /api/v1/admin/command-outbox/:id/retry` — the row, now pending. */
|
|
254
|
+
export declare const CommandOutboxRetryResponseSchema: z.ZodObject<{
|
|
255
|
+
item: z.ZodObject<{
|
|
256
|
+
id: z.ZodString;
|
|
257
|
+
action: z.ZodString;
|
|
258
|
+
objectType: z.ZodString;
|
|
259
|
+
objectId: z.ZodString;
|
|
260
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
261
|
+
hookModule: z.ZodString;
|
|
262
|
+
hookId: z.ZodString;
|
|
263
|
+
status: z.ZodEnum<{
|
|
264
|
+
pending: "pending";
|
|
265
|
+
in_flight: "in_flight";
|
|
266
|
+
delivered: "delivered";
|
|
267
|
+
dead: "dead";
|
|
268
|
+
}>;
|
|
269
|
+
attempts: z.ZodNumber;
|
|
270
|
+
lastErrorCode: z.ZodNullable<z.ZodString>;
|
|
271
|
+
lastErrorClass: z.ZodNullable<z.ZodString>;
|
|
272
|
+
createdAt: z.ZodString;
|
|
273
|
+
availableAt: z.ZodString;
|
|
274
|
+
deadAt: z.ZodNullable<z.ZodString>;
|
|
275
|
+
}, z.core.$strip>;
|
|
276
|
+
}, z.core.$strip>;
|
|
277
|
+
export type CommandOutboxRetryResponse = z.infer<typeof CommandOutboxRetryResponseSchema>;
|
|
278
|
+
/**
|
|
279
|
+
* The failure codes the platform's own drain stores in `last_error_code`
|
|
280
|
+
* (`contracts/outbox-and-admin-api.md`, amendment 4). Lower-kebab, because
|
|
281
|
+
* they are delivery outcomes and not HTTP error codes; translated by the
|
|
282
|
+
* platform vocabulary under {@link commandOutboxFailureKey}.
|
|
283
|
+
*/
|
|
284
|
+
export declare const COMMAND_OUTBOX_FAILURE_CODES: {
|
|
285
|
+
readonly HOOK_UNREGISTERED: "hook-unregistered";
|
|
286
|
+
readonly PERMANENT_FAILURE: "permanent-failure";
|
|
287
|
+
readonly HANDLER_FAILED: "handler-failed";
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* The bundle key a stored failure code may be translated under, besides
|
|
291
|
+
* `errors.<CODE>`: `commandOutbox.failure.<code>`, the code verbatim.
|
|
292
|
+
*
|
|
293
|
+
* Two families because a stored code has two shapes. An `HttpError`'s code is
|
|
294
|
+
* SCREAMING_SNAKE and already has its `errors.<CODE>` sentence wherever it is
|
|
295
|
+
* declared; a `PermanentOutboxFailure` code may be any code-shaped string
|
|
296
|
+
* (`acme-erp-rejected`), which `errors.*` cannot hold — that family is read by
|
|
297
|
+
* the error envelope and refuses any other key grammar
|
|
298
|
+
* (`check-error-translations`, `malformed-key`).
|
|
299
|
+
*/
|
|
300
|
+
export declare function commandOutboxFailureKey(code: string): string;
|
|
301
|
+
//# sourceMappingURL=command-hooks.d.ts.map
|