@endora-commerce/contracts 0.100.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/LICENSE +21 -0
- package/README.md +34 -0
- package/dist/actor.d.ts +79 -0
- package/dist/actor.d.ts.map +1 -0
- package/dist/actor.js +41 -0
- package/dist/actor.js.map +1 -0
- package/dist/addresses.d.ts +134 -0
- package/dist/addresses.d.ts.map +1 -0
- package/dist/addresses.js +16 -0
- package/dist/addresses.js.map +1 -0
- package/dist/admin-actions.d.ts +367 -0
- package/dist/admin-actions.d.ts.map +1 -0
- package/dist/admin-actions.js +287 -0
- package/dist/admin-actions.js.map +1 -0
- package/dist/admin-contributions.d.ts +518 -0
- package/dist/admin-contributions.d.ts.map +1 -0
- package/dist/admin-contributions.js +495 -0
- package/dist/admin-contributions.js.map +1 -0
- package/dist/admin-i18n.d.ts +135 -0
- package/dist/admin-i18n.d.ts.map +1 -0
- package/dist/admin-i18n.js +72 -0
- package/dist/admin-i18n.js.map +1 -0
- package/dist/admin-notifications.d.ts +55 -0
- package/dist/admin-notifications.d.ts.map +1 -0
- package/dist/admin-notifications.js +16 -0
- package/dist/admin-notifications.js.map +1 -0
- package/dist/admin-roles.d.ts +125 -0
- package/dist/admin-roles.d.ts.map +1 -0
- package/dist/admin-roles.js +2 -0
- package/dist/admin-roles.js.map +1 -0
- package/dist/admin-users.d.ts +178 -0
- package/dist/admin-users.d.ts.map +1 -0
- package/dist/admin-users.js +14 -0
- package/dist/admin-users.js.map +1 -0
- package/dist/admin.d.ts +243 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +246 -0
- package/dist/admin.js.map +1 -0
- package/dist/analytics.d.ts +123 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +68 -0
- package/dist/analytics.js.map +1 -0
- package/dist/api-keys.d.ts +97 -0
- package/dist/api-keys.d.ts.map +1 -0
- package/dist/api-keys.js +64 -0
- package/dist/api-keys.js.map +1 -0
- package/dist/assets-library.d.ts +684 -0
- package/dist/assets-library.d.ts.map +1 -0
- package/dist/assets-library.js +181 -0
- package/dist/assets-library.js.map +1 -0
- package/dist/audit-logs.d.ts +141 -0
- package/dist/audit-logs.d.ts.map +1 -0
- package/dist/audit-logs.js +31 -0
- package/dist/audit-logs.js.map +1 -0
- package/dist/auth.d.ts +174 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +27 -0
- package/dist/auth.js.map +1 -0
- package/dist/blog.d.ts +669 -0
- package/dist/blog.d.ts.map +1 -0
- package/dist/blog.js +360 -0
- package/dist/blog.js.map +1 -0
- package/dist/capabilities.d.ts +40 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +38 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/carts.d.ts +1367 -0
- package/dist/carts.d.ts.map +1 -0
- package/dist/carts.js +405 -0
- package/dist/carts.js.map +1 -0
- package/dist/catalog.d.ts +2855 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +1543 -0
- package/dist/catalog.js.map +1 -0
- package/dist/cms.d.ts +872 -0
- package/dist/cms.d.ts.map +1 -0
- package/dist/cms.js +468 -0
- package/dist/cms.js.map +1 -0
- package/dist/common.d.ts +82 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +72 -0
- package/dist/common.js.map +1 -0
- package/dist/comparisons.d.ts +487 -0
- package/dist/comparisons.d.ts.map +1 -0
- package/dist/comparisons.js +221 -0
- package/dist/comparisons.js.map +1 -0
- package/dist/credentials.d.ts +292 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +142 -0
- package/dist/credentials.js.map +1 -0
- package/dist/credit-limits.d.ts +111 -0
- package/dist/credit-limits.d.ts.map +1 -0
- package/dist/credit-limits.js +35 -0
- package/dist/credit-limits.js.map +1 -0
- package/dist/currencies.d.ts +127 -0
- package/dist/currencies.d.ts.map +1 -0
- package/dist/currencies.js +20 -0
- package/dist/currencies.js.map +1 -0
- package/dist/custom-fields.d.ts +345 -0
- package/dist/custom-fields.d.ts.map +1 -0
- package/dist/custom-fields.js +185 -0
- package/dist/custom-fields.js.map +1 -0
- package/dist/customer-accounts.d.ts +690 -0
- package/dist/customer-accounts.d.ts.map +1 -0
- package/dist/customer-accounts.js +41 -0
- package/dist/customer-accounts.js.map +1 -0
- package/dist/customers.d.ts +305 -0
- package/dist/customers.d.ts.map +1 -0
- package/dist/customers.js +158 -0
- package/dist/customers.js.map +1 -0
- package/dist/dictionary.d.ts +580 -0
- package/dist/dictionary.d.ts.map +1 -0
- package/dist/dictionary.js +297 -0
- package/dist/dictionary.js.map +1 -0
- package/dist/email-address.d.ts +62 -0
- package/dist/email-address.d.ts.map +1 -0
- package/dist/email-address.js +64 -0
- package/dist/email-address.js.map +1 -0
- package/dist/email.d.ts +175 -0
- package/dist/email.d.ts.map +1 -0
- package/dist/email.js +45 -0
- package/dist/email.js.map +1 -0
- package/dist/envelopes.d.ts +15 -0
- package/dist/envelopes.d.ts.map +1 -0
- package/dist/envelopes.js +16 -0
- package/dist/envelopes.js.map +1 -0
- package/dist/environment-inputs.d.ts +306 -0
- package/dist/environment-inputs.d.ts.map +1 -0
- package/dist/environment-inputs.js +277 -0
- package/dist/environment-inputs.js.map +1 -0
- package/dist/erp-connector.d.ts +52 -0
- package/dist/erp-connector.d.ts.map +1 -0
- package/dist/erp-connector.js +34 -0
- package/dist/erp-connector.js.map +1 -0
- package/dist/errors.d.ts +455 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +532 -0
- package/dist/errors.js.map +1 -0
- package/dist/google-analytics.d.ts +181 -0
- package/dist/google-analytics.d.ts.map +1 -0
- package/dist/google-analytics.js +176 -0
- package/dist/google-analytics.js.map +1 -0
- package/dist/google-tag-manager.d.ts +111 -0
- package/dist/google-tag-manager.d.ts.map +1 -0
- package/dist/google-tag-manager.js +129 -0
- package/dist/google-tag-manager.js.map +1 -0
- package/dist/i18n.d.ts +69 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +59 -0
- package/dist/i18n.js.map +1 -0
- package/dist/import-export.d.ts +63 -0
- package/dist/import-export.d.ts.map +1 -0
- package/dist/import-export.js +37 -0
- package/dist/import-export.js.map +1 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +126 -0
- package/dist/index.js.map +1 -0
- package/dist/inventory.d.ts +673 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +412 -0
- package/dist/inventory.js.map +1 -0
- package/dist/invoice-ledger.d.ts +366 -0
- package/dist/invoice-ledger.d.ts.map +1 -0
- package/dist/invoice-ledger.js +114 -0
- package/dist/invoice-ledger.js.map +1 -0
- package/dist/invoices.d.ts +845 -0
- package/dist/invoices.d.ts.map +1 -0
- package/dist/invoices.js +314 -0
- package/dist/invoices.js.map +1 -0
- package/dist/kernel.d.ts +49 -0
- package/dist/kernel.d.ts.map +1 -0
- package/dist/kernel.js +19 -0
- package/dist/kernel.js.map +1 -0
- package/dist/languages.d.ts +122 -0
- package/dist/languages.d.ts.map +1 -0
- package/dist/languages.js +24 -0
- package/dist/languages.js.map +1 -0
- package/dist/linkedin-ads.d.ts +167 -0
- package/dist/linkedin-ads.d.ts.map +1 -0
- package/dist/linkedin-ads.js +156 -0
- package/dist/linkedin-ads.js.map +1 -0
- package/dist/megamenu.d.ts +556 -0
- package/dist/megamenu.d.ts.map +1 -0
- package/dist/megamenu.js +186 -0
- package/dist/megamenu.js.map +1 -0
- package/dist/meta-ads.d.ts +126 -0
- package/dist/meta-ads.d.ts.map +1 -0
- package/dist/meta-ads.js +112 -0
- package/dist/meta-ads.js.map +1 -0
- package/dist/mfa.d.ts +274 -0
- package/dist/mfa.d.ts.map +1 -0
- package/dist/mfa.js +187 -0
- package/dist/mfa.js.map +1 -0
- package/dist/modules.d.ts +1706 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +1390 -0
- package/dist/modules.js.map +1 -0
- package/dist/newsletter.d.ts +611 -0
- package/dist/newsletter.d.ts.map +1 -0
- package/dist/newsletter.js +345 -0
- package/dist/newsletter.js.map +1 -0
- package/dist/orders.d.ts +1175 -0
- package/dist/orders.d.ts.map +1 -0
- package/dist/orders.js +630 -0
- package/dist/orders.js.map +1 -0
- package/dist/organizations.d.ts +938 -0
- package/dist/organizations.d.ts.map +1 -0
- package/dist/organizations.js +418 -0
- package/dist/organizations.js.map +1 -0
- package/dist/pagination.d.ts +21 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +22 -0
- package/dist/pagination.js.map +1 -0
- package/dist/payment-methods.d.ts +472 -0
- package/dist/payment-methods.d.ts.map +1 -0
- package/dist/payment-methods.js +175 -0
- package/dist/payment-methods.js.map +1 -0
- package/dist/payment-return-url.d.ts +53 -0
- package/dist/payment-return-url.d.ts.map +1 -0
- package/dist/payment-return-url.js +35 -0
- package/dist/payment-return-url.js.map +1 -0
- package/dist/payments.d.ts +386 -0
- package/dist/payments.d.ts.map +1 -0
- package/dist/payments.js +84 -0
- package/dist/payments.js.map +1 -0
- package/dist/pim-connector.d.ts +60 -0
- package/dist/pim-connector.d.ts.map +1 -0
- package/dist/pim-connector.js +43 -0
- package/dist/pim-connector.js.map +1 -0
- package/dist/pim-field-path.d.ts +6 -0
- package/dist/pim-field-path.d.ts.map +1 -0
- package/dist/pim-field-path.js +101 -0
- package/dist/pim-field-path.js.map +1 -0
- package/dist/platform-language.d.ts +20 -0
- package/dist/platform-language.d.ts.map +1 -0
- package/dist/platform-language.js +22 -0
- package/dist/platform-language.js.map +1 -0
- package/dist/price-lists.d.ts +685 -0
- package/dist/price-lists.d.ts.map +1 -0
- package/dist/price-lists.js +330 -0
- package/dist/price-lists.js.map +1 -0
- package/dist/product-feeds.d.ts +2837 -0
- package/dist/product-feeds.d.ts.map +1 -0
- package/dist/product-feeds.js +1504 -0
- package/dist/product-feeds.js.map +1 -0
- package/dist/product-scope-overrides.d.ts +134 -0
- package/dist/product-scope-overrides.d.ts.map +1 -0
- package/dist/product-scope-overrides.js +82 -0
- package/dist/product-scope-overrides.js.map +1 -0
- package/dist/product-value-resolver.d.ts +88 -0
- package/dist/product-value-resolver.d.ts.map +1 -0
- package/dist/product-value-resolver.js +128 -0
- package/dist/product-value-resolver.js.map +1 -0
- package/dist/promotions.d.ts +678 -0
- package/dist/promotions.d.ts.map +1 -0
- package/dist/promotions.js +479 -0
- package/dist/promotions.js.map +1 -0
- package/dist/prompt-actions.d.ts +582 -0
- package/dist/prompt-actions.d.ts.map +1 -0
- package/dist/prompt-actions.js +221 -0
- package/dist/prompt-actions.js.map +1 -0
- package/dist/pwa.d.ts +293 -0
- package/dist/pwa.d.ts.map +1 -0
- package/dist/pwa.js +204 -0
- package/dist/pwa.js.map +1 -0
- package/dist/quick-order.d.ts +340 -0
- package/dist/quick-order.d.ts.map +1 -0
- package/dist/quick-order.js +177 -0
- package/dist/quick-order.js.map +1 -0
- package/dist/quote-requests.d.ts +538 -0
- package/dist/quote-requests.d.ts.map +1 -0
- package/dist/quote-requests.js +308 -0
- package/dist/quote-requests.js.map +1 -0
- package/dist/returns.d.ts +774 -0
- package/dist/returns.d.ts.map +1 -0
- package/dist/returns.js +389 -0
- package/dist/returns.js.map +1 -0
- package/dist/sales-channels.d.ts +392 -0
- package/dist/sales-channels.d.ts.map +1 -0
- package/dist/sales-channels.js +285 -0
- package/dist/sales-channels.js.map +1 -0
- package/dist/scope-notice.d.ts +60 -0
- package/dist/scope-notice.d.ts.map +1 -0
- package/dist/scope-notice.js +56 -0
- package/dist/scope-notice.js.map +1 -0
- package/dist/search.d.ts +321 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +160 -0
- package/dist/search.js.map +1 -0
- package/dist/seo.d.ts +113 -0
- package/dist/seo.d.ts.map +1 -0
- package/dist/seo.js +63 -0
- package/dist/seo.js.map +1 -0
- package/dist/settings.d.ts +453 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +337 -0
- package/dist/settings.js.map +1 -0
- package/dist/shipments.d.ts +140 -0
- package/dist/shipments.d.ts.map +1 -0
- package/dist/shipments.js +14 -0
- package/dist/shipments.js.map +1 -0
- package/dist/shipping-methods.d.ts +350 -0
- package/dist/shipping-methods.d.ts.map +1 -0
- package/dist/shipping-methods.js +99 -0
- package/dist/shipping-methods.js.map +1 -0
- package/dist/shopping-lists.d.ts +122 -0
- package/dist/shopping-lists.d.ts.map +1 -0
- package/dist/shopping-lists.js +92 -0
- package/dist/shopping-lists.js.map +1 -0
- package/dist/taxes.d.ts +106 -0
- package/dist/taxes.d.ts.map +1 -0
- package/dist/taxes.js +80 -0
- package/dist/taxes.js.map +1 -0
- package/dist/text-normalization.d.ts +199 -0
- package/dist/text-normalization.d.ts.map +1 -0
- package/dist/text-normalization.js +205 -0
- package/dist/text-normalization.js.map +1 -0
- package/dist/transactional-emails.d.ts +459 -0
- package/dist/transactional-emails.d.ts.map +1 -0
- package/dist/transactional-emails.js +212 -0
- package/dist/transactional-emails.js.map +1 -0
- package/dist/webhooks.d.ts +69 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +53 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cms.d.ts","sourceRoot":"","sources":["../src/cms.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,mBAAmB;;;;EAA6C,CAAC;AAC9E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,wBAAwB;;;iBAWnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CA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AAC;CACzD;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;CAC1F"}
|
package/dist/cms.js
ADDED
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
// CMS — feature 014 contract surface.
|
|
2
|
+
// Pages, Blocks, Templates, Hooks, Page Builder content envelope, and
|
|
3
|
+
// the storefront-side resolved-content shapes. Per Principle V, these
|
|
4
|
+
// schemas are the source of truth for every HTTP boundary in the new
|
|
5
|
+
// `cms` module. The Page Builder tree itself is opaque at this layer
|
|
6
|
+
// (Puck's wire format is treated as `unknown`); per-component validation
|
|
7
|
+
// happens server-side in the CMS module.
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
import { isoDateTimeSchema, uuidSchema } from './common.js';
|
|
10
|
+
// ────────────────────────────────────────────────────────────────────
|
|
11
|
+
// Domain primitives
|
|
12
|
+
// ────────────────────────────────────────────────────────────────────
|
|
13
|
+
const cmsCodeRe = /^[a-z0-9][a-z0-9._-]{0,178}[a-z0-9]$/;
|
|
14
|
+
const cmsSlugRe = /^[a-z0-9](?:[a-z0-9/_-]{0,178}[a-z0-9])?$/;
|
|
15
|
+
export const cmsPageStatusSchema = z.enum(['draft', 'published', 'archived']);
|
|
16
|
+
export const cmsContentEnvelopeSchema = z.object({
|
|
17
|
+
// naming:allow-snake-case — the spelling is fixed by rows already in the
|
|
18
|
+
// database, not by our API style: the applied CMS migration bakes
|
|
19
|
+
// `{"schema_version":1,…}` into the `content` column defaults of
|
|
20
|
+
// `cms_pages` / `cms_templates`. Renaming it would need a data migration
|
|
21
|
+
// for no gain, since the key is deprecated and normalized away on read
|
|
22
|
+
// (`packages/cms-components/src/schema/envelope.ts`).
|
|
23
|
+
/** @deprecated Ignored — legacy rows may still carry this key. */
|
|
24
|
+
schema_version: z.number().int().min(1).optional(),
|
|
25
|
+
/** Per-language Puck data trees. The trees are opaque at this boundary. */
|
|
26
|
+
languages: z.record(z.string().min(2), z.unknown()),
|
|
27
|
+
});
|
|
28
|
+
// ────────────────────────────────────────────────────────────────────
|
|
29
|
+
// Pages
|
|
30
|
+
// ────────────────────────────────────────────────────────────────────
|
|
31
|
+
export const cmsPageSummarySchema = z.object({
|
|
32
|
+
id: uuidSchema,
|
|
33
|
+
name: z.string(),
|
|
34
|
+
slug: z.string(),
|
|
35
|
+
status: cmsPageStatusSchema,
|
|
36
|
+
active: z.boolean(),
|
|
37
|
+
description: z.string().nullable(),
|
|
38
|
+
salesChannelIds: z.array(uuidSchema),
|
|
39
|
+
languages: z.array(z.string()),
|
|
40
|
+
version: z.number().int(),
|
|
41
|
+
createdAt: isoDateTimeSchema,
|
|
42
|
+
updatedAt: isoDateTimeSchema,
|
|
43
|
+
});
|
|
44
|
+
export const cmsPageDetailSchema = cmsPageSummarySchema.extend({
|
|
45
|
+
meta: z
|
|
46
|
+
.record(z.string().min(2), z.object({
|
|
47
|
+
title: z.string().optional(),
|
|
48
|
+
description: z.string().optional(),
|
|
49
|
+
keywords: z.string().optional(),
|
|
50
|
+
}))
|
|
51
|
+
.nullable(),
|
|
52
|
+
content: cmsContentEnvelopeSchema,
|
|
53
|
+
});
|
|
54
|
+
export const createCmsPageRequestSchema = z.object({
|
|
55
|
+
name: z.string().min(1).max(200),
|
|
56
|
+
slug: z.string().regex(cmsSlugRe).max(180),
|
|
57
|
+
active: z.boolean().default(true),
|
|
58
|
+
description: z.string().nullable().optional(),
|
|
59
|
+
salesChannelIds: z.array(uuidSchema).min(1),
|
|
60
|
+
languages: z.array(z.string().min(2)).min(1),
|
|
61
|
+
meta: z
|
|
62
|
+
.record(z.string().min(2), z.object({
|
|
63
|
+
title: z.string().max(180).optional(),
|
|
64
|
+
description: z.string().max(400).optional(),
|
|
65
|
+
keywords: z.string().max(400).optional(),
|
|
66
|
+
}))
|
|
67
|
+
.optional(),
|
|
68
|
+
});
|
|
69
|
+
export const patchCmsPageRequestSchema = createCmsPageRequestSchema
|
|
70
|
+
.partial()
|
|
71
|
+
.extend({ version: z.number().int().optional() })
|
|
72
|
+
.refine((x) => Object.keys(x).length > 0, { message: 'At least one field required.' });
|
|
73
|
+
export const putCmsPageContentRequestSchema = z.object({
|
|
74
|
+
data: z.unknown(),
|
|
75
|
+
version: z.number().int(),
|
|
76
|
+
});
|
|
77
|
+
// ────────────────────────────────────────────────────────────────────
|
|
78
|
+
// Blocks
|
|
79
|
+
// ────────────────────────────────────────────────────────────────────
|
|
80
|
+
export const cmsBlockSummarySchema = z.object({
|
|
81
|
+
id: uuidSchema,
|
|
82
|
+
name: z.string(),
|
|
83
|
+
code: z.string(),
|
|
84
|
+
active: z.boolean(),
|
|
85
|
+
description: z.string().nullable(),
|
|
86
|
+
salesChannelIds: z.array(uuidSchema),
|
|
87
|
+
languages: z.array(z.string()),
|
|
88
|
+
version: z.number().int(),
|
|
89
|
+
createdAt: isoDateTimeSchema,
|
|
90
|
+
updatedAt: isoDateTimeSchema,
|
|
91
|
+
});
|
|
92
|
+
export const cmsBlockDetailSchema = cmsBlockSummarySchema.extend({
|
|
93
|
+
content: cmsContentEnvelopeSchema,
|
|
94
|
+
});
|
|
95
|
+
export const createCmsBlockRequestSchema = z.object({
|
|
96
|
+
name: z.string().min(1).max(200),
|
|
97
|
+
code: z.string().regex(cmsCodeRe).max(180),
|
|
98
|
+
active: z.boolean().default(true),
|
|
99
|
+
description: z.string().nullable().optional(),
|
|
100
|
+
salesChannelIds: z.array(uuidSchema).min(1),
|
|
101
|
+
languages: z.array(z.string().min(2)).min(1),
|
|
102
|
+
});
|
|
103
|
+
export const patchCmsBlockRequestSchema = createCmsBlockRequestSchema
|
|
104
|
+
.partial()
|
|
105
|
+
.extend({ version: z.number().int().optional() })
|
|
106
|
+
.refine((x) => Object.keys(x).length > 0, { message: 'At least one field required.' });
|
|
107
|
+
// ────────────────────────────────────────────────────────────────────
|
|
108
|
+
// Templates
|
|
109
|
+
// ────────────────────────────────────────────────────────────────────
|
|
110
|
+
export const cmsTemplateSummarySchema = z.object({
|
|
111
|
+
id: uuidSchema,
|
|
112
|
+
name: z.string(),
|
|
113
|
+
code: z.string(),
|
|
114
|
+
description: z.string().nullable(),
|
|
115
|
+
salesChannelIds: z.array(uuidSchema),
|
|
116
|
+
languages: z.array(z.string()),
|
|
117
|
+
version: z.number().int(),
|
|
118
|
+
createdAt: isoDateTimeSchema,
|
|
119
|
+
updatedAt: isoDateTimeSchema,
|
|
120
|
+
});
|
|
121
|
+
export const cmsTemplateDetailSchema = cmsTemplateSummarySchema.extend({
|
|
122
|
+
content: cmsContentEnvelopeSchema,
|
|
123
|
+
});
|
|
124
|
+
export const createCmsTemplateRequestSchema = z.object({
|
|
125
|
+
name: z.string().min(1).max(200),
|
|
126
|
+
code: z.string().regex(cmsCodeRe).max(180),
|
|
127
|
+
description: z.string().nullable().optional(),
|
|
128
|
+
salesChannelIds: z.array(uuidSchema).min(1),
|
|
129
|
+
languages: z.array(z.string().min(2)).min(1),
|
|
130
|
+
});
|
|
131
|
+
export const patchCmsTemplateRequestSchema = createCmsTemplateRequestSchema
|
|
132
|
+
.partial()
|
|
133
|
+
.extend({ version: z.number().int().optional() })
|
|
134
|
+
.refine((x) => Object.keys(x).length > 0, { message: 'At least one field required.' });
|
|
135
|
+
// ────────────────────────────────────────────────────────────────────
|
|
136
|
+
// Hooks
|
|
137
|
+
// ────────────────────────────────────────────────────────────────────
|
|
138
|
+
export const cmsHookSummarySchema = z.object({
|
|
139
|
+
id: uuidSchema,
|
|
140
|
+
name: z.string(),
|
|
141
|
+
code: z.string(),
|
|
142
|
+
active: z.boolean(),
|
|
143
|
+
description: z.string().nullable(),
|
|
144
|
+
isSystem: z.boolean(),
|
|
145
|
+
salesChannelIds: z.array(uuidSchema),
|
|
146
|
+
attachmentCount: z.number().int().nonnegative(),
|
|
147
|
+
version: z.number().int(),
|
|
148
|
+
createdAt: isoDateTimeSchema,
|
|
149
|
+
updatedAt: isoDateTimeSchema,
|
|
150
|
+
});
|
|
151
|
+
export const cmsHookDetailSchema = cmsHookSummarySchema.extend({
|
|
152
|
+
attachments: z.array(z.object({
|
|
153
|
+
blockId: uuidSchema,
|
|
154
|
+
blockCode: z.string(),
|
|
155
|
+
position: z.number().int(),
|
|
156
|
+
})),
|
|
157
|
+
});
|
|
158
|
+
export const createCmsHookRequestSchema = z.object({
|
|
159
|
+
name: z.string().min(1).max(200),
|
|
160
|
+
code: z.string().regex(cmsCodeRe).max(180),
|
|
161
|
+
active: z.boolean().default(true),
|
|
162
|
+
description: z.string().nullable().optional(),
|
|
163
|
+
salesChannelIds: z.array(uuidSchema).min(1),
|
|
164
|
+
});
|
|
165
|
+
export const patchCmsHookRequestSchema = z
|
|
166
|
+
.object({
|
|
167
|
+
name: z.string().min(1).max(200).optional(),
|
|
168
|
+
active: z.boolean().optional(),
|
|
169
|
+
description: z.string().nullable().optional(),
|
|
170
|
+
salesChannelIds: z.array(uuidSchema).optional(),
|
|
171
|
+
version: z.number().int().optional(),
|
|
172
|
+
})
|
|
173
|
+
.refine((x) => Object.keys(x).length > 0, { message: 'At least one field required.' });
|
|
174
|
+
export const cmsHookAttachmentRequestSchema = z.object({
|
|
175
|
+
blockId: uuidSchema,
|
|
176
|
+
position: z.number().int().nonnegative().default(0),
|
|
177
|
+
});
|
|
178
|
+
// ────────────────────────────────────────────────────────────────────
|
|
179
|
+
// Page Builder config descriptor
|
|
180
|
+
// ────────────────────────────────────────────────────────────────────
|
|
181
|
+
export const pageBuilderContextSchema = z.enum(['cms', 'email', 'invoice', 'newsletter']);
|
|
182
|
+
export const pageBuilderBreakpointsSchema = z.object({
|
|
183
|
+
tabletMin: z.number().int().positive(),
|
|
184
|
+
desktopMin: z.number().int().positive(),
|
|
185
|
+
});
|
|
186
|
+
export const cmsFieldDescriptorSchema = z.object({
|
|
187
|
+
type: z.enum([
|
|
188
|
+
'text',
|
|
189
|
+
'textarea',
|
|
190
|
+
'number',
|
|
191
|
+
'select',
|
|
192
|
+
'radio',
|
|
193
|
+
'array',
|
|
194
|
+
'object',
|
|
195
|
+
'external',
|
|
196
|
+
'uuid',
|
|
197
|
+
'richtext',
|
|
198
|
+
]),
|
|
199
|
+
label: z.string().optional(),
|
|
200
|
+
required: z.boolean().optional(),
|
|
201
|
+
options: z
|
|
202
|
+
.array(z.object({
|
|
203
|
+
label: z.string(),
|
|
204
|
+
value: z.union([z.string(), z.number()]),
|
|
205
|
+
}))
|
|
206
|
+
.optional(),
|
|
207
|
+
refKind: z.string().optional(),
|
|
208
|
+
});
|
|
209
|
+
export const cmsColorPaletteEntrySchema = z.object({
|
|
210
|
+
id: uuidSchema,
|
|
211
|
+
name: z.string().min(1).max(64),
|
|
212
|
+
hex: z.string().regex(/^#[0-9a-fA-F]{6}$/),
|
|
213
|
+
});
|
|
214
|
+
export const cmsColorPaletteSchema = z.array(cmsColorPaletteEntrySchema);
|
|
215
|
+
export const putCmsColorPaletteRequestSchema = z.object({
|
|
216
|
+
entries: cmsColorPaletteSchema,
|
|
217
|
+
expectedVersion: z.string().optional(),
|
|
218
|
+
});
|
|
219
|
+
// ────────────────────────────────────────────────────────────────────
|
|
220
|
+
// Page Builder block ownership — feature 096
|
|
221
|
+
// ────────────────────────────────────────────────────────────────────
|
|
222
|
+
/**
|
|
223
|
+
* The grammar of a **persisted** Page Builder block name:
|
|
224
|
+
* `<ownerModuleId>.<LocalName>`, one separator exactly
|
|
225
|
+
* (`specs/096-page-builder-block-ownership/data-model.md` §3).
|
|
226
|
+
*
|
|
227
|
+
* The owner segment is the declaring module's `id` and is matched by the same
|
|
228
|
+
* shape as `moduleIdRe`, minus the underscore prefix `moduleIdRe` reserves for
|
|
229
|
+
* platform-internal modules — none of which owns a block. The local segment is
|
|
230
|
+
* PascalCase, which all 74 pre-existing names already are.
|
|
231
|
+
*
|
|
232
|
+
* **This is the one place the grammar is written.**
|
|
233
|
+
* `@endora-commerce/page-builder-core`'s `block-name.ts` imports it for
|
|
234
|
+
* `parseBlockName` / `ownerOf` / `isNamespaced` / `formatBlockName`, and every
|
|
235
|
+
* other reader goes through those — the discipline `text-normalization.ts`
|
|
236
|
+
* keeps for diacritic folding and slugs, for the same reason: a second copy of
|
|
237
|
+
* a grammar is a second answer waiting to disagree, and this one is written
|
|
238
|
+
* into `jsonb` and never rewritten.
|
|
239
|
+
*/
|
|
240
|
+
export const blockNameRe = /^[a-z][a-z0-9_]*\.[A-Z][A-Za-z0-9]*$/;
|
|
241
|
+
/**
|
|
242
|
+
* The grammar of a declared palette category's key (`data-model.md` §2).
|
|
243
|
+
* snake_case, like a module id and unlike a block's local name — a category is
|
|
244
|
+
* a section of a palette, not a persisted identifier.
|
|
245
|
+
*/
|
|
246
|
+
export const blockCategoryKeyRe = /^[a-z][a-z0-9_]*$/;
|
|
247
|
+
/**
|
|
248
|
+
* A module's declaration of one Page Builder block
|
|
249
|
+
* (`specs/096-page-builder-block-ownership/contracts/block-definition.md` §1).
|
|
250
|
+
*
|
|
251
|
+
* Declared on the module manifest as `blocks`, beside `permissions`, `actions`
|
|
252
|
+
* and `errorCodes`, and read by nothing at runtime until the registry is
|
|
253
|
+
* populated from it.
|
|
254
|
+
*
|
|
255
|
+
* **There is no `ownerModule` field, and its absence is the design.** The owner
|
|
256
|
+
* is the segment before the `.` in `name`, so ownership is stated once rather
|
|
257
|
+
* than twice; the registry keeps computing it for the descriptor it serves.
|
|
258
|
+
* `defineModuleManifest` refuses a `name` whose owner segment is not the
|
|
259
|
+
* declaring module's own `id`.
|
|
260
|
+
*
|
|
261
|
+
* `labelKey` and `descriptionKey` are **relative to the declaring module's own
|
|
262
|
+
* i18n namespace** — `blocks.productGrid.label`, never `catalog.blocks.…` —
|
|
263
|
+
* which is the rule manifest `actions` already follow, and which this layer
|
|
264
|
+
* cannot enforce for the reason it cannot enforce it there either: relativity
|
|
265
|
+
* is a fact about a bundle, and this schema sees a string.
|
|
266
|
+
*/
|
|
267
|
+
export const BlockDefinitionSchema = z.object({
|
|
268
|
+
/** The persisted identifier. Permanent: written into `jsonb` and never rewritten. */
|
|
269
|
+
name: z.string().regex(blockNameRe),
|
|
270
|
+
/** Module-relative i18n key for the palette entry's label. */
|
|
271
|
+
labelKey: z.string().min(1).max(255),
|
|
272
|
+
/** Module-relative i18n key for the palette entry's description. */
|
|
273
|
+
descriptionKey: z.string().min(1).max(255).optional(),
|
|
274
|
+
/** The key of a declared {@link BlockCategorySchema} — not free text. */
|
|
275
|
+
category: z.string().regex(blockCategoryKeyRe),
|
|
276
|
+
/** The surfaces this block is offered on. A block offered nowhere has no reader. */
|
|
277
|
+
contexts: z.array(pageBuilderContextSchema).min(1),
|
|
278
|
+
/** The block's editable fields, in the shape the descriptor already serves. */
|
|
279
|
+
fields: z.record(z.string(), cmsFieldDescriptorSchema),
|
|
280
|
+
/** Props a freshly inserted node carries. Opaque at this boundary. */
|
|
281
|
+
defaultProps: z.record(z.string(), z.unknown()).optional(),
|
|
282
|
+
/** Which of `fields` accept a per-breakpoint override. */
|
|
283
|
+
responsiveFields: z.array(z.string().min(1)).optional(),
|
|
284
|
+
/** Palette thumbnail hint, passed through verbatim as it is today. */
|
|
285
|
+
previewIcon: z.string().min(1).optional(),
|
|
286
|
+
/** Sort order within the category. Absent sorts after everything that declares one. */
|
|
287
|
+
weight: z.number().int().min(0).max(9999).optional(),
|
|
288
|
+
});
|
|
289
|
+
/**
|
|
290
|
+
* A declared palette section (`data-model.md` §2).
|
|
291
|
+
*
|
|
292
|
+
* Categories are declared rather than hard-coded so that a module contributing
|
|
293
|
+
* a block into a category never has to edit a shared `categories` map in a
|
|
294
|
+
* package it does not own — the shape feature 091 removed from the admin. Two
|
|
295
|
+
* modules declaring the same `(key, context)` is therefore expected and is not
|
|
296
|
+
* a collision; the palette merges them.
|
|
297
|
+
*
|
|
298
|
+
* **`contracts/block-definition.md` §1.1 is normative for that merge** — what
|
|
299
|
+
* unions, what resolves, the total order that decides which declaration's
|
|
300
|
+
* `titleKey`, `weight` and `visible` are served as one record, and the two CI
|
|
301
|
+
* signals that hold this repository's modules to agreeing. It is cited rather
|
|
302
|
+
* than summarised here: a second statement of a merge rule is a second answer
|
|
303
|
+
* waiting to disagree. `defineModuleManifest` refuses one *manifest* declaring
|
|
304
|
+
* one `(key, context)` twice (§1 rule 4), which is the only case with a single
|
|
305
|
+
* author and therefore the only one decidable where it is written.
|
|
306
|
+
*
|
|
307
|
+
* A category exists **per context**: `layout` in the CMS palette and `layout`
|
|
308
|
+
* in the e-mail palette are two declarations.
|
|
309
|
+
*
|
|
310
|
+
* `visible` is absent-means-visible rather than a Zod `.default(true)`,
|
|
311
|
+
* deliberately: `ModuleManifest` is the schema's *output* type, so a default
|
|
312
|
+
* would oblige every author to write `visible: true` on every category — which
|
|
313
|
+
* is what `actions`' `keywords` and `weight` already do, and is not a precedent
|
|
314
|
+
* worth extending. It replaces the CMS palette's `_internal` hidden drawer.
|
|
315
|
+
*/
|
|
316
|
+
export const BlockCategorySchema = z.object({
|
|
317
|
+
key: z.string().regex(blockCategoryKeyRe),
|
|
318
|
+
/** Module-relative i18n key for the section title. */
|
|
319
|
+
titleKey: z.string().min(1).max(255),
|
|
320
|
+
/** The palettes this section appears in. */
|
|
321
|
+
contexts: z.array(pageBuilderContextSchema).min(1),
|
|
322
|
+
/** Palette order. */
|
|
323
|
+
weight: z.number().int().min(0).max(9999).optional(),
|
|
324
|
+
/** Absent means visible. `false` hides the section from the palette. */
|
|
325
|
+
visible: z.boolean().optional(),
|
|
326
|
+
});
|
|
327
|
+
/**
|
|
328
|
+
* `GET /api/v1/admin/cms/page-builder/config`.
|
|
329
|
+
*
|
|
330
|
+
* Feature 096 extends this **additively**: every per-component field it gains
|
|
331
|
+
* is optional and the category list is optional, so a consumer reading only the
|
|
332
|
+
* five fields that were here before keeps working, and Phase 1 changes nothing
|
|
333
|
+
* a client can observe. `name` deliberately does **not** take `blockNameRe` —
|
|
334
|
+
* the registry serves the pre-migration bare names until the renderer maps are
|
|
335
|
+
* re-keyed, and a grammar here would make the vocabulary phase a breaking
|
|
336
|
+
* change.
|
|
337
|
+
*/
|
|
338
|
+
export const cmsPageBuilderDescriptorSchema = z.object({
|
|
339
|
+
schemaVersion: z.number().int(),
|
|
340
|
+
breakpoints: pageBuilderBreakpointsSchema.optional(),
|
|
341
|
+
colorPalette: cmsColorPaletteSchema.optional(),
|
|
342
|
+
components: z.array(z.object({
|
|
343
|
+
name: z.string(),
|
|
344
|
+
ownerModule: z.string(),
|
|
345
|
+
fields: z.record(z.string(), cmsFieldDescriptorSchema),
|
|
346
|
+
previewIcon: z.string().optional(),
|
|
347
|
+
contexts: z.array(pageBuilderContextSchema).min(1).optional(),
|
|
348
|
+
// Feature 096 — the six a declaration carries that a registration did
|
|
349
|
+
// not. Optional at this layer and required of a declaration by
|
|
350
|
+
// `BlockDefinitionSchema`; what makes them present in a response is a
|
|
351
|
+
// module having declared the block.
|
|
352
|
+
labelKey: z.string().min(1).max(255).optional(),
|
|
353
|
+
descriptionKey: z.string().min(1).max(255).optional(),
|
|
354
|
+
category: z.string().regex(blockCategoryKeyRe).optional(),
|
|
355
|
+
defaultProps: z.record(z.string(), z.unknown()).optional(),
|
|
356
|
+
responsiveFields: z.array(z.string().min(1)).optional(),
|
|
357
|
+
weight: z.number().int().min(0).max(9999).optional(),
|
|
358
|
+
})),
|
|
359
|
+
/**
|
|
360
|
+
* The declared palette sections, **merged across every present module** —
|
|
361
|
+
* one entry per `(key, context)` the present modules declare, not one per
|
|
362
|
+
* declaration (`contracts/block-definition.md` §1.1 and §4.1).
|
|
363
|
+
*
|
|
364
|
+
* `ownerModule` is the one field a served section carries that a declaration
|
|
365
|
+
* does not: the module whose declaration won the fold, derived and never
|
|
366
|
+
* declared, exactly as a block's `ownerModule` is derived from its `name`. It
|
|
367
|
+
* is what lets an operator — and a support engineer reading a bug report —
|
|
368
|
+
* see why a section is called what it is called without composing the
|
|
369
|
+
* platform in their head. Optional on the wire, so a consumer reading only
|
|
370
|
+
* the declared fields keeps working.
|
|
371
|
+
*/
|
|
372
|
+
categories: z
|
|
373
|
+
.array(BlockCategorySchema.extend({ ownerModule: z.string().optional() }))
|
|
374
|
+
.optional(),
|
|
375
|
+
});
|
|
376
|
+
// ────────────────────────────────────────────────────────────────────
|
|
377
|
+
// Storefront resolved shapes
|
|
378
|
+
// ────────────────────────────────────────────────────────────────────
|
|
379
|
+
export const cmsAssetEmbedResolutionSchema = z.object({
|
|
380
|
+
url: z.string(),
|
|
381
|
+
mimeType: z.string(),
|
|
382
|
+
filename: z.string(),
|
|
383
|
+
label: z.string().nullable(),
|
|
384
|
+
visibility: z.enum(['public', 'private']),
|
|
385
|
+
});
|
|
386
|
+
export const cmsResolvedBlockSchema = z.object({
|
|
387
|
+
id: uuidSchema,
|
|
388
|
+
code: z.string(),
|
|
389
|
+
language: z.string(),
|
|
390
|
+
content: z.object({ data: z.unknown() }),
|
|
391
|
+
});
|
|
392
|
+
export const cmsResolvedTemplateSchema = cmsResolvedBlockSchema;
|
|
393
|
+
export const cmsResolvedPageSchema = z.object({
|
|
394
|
+
id: uuidSchema,
|
|
395
|
+
slug: z.string(),
|
|
396
|
+
name: z.string(),
|
|
397
|
+
language: z.string(),
|
|
398
|
+
meta: z.object({
|
|
399
|
+
title: z.string().nullable(),
|
|
400
|
+
description: z.string().nullable(),
|
|
401
|
+
keywords: z.string().nullable(),
|
|
402
|
+
}),
|
|
403
|
+
content: z.object({ data: z.unknown() }),
|
|
404
|
+
embeds: z.object({
|
|
405
|
+
blocks: z.record(z.string(), cmsResolvedBlockSchema),
|
|
406
|
+
templates: z.record(z.string(), cmsResolvedTemplateSchema),
|
|
407
|
+
}),
|
|
408
|
+
assets: z.record(uuidSchema, cmsAssetEmbedResolutionSchema),
|
|
409
|
+
});
|
|
410
|
+
export const cmsResolvedHookSchema = z.object({
|
|
411
|
+
hookCode: z.string(),
|
|
412
|
+
blocks: z.array(cmsResolvedBlockSchema),
|
|
413
|
+
});
|
|
414
|
+
/**
|
|
415
|
+
* One published CMS page, as a crawler needs to be told about it
|
|
416
|
+
* (`specs/105-cms-root-page-urls/` FR-021; `contracts/cms-page-url.md` §4.1).
|
|
417
|
+
*
|
|
418
|
+
* `slug` is the **per-channel** slug — `cms_page_sales_channels.slug`, which is
|
|
419
|
+
* what §1 says the page's address is built from, and not `cms_pages.slug`,
|
|
420
|
+
* which carries one value for every channel the page is published to. The two
|
|
421
|
+
* agree for a single-channel page and are free to disagree for any other, which
|
|
422
|
+
* is why the join and not the column is the source.
|
|
423
|
+
*
|
|
424
|
+
* `updatedAt` is the page row's, and it is here because a sitemap entry with no
|
|
425
|
+
* `lastModified` tells a crawler nothing it did not already know. Nothing else
|
|
426
|
+
* of the page travels: this shape exists to enumerate addresses, and a rendered
|
|
427
|
+
* page-builder tree per row would put the whole CMS through memory on every
|
|
428
|
+
* sitemap build — the reasoning `CmsPageRecord` already states for dropping
|
|
429
|
+
* `body` and `content`.
|
|
430
|
+
*/
|
|
431
|
+
export const cmsPageIndexEntrySchema = z.object({
|
|
432
|
+
slug: z.string(),
|
|
433
|
+
updatedAt: isoDateTimeSchema,
|
|
434
|
+
});
|
|
435
|
+
/** The published pages of the requested sales channel (FR-021). */
|
|
436
|
+
export const cmsPageIndexResponseSchema = z.object({
|
|
437
|
+
pages: z.array(cmsPageIndexEntrySchema),
|
|
438
|
+
});
|
|
439
|
+
/**
|
|
440
|
+
* The deployment's reserved first path segments, as the page editor reads them
|
|
441
|
+
* (`specs/105-cms-root-page-urls/` FR-033; `contracts/cms-page-url.md` §5.3).
|
|
442
|
+
*
|
|
443
|
+
* Normalised: lowercase, one path segment each, no duplicates — whatever an
|
|
444
|
+
* operator typed into the Setting. The editor compares a slug's first segment
|
|
445
|
+
* against this list, and the backend refuses a save against the same value, so
|
|
446
|
+
* the warning and the refusal cannot disagree.
|
|
447
|
+
*/
|
|
448
|
+
export const cmsReservedSegmentsResponseSchema = z.object({
|
|
449
|
+
segments: z.array(z.string()),
|
|
450
|
+
});
|
|
451
|
+
/**
|
|
452
|
+
* The first path segment of a CMS page slug — the only segment that can collide
|
|
453
|
+
* with a storefront route (`contracts/cms-page-url.md` §5.1).
|
|
454
|
+
*
|
|
455
|
+
* `cmsSlugRe` permits `/`, so `pomoc/dostawa` is one page at `/pomoc/dostawa`
|
|
456
|
+
* rather than a page under a section, and its first segment is `pomoc`. The
|
|
457
|
+
* storefront's route table decides the *first* segment of a URL and a catch-all
|
|
458
|
+
* takes everything after it, so that is what the refusal compares.
|
|
459
|
+
*
|
|
460
|
+
* **It lives here because two programs ask the question and must agree**: the
|
|
461
|
+
* backend, refusing a save, and the page editor, warning while the operator
|
|
462
|
+
* types. A second copy in the admin layer is a second answer waiting to
|
|
463
|
+
* disagree — the discipline `blockNameRe` and `slugify` already keep.
|
|
464
|
+
*/
|
|
465
|
+
export function firstSlugSegment(slug) {
|
|
466
|
+
return slug.split('/').filter((segment) => segment.length > 0)[0]?.toLowerCase() ?? '';
|
|
467
|
+
}
|
|
468
|
+
//# sourceMappingURL=cms.js.map
|
package/dist/cms.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cms.js","sourceRoot":"","sources":["../src/cms.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,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BAAyB,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,6BAA6B,CAAC;CAC5D,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;CACxC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,iBAAiB;CAC7B,CAAC,CAAC;AAGH,mEAAmE;AACnE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC;CACxC,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B,CAAC,CAAC;AAGH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AACzF,CAAC"}
|
package/dist/common.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Shared primitive schemas reused across every module contract.
|
|
4
|
+
* Lives in @endora-commerce/contracts so backend + both frontends share one source of truth.
|
|
5
|
+
*/
|
|
6
|
+
export declare const isoDateTimeSchema: z.ZodString;
|
|
7
|
+
export type IsoDateTime = z.infer<typeof isoDateTimeSchema>;
|
|
8
|
+
export declare const uuidSchema: z.ZodString;
|
|
9
|
+
export type Uuid = z.infer<typeof uuidSchema>;
|
|
10
|
+
/**
|
|
11
|
+
* Monetary amount — decimal string or number in the minor-unit-plus-currency form.
|
|
12
|
+
* We keep amount as a `number` on the wire; backend persists as numeric(14,2).
|
|
13
|
+
* Currency is an ISO 4217 code.
|
|
14
|
+
*/
|
|
15
|
+
export declare const moneySchema: z.ZodObject<{
|
|
16
|
+
amount: z.ZodNumber;
|
|
17
|
+
currency: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type Money = z.infer<typeof moneySchema>;
|
|
20
|
+
/**
|
|
21
|
+
* Multilingual string — keys are BCP-47 language tags. Missing tags fall back to the
|
|
22
|
+
* Sales Channel's default language (FR-105).
|
|
23
|
+
*/
|
|
24
|
+
export declare const multilingualStringSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
25
|
+
export type MultilingualString = z.infer<typeof multilingualStringSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Snapshot address embedded in Orders, Invoices, Deliveries — captured at order time so
|
|
28
|
+
* later edits to the source Address row do not rewrite history.
|
|
29
|
+
*/
|
|
30
|
+
export declare const addressSnapshotSchema: z.ZodObject<{
|
|
31
|
+
recipientName: z.ZodString;
|
|
32
|
+
street: z.ZodString;
|
|
33
|
+
city: z.ZodString;
|
|
34
|
+
postalCode: z.ZodString;
|
|
35
|
+
country: z.ZodString;
|
|
36
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
37
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
38
|
+
taxId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type AddressSnapshot = z.infer<typeof addressSnapshotSchema>;
|
|
41
|
+
/**
|
|
42
|
+
* Default order lifecycle statuses (feature 038). The lifecycle is now
|
|
43
|
+
* admin-configurable; this enum is the seeded default set and the fallback the
|
|
44
|
+
* `EnumOrderStatusRegistry` validates payment/shipping `statusOn*` references
|
|
45
|
+
* against. Runtime-added statuses are validated against the configurable graph,
|
|
46
|
+
* not this enum.
|
|
47
|
+
*/
|
|
48
|
+
export declare const orderStatusSchema: z.ZodEnum<{
|
|
49
|
+
new: "new";
|
|
50
|
+
pending: "pending";
|
|
51
|
+
paid: "paid";
|
|
52
|
+
processing: "processing";
|
|
53
|
+
shipment_ready: "shipment_ready";
|
|
54
|
+
shipment_sent: "shipment_sent";
|
|
55
|
+
completed: "completed";
|
|
56
|
+
on_hold: "on_hold";
|
|
57
|
+
cancelled: "cancelled";
|
|
58
|
+
}>;
|
|
59
|
+
export type OrderStatus = z.infer<typeof orderStatusSchema>;
|
|
60
|
+
/** Payment lifecycle statuses (FR-014). `failed` added by feature 034 (payment-method adapter framework). */
|
|
61
|
+
export declare const paymentStatusSchema: z.ZodEnum<{
|
|
62
|
+
paid: "paid";
|
|
63
|
+
awaiting_payment: "awaiting_payment";
|
|
64
|
+
failed: "failed";
|
|
65
|
+
deferred: "deferred";
|
|
66
|
+
refunded: "refunded";
|
|
67
|
+
}>;
|
|
68
|
+
export type PaymentStatus = z.infer<typeof paymentStatusSchema>;
|
|
69
|
+
/** Roles within a Customer Organization (FR-042). */
|
|
70
|
+
export declare const organizationRoleSchema: z.ZodEnum<{
|
|
71
|
+
organization_admin: "organization_admin";
|
|
72
|
+
regular_user: "regular_user";
|
|
73
|
+
}>;
|
|
74
|
+
export type OrganizationRole = z.infer<typeof organizationRoleSchema>;
|
|
75
|
+
/** Supported Sales Channel visibility modes (R-18 + FR-106). */
|
|
76
|
+
export declare const productVisibilitySchema: z.ZodEnum<{
|
|
77
|
+
public: "public";
|
|
78
|
+
logged_in_only: "logged_in_only";
|
|
79
|
+
organization_restricted: "organization_restricted";
|
|
80
|
+
}>;
|
|
81
|
+
export type ProductVisibility = z.infer<typeof productVisibilitySchema>;
|
|
82
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AAEH,eAAO,MAAM,iBAAiB,aAG6C,CAAC;AAE5E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,UAAU,aAAoB,CAAC;AAC5C,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,uCAA0C,CAAC;AAChF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;iBAkBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;EAU5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,6GAA6G;AAC7G,eAAO,MAAM,mBAAmB;;;;;;EAAyE,CAAC;AAC1G,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,qDAAqD;AACrD,eAAO,MAAM,sBAAsB;;;EAAiD,CAAC;AACrF,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