@endora-commerce/contracts 0.109.0 → 0.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accept-language.d.ts +31 -0
- package/dist/accept-language.js +64 -0
- package/dist/actor.d.ts +16 -0
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.js +8 -1
- package/dist/admin-actions.d.ts +2 -0
- package/dist/admin-actions.js +18 -0
- package/dist/admin-contributions.d.ts +99 -12
- package/dist/admin-contributions.js +36 -10
- package/dist/admin-roles.d.ts +17 -2
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin.d.ts +114 -4
- package/dist/admin.js +98 -3
- package/dist/api-keys.d.ts +22 -0
- package/dist/api-keys.js +4 -0
- package/dist/assets-library.d.ts +45 -0
- package/dist/assets-library.js +20 -3
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.js +12 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.js +9 -0
- package/dist/blog.d.ts +382 -22
- package/dist/blog.js +199 -17
- package/dist/carts.d.ts +423 -36
- package/dist/carts.js +150 -12
- package/dist/catalog.d.ts +379 -208
- package/dist/catalog.js +241 -163
- package/dist/cms-brand.d.ts +14 -14
- package/dist/cms.d.ts +71 -16
- package/dist/cms.js +15 -0
- package/dist/command-hooks.d.ts +301 -0
- package/dist/command-hooks.js +248 -0
- package/dist/common.d.ts +23 -6
- package/dist/common.js +25 -2
- package/dist/comparisons.d.ts +21 -14
- package/dist/comparisons.js +2 -1
- package/dist/credit-limits.d.ts +22 -0
- package/dist/credit-limits.js +35 -0
- package/dist/crm.d.ts +134 -78
- package/dist/crm.js +21 -5
- package/dist/custom-fields.d.ts +417 -49
- package/dist/custom-fields.js +142 -1
- package/dist/customer-accounts.d.ts +324 -22
- package/dist/customer-accounts.js +43 -0
- package/dist/customer-notifications.d.ts +143 -0
- package/dist/customer-notifications.js +41 -0
- package/dist/customers.d.ts +92 -73
- package/dist/customers.js +98 -10
- package/dist/dictionary.d.ts +53 -0
- package/dist/dictionary.js +25 -0
- package/dist/document-templates.d.ts +12 -12
- package/dist/email.d.ts +34 -0
- package/dist/email.js +6 -0
- package/dist/errors.d.ts +431 -3
- package/dist/errors.js +523 -3
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.js +827 -0
- package/dist/i18n.d.ts +34 -0
- package/dist/i18n.js +15 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.js +60 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +30 -1
- package/dist/inventory.d.ts +9 -9
- package/dist/invoice-ledger.d.ts +13 -13
- package/dist/invoices.d.ts +126 -0
- package/dist/invoices.js +53 -0
- package/dist/line-bounds.d.ts +53 -0
- package/dist/line-bounds.js +65 -0
- package/dist/megamenu.d.ts +27 -27
- package/dist/mfa.d.ts +210 -4
- package/dist/mfa.js +136 -0
- package/dist/modules.d.ts +56 -8
- package/dist/modules.js +128 -3
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.js +95 -0
- package/dist/newsletter.d.ts +4 -4
- package/dist/orders.d.ts +246 -12
- package/dist/orders.js +140 -7
- package/dist/organization-hooks.d.ts +99 -0
- package/dist/organization-hooks.js +22 -0
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-roles.d.ts +341 -0
- package/dist/organization-roles.js +218 -0
- package/dist/organizations.d.ts +1074 -103
- package/dist/organizations.js +293 -28
- package/dist/page-builder-props.d.ts +56 -56
- package/dist/pim-connector.d.ts +7 -3
- package/dist/pim-connector.js +6 -2
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/price-books.d.ts +215 -63
- package/dist/price-books.js +47 -2
- package/dist/price-lists.d.ts +13 -10
- package/dist/product-feeds.d.ts +249 -100
- package/dist/product-feeds.js +46 -2
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scopes.d.ts +199 -64
- package/dist/product-scopes.js +120 -23
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-url-keys.d.ts +51 -45
- package/dist/product-url-keys.js +73 -39
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.js +36 -96
- package/dist/projects.d.ts +76 -28
- package/dist/projects.js +53 -9
- package/dist/promotions.d.ts +163 -11
- package/dist/promotions.js +23 -1
- package/dist/pwa.d.ts +41 -2
- package/dist/quick-order.d.ts +159 -9
- package/dist/quick-order.js +79 -4
- package/dist/quote-requests.d.ts +231 -17
- package/dist/quote-requests.js +111 -9
- package/dist/record-references.d.ts +15 -15
- package/dist/record-references.js +2 -3
- package/dist/record-rich-text.js +2 -1
- package/dist/returns.d.ts +214 -52
- package/dist/returns.js +143 -28
- package/dist/sales-channels.d.ts +34 -3
- package/dist/sales-channels.js +16 -1
- package/dist/saved-list-views.d.ts +28 -0
- package/dist/saved-list-views.js +14 -1
- package/dist/schema-extensions.d.ts +36 -0
- package/dist/schema-extensions.js +29 -0
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/search.d.ts +18 -16
- package/dist/seo.d.ts +83 -30
- package/dist/seo.js +8 -1
- package/dist/settings.d.ts +173 -2
- package/dist/settings.js +53 -2
- package/dist/shopping-lists.d.ts +63 -4
- package/dist/shopping-lists.js +57 -3
- package/dist/storefront-cache-tags.d.ts +22 -0
- package/dist/storefront-cache-tags.js +12 -0
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/tasks.d.ts +27 -27
- package/dist/taxes.d.ts +27 -0
- package/dist/taxes.js +4 -0
- package/dist/transactional-emails.d.ts +48 -22
- package/dist/webhooks.d.ts +75 -0
- package/dist/webhooks.js +24 -0
- package/package.json +5 -3
- package/dist/actor.d.ts.map +0 -1
- package/dist/actor.js.map +0 -1
- package/dist/addresses.d.ts.map +0 -1
- package/dist/addresses.js.map +0 -1
- package/dist/admin-actions.d.ts.map +0 -1
- package/dist/admin-actions.js.map +0 -1
- package/dist/admin-contributions.d.ts.map +0 -1
- package/dist/admin-contributions.js.map +0 -1
- package/dist/admin-feedback.d.ts.map +0 -1
- package/dist/admin-feedback.js.map +0 -1
- package/dist/admin-i18n.d.ts.map +0 -1
- package/dist/admin-i18n.js.map +0 -1
- package/dist/admin-name.d.ts.map +0 -1
- package/dist/admin-name.js.map +0 -1
- package/dist/admin-notifications.d.ts.map +0 -1
- package/dist/admin-notifications.js.map +0 -1
- package/dist/admin-preferences.d.ts.map +0 -1
- package/dist/admin-preferences.js.map +0 -1
- package/dist/admin-roles.d.ts.map +0 -1
- package/dist/admin-roles.js.map +0 -1
- package/dist/admin-search.d.ts.map +0 -1
- package/dist/admin-search.js.map +0 -1
- package/dist/admin-users.d.ts.map +0 -1
- package/dist/admin-users.js.map +0 -1
- package/dist/admin.d.ts.map +0 -1
- package/dist/admin.js.map +0 -1
- package/dist/analytics.d.ts.map +0 -1
- package/dist/analytics.js.map +0 -1
- package/dist/api-keys.d.ts.map +0 -1
- package/dist/api-keys.js.map +0 -1
- package/dist/assets-library.d.ts.map +0 -1
- package/dist/assets-library.js.map +0 -1
- package/dist/audit-logs.d.ts.map +0 -1
- package/dist/audit-logs.js.map +0 -1
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/blog.d.ts.map +0 -1
- package/dist/blog.js.map +0 -1
- package/dist/capabilities.d.ts.map +0 -1
- package/dist/capabilities.js.map +0 -1
- package/dist/carts.d.ts.map +0 -1
- package/dist/carts.js.map +0 -1
- package/dist/catalog.d.ts.map +0 -1
- package/dist/catalog.js.map +0 -1
- package/dist/cms-brand.d.ts.map +0 -1
- package/dist/cms-brand.js.map +0 -1
- package/dist/cms-contact-form.d.ts.map +0 -1
- package/dist/cms-contact-form.js.map +0 -1
- package/dist/cms.d.ts.map +0 -1
- package/dist/cms.js.map +0 -1
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/comparisons.d.ts.map +0 -1
- package/dist/comparisons.js.map +0 -1
- package/dist/credentials.d.ts.map +0 -1
- package/dist/credentials.js.map +0 -1
- package/dist/credit-limits.d.ts.map +0 -1
- package/dist/credit-limits.js.map +0 -1
- package/dist/crm-rich-text.d.ts.map +0 -1
- package/dist/crm-rich-text.js.map +0 -1
- package/dist/crm.d.ts.map +0 -1
- package/dist/crm.js.map +0 -1
- package/dist/currencies.d.ts.map +0 -1
- package/dist/currencies.js.map +0 -1
- package/dist/custom-fields.d.ts.map +0 -1
- package/dist/custom-fields.js.map +0 -1
- package/dist/customer-accounts.d.ts.map +0 -1
- package/dist/customer-accounts.js.map +0 -1
- package/dist/customers.d.ts.map +0 -1
- package/dist/customers.js.map +0 -1
- package/dist/dictionary.d.ts.map +0 -1
- package/dist/dictionary.js.map +0 -1
- package/dist/document-templates.d.ts.map +0 -1
- package/dist/document-templates.js.map +0 -1
- package/dist/document-values.d.ts.map +0 -1
- package/dist/document-values.js.map +0 -1
- package/dist/email-address.d.ts.map +0 -1
- package/dist/email-address.js.map +0 -1
- package/dist/email.d.ts.map +0 -1
- package/dist/email.js.map +0 -1
- package/dist/envelopes.d.ts.map +0 -1
- package/dist/envelopes.js.map +0 -1
- package/dist/environment-inputs.d.ts.map +0 -1
- package/dist/environment-inputs.js.map +0 -1
- package/dist/erp-connector.d.ts.map +0 -1
- package/dist/erp-connector.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/google-analytics.d.ts.map +0 -1
- package/dist/google-analytics.js.map +0 -1
- package/dist/google-tag-manager.d.ts.map +0 -1
- package/dist/google-tag-manager.js.map +0 -1
- package/dist/i18n.d.ts.map +0 -1
- package/dist/i18n.js.map +0 -1
- package/dist/import-export.d.ts.map +0 -1
- package/dist/import-export.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inventory.d.ts.map +0 -1
- package/dist/inventory.js.map +0 -1
- package/dist/invoice-ledger.d.ts.map +0 -1
- package/dist/invoice-ledger.js.map +0 -1
- package/dist/invoices.d.ts.map +0 -1
- package/dist/invoices.js.map +0 -1
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js.map +0 -1
- package/dist/languages.d.ts.map +0 -1
- package/dist/languages.js.map +0 -1
- package/dist/line-groups.d.ts.map +0 -1
- package/dist/line-groups.js.map +0 -1
- package/dist/linkedin-ads.d.ts.map +0 -1
- package/dist/linkedin-ads.js.map +0 -1
- package/dist/localized-name.d.ts.map +0 -1
- package/dist/localized-name.js.map +0 -1
- package/dist/megamenu.d.ts.map +0 -1
- package/dist/megamenu.js.map +0 -1
- package/dist/meta-ads.d.ts.map +0 -1
- package/dist/meta-ads.js.map +0 -1
- package/dist/mfa.d.ts.map +0 -1
- package/dist/mfa.js.map +0 -1
- package/dist/modules.d.ts.map +0 -1
- package/dist/modules.js.map +0 -1
- package/dist/money-decimal.d.ts.map +0 -1
- package/dist/money-decimal.js.map +0 -1
- package/dist/money-input.d.ts.map +0 -1
- package/dist/money-input.js.map +0 -1
- package/dist/newsletter.d.ts.map +0 -1
- package/dist/newsletter.js.map +0 -1
- package/dist/order-minimums.d.ts.map +0 -1
- package/dist/order-minimums.js.map +0 -1
- package/dist/orders.d.ts.map +0 -1
- package/dist/orders.js.map +0 -1
- package/dist/organizations.d.ts.map +0 -1
- package/dist/organizations.js.map +0 -1
- package/dist/page-builder-props.d.ts.map +0 -1
- package/dist/page-builder-props.js.map +0 -1
- package/dist/page-builder-values.d.ts.map +0 -1
- package/dist/page-builder-values.js.map +0 -1
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/payment-methods.d.ts.map +0 -1
- package/dist/payment-methods.js.map +0 -1
- package/dist/payment-return-url.d.ts.map +0 -1
- package/dist/payment-return-url.js.map +0 -1
- package/dist/payments.d.ts.map +0 -1
- package/dist/payments.js.map +0 -1
- package/dist/pim-connector.d.ts.map +0 -1
- package/dist/pim-connector.js.map +0 -1
- package/dist/pim-field-path.d.ts.map +0 -1
- package/dist/pim-field-path.js.map +0 -1
- package/dist/platform-info.d.ts.map +0 -1
- package/dist/platform-info.js.map +0 -1
- package/dist/platform-language.d.ts.map +0 -1
- package/dist/platform-language.js.map +0 -1
- package/dist/price-book-decimal.d.ts.map +0 -1
- package/dist/price-book-decimal.js.map +0 -1
- package/dist/price-books.d.ts.map +0 -1
- package/dist/price-books.js.map +0 -1
- package/dist/price-lists.d.ts.map +0 -1
- package/dist/price-lists.js.map +0 -1
- package/dist/product-feeds.d.ts.map +0 -1
- package/dist/product-feeds.js.map +0 -1
- package/dist/product-scope-overrides.d.ts.map +0 -1
- package/dist/product-scope-overrides.js.map +0 -1
- package/dist/product-scopes.d.ts.map +0 -1
- package/dist/product-scopes.js.map +0 -1
- package/dist/product-summary-text.d.ts.map +0 -1
- package/dist/product-summary-text.js.map +0 -1
- package/dist/product-url-keys.d.ts.map +0 -1
- package/dist/product-url-keys.js.map +0 -1
- package/dist/product-value-resolver.d.ts.map +0 -1
- package/dist/product-value-resolver.js.map +0 -1
- package/dist/projects.d.ts.map +0 -1
- package/dist/projects.js.map +0 -1
- package/dist/promotions.d.ts.map +0 -1
- package/dist/promotions.js.map +0 -1
- package/dist/prompt-actions.d.ts.map +0 -1
- package/dist/prompt-actions.js.map +0 -1
- package/dist/pwa.d.ts.map +0 -1
- package/dist/pwa.js.map +0 -1
- package/dist/quick-order.d.ts.map +0 -1
- package/dist/quick-order.js.map +0 -1
- package/dist/quote-requests.d.ts.map +0 -1
- package/dist/quote-requests.js.map +0 -1
- package/dist/record-references.d.ts.map +0 -1
- package/dist/record-references.js.map +0 -1
- package/dist/record-rich-text.d.ts.map +0 -1
- package/dist/record-rich-text.js.map +0 -1
- package/dist/returns.d.ts.map +0 -1
- package/dist/returns.js.map +0 -1
- package/dist/sales-channels.d.ts.map +0 -1
- package/dist/sales-channels.js.map +0 -1
- package/dist/saved-list-views.d.ts.map +0 -1
- package/dist/saved-list-views.js.map +0 -1
- package/dist/scope-notice.d.ts.map +0 -1
- package/dist/scope-notice.js.map +0 -1
- package/dist/scoped-translations.d.ts +0 -48
- package/dist/scoped-translations.d.ts.map +0 -1
- package/dist/scoped-translations.js +0 -78
- package/dist/scoped-translations.js.map +0 -1
- package/dist/search.d.ts.map +0 -1
- package/dist/search.js.map +0 -1
- package/dist/seo.d.ts.map +0 -1
- package/dist/seo.js.map +0 -1
- package/dist/settings.d.ts.map +0 -1
- package/dist/settings.js.map +0 -1
- package/dist/shipments.d.ts.map +0 -1
- package/dist/shipments.js.map +0 -1
- package/dist/shipping-methods.d.ts.map +0 -1
- package/dist/shipping-methods.js.map +0 -1
- package/dist/shopping-lists.d.ts.map +0 -1
- package/dist/shopping-lists.js.map +0 -1
- package/dist/storefront-cache-tags.d.ts.map +0 -1
- package/dist/storefront-cache-tags.js.map +0 -1
- package/dist/storefront-language-path.d.ts.map +0 -1
- package/dist/storefront-language-path.js.map +0 -1
- package/dist/storefront-value-overrides.d.ts.map +0 -1
- package/dist/storefront-value-overrides.js.map +0 -1
- package/dist/tasks.d.ts.map +0 -1
- package/dist/tasks.js.map +0 -1
- package/dist/taxes.d.ts.map +0 -1
- package/dist/taxes.js.map +0 -1
- package/dist/text-normalization.d.ts.map +0 -1
- package/dist/text-normalization.js.map +0 -1
- package/dist/transactional-emails.d.ts.map +0 -1
- package/dist/transactional-emails.js.map +0 -1
- package/dist/webhooks.d.ts.map +0 -1
- package/dist/webhooks.js.map +0 -1
package/dist/catalog.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type ProductVisibility } from './common.js';
|
|
3
3
|
import type { FulfilmentStrategy } from './inventory.js';
|
|
4
|
+
import { type CustomFieldAdminAccess } from './custom-fields.js';
|
|
4
5
|
import type { BulkImportReport } from './import-export.js';
|
|
5
6
|
import type { AttributeScope } from './product-value-resolver.js';
|
|
7
|
+
import type { FieldPath, ScopeLevel } from './product-scope-model.js';
|
|
8
|
+
import type { ProductScopedWriteCell } from './product-scopes.js';
|
|
6
9
|
/**
|
|
7
10
|
* Catalog module contracts — Source of truth per Principle V.
|
|
8
11
|
* See specs/001-b2b-platform-foundation/contracts/catalog.contract.md.
|
|
@@ -46,8 +49,8 @@ export declare const stockModeSchema: z.ZodEnum<{
|
|
|
46
49
|
}>;
|
|
47
50
|
export type StockMode = z.infer<typeof stockModeSchema>;
|
|
48
51
|
export declare const stockIndicatorSchema: z.ZodEnum<{
|
|
49
|
-
available: "available";
|
|
50
52
|
out_of_stock: "out_of_stock";
|
|
53
|
+
available: "available";
|
|
51
54
|
to_order: "to_order";
|
|
52
55
|
}>;
|
|
53
56
|
export type StockIndicator = z.infer<typeof stockIndicatorSchema>;
|
|
@@ -68,8 +71,9 @@ export declare const attributeValueTypeSchema: z.ZodEnum<{
|
|
|
68
71
|
date: "date";
|
|
69
72
|
enum: "enum";
|
|
70
73
|
select: "select";
|
|
71
|
-
price: "price";
|
|
72
74
|
multiselect: "multiselect";
|
|
75
|
+
page_builder: "page_builder";
|
|
76
|
+
price: "price";
|
|
73
77
|
}>;
|
|
74
78
|
export type AttributeValueType = z.infer<typeof attributeValueTypeSchema>;
|
|
75
79
|
/**
|
|
@@ -80,8 +84,9 @@ export declare const apiAttributeTypeSchema: z.ZodEnum<{
|
|
|
80
84
|
number: "number";
|
|
81
85
|
input: "input";
|
|
82
86
|
select: "select";
|
|
83
|
-
price: "price";
|
|
84
87
|
multiselect: "multiselect";
|
|
88
|
+
page_builder: "page_builder";
|
|
89
|
+
price: "price";
|
|
85
90
|
slider: "slider";
|
|
86
91
|
}>;
|
|
87
92
|
export type ApiAttributeType = z.infer<typeof apiAttributeTypeSchema>;
|
|
@@ -118,6 +123,23 @@ export declare const attributeOptionSchema: z.ZodObject<{
|
|
|
118
123
|
updatedAt: z.ZodString;
|
|
119
124
|
}, z.core.$strip>;
|
|
120
125
|
export type AttributeOption = z.infer<typeof attributeOptionSchema>;
|
|
126
|
+
/** `GET /api/v1/admin/catalog/attributes/:attributeId/options` — the attribute's options, in order (issue #599). */
|
|
127
|
+
export declare const attributeOptionListResponseSchema: z.ZodObject<{
|
|
128
|
+
data: z.ZodObject<{
|
|
129
|
+
items: z.ZodArray<z.ZodObject<{
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
attributeId: z.ZodString;
|
|
132
|
+
value: z.ZodString;
|
|
133
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
134
|
+
labelDefault: z.ZodString;
|
|
135
|
+
isDefault: z.ZodBoolean;
|
|
136
|
+
sortOrder: z.ZodNumber;
|
|
137
|
+
createdAt: z.ZodString;
|
|
138
|
+
updatedAt: z.ZodString;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export type AttributeOptionListResponse = z.infer<typeof attributeOptionListResponseSchema>;
|
|
121
143
|
export declare const createAttributeOptionRequestSchema: z.ZodObject<{
|
|
122
144
|
value: z.ZodString;
|
|
123
145
|
label: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -161,20 +183,20 @@ export type ProductAsset = z.infer<typeof productAssetSchema>;
|
|
|
161
183
|
* storefront shows (`available` = stock not managed for the product).
|
|
162
184
|
*/
|
|
163
185
|
export declare const productAvailabilityBandSchema: z.ZodEnum<{
|
|
164
|
-
medium: "medium";
|
|
165
|
-
available: "available";
|
|
166
|
-
out_of_stock: "out_of_stock";
|
|
167
186
|
high: "high";
|
|
187
|
+
medium: "medium";
|
|
168
188
|
low: "low";
|
|
189
|
+
out_of_stock: "out_of_stock";
|
|
190
|
+
available: "available";
|
|
169
191
|
}>;
|
|
170
192
|
export type ProductAvailabilityBand = z.infer<typeof productAvailabilityBandSchema>;
|
|
171
193
|
export declare const productAvailabilitySchema: z.ZodObject<{
|
|
172
194
|
band: z.ZodEnum<{
|
|
173
|
-
medium: "medium";
|
|
174
|
-
available: "available";
|
|
175
|
-
out_of_stock: "out_of_stock";
|
|
176
195
|
high: "high";
|
|
196
|
+
medium: "medium";
|
|
177
197
|
low: "low";
|
|
198
|
+
out_of_stock: "out_of_stock";
|
|
199
|
+
available: "available";
|
|
178
200
|
}>;
|
|
179
201
|
inStock: z.ZodBoolean;
|
|
180
202
|
}, z.core.$strip>;
|
|
@@ -226,10 +248,10 @@ export declare const productResolvedPriceSchema: z.ZodObject<{
|
|
|
226
248
|
currency: z.ZodString;
|
|
227
249
|
}, z.core.$strip>>;
|
|
228
250
|
displayMode: z.ZodEnum<{
|
|
229
|
-
none: "none";
|
|
230
|
-
both: "both";
|
|
231
251
|
gross_only: "gross_only";
|
|
232
252
|
net_only: "net_only";
|
|
253
|
+
both: "both";
|
|
254
|
+
none: "none";
|
|
233
255
|
}>;
|
|
234
256
|
listPrice: z.ZodOptional<z.ZodObject<{
|
|
235
257
|
amount: z.ZodString;
|
|
@@ -262,19 +284,19 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
262
284
|
}, z.core.$strip>>>;
|
|
263
285
|
priceVariesByVariant: z.ZodOptional<z.ZodBoolean>;
|
|
264
286
|
stockIndicator: z.ZodNullable<z.ZodEnum<{
|
|
265
|
-
available: "available";
|
|
266
287
|
out_of_stock: "out_of_stock";
|
|
288
|
+
available: "available";
|
|
267
289
|
to_order: "to_order";
|
|
268
290
|
}>>;
|
|
269
291
|
stockLevel: z.ZodNullable<z.ZodNumber>;
|
|
270
292
|
priceUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
271
293
|
availability: z.ZodOptional<z.ZodObject<{
|
|
272
294
|
band: z.ZodEnum<{
|
|
273
|
-
medium: "medium";
|
|
274
|
-
available: "available";
|
|
275
|
-
out_of_stock: "out_of_stock";
|
|
276
295
|
high: "high";
|
|
296
|
+
medium: "medium";
|
|
277
297
|
low: "low";
|
|
298
|
+
out_of_stock: "out_of_stock";
|
|
299
|
+
available: "available";
|
|
278
300
|
}>;
|
|
279
301
|
inStock: z.ZodBoolean;
|
|
280
302
|
}, z.core.$strip>>;
|
|
@@ -289,16 +311,17 @@ export declare const productSummarySchema: z.ZodObject<{
|
|
|
289
311
|
currency: z.ZodString;
|
|
290
312
|
}, z.core.$strip>>;
|
|
291
313
|
displayMode: z.ZodEnum<{
|
|
292
|
-
none: "none";
|
|
293
|
-
both: "both";
|
|
294
314
|
gross_only: "gross_only";
|
|
295
315
|
net_only: "net_only";
|
|
316
|
+
both: "both";
|
|
317
|
+
none: "none";
|
|
296
318
|
}>;
|
|
297
319
|
listPrice: z.ZodOptional<z.ZodObject<{
|
|
298
320
|
amount: z.ZodString;
|
|
299
321
|
currency: z.ZodString;
|
|
300
322
|
}, z.core.$strip>>;
|
|
301
323
|
}, z.core.$strip>>>;
|
|
324
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
302
325
|
}, z.core.$strip>;
|
|
303
326
|
export type ProductSummary = z.infer<typeof productSummarySchema>;
|
|
304
327
|
export declare const productVariantSchema: z.ZodObject<{
|
|
@@ -318,6 +341,30 @@ export declare const seoMetaSchema: z.ZodObject<{
|
|
|
318
341
|
}, z.core.$strip>;
|
|
319
342
|
}, z.core.$strip>;
|
|
320
343
|
export type SeoMeta = z.infer<typeof seoMetaSchema>;
|
|
344
|
+
/**
|
|
345
|
+
* Feature 172 — one content attribute as the product page renders it: the
|
|
346
|
+
* attribute's key, the language its document was resolved to (FR-033), and
|
|
347
|
+
* that one document. No label: the storefront prints no heading of its own
|
|
348
|
+
* (OR-4, FR-037).
|
|
349
|
+
*/
|
|
350
|
+
export declare const productPageContentAttributeSchema: z.ZodObject<{
|
|
351
|
+
key: z.ZodString;
|
|
352
|
+
language: z.ZodString;
|
|
353
|
+
content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
export type ProductPageContentAttribute = z.infer<typeof productPageContentAttributeSchema>;
|
|
356
|
+
/**
|
|
357
|
+
* Feature 172 (research R-11) — the query of `GET /api/v1/catalog/products/:idOrSlug`.
|
|
358
|
+
* `include=content` asks for `contentAttributes`; without it the response is
|
|
359
|
+
* what it was before content attributes existed. Not strict: the route's
|
|
360
|
+
* other query parameters are not this schema's to judge.
|
|
361
|
+
*/
|
|
362
|
+
export declare const productDetailQuerySchema: z.ZodObject<{
|
|
363
|
+
include: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
content: "content";
|
|
365
|
+
}>>;
|
|
366
|
+
}, z.core.$strip>;
|
|
367
|
+
export type ProductDetailQuery = z.infer<typeof productDetailQuerySchema>;
|
|
321
368
|
export declare const productDetailSchema: z.ZodObject<{
|
|
322
369
|
id: z.ZodString;
|
|
323
370
|
sku: z.ZodString;
|
|
@@ -343,19 +390,19 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
343
390
|
}, z.core.$strip>>>;
|
|
344
391
|
priceVariesByVariant: z.ZodOptional<z.ZodBoolean>;
|
|
345
392
|
stockIndicator: z.ZodNullable<z.ZodEnum<{
|
|
346
|
-
available: "available";
|
|
347
393
|
out_of_stock: "out_of_stock";
|
|
394
|
+
available: "available";
|
|
348
395
|
to_order: "to_order";
|
|
349
396
|
}>>;
|
|
350
397
|
stockLevel: z.ZodNullable<z.ZodNumber>;
|
|
351
398
|
priceUnavailable: z.ZodOptional<z.ZodBoolean>;
|
|
352
399
|
availability: z.ZodOptional<z.ZodObject<{
|
|
353
400
|
band: z.ZodEnum<{
|
|
354
|
-
medium: "medium";
|
|
355
|
-
available: "available";
|
|
356
|
-
out_of_stock: "out_of_stock";
|
|
357
401
|
high: "high";
|
|
402
|
+
medium: "medium";
|
|
358
403
|
low: "low";
|
|
404
|
+
out_of_stock: "out_of_stock";
|
|
405
|
+
available: "available";
|
|
359
406
|
}>;
|
|
360
407
|
inStock: z.ZodBoolean;
|
|
361
408
|
}, z.core.$strip>>;
|
|
@@ -370,16 +417,17 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
370
417
|
currency: z.ZodString;
|
|
371
418
|
}, z.core.$strip>>;
|
|
372
419
|
displayMode: z.ZodEnum<{
|
|
373
|
-
none: "none";
|
|
374
|
-
both: "both";
|
|
375
420
|
gross_only: "gross_only";
|
|
376
421
|
net_only: "net_only";
|
|
422
|
+
both: "both";
|
|
423
|
+
none: "none";
|
|
377
424
|
}>;
|
|
378
425
|
listPrice: z.ZodOptional<z.ZodObject<{
|
|
379
426
|
amount: z.ZodString;
|
|
380
427
|
currency: z.ZodString;
|
|
381
428
|
}, z.core.$strip>>;
|
|
382
429
|
}, z.core.$strip>>>;
|
|
430
|
+
vatRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
383
431
|
description: z.ZodString;
|
|
384
432
|
attributeValues: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
385
433
|
assets: z.ZodArray<z.ZodObject<{
|
|
@@ -577,11 +625,17 @@ export declare const productDetailSchema: z.ZodObject<{
|
|
|
577
625
|
date: "date";
|
|
578
626
|
enum: "enum";
|
|
579
627
|
select: "select";
|
|
580
|
-
price: "price";
|
|
581
628
|
multiselect: "multiselect";
|
|
629
|
+
page_builder: "page_builder";
|
|
630
|
+
price: "price";
|
|
582
631
|
}>;
|
|
583
632
|
valueRendered: z.ZodString;
|
|
584
633
|
}, z.core.$strip>>>;
|
|
634
|
+
contentAttributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
635
|
+
key: z.ZodString;
|
|
636
|
+
language: z.ZodString;
|
|
637
|
+
content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
638
|
+
}, z.core.$strip>>>;
|
|
585
639
|
packagingUnits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
586
640
|
id: z.ZodString;
|
|
587
641
|
name: z.ZodString;
|
|
@@ -688,8 +742,9 @@ export declare const filterDefinitionSchema: z.ZodObject<{
|
|
|
688
742
|
date: "date";
|
|
689
743
|
enum: "enum";
|
|
690
744
|
select: "select";
|
|
691
|
-
price: "price";
|
|
692
745
|
multiselect: "multiselect";
|
|
746
|
+
page_builder: "page_builder";
|
|
747
|
+
price: "price";
|
|
693
748
|
}>;
|
|
694
749
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
695
750
|
value: z.ZodString;
|
|
@@ -703,6 +758,10 @@ export declare const filterDefinitionSchema: z.ZodObject<{
|
|
|
703
758
|
filterPosition: z.ZodDefault<z.ZodNumber>;
|
|
704
759
|
}, z.core.$strip>;
|
|
705
760
|
export type FilterDefinition = z.infer<typeof filterDefinitionSchema>;
|
|
761
|
+
/** Feature 174 (R21) — the longest product name at any scope. */
|
|
762
|
+
export declare const PRODUCT_NAME_MAX = 255;
|
|
763
|
+
/** Feature 174 (R21) — the longest product description at any scope. */
|
|
764
|
+
export declare const PRODUCT_DESCRIPTION_MAX = 20000;
|
|
706
765
|
export declare const createProductRequestSchema: z.ZodObject<{
|
|
707
766
|
sku: z.ZodString;
|
|
708
767
|
type: z.ZodEnum<{
|
|
@@ -712,8 +771,8 @@ export declare const createProductRequestSchema: z.ZodObject<{
|
|
|
712
771
|
bundle: "bundle";
|
|
713
772
|
virtual: "virtual";
|
|
714
773
|
}>;
|
|
715
|
-
name: z.
|
|
716
|
-
description: z.
|
|
774
|
+
name: z.ZodString;
|
|
775
|
+
description: z.ZodNullable<z.ZodString>;
|
|
717
776
|
categoryIds: z.ZodArray<z.ZodString>;
|
|
718
777
|
attributeValues: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
719
778
|
stockMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -755,22 +814,14 @@ export declare const createProductRequestSchema: z.ZodObject<{
|
|
|
755
814
|
}, z.core.$strip>;
|
|
756
815
|
export type CreateProductRequest = z.infer<typeof createProductRequestSchema>;
|
|
757
816
|
export declare const updateProductRequestSchema: z.ZodObject<{
|
|
758
|
-
description: z.ZodOptional<z.
|
|
817
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
818
|
+
name: z.ZodOptional<z.ZodString>;
|
|
759
819
|
status: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
760
820
|
active: "active";
|
|
761
821
|
inactive: "inactive";
|
|
762
822
|
}>>>;
|
|
763
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
764
|
-
public: "public";
|
|
765
|
-
logged_in_only: "logged_in_only";
|
|
766
|
-
organization_restricted: "organization_restricted";
|
|
767
|
-
}>>;
|
|
768
|
-
name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
769
|
-
returnable: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
770
|
-
assetIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
771
|
-
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
772
|
-
sku: z.ZodOptional<z.ZodString>;
|
|
773
823
|
minOrderQuantity: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
824
|
+
returnable: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
774
825
|
manageStock: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
775
826
|
backorderEnabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
776
827
|
lowStockThreshold: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
@@ -778,14 +829,22 @@ export declare const updateProductRequestSchema: z.ZodObject<{
|
|
|
778
829
|
cumulative: "cumulative";
|
|
779
830
|
per_warehouse: "per_warehouse";
|
|
780
831
|
}>>>;
|
|
832
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
833
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
834
|
+
public: "public";
|
|
835
|
+
logged_in_only: "logged_in_only";
|
|
836
|
+
organization_restricted: "organization_restricted";
|
|
837
|
+
}>>;
|
|
838
|
+
allowedOrganizationIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
781
839
|
attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
782
840
|
downloadAssetId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
783
841
|
downloadUrl: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
842
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
784
843
|
stockMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
785
844
|
categorical: "categorical";
|
|
786
845
|
numeric: "numeric";
|
|
787
846
|
}>>>;
|
|
788
|
-
|
|
847
|
+
assetIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
789
848
|
initialStock: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
790
849
|
attributeSetId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
791
850
|
fulfilmentStrategy: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -798,6 +857,7 @@ export declare const updateProductRequestSchema: z.ZodObject<{
|
|
|
798
857
|
fulfilmentStrategyWarehouseOrder: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>>;
|
|
799
858
|
publishFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
800
859
|
publishUntil: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
860
|
+
version: z.ZodOptional<z.ZodString>;
|
|
801
861
|
}, z.core.$strip>;
|
|
802
862
|
export type UpdateProductRequest = z.infer<typeof updateProductRequestSchema>;
|
|
803
863
|
export declare const batchByIdProductsRequestSchema: z.ZodObject<{
|
|
@@ -813,9 +873,9 @@ export declare const MAX_RESOLVE_SELECTION_SIZE = 10000;
|
|
|
813
873
|
* shows them beside the rest, `only` shows nothing else.
|
|
814
874
|
*/
|
|
815
875
|
export declare const productArchivedModeSchema: z.ZodEnum<{
|
|
816
|
-
only: "only";
|
|
817
|
-
exclude: "exclude";
|
|
818
876
|
include: "include";
|
|
877
|
+
exclude: "exclude";
|
|
878
|
+
only: "only";
|
|
819
879
|
}>;
|
|
820
880
|
export type ProductArchivedMode = z.infer<typeof productArchivedModeSchema>;
|
|
821
881
|
export declare const resolveProductIdsRequestSchema: z.ZodObject<{
|
|
@@ -833,9 +893,9 @@ export declare const resolveProductIdsRequestSchema: z.ZodObject<{
|
|
|
833
893
|
q: z.ZodOptional<z.ZodString>;
|
|
834
894
|
includeArchived: z.ZodOptional<z.ZodBoolean>;
|
|
835
895
|
archived: z.ZodOptional<z.ZodEnum<{
|
|
836
|
-
only: "only";
|
|
837
|
-
exclude: "exclude";
|
|
838
896
|
include: "include";
|
|
897
|
+
exclude: "exclude";
|
|
898
|
+
only: "only";
|
|
839
899
|
}>>;
|
|
840
900
|
}, z.core.$strip>;
|
|
841
901
|
export type ResolveProductIdsRequest = z.infer<typeof resolveProductIdsRequestSchema>;
|
|
@@ -880,9 +940,9 @@ export declare const bulkUpdateProductsRequestSchema: z.ZodObject<{
|
|
|
880
940
|
channelId: z.ZodString;
|
|
881
941
|
languageCode: z.ZodNullable<z.ZodString>;
|
|
882
942
|
value: z.ZodEnum<{
|
|
943
|
+
inherit: "inherit";
|
|
883
944
|
active: "active";
|
|
884
945
|
inactive: "inactive";
|
|
885
|
-
inherit: "inherit";
|
|
886
946
|
}>;
|
|
887
947
|
}, z.core.$strip>>;
|
|
888
948
|
archived: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -893,8 +953,8 @@ export declare const bulkUpdateProductResultSchema: z.ZodObject<{
|
|
|
893
953
|
productId: z.ZodString;
|
|
894
954
|
status: z.ZodEnum<{
|
|
895
955
|
failed: "failed";
|
|
896
|
-
succeeded: "succeeded";
|
|
897
956
|
skipped: "skipped";
|
|
957
|
+
succeeded: "succeeded";
|
|
898
958
|
}>;
|
|
899
959
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
900
960
|
product_not_found: "product_not_found";
|
|
@@ -926,8 +986,8 @@ export declare const bulkUpdateProductsResponseSchema: z.ZodObject<{
|
|
|
926
986
|
productId: z.ZodString;
|
|
927
987
|
status: z.ZodEnum<{
|
|
928
988
|
failed: "failed";
|
|
929
|
-
succeeded: "succeeded";
|
|
930
989
|
skipped: "skipped";
|
|
990
|
+
succeeded: "succeeded";
|
|
931
991
|
}>;
|
|
932
992
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
933
993
|
product_not_found: "product_not_found";
|
|
@@ -1019,8 +1079,8 @@ export declare const bulkOperationSchema: z.ZodObject<{
|
|
|
1019
1079
|
productId: z.ZodString;
|
|
1020
1080
|
status: z.ZodEnum<{
|
|
1021
1081
|
failed: "failed";
|
|
1022
|
-
succeeded: "succeeded";
|
|
1023
1082
|
skipped: "skipped";
|
|
1083
|
+
succeeded: "succeeded";
|
|
1024
1084
|
}>;
|
|
1025
1085
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
1026
1086
|
product_not_found: "product_not_found";
|
|
@@ -1101,8 +1161,8 @@ export declare const bulkOperationsListResponseSchema: z.ZodObject<{
|
|
|
1101
1161
|
productId: z.ZodString;
|
|
1102
1162
|
status: z.ZodEnum<{
|
|
1103
1163
|
failed: "failed";
|
|
1104
|
-
succeeded: "succeeded";
|
|
1105
1164
|
skipped: "skipped";
|
|
1165
|
+
succeeded: "succeeded";
|
|
1106
1166
|
}>;
|
|
1107
1167
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
1108
1168
|
product_not_found: "product_not_found";
|
|
@@ -1173,8 +1233,8 @@ export declare const bulkOperationResponseSchema: z.ZodObject<{
|
|
|
1173
1233
|
productId: z.ZodString;
|
|
1174
1234
|
status: z.ZodEnum<{
|
|
1175
1235
|
failed: "failed";
|
|
1176
|
-
succeeded: "succeeded";
|
|
1177
1236
|
skipped: "skipped";
|
|
1237
|
+
succeeded: "succeeded";
|
|
1178
1238
|
}>;
|
|
1179
1239
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
1180
1240
|
product_not_found: "product_not_found";
|
|
@@ -1281,6 +1341,15 @@ export declare const numericKindSchema: z.ZodEnum<{
|
|
|
1281
1341
|
price: "price";
|
|
1282
1342
|
}>;
|
|
1283
1343
|
export type NumericKind = z.infer<typeof numericKindSchema>;
|
|
1344
|
+
/**
|
|
1345
|
+
* The shape of an attribute key — the one rule an attribute is created with,
|
|
1346
|
+
* and the one a listing's `filter[attr.<key>]` is held to (issue #687): the
|
|
1347
|
+
* key is interpolated into the Meilisearch filter expression, so a key no
|
|
1348
|
+
* attribute could have is refused before either listing backend sees it.
|
|
1349
|
+
*/
|
|
1350
|
+
export declare const attributeKeyShapeSchema: z.ZodString;
|
|
1351
|
+
/** Whether `key` has the shape of an attribute key ({@link attributeKeyShapeSchema}). */
|
|
1352
|
+
export declare function isAttributeKey(key: string): boolean;
|
|
1284
1353
|
export declare const createAttributeRequestSchema: z.ZodObject<{
|
|
1285
1354
|
key: z.ZodString;
|
|
1286
1355
|
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -1288,8 +1357,9 @@ export declare const createAttributeRequestSchema: z.ZodObject<{
|
|
|
1288
1357
|
number: "number";
|
|
1289
1358
|
input: "input";
|
|
1290
1359
|
select: "select";
|
|
1291
|
-
price: "price";
|
|
1292
1360
|
multiselect: "multiselect";
|
|
1361
|
+
page_builder: "page_builder";
|
|
1362
|
+
price: "price";
|
|
1293
1363
|
slider: "slider";
|
|
1294
1364
|
}>>;
|
|
1295
1365
|
numericKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1303,8 +1373,9 @@ export declare const createAttributeRequestSchema: z.ZodObject<{
|
|
|
1303
1373
|
date: "date";
|
|
1304
1374
|
enum: "enum";
|
|
1305
1375
|
select: "select";
|
|
1306
|
-
price: "price";
|
|
1307
1376
|
multiselect: "multiselect";
|
|
1377
|
+
page_builder: "page_builder";
|
|
1378
|
+
price: "price";
|
|
1308
1379
|
}>>;
|
|
1309
1380
|
enumValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1310
1381
|
isSearchable: z.ZodBoolean;
|
|
@@ -1318,10 +1389,14 @@ export declare const createAttributeRequestSchema: z.ZodObject<{
|
|
|
1318
1389
|
isPriceRule: z.ZodOptional<z.ZodBoolean>;
|
|
1319
1390
|
filterPosition: z.ZodOptional<z.ZodNumber>;
|
|
1320
1391
|
isVisibleOnProductPage: z.ZodOptional<z.ZodBoolean>;
|
|
1321
|
-
|
|
1322
|
-
languageScoped: z.ZodOptional<z.ZodBoolean>;
|
|
1392
|
+
scopable: z.ZodOptional<z.ZodBoolean>;
|
|
1323
1393
|
massEditable: z.ZodOptional<z.ZodBoolean>;
|
|
1324
1394
|
quickSearchable: z.ZodOptional<z.ZodBoolean>;
|
|
1395
|
+
adminAccess: z.ZodOptional<z.ZodEnum<{
|
|
1396
|
+
hidden: "hidden";
|
|
1397
|
+
edit: "edit";
|
|
1398
|
+
read: "read";
|
|
1399
|
+
}>>;
|
|
1325
1400
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1326
1401
|
value: z.ZodString;
|
|
1327
1402
|
label: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1337,8 +1412,9 @@ export declare const updateAttributeRequestSchema: z.ZodObject<{
|
|
|
1337
1412
|
number: "number";
|
|
1338
1413
|
input: "input";
|
|
1339
1414
|
select: "select";
|
|
1340
|
-
price: "price";
|
|
1341
1415
|
multiselect: "multiselect";
|
|
1416
|
+
page_builder: "page_builder";
|
|
1417
|
+
price: "price";
|
|
1342
1418
|
slider: "slider";
|
|
1343
1419
|
}>>;
|
|
1344
1420
|
numericKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1357,10 +1433,14 @@ export declare const updateAttributeRequestSchema: z.ZodObject<{
|
|
|
1357
1433
|
isPriceRule: z.ZodOptional<z.ZodBoolean>;
|
|
1358
1434
|
filterPosition: z.ZodOptional<z.ZodNumber>;
|
|
1359
1435
|
isVisibleOnProductPage: z.ZodOptional<z.ZodBoolean>;
|
|
1360
|
-
|
|
1361
|
-
languageScoped: z.ZodOptional<z.ZodBoolean>;
|
|
1436
|
+
scopable: z.ZodOptional<z.ZodBoolean>;
|
|
1362
1437
|
massEditable: z.ZodOptional<z.ZodBoolean>;
|
|
1363
1438
|
quickSearchable: z.ZodOptional<z.ZodBoolean>;
|
|
1439
|
+
adminAccess: z.ZodOptional<z.ZodEnum<{
|
|
1440
|
+
hidden: "hidden";
|
|
1441
|
+
edit: "edit";
|
|
1442
|
+
read: "read";
|
|
1443
|
+
}>>;
|
|
1364
1444
|
}, z.core.$strict>;
|
|
1365
1445
|
export type UpdateAttributeRequest = z.infer<typeof updateAttributeRequestSchema>;
|
|
1366
1446
|
/**
|
|
@@ -1380,8 +1460,9 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1380
1460
|
number: "number";
|
|
1381
1461
|
input: "input";
|
|
1382
1462
|
select: "select";
|
|
1383
|
-
price: "price";
|
|
1384
1463
|
multiselect: "multiselect";
|
|
1464
|
+
page_builder: "page_builder";
|
|
1465
|
+
price: "price";
|
|
1385
1466
|
slider: "slider";
|
|
1386
1467
|
}>;
|
|
1387
1468
|
numericKind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -1395,8 +1476,9 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1395
1476
|
date: "date";
|
|
1396
1477
|
enum: "enum";
|
|
1397
1478
|
select: "select";
|
|
1398
|
-
price: "price";
|
|
1399
1479
|
multiselect: "multiselect";
|
|
1480
|
+
page_builder: "page_builder";
|
|
1481
|
+
price: "price";
|
|
1400
1482
|
}>;
|
|
1401
1483
|
enumValues: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
1402
1484
|
isSearchable: z.ZodBoolean;
|
|
@@ -1412,8 +1494,17 @@ export declare const adminAttributeResponseSchema: z.ZodObject<{
|
|
|
1412
1494
|
massEditable: z.ZodBoolean;
|
|
1413
1495
|
quickSearchable: z.ZodBoolean;
|
|
1414
1496
|
customFieldDefinitionId: z.ZodString;
|
|
1415
|
-
|
|
1416
|
-
|
|
1497
|
+
scopable: z.ZodOptional<z.ZodBoolean>;
|
|
1498
|
+
scopeLevels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1499
|
+
G: "G";
|
|
1500
|
+
C: "C";
|
|
1501
|
+
CL: "CL";
|
|
1502
|
+
}>>>;
|
|
1503
|
+
adminAccess: z.ZodOptional<z.ZodEnum<{
|
|
1504
|
+
hidden: "hidden";
|
|
1505
|
+
edit: "edit";
|
|
1506
|
+
read: "read";
|
|
1507
|
+
}>>;
|
|
1417
1508
|
createdAt: z.ZodString;
|
|
1418
1509
|
updatedAt: z.ZodString;
|
|
1419
1510
|
}, z.core.$strip>;
|
|
@@ -1424,6 +1515,7 @@ export declare const createCategoryRequestSchema: z.ZodObject<{
|
|
|
1424
1515
|
slug: z.ZodString;
|
|
1425
1516
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
1426
1517
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
1518
|
+
customFieldValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1427
1519
|
}, z.core.$strip>;
|
|
1428
1520
|
export type CreateCategoryRequest = z.infer<typeof createCategoryRequestSchema>;
|
|
1429
1521
|
export declare const updateCategoryRequestSchema: z.ZodObject<{
|
|
@@ -1437,14 +1529,21 @@ export declare const updateCategoryRequestSchema: z.ZodObject<{
|
|
|
1437
1529
|
}, z.core.$strict>;
|
|
1438
1530
|
export type UpdateCategoryRequest = z.infer<typeof updateCategoryRequestSchema>;
|
|
1439
1531
|
/**
|
|
1440
|
-
* The ceiling on one
|
|
1441
|
-
*
|
|
1532
|
+
* The ceiling on one stored Page Builder content envelope — a category's
|
|
1533
|
+
* content, or one product × content attribute value — in UTF-8 bytes of its
|
|
1534
|
+
* JSON serialisation, every language together.
|
|
1442
1535
|
*
|
|
1443
1536
|
* One mebibyte, because that is what a CMS page is held to today: the CMS
|
|
1444
1537
|
* declares no limit of its own and is bounded by the HTTP layer's default body
|
|
1445
1538
|
* limit, which is this number. Stated here so the bound also holds for a
|
|
1446
1539
|
* caller that does not arrive over HTTP.
|
|
1447
1540
|
*/
|
|
1541
|
+
export declare const PAGE_BUILDER_CONTENT_MAX_BYTES = 1048576;
|
|
1542
|
+
/**
|
|
1543
|
+
* The category content ceiling — {@link PAGE_BUILDER_CONTENT_MAX_BYTES}, kept
|
|
1544
|
+
* under its own name for its existing readers. Product content (feature 172)
|
|
1545
|
+
* is held to the same number.
|
|
1546
|
+
*/
|
|
1448
1547
|
export declare const CATEGORY_CONTENT_MAX_BYTES = 1048576;
|
|
1449
1548
|
/**
|
|
1450
1549
|
* The content an operator authors for a category's storefront page: one Page
|
|
@@ -1492,6 +1591,85 @@ export declare const categoryPageContentSchema: z.ZodObject<{
|
|
|
1492
1591
|
content: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1493
1592
|
}, z.core.$strip>;
|
|
1494
1593
|
export type CategoryPageContent = z.infer<typeof categoryPageContentSchema>;
|
|
1594
|
+
/**
|
|
1595
|
+
* One product × content attribute value: a Page Builder document per
|
|
1596
|
+
* language, the category envelope under the same ceiling. `null` means no
|
|
1597
|
+
* value. The writer drops a language with no block and stores nothing when
|
|
1598
|
+
* none remains (FR-013), so a stored envelope always holds a block.
|
|
1599
|
+
*/
|
|
1600
|
+
export declare const productContentEnvelopeSchema: z.ZodNullable<z.ZodObject<{
|
|
1601
|
+
languages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1602
|
+
}, z.core.$strict>>;
|
|
1603
|
+
export type ProductContentEnvelope = z.infer<typeof productContentEnvelopeSchema>;
|
|
1604
|
+
/** `PUT /api/v1/admin/catalog/products/:id/content/:attributeKey` — replaces the value. */
|
|
1605
|
+
export declare const putProductContentRequestSchema: z.ZodObject<{
|
|
1606
|
+
content: z.ZodNullable<z.ZodObject<{
|
|
1607
|
+
languages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1608
|
+
}, z.core.$strict>>;
|
|
1609
|
+
}, z.core.$strict>;
|
|
1610
|
+
export type PutProductContentRequest = z.infer<typeof putProductContentRequestSchema>;
|
|
1611
|
+
/** The single read and the write's answer: the whole stored (normalised) envelope. */
|
|
1612
|
+
export declare const adminProductContentSchema: z.ZodObject<{
|
|
1613
|
+
productId: z.ZodString;
|
|
1614
|
+
attributeKey: z.ZodString;
|
|
1615
|
+
content: z.ZodNullable<z.ZodObject<{
|
|
1616
|
+
languages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1617
|
+
}, z.core.$strict>>;
|
|
1618
|
+
}, z.core.$strip>;
|
|
1619
|
+
export type AdminProductContent = z.infer<typeof adminProductContentSchema>;
|
|
1620
|
+
/** One stored language of a content value, as the product form's card shows it — never the document. */
|
|
1621
|
+
export declare const adminProductContentLanguageStatusSchema: z.ZodObject<{
|
|
1622
|
+
language: z.ZodString;
|
|
1623
|
+
filled: z.ZodBoolean;
|
|
1624
|
+
blocks: z.ZodNumber;
|
|
1625
|
+
excerpt: z.ZodNullable<z.ZodString>;
|
|
1626
|
+
}, z.core.$strip>;
|
|
1627
|
+
export type AdminProductContentLanguageStatus = z.infer<typeof adminProductContentLanguageStatusSchema>;
|
|
1628
|
+
/** One content attribute of the product's saved attribute set, with its stored languages. */
|
|
1629
|
+
export declare const adminProductContentAttributeSchema: z.ZodObject<{
|
|
1630
|
+
attributeId: z.ZodString;
|
|
1631
|
+
key: z.ZodString;
|
|
1632
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1633
|
+
labelDefault: z.ZodString;
|
|
1634
|
+
position: z.ZodNumber;
|
|
1635
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
1636
|
+
language: z.ZodString;
|
|
1637
|
+
filled: z.ZodBoolean;
|
|
1638
|
+
blocks: z.ZodNumber;
|
|
1639
|
+
excerpt: z.ZodNullable<z.ZodString>;
|
|
1640
|
+
}, z.core.$strip>>;
|
|
1641
|
+
}, z.core.$strip>;
|
|
1642
|
+
export type AdminProductContentAttribute = z.infer<typeof adminProductContentAttributeSchema>;
|
|
1643
|
+
/** `GET /api/v1/admin/catalog/products/:id/content` — the cards, by position then key. */
|
|
1644
|
+
export declare const adminProductContentListSchema: z.ZodObject<{
|
|
1645
|
+
productId: z.ZodString;
|
|
1646
|
+
attributeSetId: z.ZodNullable<z.ZodString>;
|
|
1647
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
1648
|
+
attributeId: z.ZodString;
|
|
1649
|
+
key: z.ZodString;
|
|
1650
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1651
|
+
labelDefault: z.ZodString;
|
|
1652
|
+
position: z.ZodNumber;
|
|
1653
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
1654
|
+
language: z.ZodString;
|
|
1655
|
+
filled: z.ZodBoolean;
|
|
1656
|
+
blocks: z.ZodNumber;
|
|
1657
|
+
excerpt: z.ZodNullable<z.ZodString>;
|
|
1658
|
+
}, z.core.$strip>>;
|
|
1659
|
+
}, z.core.$strip>>;
|
|
1660
|
+
}, z.core.$strip>;
|
|
1661
|
+
export type AdminProductContentList = z.infer<typeof adminProductContentListSchema>;
|
|
1662
|
+
/**
|
|
1663
|
+
* `GET /api/v1/admin/catalog/attributes/:idOrKey/usage` — what deleting an
|
|
1664
|
+
* attribute of any type would meet (feature 172, FR-007). `productValueCount`
|
|
1665
|
+
* is the count the delete guard refuses on, from the same query.
|
|
1666
|
+
*/
|
|
1667
|
+
export declare const adminAttributeUsageSchema: z.ZodObject<{
|
|
1668
|
+
attributeSetCount: z.ZodNumber;
|
|
1669
|
+
productValueCount: z.ZodNumber;
|
|
1670
|
+
productContentCount: z.ZodNumber;
|
|
1671
|
+
}, z.core.$strip>;
|
|
1672
|
+
export type AdminAttributeUsage = z.infer<typeof adminAttributeUsageSchema>;
|
|
1495
1673
|
/**
|
|
1496
1674
|
* The orderings the storefront listing accepts.
|
|
1497
1675
|
*
|
|
@@ -1606,11 +1784,17 @@ export declare const attributeSetAssignedAttributeSchema: z.ZodObject<{
|
|
|
1606
1784
|
date: "date";
|
|
1607
1785
|
enum: "enum";
|
|
1608
1786
|
select: "select";
|
|
1609
|
-
price: "price";
|
|
1610
1787
|
multiselect: "multiselect";
|
|
1788
|
+
page_builder: "page_builder";
|
|
1789
|
+
price: "price";
|
|
1611
1790
|
}>;
|
|
1612
1791
|
position: z.ZodNumber;
|
|
1613
|
-
|
|
1792
|
+
scopable: z.ZodBoolean;
|
|
1793
|
+
scopeLevels: z.ZodArray<z.ZodEnum<{
|
|
1794
|
+
G: "G";
|
|
1795
|
+
C: "C";
|
|
1796
|
+
CL: "CL";
|
|
1797
|
+
}>>;
|
|
1614
1798
|
}, z.core.$strip>;
|
|
1615
1799
|
export type AttributeSetAssignedAttribute = z.infer<typeof attributeSetAssignedAttributeSchema>;
|
|
1616
1800
|
export declare const attributeSetDetailSchema: z.ZodObject<{
|
|
@@ -1634,11 +1818,17 @@ export declare const attributeSetDetailSchema: z.ZodObject<{
|
|
|
1634
1818
|
date: "date";
|
|
1635
1819
|
enum: "enum";
|
|
1636
1820
|
select: "select";
|
|
1637
|
-
price: "price";
|
|
1638
1821
|
multiselect: "multiselect";
|
|
1822
|
+
page_builder: "page_builder";
|
|
1823
|
+
price: "price";
|
|
1639
1824
|
}>;
|
|
1640
1825
|
position: z.ZodNumber;
|
|
1641
|
-
|
|
1826
|
+
scopable: z.ZodBoolean;
|
|
1827
|
+
scopeLevels: z.ZodArray<z.ZodEnum<{
|
|
1828
|
+
G: "G";
|
|
1829
|
+
C: "C";
|
|
1830
|
+
CL: "CL";
|
|
1831
|
+
}>>;
|
|
1642
1832
|
}, z.core.$strip>>;
|
|
1643
1833
|
}, z.core.$strip>;
|
|
1644
1834
|
export type AttributeSetDetail = z.infer<typeof attributeSetDetailSchema>;
|
|
@@ -1668,10 +1858,8 @@ export declare const galleryLabelSchema: z.ZodEnum<{
|
|
|
1668
1858
|
thumbnail: "thumbnail";
|
|
1669
1859
|
}>;
|
|
1670
1860
|
export type GalleryLabel = z.infer<typeof galleryLabelSchema>;
|
|
1671
|
-
/** Feature 163
|
|
1861
|
+
/** Feature 163 / 174 — the longest alt text of one image at one scope. */
|
|
1672
1862
|
export declare const GALLERY_ALT_TEXT_MAX = 255;
|
|
1673
|
-
/** Feature 163 — the most channels one write names. */
|
|
1674
|
-
export declare const SCOPED_CHANNELS_MAX = 256;
|
|
1675
1863
|
export declare const galleryItemSchema: z.ZodObject<{
|
|
1676
1864
|
id: z.ZodString;
|
|
1677
1865
|
productId: z.ZodString;
|
|
@@ -1682,8 +1870,8 @@ export declare const galleryItemSchema: z.ZodObject<{
|
|
|
1682
1870
|
small_image: "small_image";
|
|
1683
1871
|
thumbnail: "thumbnail";
|
|
1684
1872
|
}>>;
|
|
1685
|
-
altText: z.ZodOptional<z.
|
|
1686
|
-
|
|
1873
|
+
altText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1874
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
1687
1875
|
createdAt: z.ZodString;
|
|
1688
1876
|
updatedAt: z.ZodString;
|
|
1689
1877
|
}, z.core.$strip>;
|
|
@@ -1698,48 +1886,15 @@ export declare const createGalleryItemRequestSchema: z.ZodObject<{
|
|
|
1698
1886
|
}>>>;
|
|
1699
1887
|
}, z.core.$strict>;
|
|
1700
1888
|
export type CreateGalleryItemRequest = z.infer<typeof createGalleryItemRequestSchema>;
|
|
1889
|
+
/**
|
|
1890
|
+
* Feature 174 (`contracts/scoped-values-api.md` §6) — a collection operation only: the item's
|
|
1891
|
+
* position. Its roles (`galleryRole:<label>`), alt text and hidden flag are scoped fields, written
|
|
1892
|
+
* at every scope, Global included, through `PUT …/products/:id/scoped-values`.
|
|
1893
|
+
*/
|
|
1701
1894
|
export declare const updateGalleryItemRequestSchema: z.ZodObject<{
|
|
1702
1895
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1703
|
-
labels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1704
|
-
base_image: "base_image";
|
|
1705
|
-
small_image: "small_image";
|
|
1706
|
-
thumbnail: "thumbnail";
|
|
1707
|
-
}>>>;
|
|
1708
|
-
altText: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1709
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1710
1896
|
}, z.core.$strict>;
|
|
1711
1897
|
export type UpdateGalleryItemRequest = z.infer<typeof updateGalleryItemRequestSchema>;
|
|
1712
|
-
/**
|
|
1713
|
-
* Feature 163 (FR-076, R14) — a channel's own holders of the gallery roles. `null` =
|
|
1714
|
-
* the global holder applies there. Read with `GET …/gallery/channel-roles`.
|
|
1715
|
-
*
|
|
1716
|
-
* The keys are the camelCase names of the gallery labels (`baseImage` = the
|
|
1717
|
-
* `base_image` label, `smallImage` = `small_image`, `thumbnail` = `thumbnail`); the
|
|
1718
|
-
* label spelling stays a value (`galleryLabelSchema`), never an API key.
|
|
1719
|
-
*/
|
|
1720
|
-
export declare const galleryChannelRolesSchema: z.ZodObject<{
|
|
1721
|
-
channelId: z.ZodString;
|
|
1722
|
-
roles: z.ZodObject<{
|
|
1723
|
-
baseImage: z.ZodNullable<z.ZodString>;
|
|
1724
|
-
smallImage: z.ZodNullable<z.ZodString>;
|
|
1725
|
-
thumbnail: z.ZodNullable<z.ZodString>;
|
|
1726
|
-
}, z.core.$strip>;
|
|
1727
|
-
}, z.core.$strip>;
|
|
1728
|
-
export type GalleryChannelRoles = z.infer<typeof galleryChannelRolesSchema>;
|
|
1729
|
-
/**
|
|
1730
|
-
* `PUT …/gallery/channel-roles` — a role named with an item id moves to that item in
|
|
1731
|
-
* the channel, `null` = use inherited (the global holder), an absent role is left as
|
|
1732
|
-
* it is.
|
|
1733
|
-
*/
|
|
1734
|
-
export declare const putGalleryChannelRolesRequestSchema: z.ZodObject<{
|
|
1735
|
-
channelId: z.ZodString;
|
|
1736
|
-
roles: z.ZodObject<{
|
|
1737
|
-
baseImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1738
|
-
smallImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1739
|
-
thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1740
|
-
}, z.core.$strict>;
|
|
1741
|
-
}, z.core.$strict>;
|
|
1742
|
-
export type PutGalleryChannelRolesRequest = z.infer<typeof putGalleryChannelRolesRequestSchema>;
|
|
1743
1898
|
export declare const reorderGalleryRequestSchema: z.ZodObject<{
|
|
1744
1899
|
orderedGalleryItemIds: z.ZodArray<z.ZodString>;
|
|
1745
1900
|
}, z.core.$strict>;
|
|
@@ -1766,9 +1921,9 @@ export declare const updateAttachmentTypeRequestSchema: z.ZodObject<{
|
|
|
1766
1921
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1767
1922
|
}, z.core.$strict>;
|
|
1768
1923
|
export type UpdateAttachmentTypeRequest = z.infer<typeof updateAttachmentTypeRequestSchema>;
|
|
1769
|
-
/** Feature 163
|
|
1924
|
+
/** Feature 163 / 174 — the longest attachment description at a Channel or Channel × language scope. */
|
|
1770
1925
|
export declare const ATTACHMENT_DESCRIPTION_TRANSLATION_MAX = 4000;
|
|
1771
|
-
/** Feature 163
|
|
1926
|
+
/** Feature 163 / 174 — an attachment name at any scope, as long as the Global one. */
|
|
1772
1927
|
export declare const ATTACHMENT_NAME_MAX = 160;
|
|
1773
1928
|
export declare const productAttachmentSchema: z.ZodObject<{
|
|
1774
1929
|
id: z.ZodString;
|
|
@@ -1778,9 +1933,7 @@ export declare const productAttachmentSchema: z.ZodObject<{
|
|
|
1778
1933
|
name: z.ZodString;
|
|
1779
1934
|
description: z.ZodNullable<z.ZodString>;
|
|
1780
1935
|
position: z.ZodNumber;
|
|
1781
|
-
|
|
1782
|
-
descriptionTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1783
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1936
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
1784
1937
|
createdAt: z.ZodString;
|
|
1785
1938
|
updatedAt: z.ZodString;
|
|
1786
1939
|
}, z.core.$strip>;
|
|
@@ -1791,22 +1944,19 @@ export declare const createAttachmentRequestSchema: z.ZodObject<{
|
|
|
1791
1944
|
name: z.ZodString;
|
|
1792
1945
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1793
1946
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1794
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1795
|
-
descriptionTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1796
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1797
1947
|
}, z.core.$strict>;
|
|
1798
1948
|
export type CreateAttachmentRequest = z.infer<typeof createAttachmentRequestSchema>;
|
|
1949
|
+
/**
|
|
1950
|
+
* Feature 174 (`contracts/scoped-values-api.md` §6) — the attachment's type and position. Its
|
|
1951
|
+
* name, description and hidden flag are scoped fields, written at every scope, Global included,
|
|
1952
|
+
* through `PUT …/products/:id/scoped-values`.
|
|
1953
|
+
*/
|
|
1799
1954
|
export declare const updateAttachmentRequestSchema: z.ZodObject<{
|
|
1800
1955
|
attachmentTypeId: z.ZodOptional<z.ZodString>;
|
|
1801
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1802
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1803
1956
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1804
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1805
|
-
descriptionTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1806
|
-
hiddenInChannels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1807
1957
|
}, z.core.$strict>;
|
|
1808
1958
|
export type UpdateAttachmentRequest = z.infer<typeof updateAttachmentRequestSchema>;
|
|
1809
|
-
/** The longest packaging-unit name
|
|
1959
|
+
/** The longest packaging-unit name at any scope. */
|
|
1810
1960
|
export declare const PACKAGING_UNIT_NAME_MAX = 160;
|
|
1811
1961
|
/**
|
|
1812
1962
|
* A named ordering unit attached to a product (e.g. "Paleta" = 480 pieces).
|
|
@@ -1817,7 +1967,6 @@ export declare const packagingUnitSchema: z.ZodObject<{
|
|
|
1817
1967
|
id: z.ZodString;
|
|
1818
1968
|
productId: z.ZodString;
|
|
1819
1969
|
name: z.ZodString;
|
|
1820
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1821
1970
|
baseQuantity: z.ZodNumber;
|
|
1822
1971
|
position: z.ZodNumber;
|
|
1823
1972
|
isDefault: z.ZodBoolean;
|
|
@@ -1832,16 +1981,18 @@ export declare const createPackagingUnitRequestSchema: z.ZodObject<{
|
|
|
1832
1981
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
1833
1982
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1834
1983
|
minOrderUnits: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1835
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1836
1984
|
}, z.core.$strict>;
|
|
1837
1985
|
export type CreatePackagingUnitRequest = z.infer<typeof createPackagingUnitRequestSchema>;
|
|
1986
|
+
/**
|
|
1987
|
+
* Feature 174 (`contracts/scoped-values-api.md` §6) — base quantity, default flag, position and
|
|
1988
|
+
* minimum. The unit's name is a scoped field, written at every scope, Global included, through
|
|
1989
|
+
* `PUT …/products/:id/scoped-values`.
|
|
1990
|
+
*/
|
|
1838
1991
|
export declare const updatePackagingUnitRequestSchema: z.ZodObject<{
|
|
1839
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1840
1992
|
baseQuantity: z.ZodOptional<z.ZodNumber>;
|
|
1841
1993
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
1842
1994
|
position: z.ZodOptional<z.ZodNumber>;
|
|
1843
1995
|
minOrderUnits: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1844
|
-
nameTranslations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1845
1996
|
}, z.core.$strict>;
|
|
1846
1997
|
export type UpdatePackagingUnitRequest = z.infer<typeof updatePackagingUnitRequestSchema>;
|
|
1847
1998
|
export declare const reorderPackagingUnitsRequestSchema: z.ZodObject<{
|
|
@@ -2039,9 +2190,13 @@ export interface CatalogProductRecord {
|
|
|
2039
2190
|
slug: string;
|
|
2040
2191
|
type: ProductType;
|
|
2041
2192
|
status: ProductStatus;
|
|
2042
|
-
/**
|
|
2043
|
-
|
|
2044
|
-
|
|
2193
|
+
/**
|
|
2194
|
+
* Feature 174 (FR-014, FR-031) — the Global name and description, one string each. A reader
|
|
2195
|
+
* with a channel resolves the effective texts at (C, L) through
|
|
2196
|
+
* `catalogProductAvailabilityPort.effectiveTexts`; one without a channel shows these.
|
|
2197
|
+
*/
|
|
2198
|
+
name: string;
|
|
2199
|
+
description: string | null;
|
|
2045
2200
|
/** Per-product override of the global stock mode; `null` ⇒ inherit. */
|
|
2046
2201
|
stockMode: StockMode | null;
|
|
2047
2202
|
visibility: ProductVisibility;
|
|
@@ -2302,12 +2457,6 @@ export interface CatalogPackagingUnitRecord {
|
|
|
2302
2457
|
updatedAt: Date;
|
|
2303
2458
|
/** Feature 155 — minimum units of this packaging unit per order of the product; `null` = none. */
|
|
2304
2459
|
minOrderUnits: number | null;
|
|
2305
|
-
/**
|
|
2306
|
-
* Feature 163 (FR-079) — the name per language; the snapshot of a basket or quote
|
|
2307
|
-
* line takes `effectivePackagingUnitName(record, L)`. Optional so other builders of
|
|
2308
|
-
* the record keep compiling; `catalog` always sets it.
|
|
2309
|
-
*/
|
|
2310
|
-
nameTranslations?: Record<string, string>;
|
|
2311
2460
|
}
|
|
2312
2461
|
/** A directed product↔product relation (cross-sell, up-sell, related). */
|
|
2313
2462
|
export interface CatalogProductLinkRow {
|
|
@@ -2373,7 +2522,13 @@ export interface CatalogProductLookupOptions {
|
|
|
2373
2522
|
export interface CatalogProductReadPort {
|
|
2374
2523
|
findById(id: string, options?: CatalogProductLookupOptions): Promise<CatalogProductRecord | null>;
|
|
2375
2524
|
findByIds(ids: readonly string[], options?: CatalogProductLookupOptions): Promise<CatalogProductRecord[]>;
|
|
2525
|
+
/**
|
|
2526
|
+
* A SKU is unique among live products only (issue #693): a deleted product keeps its SKU and
|
|
2527
|
+
* frees it for reuse. Without `liveOnly`, the lookup therefore answers the live product when
|
|
2528
|
+
* there is one, else the most recently deleted one holding the SKU.
|
|
2529
|
+
*/
|
|
2376
2530
|
findBySku(sku: string, options?: CatalogProductLookupOptions): Promise<CatalogProductRecord | null>;
|
|
2531
|
+
/** At most one product per SKU, chosen as {@link findBySku} chooses it. */
|
|
2377
2532
|
findBySkus(skus: readonly string[], options?: CatalogProductLookupOptions): Promise<CatalogProductRecord[]>;
|
|
2378
2533
|
/** `count === ids.length` existence check, without loading the rows. */
|
|
2379
2534
|
countByIds(ids: readonly string[]): Promise<number>;
|
|
@@ -2391,6 +2546,10 @@ export interface CatalogProductReadPort {
|
|
|
2391
2546
|
findPricingRefsByIds(ids: readonly string[]): Promise<CatalogProductPricingRef[]>;
|
|
2392
2547
|
/** Variants of the given parent products, ordered by sku. */
|
|
2393
2548
|
listVariantsByProductIds(productIds: readonly string[]): Promise<CatalogProductVariantRecord[]>;
|
|
2549
|
+
/**
|
|
2550
|
+
* At most one variant per SKU: the live one, else the most recently deleted. A variant is
|
|
2551
|
+
* deleted with its product and its SKU may then be reused (issue #693).
|
|
2552
|
+
*/
|
|
2394
2553
|
findVariantsBySkus(skus: readonly string[]): Promise<CatalogProductVariantRecord[]>;
|
|
2395
2554
|
/** A variant, but only if it belongs to that parent. */
|
|
2396
2555
|
findVariantInProduct(parentProductId: string, variantId: string): Promise<CatalogProductVariantRecord | null>;
|
|
@@ -2434,7 +2593,7 @@ export interface CatalogProductReadPort {
|
|
|
2434
2593
|
/**
|
|
2435
2594
|
* Feature 161 (G15, `specs/161-price-book-editor/research.md` R14) — one page
|
|
2436
2595
|
* of the products a caller's **membership seam** names, ordered by the stored
|
|
2437
|
-
* admin name key
|
|
2596
|
+
* admin name key (feature 174: one key over the Global name, for every admin language),
|
|
2438
2597
|
* then SKU, then id, and how many there are. `search` narrows to the products
|
|
2439
2598
|
* whose stored search key (folded shown name and SKU) or one of whose
|
|
2440
2599
|
* variants' SKU contains it — case- and accent-folded, taken literally. How
|
|
@@ -2468,8 +2627,6 @@ export interface CatalogProductMembership {
|
|
|
2468
2627
|
export interface CatalogAdminNamePageQuery {
|
|
2469
2628
|
readonly membership: CatalogProductMembership;
|
|
2470
2629
|
readonly search?: string | null;
|
|
2471
|
-
/** A language tag (`pl`, `pl-PL`); its primary subtag picks the key, `en` when it has none. */
|
|
2472
|
-
readonly language: string | null;
|
|
2473
2630
|
readonly offset: number;
|
|
2474
2631
|
readonly limit: number;
|
|
2475
2632
|
/** Default `true`. Without a search, `false` skips the count. */
|
|
@@ -2632,42 +2789,52 @@ export interface ProductImportRow {
|
|
|
2632
2789
|
sku: string;
|
|
2633
2790
|
status?: ProductStatus;
|
|
2634
2791
|
visibility?: ProductVisibility;
|
|
2635
|
-
/** Per-locale, merged into the stored JSONB rather than replacing it. */
|
|
2636
|
-
name?: Record<string, string>;
|
|
2637
|
-
description?: Record<string, string>;
|
|
2638
2792
|
/**
|
|
2639
|
-
* Feature
|
|
2640
|
-
*
|
|
2641
|
-
*
|
|
2642
|
-
*
|
|
2793
|
+
* Feature 174 (`contracts/import-profiles-and-csv.md` §2; FR-043, FR-110) — every scoped cell
|
|
2794
|
+
* of the row, Global included, already decoded with `decodeCsvScopedCell` and mapped through
|
|
2795
|
+
* the run's profile, channels by id. A (field, scope) the file has no column for is untouched;
|
|
2796
|
+
* refusals are per cell (the row's other cells apply) and reported in
|
|
2797
|
+
* `BulkImportReport.fieldErrors` under the cell's `column`.
|
|
2643
2798
|
*/
|
|
2644
|
-
|
|
2799
|
+
cells?: ProductImportCell[];
|
|
2645
2800
|
}
|
|
2646
|
-
/** One
|
|
2647
|
-
export interface
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2801
|
+
/** One cell of a {@link ProductImportRow}: a scoped write and the file column it came from. */
|
|
2802
|
+
export interface ProductImportCell extends ProductScopedWriteCell {
|
|
2803
|
+
/** Echoed in `BulkImportReport.fieldErrors[].column`; absent → `<field>@<scope>`. */
|
|
2804
|
+
column?: string;
|
|
2805
|
+
}
|
|
2806
|
+
/** One own value of a {@link ScopedValuesExport} cell: deliberately empty, a text, or a non-text value. */
|
|
2807
|
+
export type ScopedExportValue = {
|
|
2808
|
+
kind: 'empty';
|
|
2809
|
+
} | {
|
|
2810
|
+
kind: 'text';
|
|
2811
|
+
text: string;
|
|
2653
2812
|
}
|
|
2654
|
-
/**
|
|
2655
|
-
|
|
2656
|
-
|
|
2813
|
+
/** A minimum order quantity, a returnable flag, a number, date-less non-text or multiselect attribute value. */
|
|
2814
|
+
| {
|
|
2815
|
+
kind: 'value';
|
|
2816
|
+
value: number | boolean | string[];
|
|
2817
|
+
};
|
|
2818
|
+
/**
|
|
2819
|
+
* Feature 174 (`contracts/import-profiles-and-csv.md` §3; FR-043, FR-114) — the scoped columns of
|
|
2820
|
+
* a products export: one per (field, scope) at which any product holds an own value, and each
|
|
2821
|
+
* product's own values there. Fields: `name`, `description`, `status`, `urlKey`, every
|
|
2822
|
+
* `attribute:<key>`, and at C `minOrderQuantity` and `returnable`; scopes C and C×L (the Global
|
|
2823
|
+
* values are the products' own records). Orphans are not exported.
|
|
2824
|
+
*/
|
|
2825
|
+
export interface ScopedValuesExport {
|
|
2826
|
+
/** In a stable order: field, then channel code, then the channel scope before its languages. */
|
|
2657
2827
|
columns: Array<{
|
|
2828
|
+
field: FieldPath;
|
|
2829
|
+
channelId: string;
|
|
2658
2830
|
channelCode: string;
|
|
2659
2831
|
languageCode: string | null;
|
|
2660
2832
|
}>;
|
|
2661
|
-
/** Product id → column
|
|
2662
|
-
values: Record<string, Record<string,
|
|
2833
|
+
/** Product id → column key ({@link scopedColumn}) → the own value there. A scope that inherits is absent (`INHERIT`). */
|
|
2834
|
+
values: Record<string, Record<string, ScopedExportValue>>;
|
|
2663
2835
|
}
|
|
2664
|
-
/** The products-file column of a scope:
|
|
2665
|
-
export declare function
|
|
2666
|
-
/** The scope a products-file column names, or `null` when it is not a scoped-status column. */
|
|
2667
|
-
export declare function parseScopedStatusColumn(column: string): {
|
|
2668
|
-
channelCode: string;
|
|
2669
|
-
languageCode: string | null;
|
|
2670
|
-
} | null;
|
|
2836
|
+
/** The products-file column of a scope: `<field>@<channel code>` or `<field>@<channel code>/<language>`. */
|
|
2837
|
+
export declare function scopedColumn(field: string, channelCode: string, languageCode: string | null): string;
|
|
2671
2838
|
/**
|
|
2672
2839
|
* Container name: `catalogBulkImportPort`. Owner: `catalog`.
|
|
2673
2840
|
*
|
|
@@ -2683,9 +2850,30 @@ export declare function parseScopedStatusColumn(column: string): {
|
|
|
2683
2850
|
*/
|
|
2684
2851
|
export interface CatalogBulkImportPort {
|
|
2685
2852
|
importCategories(rows: readonly CategoryImportRow[]): Promise<BulkImportReport>;
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2853
|
+
/**
|
|
2854
|
+
* Feature 174 (`contracts/import-profiles-and-csv.md` §2) — **per product**: each row applies in
|
|
2855
|
+
* its own Command `product.scoped_values.import` (one audit entry, `source: 'import_export'`), so
|
|
2856
|
+
* one row's failure leaves the others applied. An unknown SKU is a row error; each refused cell
|
|
2857
|
+
* a field error (the codes of `ProductScopedWriteRefusalCode`, or `URL_KEY_TAKEN` for a key
|
|
2858
|
+
* another product holds), the row's other cells applying. The integration allowlist of
|
|
2859
|
+
* `integrationWritableField` applies to the cells, widened for the products file by
|
|
2860
|
+
* `minOrderQuantity` and `returnable` at G and C (the CSV grammar covers every scoped product
|
|
2861
|
+
* value; multiselect attributes are `attribute:<key>` cells). `status` / `visibility` write
|
|
2862
|
+
* Global. A stored `''` Global description counts as none: an empty cell there writes nothing.
|
|
2863
|
+
* `dryRun` validates every row and cell the same way and writes nothing (URL keys are checked
|
|
2864
|
+
* for grammar only).
|
|
2865
|
+
*/
|
|
2866
|
+
importProducts(rows: readonly ProductImportRow[], options?: {
|
|
2867
|
+
dryRun?: boolean;
|
|
2868
|
+
}): Promise<BulkImportReport>;
|
|
2869
|
+
/** Feature 174 (FR-043, FR-114) — the scoped columns of a products export, and their own values. */
|
|
2870
|
+
exportScopedValues(): Promise<ScopedValuesExport>;
|
|
2871
|
+
/**
|
|
2872
|
+
* Feature 172 (FR-041) — the keys of the Page Builder content attributes. A
|
|
2873
|
+
* products file may not carry a value under one: content is authored on the
|
|
2874
|
+
* product content screen only, so an importer refuses such a cell per row.
|
|
2875
|
+
*/
|
|
2876
|
+
contentAttributeKeys(): Promise<string[]>;
|
|
2689
2877
|
}
|
|
2690
2878
|
export interface CatalogAttributeOptionView {
|
|
2691
2879
|
/** `custom_field_options` id. */
|
|
@@ -2727,9 +2915,15 @@ export interface CatalogAttributeView {
|
|
|
2727
2915
|
isPriceRule: boolean;
|
|
2728
2916
|
filterPosition: number;
|
|
2729
2917
|
isVisibleOnProductPage: boolean;
|
|
2730
|
-
|
|
2731
|
-
|
|
2918
|
+
/** Feature 174 (R15) — the scope flag; {@link scopeLevels} is what it derives with the value type. */
|
|
2919
|
+
scopable: boolean;
|
|
2920
|
+
scopeLevels: readonly ScopeLevel[];
|
|
2732
2921
|
massEditable: boolean;
|
|
2922
|
+
/**
|
|
2923
|
+
* Feature 175 — the backing definition's admin access (`edit` when absent).
|
|
2924
|
+
* Optional so the hand-built views of other modules keep compiling.
|
|
2925
|
+
*/
|
|
2926
|
+
adminAccess?: CustomFieldAdminAccess;
|
|
2733
2927
|
createdAt: Date;
|
|
2734
2928
|
updatedAt: Date;
|
|
2735
2929
|
}
|
|
@@ -2799,14 +2993,11 @@ export interface CatalogQuickSearchHit {
|
|
|
2799
2993
|
productId: string;
|
|
2800
2994
|
sku: string;
|
|
2801
2995
|
slug: string;
|
|
2802
|
-
/** Per-locale JSONB as stored — the caller picks its own language. */
|
|
2803
|
-
name: Record<string, string>;
|
|
2804
2996
|
/**
|
|
2805
|
-
* Feature
|
|
2806
|
-
*
|
|
2807
|
-
* baseline pick. What a type-ahead should display.
|
|
2997
|
+
* Feature 174 (`contracts/readers.md` §2) — the name effective at the search's (channel,
|
|
2998
|
+
* language) along C×L → C → G; the Global name when the search names no channel.
|
|
2808
2999
|
*/
|
|
2809
|
-
|
|
3000
|
+
name: string;
|
|
2810
3001
|
status: ProductStatus;
|
|
2811
3002
|
matchedOn: CatalogQuickSearchField[];
|
|
2812
3003
|
}
|
|
@@ -2893,8 +3084,7 @@ export declare function isSystemAttributeKey(key: string): key is SystemAttribut
|
|
|
2893
3084
|
* global-only).
|
|
2894
3085
|
*/
|
|
2895
3086
|
export declare function getAttributeScope(attributeKey: string, productAttributeRow?: {
|
|
2896
|
-
|
|
2897
|
-
languageScoped: boolean;
|
|
3087
|
+
scopable: boolean;
|
|
2898
3088
|
} | null): AttributeScope;
|
|
2899
3089
|
/** Optional metadata attaching an audit entry to an admin mutation. */
|
|
2900
3090
|
export interface CatalogAdminAuditContext {
|
|
@@ -2965,33 +3155,6 @@ export interface CatalogProductWritePort {
|
|
|
2965
3155
|
updateVariant(parentProductId: string, variantId: string, req: UpdateVariantRequest): Promise<CatalogProductVariantRecord>;
|
|
2966
3156
|
deleteVariant(parentProductId: string, variantId: string): Promise<void>;
|
|
2967
3157
|
}
|
|
2968
|
-
/**
|
|
2969
|
-
* One channel/language override upsert — feature 022 / product-scope-overrides.
|
|
2970
|
-
* Used by PIM importers (feature 089) to land channel-locale-scoped names and
|
|
2971
|
-
* descriptions without reaching `product_value_overrides` directly (Principle XII).
|
|
2972
|
-
*/
|
|
2973
|
-
export interface CatalogProductValueOverrideUpsert {
|
|
2974
|
-
attributeKey: string;
|
|
2975
|
-
channelId: string;
|
|
2976
|
-
languageCode: string | null;
|
|
2977
|
-
value: {
|
|
2978
|
-
v: unknown;
|
|
2979
|
-
};
|
|
2980
|
-
}
|
|
2981
|
-
/**
|
|
2982
|
-
* Container name: `catalogProductValueOverrideWritePort`. Owner: `catalog`.
|
|
2983
|
-
*
|
|
2984
|
-
* Bulk upsert of per-channel / per-language product attribute overrides. The
|
|
2985
|
-
* only consumer today is `pim_unopim` (feature 089 / FR-023); the admin SPA
|
|
2986
|
-
* still goes through `ProductOverridesService` inside catalog's own routes.
|
|
2987
|
-
*
|
|
2988
|
-
* **Owner off:** resolving this port throws `ModuleDisabledError` (503).
|
|
2989
|
-
*/
|
|
2990
|
-
export interface CatalogProductValueOverrideWritePort {
|
|
2991
|
-
applyBulk(productId: string, input: {
|
|
2992
|
-
upserts: readonly CatalogProductValueOverrideUpsert[];
|
|
2993
|
-
}): Promise<void>;
|
|
2994
|
-
}
|
|
2995
3158
|
/** The patch `updateCategory` accepts. Absent keys are left alone. */
|
|
2996
3159
|
export interface UpdateCategoryInput {
|
|
2997
3160
|
parentCategoryId?: string | null;
|
|
@@ -3137,8 +3300,12 @@ export interface CatalogGalleryPort {
|
|
|
3137
3300
|
* Feature 163 (FR-076, owner decision MED-1 = A) — `channelId` is the channel the
|
|
3138
3301
|
* caller serves (a feed's channel): an item hidden there is left out. `null` names no
|
|
3139
3302
|
* channel and answers the global gallery.
|
|
3303
|
+
*
|
|
3304
|
+
* Feature 174 (`data-model.md` §6) — `hidden` resolves C×L → C → Global: an item hidden
|
|
3305
|
+
* at Global is left out of the global gallery too. `languageCode` (optional, additive) is
|
|
3306
|
+
* the caller's language in the channel; omitted or `null` = the Channel level.
|
|
3140
3307
|
*/
|
|
3141
|
-
listForProducts(productIds: readonly string[], channelId: string | null): Promise<CatalogGalleryBatchItem[]>;
|
|
3308
|
+
listForProducts(productIds: readonly string[], channelId: string | null, languageCode?: string | null): Promise<CatalogGalleryBatchItem[]>;
|
|
3142
3309
|
/**
|
|
3143
3310
|
* The `base_image` url of each of a batch of products — `base_image` only,
|
|
3144
3311
|
* with no fallback to `thumbnail` or to the first item by position.
|
|
@@ -3159,8 +3326,12 @@ export interface CatalogGalleryPort {
|
|
|
3159
3326
|
* (the request's resolved channel): the channel's own holder of the role when it has
|
|
3160
3327
|
* one, else the global holder; `null` when that holder is hidden there. `null` names
|
|
3161
3328
|
* no channel and answers the global holder.
|
|
3329
|
+
*
|
|
3330
|
+
* Feature 174 (`data-model.md` §6b) — the holder resolves C×L → C → Global; an override
|
|
3331
|
+
* naming no item means no image holds the role there. `languageCode` as
|
|
3332
|
+
* {@link listForProducts}.
|
|
3162
3333
|
*/
|
|
3163
|
-
baseImageUrls(productIds: readonly string[], channelId: string | null): Promise<Map<string, string | null>>;
|
|
3334
|
+
baseImageUrls(productIds: readonly string[], channelId: string | null, languageCode?: string | null): Promise<Map<string, string | null>>;
|
|
3164
3335
|
create(productId: string, req: CreateGalleryItemRequest, options: CatalogGalleryWriteOptions): Promise<GalleryItem>;
|
|
3165
3336
|
delete(productId: string, itemId: string): Promise<void>;
|
|
3166
3337
|
reorder(productId: string, orderedIds: string[]): Promise<void>;
|