@endora-commerce/contracts 0.108.0 → 0.110.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/actor.d.ts +16 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +8 -1
- package/dist/addresses.js.map +1 -1
- package/dist/admin-actions.d.ts +12 -3
- package/dist/admin-actions.d.ts.map +1 -1
- package/dist/admin-actions.js +34 -3
- package/dist/admin-actions.js.map +1 -1
- package/dist/admin-contributions.d.ts +94 -10
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +65 -0
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-notifications.d.ts +17 -1
- package/dist/admin-notifications.d.ts.map +1 -1
- package/dist/admin-preferences.d.ts +108 -0
- package/dist/admin-preferences.d.ts.map +1 -0
- package/dist/admin-preferences.js +133 -0
- package/dist/admin-preferences.js.map +1 -0
- package/dist/admin-roles.d.ts +8 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin-users.d.ts.map +1 -1
- package/dist/admin.d.ts +92 -5
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +86 -3
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +123 -3
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +11 -3
- package/dist/assets-library.js.map +1 -1
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.d.ts.map +1 -1
- package/dist/audit-logs.js +12 -0
- package/dist/audit-logs.js.map +1 -1
- package/dist/blog.d.ts +431 -14
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +251 -7
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +507 -92
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +197 -21
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +515 -144
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +356 -68
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +2233 -0
- package/dist/cms-brand.d.ts.map +1 -0
- package/dist/cms-brand.js +311 -0
- package/dist/cms-brand.js.map +1 -0
- package/dist/cms-contact-form.d.ts +55 -0
- package/dist/cms-contact-form.d.ts.map +1 -0
- package/dist/cms-contact-form.js +100 -0
- package/dist/cms-contact-form.js.map +1 -0
- package/dist/cms.d.ts +576 -17
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +251 -0
- package/dist/cms.js.map +1 -1
- package/dist/common.d.ts +23 -6
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +25 -2
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +28 -21
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -1
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts +1 -0
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +14 -0
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm-rich-text.d.ts +10 -61
- package/dist/crm-rich-text.d.ts.map +1 -1
- package/dist/crm-rich-text.js +10 -300
- package/dist/crm-rich-text.js.map +1 -1
- package/dist/crm.d.ts +173 -115
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +35 -88
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +54 -22
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +21 -1
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +216 -22
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +70 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/customers.d.ts +40 -73
- package/dist/customers.d.ts.map +1 -1
- package/dist/customers.js +45 -10
- package/dist/customers.js.map +1 -1
- package/dist/document-templates.d.ts +35 -23
- package/dist/document-templates.d.ts.map +1 -1
- package/dist/document-values.d.ts +8 -0
- package/dist/document-values.d.ts.map +1 -1
- package/dist/document-values.js +24 -6
- package/dist/document-values.js.map +1 -1
- package/dist/email.d.ts +5 -0
- package/dist/email.d.ts.map +1 -1
- package/dist/errors.d.ts +224 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +269 -1
- package/dist/errors.js.map +1 -1
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.fixtures.js.map +1 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms-logic.js.map +1 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +827 -0
- package/dist/forms.js.map +1 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +60 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -1
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +6 -6
- package/dist/invoice-ledger.d.ts +7 -7
- package/dist/invoices.d.ts +6 -2
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +7 -0
- package/dist/invoices.js.map +1 -1
- package/dist/megamenu.d.ts +674 -0
- package/dist/megamenu.d.ts.map +1 -1
- package/dist/megamenu.js +96 -3
- package/dist/megamenu.js.map +1 -1
- package/dist/mfa.d.ts +125 -4
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +54 -2
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +44 -5
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +73 -0
- package/dist/modules.js.map +1 -1
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.d.ts.map +1 -1
- package/dist/money-decimal.js +95 -0
- package/dist/money-decimal.js.map +1 -1
- package/dist/newsletter.d.ts +7 -7
- package/dist/orders.d.ts +128 -10
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +74 -4
- package/dist/orders.js.map +1 -1
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.d.ts.map +1 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-registry-lookup.js.map +1 -0
- package/dist/organization-roles.d.ts +340 -0
- package/dist/organization-roles.d.ts.map +1 -0
- package/dist/organization-roles.js +211 -0
- package/dist/organization-roles.js.map +1 -0
- package/dist/organizations.d.ts +123 -89
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +68 -24
- package/dist/organizations.js.map +1 -1
- package/dist/page-builder-props.d.ts +1401 -0
- package/dist/page-builder-props.d.ts.map +1 -0
- package/dist/page-builder-props.js +266 -0
- package/dist/page-builder-props.js.map +1 -0
- package/dist/page-builder-values.d.ts +95 -0
- package/dist/page-builder-values.d.ts.map +1 -0
- package/dist/page-builder-values.js +164 -0
- package/dist/page-builder-values.js.map +1 -0
- package/dist/pim-connector.d.ts +6 -2
- package/dist/pim-connector.d.ts.map +1 -1
- package/dist/pim-connector.js +6 -2
- package/dist/pim-connector.js.map +1 -1
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.d.ts.map +1 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-field-path.js.map +1 -1
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.d.ts.map +1 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/pim-locale-mapping.js.map +1 -0
- package/dist/platform-language.d.ts +9 -0
- package/dist/platform-language.d.ts.map +1 -1
- package/dist/platform-language.js +14 -0
- package/dist/platform-language.js.map +1 -1
- package/dist/price-books.d.ts +47 -43
- package/dist/price-books.d.ts.map +1 -1
- package/dist/price-books.js +6 -2
- package/dist/price-books.js.map +1 -1
- package/dist/price-lists.d.ts +48 -14
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +24 -1
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +144 -84
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +23 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.d.ts.map +1 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-model.js.map +1 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.d.ts.map +1 -1
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scope-overrides.js.map +1 -1
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.d.ts.map +1 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scoped-values.js.map +1 -0
- package/dist/product-scopes.d.ts +746 -0
- package/dist/product-scopes.d.ts.map +1 -0
- package/dist/product-scopes.js +436 -0
- package/dist/product-scopes.js.map +1 -0
- package/dist/product-summary-text.d.ts +23 -0
- package/dist/product-summary-text.d.ts.map +1 -0
- package/dist/product-summary-text.js +64 -0
- package/dist/product-summary-text.js.map +1 -0
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.d.ts.map +1 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-tax-rates.js.map +1 -0
- package/dist/product-url-keys.d.ts +210 -0
- package/dist/product-url-keys.d.ts.map +1 -0
- package/dist/product-url-keys.js +200 -0
- package/dist/product-url-keys.js.map +1 -0
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +36 -96
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/projects.d.ts +2370 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +843 -0
- package/dist/projects.js.map +1 -0
- package/dist/promotions.d.ts +10 -10
- package/dist/prompt-actions.d.ts +19 -1
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +31 -2
- package/dist/prompt-actions.js.map +1 -1
- package/dist/pwa.d.ts +2 -2
- package/dist/quick-order.d.ts +150 -7
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +76 -2
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +99 -13
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +66 -1
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts +252 -0
- package/dist/record-references.d.ts.map +1 -0
- package/dist/record-references.js +178 -0
- package/dist/record-references.js.map +1 -0
- package/dist/record-rich-text.d.ts +66 -0
- package/dist/record-rich-text.d.ts.map +1 -0
- package/dist/record-rich-text.js +304 -0
- package/dist/record-rich-text.js.map +1 -0
- package/dist/returns.d.ts +234 -52
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +139 -26
- package/dist/returns.js.map +1 -1
- package/dist/sales-channels.d.ts +51 -7
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +38 -4
- package/dist/sales-channels.js.map +1 -1
- package/dist/saved-list-views.d.ts +56 -0
- package/dist/saved-list-views.d.ts.map +1 -1
- package/dist/saved-list-views.js +27 -1
- package/dist/saved-list-views.js.map +1 -1
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.d.ts.map +1 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/scoped-write-encoding.js.map +1 -0
- package/dist/search.d.ts +25 -15
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +127 -15
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +38 -4
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +161 -3
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +73 -3
- package/dist/settings.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -3
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -0
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +41 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +36 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-language-path.d.ts +77 -0
- package/dist/storefront-language-path.d.ts.map +1 -0
- package/dist/storefront-language-path.js +123 -0
- package/dist/storefront-language-path.js.map +1 -0
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.d.ts.map +1 -1
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/storefront-value-overrides.js.map +1 -1
- package/dist/tasks.d.ts +2842 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +901 -0
- package/dist/tasks.js.map +1 -0
- package/dist/transactional-emails.d.ts +14 -11
- package/dist/transactional-emails.d.ts.map +1 -1
- package/dist/transactional-emails.js +13 -0
- package/dist/transactional-emails.js.map +1 -1
- package/package.json +3 -3
package/dist/megamenu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"megamenu.d.ts","sourceRoot":"","sources":["../src/megamenu.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"megamenu.d.ts","sourceRoot":"","sources":["../src/megamenu.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,sBAAsB;;;;;;;;;EAWjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;EAAkD,CAAC;AAC1F,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,qDAAqD;AACrD,eAAO,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KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBxB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GAAG;IACpE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAE9D,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAOtE,eAAO,MAAM,6BAA6B;;;;;;;;;;iBAYxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
package/dist/megamenu.js
CHANGED
|
@@ -14,7 +14,61 @@ export const megamenuItemKindSchema = z.enum([
|
|
|
14
14
|
'button',
|
|
15
15
|
'asset',
|
|
16
16
|
'cms-block-embed',
|
|
17
|
+
// Feature 168: a heading without a link (a column of a `mega` panel), and a
|
|
18
|
+
// live expansion of the catalogue's category tree.
|
|
19
|
+
'group',
|
|
20
|
+
'category-tree',
|
|
17
21
|
]);
|
|
22
|
+
/**
|
|
23
|
+
* How a top-level item — a **tab** of the navigation bar — opens (feature 168):
|
|
24
|
+
* a plain link, a narrow list, a full-width panel of columns, or the
|
|
25
|
+
* departments → subcategories catalogue panel.
|
|
26
|
+
*/
|
|
27
|
+
export const megamenuPresentationSchema = z.enum(['link', 'dropdown', 'mega', 'catalog']);
|
|
28
|
+
/** Which end of the navigation bar a tab sits at. */
|
|
29
|
+
export const megamenuAlignmentSchema = z.enum(['start', 'end']);
|
|
30
|
+
/** The kinds a tab may be (FR-002). Media, embeds and trees open under a tab, never as one. */
|
|
31
|
+
export const MEGAMENU_TAB_KINDS = new Set([
|
|
32
|
+
'category-link',
|
|
33
|
+
'cms-page-link',
|
|
34
|
+
'external-link',
|
|
35
|
+
'button',
|
|
36
|
+
'group',
|
|
37
|
+
]);
|
|
38
|
+
/**
|
|
39
|
+
* The kinds whose label may be empty: each points at something with a name of
|
|
40
|
+
* its own in every language, which an empty label inherits (FR-015).
|
|
41
|
+
*/
|
|
42
|
+
/** The kinds a tab may be that have a link of their own to follow on click. */
|
|
43
|
+
export const MEGAMENU_CLICK_NAVIGATES_KINDS = new Set([
|
|
44
|
+
'category-link',
|
|
45
|
+
'cms-page-link',
|
|
46
|
+
'external-link',
|
|
47
|
+
]);
|
|
48
|
+
export const MEGAMENU_LABEL_INHERITING_KINDS = new Set([
|
|
49
|
+
'category-link',
|
|
50
|
+
'cms-page-link',
|
|
51
|
+
'category-tree',
|
|
52
|
+
]);
|
|
53
|
+
/**
|
|
54
|
+
* Who may see an item (feature 168, FR-017). Hiding an item hides its subtree.
|
|
55
|
+
* A customer-group audience matches the buyer's *effective* customer group
|
|
56
|
+
* (`effectiveCustomerGroupId`), the one pricing reads.
|
|
57
|
+
*/
|
|
58
|
+
export const megamenuAudienceSchema = z.discriminatedUnion('kind', [
|
|
59
|
+
z.object({ kind: z.literal('everyone') }),
|
|
60
|
+
z.object({ kind: z.literal('guests') }),
|
|
61
|
+
z.object({ kind: z.literal('signed_in') }),
|
|
62
|
+
z.object({
|
|
63
|
+
kind: z.literal('customer_groups'),
|
|
64
|
+
customerGroupIds: z
|
|
65
|
+
.array(uuidSchema)
|
|
66
|
+
.min(1)
|
|
67
|
+
.max(50)
|
|
68
|
+
.refine((ids) => new Set(ids).size === ids.length, { message: 'Customer groups must be unique.' }),
|
|
69
|
+
}),
|
|
70
|
+
]);
|
|
71
|
+
export const MEGAMENU_EVERYONE_AUDIENCE = { kind: 'everyone' };
|
|
18
72
|
export const megamenuButtonVariantSchema = z.enum(['primary', 'secondary', 'ghost']);
|
|
19
73
|
export const megamenuIconPositionSchema = z.enum(['left', 'right']);
|
|
20
74
|
export const megamenuEmbedSideSchema = z.enum(['left', 'right']);
|
|
@@ -42,6 +96,18 @@ export const megamenuItemBaseFields = {
|
|
|
42
96
|
position: z.number().int().nonnegative(),
|
|
43
97
|
labels: multilingualStringSchema,
|
|
44
98
|
descriptions: multilingualStringSchema.nullable().optional(),
|
|
99
|
+
/** Tabs only, and required there (FR-001) — the server refuses either mistake. */
|
|
100
|
+
presentation: megamenuPresentationSchema.optional(),
|
|
101
|
+
/** Tabs only; `start` when a tab omits it. */
|
|
102
|
+
alignment: megamenuAlignmentSchema.optional(),
|
|
103
|
+
/** `everyone` when omitted. */
|
|
104
|
+
audience: megamenuAudienceSchema.optional(),
|
|
105
|
+
/**
|
|
106
|
+
* Tabs with a link of their own and a panel only: a click follows the tab's
|
|
107
|
+
* link, and the panel opens on hover and from its own toggle. Off by default,
|
|
108
|
+
* when a click opens the panel.
|
|
109
|
+
*/
|
|
110
|
+
clickNavigates: z.boolean().optional(),
|
|
45
111
|
};
|
|
46
112
|
export const categoryLinkTargetSchema = z.object({
|
|
47
113
|
categoryId: uuidSchema,
|
|
@@ -74,6 +140,16 @@ export const cmsBlockEmbedTargetSchema = z.object({
|
|
|
74
140
|
blockId: uuidSchema,
|
|
75
141
|
embedSide: megamenuEmbedSideSchema,
|
|
76
142
|
});
|
|
143
|
+
/** A group points at nothing: it is a heading. */
|
|
144
|
+
export const groupTargetSchema = z.object({});
|
|
145
|
+
/**
|
|
146
|
+
* A live expansion of the catalogue: the root's live descendants to `depth`
|
|
147
|
+
* levels, or the whole catalogue's from its top level when the root is `null`.
|
|
148
|
+
*/
|
|
149
|
+
export const categoryTreeTargetSchema = z.object({
|
|
150
|
+
rootCategoryId: uuidSchema.nullable(),
|
|
151
|
+
depth: z.number().int().min(1).max(3),
|
|
152
|
+
});
|
|
77
153
|
export const megamenuItemSchema = z.discriminatedUnion('kind', [
|
|
78
154
|
z.object({ ...megamenuItemBaseFields, kind: z.literal('category-link'), target: categoryLinkTargetSchema }),
|
|
79
155
|
z.object({ ...megamenuItemBaseFields, kind: z.literal('cms-page-link'), target: cmsPageLinkTargetSchema }),
|
|
@@ -81,6 +157,8 @@ export const megamenuItemSchema = z.discriminatedUnion('kind', [
|
|
|
81
157
|
z.object({ ...megamenuItemBaseFields, kind: z.literal('button'), target: buttonTargetSchema }),
|
|
82
158
|
z.object({ ...megamenuItemBaseFields, kind: z.literal('asset'), target: assetTargetSchema }),
|
|
83
159
|
z.object({ ...megamenuItemBaseFields, kind: z.literal('cms-block-embed'), target: cmsBlockEmbedTargetSchema }),
|
|
160
|
+
z.object({ ...megamenuItemBaseFields, kind: z.literal('group'), target: groupTargetSchema }),
|
|
161
|
+
z.object({ ...megamenuItemBaseFields, kind: z.literal('category-tree'), target: categoryTreeTargetSchema }),
|
|
84
162
|
]);
|
|
85
163
|
// ────────────────────────────────────────────────────────────────────
|
|
86
164
|
// Megamenu (configuration row)
|
|
@@ -146,11 +224,26 @@ export const megamenuResolvedBlockSchema = z.object({
|
|
|
146
224
|
language: z.string(),
|
|
147
225
|
content: z.object({ schemaVersion: z.number().int(), data: z.unknown() }),
|
|
148
226
|
});
|
|
227
|
+
/**
|
|
228
|
+
* The kinds a resolved tree carries: every stored kind but `category-tree`,
|
|
229
|
+
* which the resolver replaces by the categories it expands to (feature 168).
|
|
230
|
+
*/
|
|
231
|
+
export const megamenuResolvedItemKindSchema = megamenuItemKindSchema.exclude(['category-tree']);
|
|
149
232
|
const resolvedMenuItemBase = z.object({
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
233
|
+
/**
|
|
234
|
+
* A stored item's uuid, or `<tree item id>:<category id>` for a category a
|
|
235
|
+
* `category-tree` expanded to — those have no row of their own.
|
|
236
|
+
*/
|
|
237
|
+
id: z.string().min(1),
|
|
238
|
+
parentId: z.string().min(1).nullable(),
|
|
239
|
+
kind: megamenuResolvedItemKindSchema,
|
|
153
240
|
label: z.string(),
|
|
241
|
+
/** Tabs only. */
|
|
242
|
+
presentation: megamenuPresentationSchema.optional(),
|
|
243
|
+
/** Tabs only. */
|
|
244
|
+
alignment: megamenuAlignmentSchema.optional(),
|
|
245
|
+
/** Tabs only, and only when `true`: a click follows `url`; the panel opens on hover or its toggle. */
|
|
246
|
+
clickNavigates: z.boolean().optional(),
|
|
154
247
|
description: z.string().nullable().optional(),
|
|
155
248
|
url: z.string().optional(),
|
|
156
249
|
icon: megamenuResolvedIconSchema.nullable().optional(),
|
package/dist/megamenu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"megamenu.js","sourceRoot":"","sources":["../src/megamenu.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,wEAAwE;AACxE,qEAAqE;AACrE,wEAAwE;AAExE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtF,uEAAuE;AACvE,oBAAoB;AACpB,uEAAuE;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,eAAe;IACf,eAAe;IACf,eAAe;IACf,QAAQ;IACR,OAAO;IACP,iBAAiB;
|
|
1
|
+
{"version":3,"file":"megamenu.js","sourceRoot":"","sources":["../src/megamenu.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,wEAAwE;AACxE,qEAAqE;AACrE,wEAAwE;AAExE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtF,uEAAuE;AACvE,oBAAoB;AACpB,uEAAuE;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,eAAe;IACf,eAAe;IACf,eAAe;IACf,QAAQ;IAC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;IAC7C,KAAK,EAAE,2BAA2B,CAAC,QAAQ,EAAE;IAC7C,SAAS,EAAE,uBAAuB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,sBAAsB,GAAgC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC7E,oBAAoB,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAC3E,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,UAAU,EAAE,UAAU;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;CACvC,CAAC,CAAC;AAGH,uEAAuE;AACvE,uEAAuE;AACvE,oDAAoD;AACpD,uEAAuE;AAEvE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC;QAClB,UAAU,EAAE,UAAU;QACtB,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;KACrB,CAAC;IACF,gBAAgB,EAAE,CAAC;SAChB,MAAM,CAAC;QACN,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
|
package/dist/mfa.d.ts
CHANGED
|
@@ -37,6 +37,45 @@ export declare const federatedSignInOptionsResponseSchema: z.ZodObject<{
|
|
|
37
37
|
}>>;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
export type FederatedSignInOptionsResponse = z.infer<typeof federatedSignInOptionsResponseSchema>;
|
|
40
|
+
/**
|
|
41
|
+
* The `error` a refused federated sign-in carries back to the storefront or the Admin UI:
|
|
42
|
+
* `/login?error=<code>` (issues #789, #813). A code, never a sentence — each frontend words
|
|
43
|
+
* it in its own copy and reads any other value as its generic sign-in failure
|
|
44
|
+
* (`specs/conventions/module-i18n.md`, URL-borne errors). These are redirect codes, not API
|
|
45
|
+
* `error.code` values, which is why they are lower-case and fall outside `errorCodeRe`.
|
|
46
|
+
*
|
|
47
|
+
* - `unknown_provider` — the provider in the path is not one the platform supports.
|
|
48
|
+
* - `provider_unavailable` — the provider is not configured or not enabled for the channel.
|
|
49
|
+
* - `sign_in_cancelled` — the provider answered with an error, or the callback is incomplete.
|
|
50
|
+
* - `sign_in_expired` — the transaction is gone or belongs to another browser.
|
|
51
|
+
* - `sign_in_failed` — the code exchange with the provider failed.
|
|
52
|
+
* - `email_unverified` — the provider's e-mail address is not verified.
|
|
53
|
+
* - `no_matching_account` — no account matches the provider identity.
|
|
54
|
+
* - `account_blocked` — the matched account is blocked.
|
|
55
|
+
* - `registration_disabled_in_channel` — no account exists and personal (org-less)
|
|
56
|
+
* registration is off on the channel the sign-in started on
|
|
57
|
+
* (`customers.allow_registration_without_organization`), so none was created. Business
|
|
58
|
+
* registration is not affected.
|
|
59
|
+
* - `mfa_setup_required` — a second factor is enforced and not set up yet.
|
|
60
|
+
* - `sales_channel_sign_in_required` — no account exists and the store is closed to
|
|
61
|
+
* anonymous visitors, so none was created.
|
|
62
|
+
* - `sales_channel_not_permitted` — the account's Organization may not use this store.
|
|
63
|
+
*/
|
|
64
|
+
export declare const federatedSignInErrorCodeSchema: z.ZodEnum<{
|
|
65
|
+
unknown_provider: "unknown_provider";
|
|
66
|
+
provider_unavailable: "provider_unavailable";
|
|
67
|
+
sign_in_cancelled: "sign_in_cancelled";
|
|
68
|
+
sign_in_expired: "sign_in_expired";
|
|
69
|
+
sign_in_failed: "sign_in_failed";
|
|
70
|
+
email_unverified: "email_unverified";
|
|
71
|
+
no_matching_account: "no_matching_account";
|
|
72
|
+
account_blocked: "account_blocked";
|
|
73
|
+
registration_disabled_in_channel: "registration_disabled_in_channel";
|
|
74
|
+
mfa_setup_required: "mfa_setup_required";
|
|
75
|
+
sales_channel_sign_in_required: "sales_channel_sign_in_required";
|
|
76
|
+
sales_channel_not_permitted: "sales_channel_not_permitted";
|
|
77
|
+
}>;
|
|
78
|
+
export type FederatedSignInErrorCode = z.infer<typeof federatedSignInErrorCodeSchema>;
|
|
40
79
|
/**
|
|
41
80
|
* Discriminated result returned by the first login step (email+password) and
|
|
42
81
|
* by the OAuth callback. Only `authenticated` carries/sets a session cookie;
|
|
@@ -65,6 +104,7 @@ export declare const mfaSetupTicketBodySchema: z.ZodObject<{
|
|
|
65
104
|
export declare const mfaSetupResponseSchema: z.ZodObject<{
|
|
66
105
|
secret: z.ZodString;
|
|
67
106
|
otpauthUri: z.ZodString;
|
|
107
|
+
qrSvg: z.ZodString;
|
|
68
108
|
}, z.core.$strip>;
|
|
69
109
|
export type MfaSetupResponse = z.infer<typeof mfaSetupResponseSchema>;
|
|
70
110
|
export declare const mfaActivateRequestSchema: z.ZodObject<{
|
|
@@ -185,6 +225,14 @@ export declare const mfaResetBulkResultSchema: z.ZodObject<{
|
|
|
185
225
|
skipped: z.ZodNumber;
|
|
186
226
|
}, z.core.$strip>;
|
|
187
227
|
export type MfaResetBulkResult = z.infer<typeof mfaResetBulkResultSchema>;
|
|
228
|
+
/**
|
|
229
|
+
* Why a second-factor requirement cannot be met on this instance: `mfa` has no
|
|
230
|
+
* `MFA_SECRET_ENCRYPTION_KEY`, so it serves no enrolment route (issue #930).
|
|
231
|
+
* One spelling for every refusal and notice that says so — the
|
|
232
|
+
* `mfa.admin.totp_enforced` write, its Settings notice, and a role's
|
|
233
|
+
* two-factor flag — as `details.reason` and as the sentence token.
|
|
234
|
+
*/
|
|
235
|
+
export declare const ENCRYPTION_KEY_MISSING: "encryption_key_missing";
|
|
188
236
|
export declare const MFA_SETTING_CODES: {
|
|
189
237
|
/**
|
|
190
238
|
* Feature 074 — the operator-activation control (Constitution XVII). It sits
|
|
@@ -238,9 +286,13 @@ export interface MfaEnrolmentCountPort {
|
|
|
238
286
|
* platform currently **requires** of administrators. `/platform/modules` asks
|
|
239
287
|
* it before an operator switches `mfa` off and refuses the switch-off while the
|
|
240
288
|
* answer is `true` (`MFA_DEACTIVATION_BLOCKED`): the requirement is turned off
|
|
241
|
-
* first, as its own deliberate
|
|
242
|
-
*
|
|
243
|
-
*
|
|
289
|
+
* first, as its own deliberate change, and only then the module. Off still
|
|
290
|
+
* means no second factor (D-96); what this adds is that the one switch no
|
|
291
|
+
* longer silently takes the administrator requirement with it.
|
|
292
|
+
*
|
|
293
|
+
* The requirement has **two sources** since issue #349: the platform-wide
|
|
294
|
+
* setting `mfa.admin.totp_enforced`, and any admin role whose
|
|
295
|
+
* `requiresTwoFactor` is set. Either one blocks the switch-off.
|
|
244
296
|
*
|
|
245
297
|
* Read while the module is still on, through an open gate, for the reason
|
|
246
298
|
* {@link MfaEnrolmentCountPort} gives. Unlike that count, a read that fails is
|
|
@@ -248,8 +300,77 @@ export interface MfaEnrolmentCountPort {
|
|
|
248
300
|
* switch-off rather than letting it through.
|
|
249
301
|
*/
|
|
250
302
|
export interface MfaDeactivationGuardPort {
|
|
251
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* Whether a second factor is required of any administrator: the setting
|
|
305
|
+
* `mfa.admin.totp_enforced`, or a role with `requiresTwoFactor`.
|
|
306
|
+
*/
|
|
252
307
|
isAdminSecondFactorRequired(): Promise<boolean>;
|
|
308
|
+
/**
|
|
309
|
+
* The same answer, by source, so the refusal can name what to turn off:
|
|
310
|
+
* whether the setting is on, and the codes of the roles that set the flag.
|
|
311
|
+
*/
|
|
312
|
+
requirement(): Promise<MfaAdminSecondFactorRequirement>;
|
|
313
|
+
}
|
|
314
|
+
/** What requires administrators to use a second factor — see {@link MfaDeactivationGuardPort}. */
|
|
315
|
+
export interface MfaAdminSecondFactorRequirement {
|
|
316
|
+
/** `mfa.admin.totp_enforced` is on. */
|
|
317
|
+
readonly setting: boolean;
|
|
318
|
+
/** Codes of the roles whose `requiresTwoFactor` is set, in role-list order. */
|
|
319
|
+
readonly roleCodes: readonly string[];
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Why a second-factor requirement started binding these administrators: a
|
|
323
|
+
* role's flag was turned on, a role with the flag was given to them, or
|
|
324
|
+
* (issue #349, E-349-1) `mfa.admin.totp_enforced` was switched on.
|
|
325
|
+
*/
|
|
326
|
+
export type MfaAdminEnforcementTrigger = 'role_requirement_enabled' | 'role_assigned' | 'setting_enabled';
|
|
327
|
+
/** What {@link MfaAdminEnforcementPort.endUnprotectedAdminSessions} is told. */
|
|
328
|
+
export type MfaEndUnprotectedAdminSessionsOptions = {
|
|
329
|
+
/** The acting administrator's own current session, which is kept. */
|
|
330
|
+
readonly exceptSessionId?: string;
|
|
331
|
+
} & ({
|
|
332
|
+
readonly trigger: 'role_requirement_enabled' | 'role_assigned';
|
|
333
|
+
/** The role whose requirement now binds them, for the audit row. */
|
|
334
|
+
readonly roleCode: string;
|
|
335
|
+
} | {
|
|
336
|
+
readonly trigger: 'setting_enabled';
|
|
337
|
+
/** The setting that now binds them, for the audit row. */
|
|
338
|
+
readonly settingCode: string;
|
|
339
|
+
});
|
|
340
|
+
/**
|
|
341
|
+
* Container name: `mfaAdminEnforcementPort`. Owner: `mfa`.
|
|
342
|
+
*
|
|
343
|
+
* Issue #349 — what `admin_users` needs from `mfa` when a role's
|
|
344
|
+
* `requiresTwoFactor` starts binding administrators, either because the flag
|
|
345
|
+
* was turned on or because an administrator was given the role.
|
|
346
|
+
*
|
|
347
|
+
* An administrator session lasts thirty days, so a requirement applied only at
|
|
348
|
+
* the next sign-in could stay unenforced for a month. An administrator with an
|
|
349
|
+
* **active** enrolment keeps their sessions: `beginLogin` challenged them for
|
|
350
|
+
* it, or they proved it by confirming the enrolment. The others were opened
|
|
351
|
+
* without a second factor, and those end.
|
|
352
|
+
*
|
|
353
|
+
* Non-binding for `admin_users`: it resolves this only while `mfa` is present,
|
|
354
|
+
* and with `mfa` absent the flag cannot be turned on at all
|
|
355
|
+
* (`MFA_REQUIRED_FOR_ROLE_TWO_FACTOR`). `mfa` calls it itself when
|
|
356
|
+
* `mfa.admin.totp_enforced` is switched on (issue #349, E-349-1).
|
|
357
|
+
*
|
|
358
|
+
* Without the encryption key no requirement is in force (issue #948, owner
|
|
359
|
+
* ruling Q6), so none binds anybody: nothing is ended and nobody is counted.
|
|
360
|
+
*/
|
|
361
|
+
export interface MfaAdminEnforcementPort {
|
|
362
|
+
/**
|
|
363
|
+
* End every session and pending login of these administrators that is not
|
|
364
|
+
* protected by an active second factor, sparing `exceptSessionId`. Records
|
|
365
|
+
* one audit row when anybody was affected. Answers how many administrators
|
|
366
|
+
* had no active enrolment, which is how many were signed out — `0`, and
|
|
367
|
+
* nothing ended, where no second factor can be enrolled.
|
|
368
|
+
*/
|
|
369
|
+
endUnprotectedAdminSessions(adminUserIds: readonly string[], options: MfaEndUnprotectedAdminSessionsOptions): Promise<number>;
|
|
370
|
+
/** How many of these administrators have no active enrolment — the preview of the call above. */
|
|
371
|
+
countUnprotected(adminUserIds: readonly string[]): Promise<number>;
|
|
372
|
+
/** Whether a requirement set now can be met: `mfa` composed with its encryption key. */
|
|
373
|
+
canEnforceAdminSecondFactor(): Promise<boolean>;
|
|
253
374
|
}
|
|
254
375
|
/**
|
|
255
376
|
* Container name: `mfaEnrolmentStatePort`. Owner: `mfa`.
|
package/dist/mfa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfa.d.ts","sourceRoot":"","sources":["../src/mfa.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,6CAA6C;AAC7C,eAAO,MAAM,oBAAoB;;;EAAgC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,8CAA8C;AAC9C,e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B,CACzB,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,iGAAiG;IACjG,gBAAgB,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnE,wFAAwF;IACxF,2BAA2B,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,gBAAgB,CACd,WAAW,EAAE,cAAc,EAC3B,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACtB"}
|
package/dist/mfa.js
CHANGED
|
@@ -36,6 +36,44 @@ export const mfaSocialProviderSchema = z.enum(['google', 'microsoft']);
|
|
|
36
36
|
export const federatedSignInOptionsResponseSchema = z.object({
|
|
37
37
|
providers: z.array(mfaSocialProviderSchema),
|
|
38
38
|
});
|
|
39
|
+
/**
|
|
40
|
+
* The `error` a refused federated sign-in carries back to the storefront or the Admin UI:
|
|
41
|
+
* `/login?error=<code>` (issues #789, #813). A code, never a sentence — each frontend words
|
|
42
|
+
* it in its own copy and reads any other value as its generic sign-in failure
|
|
43
|
+
* (`specs/conventions/module-i18n.md`, URL-borne errors). These are redirect codes, not API
|
|
44
|
+
* `error.code` values, which is why they are lower-case and fall outside `errorCodeRe`.
|
|
45
|
+
*
|
|
46
|
+
* - `unknown_provider` — the provider in the path is not one the platform supports.
|
|
47
|
+
* - `provider_unavailable` — the provider is not configured or not enabled for the channel.
|
|
48
|
+
* - `sign_in_cancelled` — the provider answered with an error, or the callback is incomplete.
|
|
49
|
+
* - `sign_in_expired` — the transaction is gone or belongs to another browser.
|
|
50
|
+
* - `sign_in_failed` — the code exchange with the provider failed.
|
|
51
|
+
* - `email_unverified` — the provider's e-mail address is not verified.
|
|
52
|
+
* - `no_matching_account` — no account matches the provider identity.
|
|
53
|
+
* - `account_blocked` — the matched account is blocked.
|
|
54
|
+
* - `registration_disabled_in_channel` — no account exists and personal (org-less)
|
|
55
|
+
* registration is off on the channel the sign-in started on
|
|
56
|
+
* (`customers.allow_registration_without_organization`), so none was created. Business
|
|
57
|
+
* registration is not affected.
|
|
58
|
+
* - `mfa_setup_required` — a second factor is enforced and not set up yet.
|
|
59
|
+
* - `sales_channel_sign_in_required` — no account exists and the store is closed to
|
|
60
|
+
* anonymous visitors, so none was created.
|
|
61
|
+
* - `sales_channel_not_permitted` — the account's Organization may not use this store.
|
|
62
|
+
*/
|
|
63
|
+
export const federatedSignInErrorCodeSchema = z.enum([
|
|
64
|
+
'unknown_provider',
|
|
65
|
+
'provider_unavailable',
|
|
66
|
+
'sign_in_cancelled',
|
|
67
|
+
'sign_in_expired',
|
|
68
|
+
'sign_in_failed',
|
|
69
|
+
'email_unverified',
|
|
70
|
+
'no_matching_account',
|
|
71
|
+
'account_blocked',
|
|
72
|
+
'registration_disabled_in_channel',
|
|
73
|
+
'mfa_setup_required',
|
|
74
|
+
'sales_channel_sign_in_required',
|
|
75
|
+
'sales_channel_not_permitted',
|
|
76
|
+
]);
|
|
39
77
|
// ---------------------------------------------------------------------------
|
|
40
78
|
// Two-step login result (replaces the inline `twoFactorCode` shape)
|
|
41
79
|
// ---------------------------------------------------------------------------
|
|
@@ -67,8 +105,14 @@ export const mfaSetupTicketBodySchema = z.object({
|
|
|
67
105
|
export const mfaSetupResponseSchema = z.object({
|
|
68
106
|
/** base32 secret for manual entry. */
|
|
69
107
|
secret: z.string().min(1),
|
|
70
|
-
/** otpauth:// URI
|
|
108
|
+
/** otpauth:// URI — what an authenticator app enrols from. */
|
|
71
109
|
otpauthUri: z.string().min(1),
|
|
110
|
+
/**
|
|
111
|
+
* The QR code of `otpauthUri`, as an SVG document drawn by the server
|
|
112
|
+
* (`specs/166-mfa-totp-hardening/`). Static markup with no script; render it
|
|
113
|
+
* as an image (e.g. a `data:image/svg+xml` URI), not as HTML.
|
|
114
|
+
*/
|
|
115
|
+
qrSvg: z.string().min(1),
|
|
72
116
|
});
|
|
73
117
|
export const mfaActivateRequestSchema = z.object({
|
|
74
118
|
code: z.string().length(6),
|
|
@@ -96,7 +140,7 @@ export const mfaDisableRequestSchema = z
|
|
|
96
140
|
code: z.string().min(6).max(20).optional(),
|
|
97
141
|
})
|
|
98
142
|
.refine((v) => Boolean(v.password) || Boolean(v.code), {
|
|
99
|
-
message: 'Either password or code is required to disable
|
|
143
|
+
message: 'Either password or code is required to disable two-step verification.',
|
|
100
144
|
});
|
|
101
145
|
export const mfaRegenerateRequestSchema = z.object({
|
|
102
146
|
code: z.string().length(6),
|
|
@@ -159,6 +203,14 @@ export const mfaResetBulkResultSchema = z.object({
|
|
|
159
203
|
// ---------------------------------------------------------------------------
|
|
160
204
|
// Setting codes (single source for both manifest and resolver)
|
|
161
205
|
// ---------------------------------------------------------------------------
|
|
206
|
+
/**
|
|
207
|
+
* Why a second-factor requirement cannot be met on this instance: `mfa` has no
|
|
208
|
+
* `MFA_SECRET_ENCRYPTION_KEY`, so it serves no enrolment route (issue #930).
|
|
209
|
+
* One spelling for every refusal and notice that says so — the
|
|
210
|
+
* `mfa.admin.totp_enforced` write, its Settings notice, and a role's
|
|
211
|
+
* two-factor flag — as `details.reason` and as the sentence token.
|
|
212
|
+
*/
|
|
213
|
+
export const ENCRYPTION_KEY_MISSING = 'encryption_key_missing';
|
|
162
214
|
export const MFA_SETTING_CODES = {
|
|
163
215
|
/**
|
|
164
216
|
* Feature 074 — the operator-activation control (Constitution XVII). It sits
|
package/dist/mfa.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfa.js","sourceRoot":"","sources":["../src/mfa.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAC7E,+EAA+E;AAE/E,OAAO,EAAE,CAAC,EAAE,MA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ist/modules.d.ts
CHANGED
|
@@ -635,6 +635,11 @@ export declare const errorCodeTokenRe: RegExp;
|
|
|
635
635
|
* does not know the token set cannot tell `errors.CART_COUPON_REJECTED.expired`
|
|
636
636
|
* from a key whose tail is not a code at all — which is a finding. Fourteen keys
|
|
637
637
|
* in `invoices` and `carts` have this shape today.
|
|
638
|
+
*
|
|
639
|
+
* A code raised with a `details.code` the static read cannot spell — a
|
|
640
|
+
* variable, a details object handed down, a spread — **must** declare its
|
|
641
|
+
* `tokens` (issue #83). **`tokens: []` is a declaration**, not an absence: it
|
|
642
|
+
* states that such a raise's `details` never carries a `code`.
|
|
638
643
|
*/
|
|
639
644
|
export declare const ModuleErrorCodeDeclarationSchema: z.ZodObject<{
|
|
640
645
|
code: z.ZodString;
|
|
@@ -659,6 +664,32 @@ export declare const ExclusiveCapabilitySchema: z.ZodObject<{
|
|
|
659
664
|
errorCode: z.ZodString;
|
|
660
665
|
}, z.core.$strip>;
|
|
661
666
|
export type ExclusiveCapability = z.infer<typeof ExclusiveCapabilitySchema>;
|
|
667
|
+
/**
|
|
668
|
+
* The shape of an **organization permission** code (`specs/170-organization-roles/`,
|
|
669
|
+
* FR-020, research R-2): `<module>.<action>`, lower snake case, exactly one dot.
|
|
670
|
+
*
|
|
671
|
+
* The operator vocabulary is `<area>:<action>` (`permissions` below). Two
|
|
672
|
+
* shapes make a mix-up visible in review, and the permission inventory's
|
|
673
|
+
* `cross-vocabulary` finding makes it fail the build.
|
|
674
|
+
*/
|
|
675
|
+
export declare const ORGANIZATION_PERMISSION_CODE: RegExp;
|
|
676
|
+
/**
|
|
677
|
+
* One organization permission a module declares — a buyer action its routes
|
|
678
|
+
* or services gate (`contracts/organization-permissions-manifest.md` §1).
|
|
679
|
+
*
|
|
680
|
+
* `label` and `description` are the English fallbacks; the translations live
|
|
681
|
+
* in the declaring module's own bundle under
|
|
682
|
+
* `organizationPermissions.<code>.label` and `.description`. `memberDefault`
|
|
683
|
+
* says whether an Organization's *Member* role holds the code from the moment
|
|
684
|
+
* it is first offered (FR-021, research R-17).
|
|
685
|
+
*/
|
|
686
|
+
export declare const moduleOrganizationPermissionDeclarationSchema: z.ZodObject<{
|
|
687
|
+
code: z.ZodString;
|
|
688
|
+
label: z.ZodString;
|
|
689
|
+
description: z.ZodString;
|
|
690
|
+
memberDefault: z.ZodBoolean;
|
|
691
|
+
}, z.core.$strict>;
|
|
692
|
+
export type ModuleOrganizationPermissionDeclaration = z.infer<typeof moduleOrganizationPermissionDeclarationSchema>;
|
|
662
693
|
export declare const ModuleManifestSchema: z.ZodObject<{
|
|
663
694
|
id: z.ZodString;
|
|
664
695
|
name: z.ZodString;
|
|
@@ -799,6 +830,7 @@ export declare const ModuleManifestSchema: z.ZodObject<{
|
|
|
799
830
|
targetRoute: z.ZodString;
|
|
800
831
|
requiredPermission: z.ZodOptional<z.ZodString>;
|
|
801
832
|
keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
833
|
+
keywordsKey: z.ZodOptional<z.ZodString>;
|
|
802
834
|
weight: z.ZodDefault<z.ZodNumber>;
|
|
803
835
|
}, z.core.$strip>>>;
|
|
804
836
|
permissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -808,6 +840,12 @@ export declare const ModuleManifestSchema: z.ZodObject<{
|
|
|
808
840
|
description: z.ZodOptional<z.ZodString>;
|
|
809
841
|
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
810
842
|
}, z.core.$strip>>>;
|
|
843
|
+
organizationPermissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
844
|
+
code: z.ZodString;
|
|
845
|
+
label: z.ZodString;
|
|
846
|
+
description: z.ZodString;
|
|
847
|
+
memberDefault: z.ZodBoolean;
|
|
848
|
+
}, z.core.$strict>>>;
|
|
811
849
|
transactionalEmails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
812
850
|
code: z.ZodString;
|
|
813
851
|
name: z.ZodString;
|
|
@@ -817,6 +855,7 @@ export declare const ModuleManifestSchema: z.ZodObject<{
|
|
|
817
855
|
key: z.ZodString;
|
|
818
856
|
label: z.ZodString;
|
|
819
857
|
sampleValue: z.ZodOptional<z.ZodString>;
|
|
858
|
+
sampleValueKey: z.ZodOptional<z.ZodString>;
|
|
820
859
|
description: z.ZodOptional<z.ZodString>;
|
|
821
860
|
}, z.core.$strip>>>;
|
|
822
861
|
}, z.core.$strip>>>;
|
|
@@ -835,8 +874,8 @@ export declare const ModuleManifestSchema: z.ZodObject<{
|
|
|
835
874
|
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
836
875
|
category: z.ZodString;
|
|
837
876
|
contexts: z.ZodArray<z.ZodEnum<{
|
|
838
|
-
cms: "cms";
|
|
839
877
|
email: "email";
|
|
878
|
+
cms: "cms";
|
|
840
879
|
invoice: "invoice";
|
|
841
880
|
newsletter: "newsletter";
|
|
842
881
|
document: "document";
|
|
@@ -846,12 +885,12 @@ export declare const ModuleManifestSchema: z.ZodObject<{
|
|
|
846
885
|
number: "number";
|
|
847
886
|
object: "object";
|
|
848
887
|
array: "array";
|
|
849
|
-
uuid: "uuid";
|
|
850
888
|
text: "text";
|
|
851
|
-
|
|
889
|
+
external: "external";
|
|
852
890
|
select: "select";
|
|
891
|
+
uuid: "uuid";
|
|
892
|
+
textarea: "textarea";
|
|
853
893
|
radio: "radio";
|
|
854
|
-
external: "external";
|
|
855
894
|
richtext: "richtext";
|
|
856
895
|
}>;
|
|
857
896
|
label: z.ZodOptional<z.ZodString>;
|
|
@@ -879,8 +918,8 @@ export declare const ModuleManifestSchema: z.ZodObject<{
|
|
|
879
918
|
key: z.ZodString;
|
|
880
919
|
titleKey: z.ZodString;
|
|
881
920
|
contexts: z.ZodArray<z.ZodEnum<{
|
|
882
|
-
cms: "cms";
|
|
883
921
|
email: "email";
|
|
922
|
+
cms: "cms";
|
|
884
923
|
invoice: "invoice";
|
|
885
924
|
newsletter: "newsletter";
|
|
886
925
|
document: "document";
|