@endora-commerce/contracts 0.110.0 → 0.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accept-language.d.ts +31 -0
- package/dist/accept-language.js +64 -0
- package/dist/admin-actions.d.ts +2 -0
- package/dist/admin-actions.js +18 -0
- package/dist/admin-contributions.d.ts +37 -5
- package/dist/admin-contributions.js +9 -2
- package/dist/admin-roles.d.ts +9 -0
- package/dist/admin.d.ts +37 -0
- package/dist/admin.js +19 -0
- package/dist/api-keys.d.ts +22 -0
- package/dist/api-keys.js +4 -0
- package/dist/assets-library.d.ts +19 -0
- package/dist/assets-library.js +14 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.js +9 -0
- package/dist/carts.d.ts +30 -1
- package/dist/carts.js +20 -5
- package/dist/catalog.d.ts +61 -22
- package/dist/catalog.js +32 -6
- package/dist/cms.d.ts +33 -3
- package/dist/cms.js +15 -0
- package/dist/command-hooks.d.ts +301 -0
- package/dist/command-hooks.js +248 -0
- package/dist/comparisons.d.ts +14 -14
- package/dist/credit-limits.d.ts +21 -0
- package/dist/credit-limits.js +21 -0
- package/dist/crm.d.ts +81 -55
- package/dist/crm.js +15 -5
- package/dist/custom-fields.d.ts +403 -49
- package/dist/custom-fields.js +127 -0
- package/dist/customer-accounts.d.ts +138 -0
- package/dist/customer-accounts.js +4 -0
- package/dist/customer-notifications.d.ts +143 -0
- package/dist/customer-notifications.js +41 -0
- package/dist/customers.d.ts +52 -0
- package/dist/customers.js +53 -0
- package/dist/dictionary.d.ts +53 -0
- package/dist/dictionary.js +25 -0
- package/dist/document-templates.d.ts +4 -4
- package/dist/email.d.ts +34 -0
- package/dist/email.js +6 -0
- package/dist/errors.d.ts +312 -2
- package/dist/errors.js +377 -2
- package/dist/forms.d.ts +88 -88
- package/dist/i18n.d.ts +34 -0
- package/dist/i18n.js +15 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +12 -1
- package/dist/invoice-ledger.d.ts +6 -6
- package/dist/invoices.d.ts +126 -0
- package/dist/invoices.js +49 -0
- package/dist/line-bounds.d.ts +53 -0
- package/dist/line-bounds.js +65 -0
- package/dist/megamenu.d.ts +27 -27
- package/dist/mfa.d.ts +86 -0
- package/dist/mfa.js +90 -0
- package/dist/modules.d.ts +21 -5
- package/dist/modules.js +60 -3
- package/dist/orders.d.ts +141 -0
- package/dist/orders.js +80 -3
- package/dist/organization-hooks.d.ts +99 -0
- package/dist/organization-hooks.js +22 -0
- package/dist/organization-registry-lookup.d.ts +5 -5
- package/dist/organization-roles.d.ts +1 -0
- package/dist/organization-roles.js +7 -0
- package/dist/organizations.d.ts +954 -17
- package/dist/organizations.js +229 -8
- package/dist/price-books.d.ts +173 -25
- package/dist/price-books.js +41 -0
- package/dist/price-lists.d.ts +5 -2
- package/dist/product-feeds.d.ts +157 -8
- package/dist/product-feeds.js +41 -2
- package/dist/product-scopes.d.ts +17 -0
- package/dist/product-scopes.js +31 -5
- package/dist/projects.d.ts +61 -28
- package/dist/projects.js +47 -9
- package/dist/promotions.d.ts +157 -5
- package/dist/promotions.js +23 -1
- package/dist/pwa.d.ts +39 -0
- package/dist/quick-order.d.ts +9 -3
- package/dist/quick-order.js +4 -3
- package/dist/quote-requests.d.ts +168 -5
- package/dist/quote-requests.js +69 -8
- package/dist/record-references.d.ts +15 -15
- package/dist/returns.d.ts +6 -0
- package/dist/returns.js +4 -2
- package/dist/sales-channels.d.ts +34 -3
- package/dist/sales-channels.js +16 -1
- package/dist/schema-extensions.d.ts +36 -0
- package/dist/schema-extensions.js +29 -0
- package/dist/seo.d.ts +2 -2
- package/dist/settings.d.ts +44 -2
- package/dist/settings.js +17 -2
- package/dist/shopping-lists.d.ts +39 -1
- package/dist/shopping-lists.js +37 -3
- package/dist/storefront-cache-tags.d.ts +10 -0
- package/dist/tasks.d.ts +21 -21
- package/dist/taxes.d.ts +27 -0
- package/dist/taxes.js +4 -0
- package/dist/transactional-emails.d.ts +39 -13
- package/dist/webhooks.d.ts +75 -0
- package/dist/webhooks.js +24 -0
- package/package.json +4 -2
- package/dist/actor.d.ts.map +0 -1
- package/dist/actor.js.map +0 -1
- package/dist/addresses.d.ts.map +0 -1
- package/dist/addresses.js.map +0 -1
- package/dist/admin-actions.d.ts.map +0 -1
- package/dist/admin-actions.js.map +0 -1
- package/dist/admin-contributions.d.ts.map +0 -1
- package/dist/admin-contributions.js.map +0 -1
- package/dist/admin-feedback.d.ts.map +0 -1
- package/dist/admin-feedback.js.map +0 -1
- package/dist/admin-i18n.d.ts.map +0 -1
- package/dist/admin-i18n.js.map +0 -1
- package/dist/admin-name.d.ts.map +0 -1
- package/dist/admin-name.js.map +0 -1
- package/dist/admin-notifications.d.ts.map +0 -1
- package/dist/admin-notifications.js.map +0 -1
- package/dist/admin-preferences.d.ts.map +0 -1
- package/dist/admin-preferences.js.map +0 -1
- package/dist/admin-roles.d.ts.map +0 -1
- package/dist/admin-roles.js.map +0 -1
- package/dist/admin-search.d.ts.map +0 -1
- package/dist/admin-search.js.map +0 -1
- package/dist/admin-users.d.ts.map +0 -1
- package/dist/admin-users.js.map +0 -1
- package/dist/admin.d.ts.map +0 -1
- package/dist/admin.js.map +0 -1
- package/dist/analytics.d.ts.map +0 -1
- package/dist/analytics.js.map +0 -1
- package/dist/api-keys.d.ts.map +0 -1
- package/dist/api-keys.js.map +0 -1
- package/dist/assets-library.d.ts.map +0 -1
- package/dist/assets-library.js.map +0 -1
- package/dist/audit-logs.d.ts.map +0 -1
- package/dist/audit-logs.js.map +0 -1
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/blog.d.ts.map +0 -1
- package/dist/blog.js.map +0 -1
- package/dist/capabilities.d.ts.map +0 -1
- package/dist/capabilities.js.map +0 -1
- package/dist/carts.d.ts.map +0 -1
- package/dist/carts.js.map +0 -1
- package/dist/catalog.d.ts.map +0 -1
- package/dist/catalog.js.map +0 -1
- package/dist/cms-brand.d.ts.map +0 -1
- package/dist/cms-brand.js.map +0 -1
- package/dist/cms-contact-form.d.ts.map +0 -1
- package/dist/cms-contact-form.js.map +0 -1
- package/dist/cms.d.ts.map +0 -1
- package/dist/cms.js.map +0 -1
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/comparisons.d.ts.map +0 -1
- package/dist/comparisons.js.map +0 -1
- package/dist/credentials.d.ts.map +0 -1
- package/dist/credentials.js.map +0 -1
- package/dist/credit-limits.d.ts.map +0 -1
- package/dist/credit-limits.js.map +0 -1
- package/dist/crm-rich-text.d.ts.map +0 -1
- package/dist/crm-rich-text.js.map +0 -1
- package/dist/crm.d.ts.map +0 -1
- package/dist/crm.js.map +0 -1
- package/dist/currencies.d.ts.map +0 -1
- package/dist/currencies.js.map +0 -1
- package/dist/custom-fields.d.ts.map +0 -1
- package/dist/custom-fields.js.map +0 -1
- package/dist/customer-accounts.d.ts.map +0 -1
- package/dist/customer-accounts.js.map +0 -1
- package/dist/customers.d.ts.map +0 -1
- package/dist/customers.js.map +0 -1
- package/dist/dictionary.d.ts.map +0 -1
- package/dist/dictionary.js.map +0 -1
- package/dist/document-templates.d.ts.map +0 -1
- package/dist/document-templates.js.map +0 -1
- package/dist/document-values.d.ts.map +0 -1
- package/dist/document-values.js.map +0 -1
- package/dist/email-address.d.ts.map +0 -1
- package/dist/email-address.js.map +0 -1
- package/dist/email.d.ts.map +0 -1
- package/dist/email.js.map +0 -1
- package/dist/envelopes.d.ts.map +0 -1
- package/dist/envelopes.js.map +0 -1
- package/dist/environment-inputs.d.ts.map +0 -1
- package/dist/environment-inputs.js.map +0 -1
- package/dist/erp-connector.d.ts.map +0 -1
- package/dist/erp-connector.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/forms-logic.d.ts.map +0 -1
- package/dist/forms-logic.fixtures.d.ts.map +0 -1
- package/dist/forms-logic.fixtures.js.map +0 -1
- package/dist/forms-logic.js.map +0 -1
- package/dist/forms.d.ts.map +0 -1
- package/dist/forms.js.map +0 -1
- package/dist/google-analytics.d.ts.map +0 -1
- package/dist/google-analytics.js.map +0 -1
- package/dist/google-tag-manager.d.ts.map +0 -1
- package/dist/google-tag-manager.js.map +0 -1
- package/dist/i18n.d.ts.map +0 -1
- package/dist/i18n.js.map +0 -1
- package/dist/import-export.d.ts.map +0 -1
- package/dist/import-export.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inventory.d.ts.map +0 -1
- package/dist/inventory.js.map +0 -1
- package/dist/invoice-ledger.d.ts.map +0 -1
- package/dist/invoice-ledger.js.map +0 -1
- package/dist/invoices.d.ts.map +0 -1
- package/dist/invoices.js.map +0 -1
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js.map +0 -1
- package/dist/languages.d.ts.map +0 -1
- package/dist/languages.js.map +0 -1
- package/dist/line-groups.d.ts.map +0 -1
- package/dist/line-groups.js.map +0 -1
- package/dist/linkedin-ads.d.ts.map +0 -1
- package/dist/linkedin-ads.js.map +0 -1
- package/dist/localized-name.d.ts.map +0 -1
- package/dist/localized-name.js.map +0 -1
- package/dist/megamenu.d.ts.map +0 -1
- package/dist/megamenu.js.map +0 -1
- package/dist/meta-ads.d.ts.map +0 -1
- package/dist/meta-ads.js.map +0 -1
- package/dist/mfa.d.ts.map +0 -1
- package/dist/mfa.js.map +0 -1
- package/dist/modules.d.ts.map +0 -1
- package/dist/modules.js.map +0 -1
- package/dist/money-decimal.d.ts.map +0 -1
- package/dist/money-decimal.js.map +0 -1
- package/dist/money-input.d.ts.map +0 -1
- package/dist/money-input.js.map +0 -1
- package/dist/newsletter.d.ts.map +0 -1
- package/dist/newsletter.js.map +0 -1
- package/dist/order-minimums.d.ts.map +0 -1
- package/dist/order-minimums.js.map +0 -1
- package/dist/orders.d.ts.map +0 -1
- package/dist/orders.js.map +0 -1
- package/dist/organization-registry-lookup.d.ts.map +0 -1
- package/dist/organization-registry-lookup.js.map +0 -1
- package/dist/organization-roles.d.ts.map +0 -1
- package/dist/organization-roles.js.map +0 -1
- package/dist/organizations.d.ts.map +0 -1
- package/dist/organizations.js.map +0 -1
- package/dist/page-builder-props.d.ts.map +0 -1
- package/dist/page-builder-props.js.map +0 -1
- package/dist/page-builder-values.d.ts.map +0 -1
- package/dist/page-builder-values.js.map +0 -1
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/payment-methods.d.ts.map +0 -1
- package/dist/payment-methods.js.map +0 -1
- package/dist/payment-return-url.d.ts.map +0 -1
- package/dist/payment-return-url.js.map +0 -1
- package/dist/payments.d.ts.map +0 -1
- package/dist/payments.js.map +0 -1
- package/dist/pim-connector.d.ts.map +0 -1
- package/dist/pim-connector.js.map +0 -1
- package/dist/pim-field-path.d.ts.map +0 -1
- package/dist/pim-field-path.js.map +0 -1
- package/dist/pim-locale-mapping.d.ts.map +0 -1
- package/dist/pim-locale-mapping.js.map +0 -1
- package/dist/platform-info.d.ts.map +0 -1
- package/dist/platform-info.js.map +0 -1
- package/dist/platform-language.d.ts.map +0 -1
- package/dist/platform-language.js.map +0 -1
- package/dist/price-book-decimal.d.ts.map +0 -1
- package/dist/price-book-decimal.js.map +0 -1
- package/dist/price-books.d.ts.map +0 -1
- package/dist/price-books.js.map +0 -1
- package/dist/price-lists.d.ts.map +0 -1
- package/dist/price-lists.js.map +0 -1
- package/dist/product-feeds.d.ts.map +0 -1
- package/dist/product-feeds.js.map +0 -1
- package/dist/product-scope-model.d.ts.map +0 -1
- package/dist/product-scope-model.js.map +0 -1
- package/dist/product-scope-overrides.d.ts.map +0 -1
- package/dist/product-scope-overrides.js.map +0 -1
- package/dist/product-scoped-values.d.ts.map +0 -1
- package/dist/product-scoped-values.js.map +0 -1
- package/dist/product-scopes.d.ts.map +0 -1
- package/dist/product-scopes.js.map +0 -1
- package/dist/product-summary-text.d.ts.map +0 -1
- package/dist/product-summary-text.js.map +0 -1
- package/dist/product-tax-rates.d.ts.map +0 -1
- package/dist/product-tax-rates.js.map +0 -1
- package/dist/product-url-keys.d.ts.map +0 -1
- package/dist/product-url-keys.js.map +0 -1
- package/dist/product-value-resolver.d.ts.map +0 -1
- package/dist/product-value-resolver.js.map +0 -1
- package/dist/projects.d.ts.map +0 -1
- package/dist/projects.js.map +0 -1
- package/dist/promotions.d.ts.map +0 -1
- package/dist/promotions.js.map +0 -1
- package/dist/prompt-actions.d.ts.map +0 -1
- package/dist/prompt-actions.js.map +0 -1
- package/dist/pwa.d.ts.map +0 -1
- package/dist/pwa.js.map +0 -1
- package/dist/quick-order.d.ts.map +0 -1
- package/dist/quick-order.js.map +0 -1
- package/dist/quote-requests.d.ts.map +0 -1
- package/dist/quote-requests.js.map +0 -1
- package/dist/record-references.d.ts.map +0 -1
- package/dist/record-references.js.map +0 -1
- package/dist/record-rich-text.d.ts.map +0 -1
- package/dist/record-rich-text.js.map +0 -1
- package/dist/returns.d.ts.map +0 -1
- package/dist/returns.js.map +0 -1
- package/dist/sales-channels.d.ts.map +0 -1
- package/dist/sales-channels.js.map +0 -1
- package/dist/saved-list-views.d.ts.map +0 -1
- package/dist/saved-list-views.js.map +0 -1
- package/dist/scope-notice.d.ts.map +0 -1
- package/dist/scope-notice.js.map +0 -1
- package/dist/scoped-write-encoding.d.ts.map +0 -1
- package/dist/scoped-write-encoding.js.map +0 -1
- package/dist/search.d.ts.map +0 -1
- package/dist/search.js.map +0 -1
- package/dist/seo.d.ts.map +0 -1
- package/dist/seo.js.map +0 -1
- package/dist/settings.d.ts.map +0 -1
- package/dist/settings.js.map +0 -1
- package/dist/shipments.d.ts.map +0 -1
- package/dist/shipments.js.map +0 -1
- package/dist/shipping-methods.d.ts.map +0 -1
- package/dist/shipping-methods.js.map +0 -1
- package/dist/shopping-lists.d.ts.map +0 -1
- package/dist/shopping-lists.js.map +0 -1
- package/dist/storefront-cache-tags.d.ts.map +0 -1
- package/dist/storefront-cache-tags.js.map +0 -1
- package/dist/storefront-language-path.d.ts.map +0 -1
- package/dist/storefront-language-path.js.map +0 -1
- package/dist/storefront-value-overrides.d.ts.map +0 -1
- package/dist/storefront-value-overrides.js.map +0 -1
- package/dist/tasks.d.ts.map +0 -1
- package/dist/tasks.js.map +0 -1
- package/dist/taxes.d.ts.map +0 -1
- package/dist/taxes.js.map +0 -1
- package/dist/text-normalization.d.ts.map +0 -1
- package/dist/text-normalization.js.map +0 -1
- package/dist/transactional-emails.d.ts.map +0 -1
- package/dist/transactional-emails.js.map +0 -1
- package/dist/webhooks.d.ts.map +0 -1
- package/dist/webhooks.js.map +0 -1
package/dist/i18n.d.ts
CHANGED
|
@@ -9,6 +9,22 @@ export declare const languageSchema: z.ZodObject<{
|
|
|
9
9
|
updatedAt: z.ZodString;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export type Language = z.infer<typeof languageSchema>;
|
|
12
|
+
/**
|
|
13
|
+
* `GET /api/v1/admin/languages` — every language row, active or not, the
|
|
14
|
+
* available catalogue included (issue #599).
|
|
15
|
+
*/
|
|
16
|
+
export declare const languageListResponseSchema: z.ZodObject<{
|
|
17
|
+
data: z.ZodArray<z.ZodObject<{
|
|
18
|
+
code: z.ZodString;
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
isDefault: z.ZodBoolean;
|
|
21
|
+
isActive: z.ZodBoolean;
|
|
22
|
+
sortOrder: z.ZodNumber;
|
|
23
|
+
createdAt: z.ZodString;
|
|
24
|
+
updatedAt: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type LanguageListResponse = z.infer<typeof languageListResponseSchema>;
|
|
12
28
|
export declare const upsertLanguageRequestSchema: z.ZodObject<{
|
|
13
29
|
label: z.ZodString;
|
|
14
30
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -28,6 +44,24 @@ export declare const currencySchema: z.ZodObject<{
|
|
|
28
44
|
updatedAt: z.ZodString;
|
|
29
45
|
}, z.core.$strip>;
|
|
30
46
|
export type Currency = z.infer<typeof currencySchema>;
|
|
47
|
+
/**
|
|
48
|
+
* `GET /api/v1/admin/currencies` — every currency, active or not (issue #599).
|
|
49
|
+
* The rows are `currencySchema`: the catalogue's `symbolPosition` and
|
|
50
|
+
* `decimalPlaces` are `dictionaries`' admin screen to answer, not this one.
|
|
51
|
+
*/
|
|
52
|
+
export declare const currencyListResponseSchema: z.ZodObject<{
|
|
53
|
+
data: z.ZodArray<z.ZodObject<{
|
|
54
|
+
code: z.ZodString;
|
|
55
|
+
label: z.ZodString;
|
|
56
|
+
symbol: z.ZodString;
|
|
57
|
+
isDefault: z.ZodBoolean;
|
|
58
|
+
isActive: z.ZodBoolean;
|
|
59
|
+
sortOrder: z.ZodNumber;
|
|
60
|
+
createdAt: z.ZodString;
|
|
61
|
+
updatedAt: z.ZodString;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type CurrencyListResponse = z.infer<typeof currencyListResponseSchema>;
|
|
31
65
|
export declare const upsertCurrencyRequestSchema: z.ZodObject<{
|
|
32
66
|
label: z.ZodString;
|
|
33
67
|
symbol: z.ZodString;
|
package/dist/i18n.js
CHANGED
|
@@ -18,6 +18,13 @@ export const languageSchema = z.object({
|
|
|
18
18
|
createdAt: isoDateTimeSchema,
|
|
19
19
|
updatedAt: isoDateTimeSchema,
|
|
20
20
|
});
|
|
21
|
+
/**
|
|
22
|
+
* `GET /api/v1/admin/languages` — every language row, active or not, the
|
|
23
|
+
* available catalogue included (issue #599).
|
|
24
|
+
*/
|
|
25
|
+
export const languageListResponseSchema = z.object({
|
|
26
|
+
data: z.array(languageSchema),
|
|
27
|
+
});
|
|
21
28
|
export const upsertLanguageRequestSchema = z.object({
|
|
22
29
|
label: z.string().min(1).max(64),
|
|
23
30
|
isActive: z.boolean().optional(),
|
|
@@ -36,6 +43,14 @@ export const currencySchema = z.object({
|
|
|
36
43
|
createdAt: isoDateTimeSchema,
|
|
37
44
|
updatedAt: isoDateTimeSchema,
|
|
38
45
|
});
|
|
46
|
+
/**
|
|
47
|
+
* `GET /api/v1/admin/currencies` — every currency, active or not (issue #599).
|
|
48
|
+
* The rows are `currencySchema`: the catalogue's `symbolPosition` and
|
|
49
|
+
* `decimalPlaces` are `dictionaries`' admin screen to answer, not this one.
|
|
50
|
+
*/
|
|
51
|
+
export const currencyListResponseSchema = z.object({
|
|
52
|
+
data: z.array(currencySchema),
|
|
53
|
+
});
|
|
39
54
|
export const upsertCurrencyRequestSchema = z.object({
|
|
40
55
|
label: z.string().min(1).max(64),
|
|
41
56
|
symbol: z.string().min(1).max(8),
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './common.js';
|
|
|
6
6
|
export * from './scope-notice.js';
|
|
7
7
|
export * from './catalog.js';
|
|
8
8
|
export * from './order-minimums.js';
|
|
9
|
+
export * from './line-bounds.js';
|
|
9
10
|
export * from './localized-name.js';
|
|
10
11
|
export * from './product-summary-text.js';
|
|
11
12
|
export * from './line-groups.js';
|
|
@@ -45,8 +46,9 @@ export * from './analytics.js';
|
|
|
45
46
|
export * from './seo.js';
|
|
46
47
|
export * from './i18n.js';
|
|
47
48
|
export * from './platform-language.js';
|
|
49
|
+
export * from './accept-language.js';
|
|
48
50
|
export * from './admin-i18n.js';
|
|
49
|
-
export { cmsPageStatusSchema, cmsContentEnvelopeSchema, cmsPageSummarySchema, cmsBreadcrumbsSchemeSchema, cmsPageDetailSchema, createCmsPageRequestSchema, patchCmsPageRequestSchema, putCmsPageContentRequestSchema, cmsBlockSummarySchema, cmsBlockDetailSchema, createCmsBlockRequestSchema, patchCmsBlockRequestSchema, cmsTemplateSummarySchema, cmsTemplateDetailSchema, createCmsTemplateRequestSchema, patchCmsTemplateRequestSchema, cmsHookSummarySchema, cmsHookDetailSchema, createCmsHookRequestSchema, patchCmsHookRequestSchema, cmsHookAttachmentRequestSchema, cmsFieldDescriptorSchema, cmsPageBuilderDescriptorSchema, blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema, cmsPageIndexEntrySchema, cmsPageIndexResponseSchema, cmsReservedSegmentsResponseSchema, firstSlugSegment, CMS_PAGE_PATH_MAX_LEVELS, cmsPagePublicPaths, type CmsPagePathNode, cmsPageTranslationSchema, cmsPageTranslationsSchema, cmsLocalizedPage, cmsPageUrl, type CmsPageTranslation, type CmsPageTranslations, type CmsLocalizablePage, type CmsPageUrlInput, translatablePathRe, blockTranslatableTextSchema, blockTranslatableSchema, CMS_TRANSLATION_MAX_SOURCE_CHARACTERS_BOUNDS, CMS_TRANSLATION_DEFAULT_MAX_SOURCE_CHARACTERS, cmsPageBuilderTranslationStatusSchema, cmsPageBuilderTranslationCapabilitySchema, cmsPuckDataSchema, cmsPageBuilderTranslationScopeSchema, cmsPageBuilderTranslateRequestSchema, cmsPageBuilderTranslateResponseSchema, type BlockTranslatableText, type CmsPageBuilderTranslationStatus, type CmsPageBuilderTranslationCapability, type CmsPuckData, type CmsPageBuilderTranslationScope, type CmsPageBuilderTranslateRequest, type CmsPageBuilderTranslateResponse, type CmsPageStatus, type CmsContentEnvelope, type CmsPageSummary, type CmsBreadcrumbsScheme, type CmsPageDetail, type CreateCmsPageRequest, type PatchCmsPageRequest, type PutCmsPageContentRequest, type CmsBlockSummary, type CmsBlockDetail, type CreateCmsBlockRequest, type PatchCmsBlockRequest, type CmsTemplateSummary, type CmsTemplateDetail, type CreateCmsTemplateRequest, type PatchCmsTemplateRequest, type CmsHookSummary, type CmsHookDetail, type CreateCmsHookRequest, type PatchCmsHookRequest, type CmsHookAttachmentRequest, type CmsFieldDescriptor, type CmsPageBuilderDescriptor, type BlockDefinition, type BlockCategory, type CmsColorPaletteEntry, type CmsColorPalette, type PutCmsColorPaletteRequest, type CmsAssetEmbedResolution, type CmsResolvedBlock, type CmsResolvedTemplate, type CmsResolvedPage, type CmsResolvedHook, type CmsPageIndexEntry, type CmsPageIndexResponse, type CmsReservedSegmentsResponse, type CmsReference, type CmsExternalReferenceScanner, type CmsReferenceRegistryPort, type CmsPageRecord, type CmsPageReadPort, type CmsReservedSegmentContributor, type CmsReservedSegmentRegistryPort, type CmsPageStorefrontLink, type CmsPageStorefrontLinkScope, type CmsSeededBlock, type CmsBlockSeedPort, type CmsBlockRecord, type CmsLocalizedBlockRecord, type CmsBlockReadPort, } from './cms.js';
|
|
51
|
+
export { cmsPageStatusSchema, cmsContentEnvelopeSchema, cmsPageSummarySchema, cmsBreadcrumbsSchemeSchema, cmsPageDetailSchema, createCmsPageRequestSchema, patchCmsPageRequestSchema, putCmsPageContentRequestSchema, cmsBlockSummarySchema, cmsBlockDetailSchema, createCmsBlockRequestSchema, patchCmsBlockRequestSchema, cmsTemplateSummarySchema, cmsTemplateDetailSchema, createCmsTemplateRequestSchema, patchCmsTemplateRequestSchema, cmsHookSummarySchema, cmsHookDetailSchema, createCmsHookRequestSchema, patchCmsHookRequestSchema, cmsHookAttachmentRequestSchema, cmsFieldDescriptorSchema, cmsPageBuilderDescriptorSchema, blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedBlockByCodeSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema, cmsPageIndexEntrySchema, cmsPageIndexResponseSchema, cmsReservedSegmentsResponseSchema, firstSlugSegment, CMS_PAGE_PATH_MAX_LEVELS, cmsPagePublicPaths, type CmsPagePathNode, cmsPageTranslationSchema, cmsPageTranslationsSchema, cmsLocalizedPage, cmsPageUrl, type CmsPageTranslation, type CmsPageTranslations, type CmsLocalizablePage, type CmsPageUrlInput, translatablePathRe, blockTranslatableTextSchema, blockTranslatableSchema, CMS_TRANSLATION_MAX_SOURCE_CHARACTERS_BOUNDS, CMS_TRANSLATION_DEFAULT_MAX_SOURCE_CHARACTERS, cmsPageBuilderTranslationStatusSchema, cmsPageBuilderTranslationCapabilitySchema, cmsPuckDataSchema, cmsPageBuilderTranslationScopeSchema, cmsPageBuilderTranslateRequestSchema, cmsPageBuilderTranslateResponseSchema, type BlockTranslatableText, type CmsPageBuilderTranslationStatus, type CmsPageBuilderTranslationCapability, type CmsPuckData, type CmsPageBuilderTranslationScope, type CmsPageBuilderTranslateRequest, type CmsPageBuilderTranslateResponse, type CmsPageStatus, type CmsContentEnvelope, type CmsPageSummary, type CmsBreadcrumbsScheme, type CmsPageDetail, type CreateCmsPageRequest, type PatchCmsPageRequest, type PutCmsPageContentRequest, type CmsBlockSummary, type CmsBlockDetail, type CreateCmsBlockRequest, type PatchCmsBlockRequest, type CmsTemplateSummary, type CmsTemplateDetail, type CreateCmsTemplateRequest, type PatchCmsTemplateRequest, type CmsHookSummary, type CmsHookDetail, type CreateCmsHookRequest, type PatchCmsHookRequest, type CmsHookAttachmentRequest, type CmsFieldDescriptor, type CmsPageBuilderDescriptor, type BlockDefinition, type BlockCategory, type CmsColorPaletteEntry, type CmsColorPalette, type PutCmsColorPaletteRequest, type CmsAssetEmbedResolution, type CmsResolvedBlock, type CmsResolvedBlockByCode, type CmsResolvedTemplate, type CmsResolvedPage, type CmsResolvedHook, type CmsPageIndexEntry, type CmsPageIndexResponse, type CmsReservedSegmentsResponse, type CmsReference, type CmsExternalReferenceScanner, type CmsReferenceRegistryPort, type CmsPageRecord, type CmsPageReadPort, type CmsReservedSegmentContributor, type CmsReservedSegmentRegistryPort, type CmsPageStorefrontLink, type CmsPageStorefrontLinkScope, type CmsSeededBlock, type CmsBlockSeedPort, type CmsBlockRecord, type CmsLocalizedBlockRecord, type CmsBlockReadPort, } from './cms.js';
|
|
50
52
|
export * from './page-builder-props.js';
|
|
51
53
|
export * from './cms-brand.js';
|
|
52
54
|
export * from './cms-contact-form.js';
|
|
@@ -62,6 +64,8 @@ export * from './storefront-cache-tags.js';
|
|
|
62
64
|
export * from './blog.js';
|
|
63
65
|
export * from './dictionary.js';
|
|
64
66
|
export * from './modules.js';
|
|
67
|
+
export * from './command-hooks.js';
|
|
68
|
+
export * from './organization-hooks.js';
|
|
65
69
|
export * from './platform-info.js';
|
|
66
70
|
export * from './admin-feedback.js';
|
|
67
71
|
export * from './admin-actions.js';
|
|
@@ -108,6 +112,7 @@ export * from './admin-users.js';
|
|
|
108
112
|
export * from './addresses.js';
|
|
109
113
|
export * from './shipments.js';
|
|
110
114
|
export * from './admin-notifications.js';
|
|
115
|
+
export * from './customer-notifications.js';
|
|
111
116
|
export * from './audit-logs.js';
|
|
112
117
|
export * from './import-export.js';
|
|
113
118
|
export * from './text-normalization.js';
|
|
@@ -117,4 +122,5 @@ export * from './admin-search.js';
|
|
|
117
122
|
export * from './document-templates.js';
|
|
118
123
|
export * from './forms.js';
|
|
119
124
|
export * from './forms-logic.js';
|
|
125
|
+
export * from './schema-extensions.js';
|
|
120
126
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,8 @@ export * from './scope-notice.js';
|
|
|
16
16
|
export * from './catalog.js';
|
|
17
17
|
// Feature 155 — the minimum-order rule (specs/155-catalog-order-constraints/).
|
|
18
18
|
export * from './order-minimums.js';
|
|
19
|
+
// Issue #351 — the line quantity and line count bounds every line-carrying request shares.
|
|
20
|
+
export * from './line-bounds.js';
|
|
19
21
|
export * from './localized-name.js';
|
|
20
22
|
// Feature 163, T196 — the product card's summary, shared by the catalogue and the page editor's preview.
|
|
21
23
|
export * from './product-summary-text.js';
|
|
@@ -67,6 +69,7 @@ export * from './analytics.js';
|
|
|
67
69
|
export * from './seo.js';
|
|
68
70
|
export * from './i18n.js';
|
|
69
71
|
export * from './platform-language.js';
|
|
72
|
+
export * from './accept-language.js';
|
|
70
73
|
export * from './admin-i18n.js';
|
|
71
74
|
export {
|
|
72
75
|
// `cmsPageStatusSchema` and `CmsPageStatus` are on this list because feature
|
|
@@ -79,7 +82,7 @@ cmsPageStatusSchema, cmsContentEnvelopeSchema, cmsPageSummarySchema, cmsBreadcru
|
|
|
79
82
|
// Feature 096 — the Page Builder block vocabulary. `blockNameRe` is the one
|
|
80
83
|
// authored copy of the persisted-name grammar; `page-builder-core` imports it
|
|
81
84
|
// rather than restating it.
|
|
82
|
-
blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema,
|
|
85
|
+
blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedBlockByCodeSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema,
|
|
83
86
|
// Feature 105, Phase 3 — what the shop advertises to a crawler.
|
|
84
87
|
cmsPageIndexEntrySchema, cmsPageIndexResponseSchema,
|
|
85
88
|
// Feature 105, Phase 4 — the reserved set the editor and the refusal share.
|
|
@@ -109,6 +112,9 @@ export * from './storefront-cache-tags.js';
|
|
|
109
112
|
export * from './blog.js';
|
|
110
113
|
export * from './dictionary.js';
|
|
111
114
|
export * from './modules.js';
|
|
115
|
+
// `specs/176-command-hooks-outbox/` P2 — command-hook refs, and `organizations`' first four.
|
|
116
|
+
export * from './command-hooks.js';
|
|
117
|
+
export * from './organization-hooks.js';
|
|
112
118
|
export * from './platform-info.js';
|
|
113
119
|
export * from './admin-feedback.js';
|
|
114
120
|
export * from './admin-actions.js';
|
|
@@ -167,6 +173,8 @@ export * from './admin-users.js';
|
|
|
167
173
|
export * from './addresses.js';
|
|
168
174
|
export * from './shipments.js';
|
|
169
175
|
export * from './admin-notifications.js';
|
|
176
|
+
// The buyer's notification centre (feature 179): port types + storefront API shapes.
|
|
177
|
+
export * from './customer-notifications.js';
|
|
170
178
|
// The audit-log reference registry (feature 075, D-87 drain). Not an API shape:
|
|
171
179
|
// the in-process seam each module answers "what is this row of mine called, and
|
|
172
180
|
// where does the admin app show it?" through.
|
|
@@ -198,4 +206,7 @@ export * from './document-templates.js';
|
|
|
198
206
|
// storefront renderer and the admin preview all run (research R-5).
|
|
199
207
|
export * from './forms.js';
|
|
200
208
|
export * from './forms-logic.js';
|
|
209
|
+
// Declared extension columns on core tables (`specs/178-extensible-columns/`): the
|
|
210
|
+
// `?extensions=` query parameter and the `extensions` attribute of an admin read.
|
|
211
|
+
export * from './schema-extensions.js';
|
|
201
212
|
//# sourceMappingURL=index.js.map
|
package/dist/invoice-ledger.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ export declare const invoiceLedgerDeliveryStatusSchema: z.ZodEnum<{
|
|
|
32
32
|
failed: "failed";
|
|
33
33
|
queued: "queued";
|
|
34
34
|
succeeded: "succeeded";
|
|
35
|
-
awaiting_remote: "awaiting_remote";
|
|
36
35
|
dead: "dead";
|
|
36
|
+
awaiting_remote: "awaiting_remote";
|
|
37
37
|
}>;
|
|
38
38
|
export type InvoiceLedgerDeliveryStatus = z.infer<typeof invoiceLedgerDeliveryStatusSchema>;
|
|
39
39
|
export declare const INVOICE_LEDGER_DELIVERY_KINDS: readonly ["invoice", "correction"];
|
|
@@ -103,8 +103,8 @@ export declare const invoiceLedgerDeliveryAttemptSchema: z.ZodObject<{
|
|
|
103
103
|
failed: "failed";
|
|
104
104
|
queued: "queued";
|
|
105
105
|
succeeded: "succeeded";
|
|
106
|
-
awaiting_remote: "awaiting_remote";
|
|
107
106
|
dead: "dead";
|
|
107
|
+
awaiting_remote: "awaiting_remote";
|
|
108
108
|
}>;
|
|
109
109
|
at: z.ZodString;
|
|
110
110
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -137,8 +137,8 @@ export declare const ledgerDeliveryRecordSchema: z.ZodObject<{
|
|
|
137
137
|
failed: "failed";
|
|
138
138
|
queued: "queued";
|
|
139
139
|
succeeded: "succeeded";
|
|
140
|
-
awaiting_remote: "awaiting_remote";
|
|
141
140
|
dead: "dead";
|
|
141
|
+
awaiting_remote: "awaiting_remote";
|
|
142
142
|
}>;
|
|
143
143
|
asyncTaskId: z.ZodNullable<z.ZodString>;
|
|
144
144
|
remoteDocumentId: z.ZodNullable<z.ZodString>;
|
|
@@ -149,8 +149,8 @@ export declare const ledgerDeliveryRecordSchema: z.ZodObject<{
|
|
|
149
149
|
failed: "failed";
|
|
150
150
|
queued: "queued";
|
|
151
151
|
succeeded: "succeeded";
|
|
152
|
-
awaiting_remote: "awaiting_remote";
|
|
153
152
|
dead: "dead";
|
|
153
|
+
awaiting_remote: "awaiting_remote";
|
|
154
154
|
}>;
|
|
155
155
|
at: z.ZodString;
|
|
156
156
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -339,8 +339,8 @@ export declare const invoiceLedgerDeliveryListItemSchema: z.ZodObject<{
|
|
|
339
339
|
failed: "failed";
|
|
340
340
|
queued: "queued";
|
|
341
341
|
succeeded: "succeeded";
|
|
342
|
-
awaiting_remote: "awaiting_remote";
|
|
343
342
|
dead: "dead";
|
|
343
|
+
awaiting_remote: "awaiting_remote";
|
|
344
344
|
}>;
|
|
345
345
|
lastError: z.ZodNullable<z.ZodString>;
|
|
346
346
|
environment: z.ZodString;
|
|
@@ -356,8 +356,8 @@ export declare const invoiceLedgerDeliveryListQuerySchema: z.ZodObject<{
|
|
|
356
356
|
failed: "failed";
|
|
357
357
|
queued: "queued";
|
|
358
358
|
succeeded: "succeeded";
|
|
359
|
-
awaiting_remote: "awaiting_remote";
|
|
360
359
|
dead: "dead";
|
|
360
|
+
awaiting_remote: "awaiting_remote";
|
|
361
361
|
}>>;
|
|
362
362
|
salesChannelId: z.ZodOptional<z.ZodString>;
|
|
363
363
|
invoiceId: z.ZodOptional<z.ZodString>;
|
package/dist/invoices.d.ts
CHANGED
|
@@ -224,6 +224,104 @@ export declare const invoiceDetailSchema: z.ZodObject<{
|
|
|
224
224
|
}, z.core.$strip>;
|
|
225
225
|
}, z.core.$strip>;
|
|
226
226
|
export type InvoiceDetail = z.infer<typeof invoiceDetailSchema>;
|
|
227
|
+
/**
|
|
228
|
+
* One row of `GET /api/v1/admin/invoices` (issue #599). A platform invoice
|
|
229
|
+
* carries its order; an ERP-imported sale document may have none, and then
|
|
230
|
+
* `orderId` and `orderBusinessId` are both `null`.
|
|
231
|
+
*/
|
|
232
|
+
export declare const adminInvoiceListItemSchema: z.ZodObject<{
|
|
233
|
+
id: z.ZodString;
|
|
234
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
235
|
+
orderBusinessId: z.ZodNullable<z.ZodString>;
|
|
236
|
+
salesChannelId: z.ZodNullable<z.ZodString>;
|
|
237
|
+
kind: z.ZodEnum<{
|
|
238
|
+
invoice: "invoice";
|
|
239
|
+
proforma: "proforma";
|
|
240
|
+
correction: "correction";
|
|
241
|
+
wz: "wz";
|
|
242
|
+
}>;
|
|
243
|
+
number: z.ZodString;
|
|
244
|
+
issuedAt: z.ZodString;
|
|
245
|
+
currency: z.ZodString;
|
|
246
|
+
total: z.ZodNumber;
|
|
247
|
+
status: z.ZodEnum<{
|
|
248
|
+
pending: "pending";
|
|
249
|
+
cancelled: "cancelled";
|
|
250
|
+
ready: "ready";
|
|
251
|
+
}>;
|
|
252
|
+
pdfReady: z.ZodBoolean;
|
|
253
|
+
createdAt: z.ZodString;
|
|
254
|
+
updatedAt: z.ZodString;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
export type AdminInvoiceListItem = z.infer<typeof adminInvoiceListItemSchema>;
|
|
257
|
+
export declare const adminInvoiceListResponseSchema: z.ZodObject<{
|
|
258
|
+
data: z.ZodArray<z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
261
|
+
orderBusinessId: z.ZodNullable<z.ZodString>;
|
|
262
|
+
salesChannelId: z.ZodNullable<z.ZodString>;
|
|
263
|
+
kind: z.ZodEnum<{
|
|
264
|
+
invoice: "invoice";
|
|
265
|
+
proforma: "proforma";
|
|
266
|
+
correction: "correction";
|
|
267
|
+
wz: "wz";
|
|
268
|
+
}>;
|
|
269
|
+
number: z.ZodString;
|
|
270
|
+
issuedAt: z.ZodString;
|
|
271
|
+
currency: z.ZodString;
|
|
272
|
+
total: z.ZodNumber;
|
|
273
|
+
status: z.ZodEnum<{
|
|
274
|
+
pending: "pending";
|
|
275
|
+
cancelled: "cancelled";
|
|
276
|
+
ready: "ready";
|
|
277
|
+
}>;
|
|
278
|
+
pdfReady: z.ZodBoolean;
|
|
279
|
+
createdAt: z.ZodString;
|
|
280
|
+
updatedAt: z.ZodString;
|
|
281
|
+
}, z.core.$strip>>;
|
|
282
|
+
pagination: z.ZodObject<{
|
|
283
|
+
cursor: z.ZodNullable<z.ZodString>;
|
|
284
|
+
hasMore: z.ZodBoolean;
|
|
285
|
+
limit: z.ZodNumber;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
}, z.core.$strip>;
|
|
288
|
+
export type AdminInvoiceListResponse = z.infer<typeof adminInvoiceListResponseSchema>;
|
|
289
|
+
/**
|
|
290
|
+
* One row of `GET /api/v1/orders/:id/invoices` — a `ready` invoice of an order
|
|
291
|
+
* the buyer may read (issue #599). `downloadHref` is the API path of its PDF.
|
|
292
|
+
*/
|
|
293
|
+
export declare const orderInvoiceListItemSchema: z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
kind: z.ZodEnum<{
|
|
296
|
+
invoice: "invoice";
|
|
297
|
+
proforma: "proforma";
|
|
298
|
+
correction: "correction";
|
|
299
|
+
wz: "wz";
|
|
300
|
+
}>;
|
|
301
|
+
number: z.ZodString;
|
|
302
|
+
issuedAt: z.ZodString;
|
|
303
|
+
currency: z.ZodString;
|
|
304
|
+
total: z.ZodNumber;
|
|
305
|
+
downloadHref: z.ZodString;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
export type OrderInvoiceListItem = z.infer<typeof orderInvoiceListItemSchema>;
|
|
308
|
+
export declare const orderInvoiceListResponseSchema: z.ZodObject<{
|
|
309
|
+
data: z.ZodArray<z.ZodObject<{
|
|
310
|
+
id: z.ZodString;
|
|
311
|
+
kind: z.ZodEnum<{
|
|
312
|
+
invoice: "invoice";
|
|
313
|
+
proforma: "proforma";
|
|
314
|
+
correction: "correction";
|
|
315
|
+
wz: "wz";
|
|
316
|
+
}>;
|
|
317
|
+
number: z.ZodString;
|
|
318
|
+
issuedAt: z.ZodString;
|
|
319
|
+
currency: z.ZodString;
|
|
320
|
+
total: z.ZodNumber;
|
|
321
|
+
downloadHref: z.ZodString;
|
|
322
|
+
}, z.core.$strip>>;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
export type OrderInvoiceListResponse = z.infer<typeof orderInvoiceListResponseSchema>;
|
|
227
325
|
/**
|
|
228
326
|
* What `invoices` hands the document render port
|
|
229
327
|
* (`specs/152-compare-pdf-template/contracts/invoice-document.md` §1–§2).
|
|
@@ -861,6 +959,34 @@ export declare const erpSaleDocumentListItemSchema: z.ZodObject<{
|
|
|
861
959
|
}, z.core.$strip>>;
|
|
862
960
|
}, z.core.$strip>;
|
|
863
961
|
export type ErpSaleDocumentListItem = z.infer<typeof erpSaleDocumentListItemSchema>;
|
|
962
|
+
/** `GET /api/v1/account/organization/invoices` — the Organization's ERP-imported sale documents (issue #599). */
|
|
963
|
+
export declare const erpSaleDocumentListResponseSchema: z.ZodObject<{
|
|
964
|
+
data: z.ZodArray<z.ZodObject<{
|
|
965
|
+
id: z.ZodString;
|
|
966
|
+
kind: z.ZodEnum<{
|
|
967
|
+
invoice: "invoice";
|
|
968
|
+
proforma: "proforma";
|
|
969
|
+
correction: "correction";
|
|
970
|
+
wz: "wz";
|
|
971
|
+
}>;
|
|
972
|
+
number: z.ZodString;
|
|
973
|
+
documentKind: z.ZodEnum<{
|
|
974
|
+
invoice: "invoice";
|
|
975
|
+
wz: "wz";
|
|
976
|
+
}>;
|
|
977
|
+
issuedAt: z.ZodString;
|
|
978
|
+
currency: z.ZodString;
|
|
979
|
+
total: z.ZodNumber;
|
|
980
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
981
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
982
|
+
id: z.ZodString;
|
|
983
|
+
fileName: z.ZodString;
|
|
984
|
+
contentType: z.ZodNullable<z.ZodString>;
|
|
985
|
+
downloadHref: z.ZodString;
|
|
986
|
+
}, z.core.$strip>>;
|
|
987
|
+
}, z.core.$strip>>;
|
|
988
|
+
}, z.core.$strip>;
|
|
989
|
+
export type ErpSaleDocumentListResponse = z.infer<typeof erpSaleDocumentListResponseSchema>;
|
|
864
990
|
/**
|
|
865
991
|
* Container name: `erpSaleDocumentWritePort`. Owner: `invoices`.
|
|
866
992
|
*
|
package/dist/invoices.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { isoDateTimeSchema, uuidSchema } from './common.js';
|
|
3
3
|
import { twoDecimalAmountString } from './money-input.js';
|
|
4
|
+
import { paginationSchema } from './pagination.js';
|
|
4
5
|
/**
|
|
5
6
|
* Invoices (FR-080 + feature 047-invoices-module). Produces proforma, VAT
|
|
6
7
|
* invoice, and corrective (credit-note) PDFs against orders. The binary
|
|
@@ -125,6 +126,50 @@ export const invoiceDetailSchema = invoiceSchema.extend({
|
|
|
125
126
|
seller: sellerCompanyDataSchema,
|
|
126
127
|
buyer: invoiceBuyerSchema,
|
|
127
128
|
});
|
|
129
|
+
/**
|
|
130
|
+
* One row of `GET /api/v1/admin/invoices` (issue #599). A platform invoice
|
|
131
|
+
* carries its order; an ERP-imported sale document may have none, and then
|
|
132
|
+
* `orderId` and `orderBusinessId` are both `null`.
|
|
133
|
+
*/
|
|
134
|
+
export const adminInvoiceListItemSchema = z.object({
|
|
135
|
+
id: uuidSchema,
|
|
136
|
+
orderId: uuidSchema.nullable(),
|
|
137
|
+
/** Human-readable order business id (e.g. `ORD-…`); null without an order or when it is gone. */
|
|
138
|
+
orderBusinessId: z.string().nullable(),
|
|
139
|
+
salesChannelId: uuidSchema.nullable(),
|
|
140
|
+
kind: invoiceKindSchema,
|
|
141
|
+
number: z.string(),
|
|
142
|
+
issuedAt: isoDateTimeSchema,
|
|
143
|
+
currency: z.string().length(3),
|
|
144
|
+
/** The gross total. */
|
|
145
|
+
total: z.number().finite(),
|
|
146
|
+
status: invoiceStatusSchema,
|
|
147
|
+
/** `status === 'ready'`: the PDF can be downloaded. */
|
|
148
|
+
pdfReady: z.boolean(),
|
|
149
|
+
createdAt: isoDateTimeSchema,
|
|
150
|
+
updatedAt: isoDateTimeSchema,
|
|
151
|
+
});
|
|
152
|
+
export const adminInvoiceListResponseSchema = z.object({
|
|
153
|
+
data: z.array(adminInvoiceListItemSchema),
|
|
154
|
+
pagination: paginationSchema,
|
|
155
|
+
});
|
|
156
|
+
/**
|
|
157
|
+
* One row of `GET /api/v1/orders/:id/invoices` — a `ready` invoice of an order
|
|
158
|
+
* the buyer may read (issue #599). `downloadHref` is the API path of its PDF.
|
|
159
|
+
*/
|
|
160
|
+
export const orderInvoiceListItemSchema = z.object({
|
|
161
|
+
id: uuidSchema,
|
|
162
|
+
kind: invoiceKindSchema,
|
|
163
|
+
number: z.string(),
|
|
164
|
+
issuedAt: isoDateTimeSchema,
|
|
165
|
+
currency: z.string().length(3),
|
|
166
|
+
/** The gross total. */
|
|
167
|
+
total: z.number().finite(),
|
|
168
|
+
downloadHref: z.string(),
|
|
169
|
+
});
|
|
170
|
+
export const orderInvoiceListResponseSchema = z.object({
|
|
171
|
+
data: z.array(orderInvoiceListItemSchema),
|
|
172
|
+
});
|
|
128
173
|
/**
|
|
129
174
|
* What `invoices` hands the document render port
|
|
130
175
|
* (`specs/152-compare-pdf-template/contracts/invoice-document.md` §1–§2).
|
|
@@ -330,6 +375,10 @@ export const erpSaleDocumentListItemSchema = z.object({
|
|
|
330
375
|
orderId: uuidSchema.nullable(),
|
|
331
376
|
attachments: z.array(erpSaleDocumentAttachmentListItemSchema),
|
|
332
377
|
});
|
|
378
|
+
/** `GET /api/v1/account/organization/invoices` — the Organization's ERP-imported sale documents (issue #599). */
|
|
379
|
+
export const erpSaleDocumentListResponseSchema = z.object({
|
|
380
|
+
data: z.array(erpSaleDocumentListItemSchema),
|
|
381
|
+
});
|
|
333
382
|
// ---------------------------------------------------------------------------
|
|
334
383
|
// ERP attachment fetch — the seam an importing connector contributes to
|
|
335
384
|
// (feature 134, T061; `specs/134-paid-module-extraction/research.md` D12)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Issue #351 — the bounds every request that carries order lines shares.
|
|
4
|
+
*
|
|
5
|
+
* Imports nothing but zod and the order-minimum ceiling, so every
|
|
6
|
+
* request-schema file (`carts`, `orders`, `quote-requests`, `quick-order`,
|
|
7
|
+
* `shopping-lists`, `returns`, `catalog`, `promotions`) can import it without a
|
|
8
|
+
* load-order cycle.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The most pieces one line may carry. The order-minimum ceiling on purpose: the
|
|
12
|
+
* largest minimum a product can carry is still orderable, and a quantity this
|
|
13
|
+
* size is far below the integer column it is stored in and stays exact in any
|
|
14
|
+
* arithmetic done on it before it is stored (totals, per-product sums).
|
|
15
|
+
*/
|
|
16
|
+
export declare const LINE_QUANTITY_MAX = 1000000;
|
|
17
|
+
/**
|
|
18
|
+
* The refusal of a line quantity past {@link LINE_QUANTITY_MAX} (architect
|
|
19
|
+
* ruling R1 on PR #1009). Built like `AMOUNT_PRECISION_EXCEEDED`: a request
|
|
20
|
+
* schema tags the Zod issue with it, and the error envelope
|
|
21
|
+
* (`@endora-commerce/platform/http`) answers a request whose only failures are
|
|
22
|
+
* this one with `400 LINE_QUANTITY_EXCEEDED`, a code it translates —
|
|
23
|
+
* `VALIDATION_FAILED` it never does. A request valid on its own whose line would
|
|
24
|
+
* end past the bound (an add onto an existing basket line, a packaging unit's
|
|
25
|
+
* pieces) is refused by the service with `422 LINE_QUANTITY_EXCEEDED`,
|
|
26
|
+
* `details: { quantity, maximum }`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const LINE_QUANTITY_EXCEEDED: "LINE_QUANTITY_EXCEEDED";
|
|
29
|
+
/**
|
|
30
|
+
* A whole-number schema refusing a value past {@link LINE_QUANTITY_MAX} with the
|
|
31
|
+
* tagged issue. Its own floor (`positive()`, `min(0)`) stays a plain issue.
|
|
32
|
+
*/
|
|
33
|
+
export declare function boundedLineQuantity<T extends z.ZodNumber>(schema: T): T;
|
|
34
|
+
/** A request line's quantity: a whole number in 1…{@link LINE_QUANTITY_MAX}. */
|
|
35
|
+
export declare const lineQuantitySchema: z.ZodNumber;
|
|
36
|
+
/** Whether a Zod issue (or a Fastify-wrapped one, whose `params` carry the issue's) is the line-quantity issue. */
|
|
37
|
+
export declare function isLineQuantityExceededIssue(issue: unknown): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The most lines one request may carry — the basket, quick order, the admin and
|
|
40
|
+
* API order intake, quote requests and returns. **The value is shared; the
|
|
41
|
+
* refusal is not** (architect ruling R2 on PR #1009): the quote request and
|
|
42
|
+
* return schemas bound their arrays with it, so one line more is
|
|
43
|
+
* `400 VALIDATION_FAILED`; the order intakes (admin create and preview,
|
|
44
|
+
* external API) and the quick-order build judge it in their services as their
|
|
45
|
+
* first step, `422 VALIDATION_FAILED` with
|
|
46
|
+
* `details: { code: 'too_many_items', maximum }` — a released contract that
|
|
47
|
+
* their request schemas must not turn into a 400 by adding a `.max()`. The
|
|
48
|
+
* basket's own cap (`CART_MAX_LINES` in `carts`) answers
|
|
49
|
+
* `422 CART_LINE_CAP_EXCEEDED`. `ADMIN_ORDER_MAX_ITEMS` and
|
|
50
|
+
* `QUICK_ORDER_BUILD_MAX_ITEMS` are this constant under their own names.
|
|
51
|
+
*/
|
|
52
|
+
export declare const REQUEST_LINE_ITEMS_MAX = 200;
|
|
53
|
+
//# sourceMappingURL=line-bounds.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ORDER_MINIMUM_MAX } from './order-minimums.js';
|
|
3
|
+
/**
|
|
4
|
+
* Issue #351 — the bounds every request that carries order lines shares.
|
|
5
|
+
*
|
|
6
|
+
* Imports nothing but zod and the order-minimum ceiling, so every
|
|
7
|
+
* request-schema file (`carts`, `orders`, `quote-requests`, `quick-order`,
|
|
8
|
+
* `shopping-lists`, `returns`, `catalog`, `promotions`) can import it without a
|
|
9
|
+
* load-order cycle.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The most pieces one line may carry. The order-minimum ceiling on purpose: the
|
|
13
|
+
* largest minimum a product can carry is still orderable, and a quantity this
|
|
14
|
+
* size is far below the integer column it is stored in and stays exact in any
|
|
15
|
+
* arithmetic done on it before it is stored (totals, per-product sums).
|
|
16
|
+
*/
|
|
17
|
+
export const LINE_QUANTITY_MAX = ORDER_MINIMUM_MAX;
|
|
18
|
+
/**
|
|
19
|
+
* The refusal of a line quantity past {@link LINE_QUANTITY_MAX} (architect
|
|
20
|
+
* ruling R1 on PR #1009). Built like `AMOUNT_PRECISION_EXCEEDED`: a request
|
|
21
|
+
* schema tags the Zod issue with it, and the error envelope
|
|
22
|
+
* (`@endora-commerce/platform/http`) answers a request whose only failures are
|
|
23
|
+
* this one with `400 LINE_QUANTITY_EXCEEDED`, a code it translates —
|
|
24
|
+
* `VALIDATION_FAILED` it never does. A request valid on its own whose line would
|
|
25
|
+
* end past the bound (an add onto an existing basket line, a packaging unit's
|
|
26
|
+
* pieces) is refused by the service with `422 LINE_QUANTITY_EXCEEDED`,
|
|
27
|
+
* `details: { quantity, maximum }`.
|
|
28
|
+
*/
|
|
29
|
+
export const LINE_QUANTITY_EXCEEDED = 'LINE_QUANTITY_EXCEEDED';
|
|
30
|
+
/** A fresh object each time: Zod normalises a refinement's params in place. */
|
|
31
|
+
function lineQuantityIssue() {
|
|
32
|
+
return { message: LINE_QUANTITY_EXCEEDED, params: { code: LINE_QUANTITY_EXCEEDED } };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A whole-number schema refusing a value past {@link LINE_QUANTITY_MAX} with the
|
|
36
|
+
* tagged issue. Its own floor (`positive()`, `min(0)`) stays a plain issue.
|
|
37
|
+
*/
|
|
38
|
+
export function boundedLineQuantity(schema) {
|
|
39
|
+
return schema.refine((value) => value <= LINE_QUANTITY_MAX, lineQuantityIssue());
|
|
40
|
+
}
|
|
41
|
+
/** A request line's quantity: a whole number in 1…{@link LINE_QUANTITY_MAX}. */
|
|
42
|
+
export const lineQuantitySchema = boundedLineQuantity(z.number().int().positive());
|
|
43
|
+
/** Whether a Zod issue (or a Fastify-wrapped one, whose `params` carry the issue's) is the line-quantity issue. */
|
|
44
|
+
export function isLineQuantityExceededIssue(issue) {
|
|
45
|
+
if (!issue || typeof issue !== 'object')
|
|
46
|
+
return false;
|
|
47
|
+
const params = issue.params;
|
|
48
|
+
return params?.code === LINE_QUANTITY_EXCEEDED || params?.params?.code === LINE_QUANTITY_EXCEEDED;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The most lines one request may carry — the basket, quick order, the admin and
|
|
52
|
+
* API order intake, quote requests and returns. **The value is shared; the
|
|
53
|
+
* refusal is not** (architect ruling R2 on PR #1009): the quote request and
|
|
54
|
+
* return schemas bound their arrays with it, so one line more is
|
|
55
|
+
* `400 VALIDATION_FAILED`; the order intakes (admin create and preview,
|
|
56
|
+
* external API) and the quick-order build judge it in their services as their
|
|
57
|
+
* first step, `422 VALIDATION_FAILED` with
|
|
58
|
+
* `details: { code: 'too_many_items', maximum }` — a released contract that
|
|
59
|
+
* their request schemas must not turn into a 400 by adding a `.max()`. The
|
|
60
|
+
* basket's own cap (`CART_MAX_LINES` in `carts`) answers
|
|
61
|
+
* `422 CART_LINE_CAP_EXCEEDED`. `ADMIN_ORDER_MAX_ITEMS` and
|
|
62
|
+
* `QUICK_ORDER_BUILD_MAX_ITEMS` are this constant under their own names.
|
|
63
|
+
*/
|
|
64
|
+
export const REQUEST_LINE_ITEMS_MAX = 200;
|
|
65
|
+
//# sourceMappingURL=line-bounds.js.map
|