@endora-commerce/contracts 0.109.0 → 0.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actor.d.ts +16 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +8 -1
- package/dist/addresses.js.map +1 -1
- package/dist/admin-contributions.d.ts +62 -7
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +27 -8
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-roles.d.ts +8 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin-users.d.ts.map +1 -1
- package/dist/admin.d.ts +77 -4
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +79 -3
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +26 -0
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +6 -3
- package/dist/assets-library.js.map +1 -1
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.d.ts.map +1 -1
- package/dist/audit-logs.js +12 -0
- package/dist/audit-logs.js.map +1 -1
- package/dist/blog.d.ts +382 -22
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +199 -17
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +394 -36
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +131 -8
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +351 -219
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +209 -157
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +14 -14
- package/dist/cms.d.ts +41 -16
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js.map +1 -1
- package/dist/common.d.ts +23 -6
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +25 -2
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +28 -21
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -1
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts +1 -0
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +14 -0
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm.d.ts +79 -49
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +6 -0
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +27 -13
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +15 -1
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +186 -22
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +39 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/customers.d.ts +40 -73
- package/dist/customers.d.ts.map +1 -1
- package/dist/customers.js +45 -10
- package/dist/customers.js.map +1 -1
- package/dist/document-templates.d.ts +12 -12
- package/dist/errors.d.ts +119 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +146 -1
- package/dist/errors.js.map +1 -1
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.fixtures.js.map +1 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms-logic.js.map +1 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +827 -0
- package/dist/forms.js.map +1 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +60 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +9 -9
- package/dist/invoice-ledger.d.ts +7 -7
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +4 -0
- package/dist/invoices.js.map +1 -1
- package/dist/mfa.d.ts +124 -4
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +46 -0
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +36 -4
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +68 -0
- package/dist/modules.js.map +1 -1
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.d.ts.map +1 -1
- package/dist/money-decimal.js +95 -0
- package/dist/money-decimal.js.map +1 -1
- package/dist/newsletter.d.ts +4 -4
- package/dist/orders.d.ts +105 -12
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +60 -4
- package/dist/orders.js.map +1 -1
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.d.ts.map +1 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-registry-lookup.js.map +1 -0
- package/dist/organization-roles.d.ts +340 -0
- package/dist/organization-roles.d.ts.map +1 -0
- package/dist/organization-roles.js +211 -0
- package/dist/organization-roles.js.map +1 -0
- package/dist/organizations.d.ts +123 -89
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +68 -24
- package/dist/organizations.js.map +1 -1
- package/dist/page-builder-props.d.ts +56 -56
- package/dist/pim-connector.d.ts +7 -3
- package/dist/pim-connector.d.ts.map +1 -1
- package/dist/pim-connector.js +6 -2
- package/dist/pim-connector.js.map +1 -1
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.d.ts.map +1 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-field-path.js.map +1 -1
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.d.ts.map +1 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/pim-locale-mapping.js.map +1 -0
- package/dist/price-books.d.ts +67 -63
- package/dist/price-books.d.ts.map +1 -1
- package/dist/price-books.js +6 -2
- package/dist/price-books.js.map +1 -1
- package/dist/price-lists.d.ts +8 -8
- package/dist/product-feeds.d.ts +94 -94
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +5 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.d.ts.map +1 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-model.js.map +1 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.d.ts.map +1 -1
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scope-overrides.js.map +1 -1
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.d.ts.map +1 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scoped-values.js.map +1 -0
- package/dist/product-scopes.d.ts +182 -64
- package/dist/product-scopes.d.ts.map +1 -1
- package/dist/product-scopes.js +89 -18
- package/dist/product-scopes.js.map +1 -1
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.d.ts.map +1 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-tax-rates.js.map +1 -0
- package/dist/product-url-keys.d.ts +51 -45
- package/dist/product-url-keys.d.ts.map +1 -1
- package/dist/product-url-keys.js +73 -39
- package/dist/product-url-keys.js.map +1 -1
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +36 -96
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/projects.d.ts +15 -0
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js +6 -0
- package/dist/projects.js.map +1 -1
- package/dist/promotions.d.ts +10 -10
- package/dist/pwa.d.ts +2 -2
- package/dist/quick-order.d.ts +150 -6
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +75 -1
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +63 -12
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +42 -1
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts.map +1 -1
- package/dist/record-references.js +2 -3
- package/dist/record-references.js.map +1 -1
- package/dist/record-rich-text.d.ts.map +1 -1
- package/dist/record-rich-text.js +2 -1
- package/dist/record-rich-text.js.map +1 -1
- package/dist/returns.d.ts +208 -52
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +139 -26
- package/dist/returns.js.map +1 -1
- package/dist/saved-list-views.d.ts +28 -0
- package/dist/saved-list-views.d.ts.map +1 -1
- package/dist/saved-list-views.js +14 -1
- package/dist/saved-list-views.js.map +1 -1
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.d.ts.map +1 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/scoped-write-encoding.js.map +1 -0
- package/dist/search.d.ts +18 -16
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +81 -28
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +8 -1
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +129 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +36 -0
- package/dist/settings.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -3
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -0
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +12 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +12 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.d.ts.map +1 -1
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/storefront-value-overrides.js.map +1 -1
- package/dist/tasks.d.ts +6 -6
- package/dist/transactional-emails.d.ts +9 -9
- package/package.json +2 -2
- 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/product-scopes.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type ProductVisibility } from './common.js';
|
|
3
3
|
import { type ProductAudience } from './catalog.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { UrlKeyWriteOutcome } from './product-url-keys.js';
|
|
5
|
+
import { type FieldPath, type ScopeRef } from './product-scope-model.js';
|
|
6
|
+
import { type ScopedWriteOp } from './scoped-write-encoding.js';
|
|
5
7
|
/**
|
|
6
8
|
* Feature 163 (`specs/163-product-data-scopes/`) — product data scopes per sales
|
|
7
9
|
* channel and language: the one rule of effective availability, its admin shapes and
|
|
@@ -38,7 +40,10 @@ export interface AudienceRule {
|
|
|
38
40
|
visibility: ProductVisibility;
|
|
39
41
|
allowedOrganizationIds: string[];
|
|
40
42
|
}
|
|
41
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* A `product_channel_scopes` row. Every `null` inherits the global value, except the
|
|
45
|
+
* minimum order quantity, whose override is the flag (feature 174, data-model §4).
|
|
46
|
+
*/
|
|
42
47
|
export interface ProductChannelScopeRecord {
|
|
43
48
|
productId: string;
|
|
44
49
|
channelId: string;
|
|
@@ -48,7 +53,12 @@ export interface ProductChannelScopeRecord {
|
|
|
48
53
|
window: PublicationWindow | null;
|
|
49
54
|
/** `null` = inherit the whole global rule. */
|
|
50
55
|
audience: AudienceRule | null;
|
|
51
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Feature 174 (data-model §4) — whether the channel overrides the global minimum. When
|
|
58
|
+
* it does, {@link minOrderQuantity} `null` = **no minimum in this channel**.
|
|
59
|
+
*/
|
|
60
|
+
minOrderQuantityOverridden: boolean;
|
|
61
|
+
/** Meaningful only when {@link minOrderQuantityOverridden}; `null` = no minimum here. */
|
|
52
62
|
minOrderQuantity: number | null;
|
|
53
63
|
/** `null` = inherit. */
|
|
54
64
|
returnable: boolean | null;
|
|
@@ -94,7 +104,7 @@ export declare function isInsideWindow(window: PublicationWindow, now: Date): bo
|
|
|
94
104
|
/** The channel's rule when it overrides one, else the global rule — replaced whole, never merged (C4). */
|
|
95
105
|
export declare function effectiveAudience(global: Pick<ProductGlobalScopeFields, 'visibility' | 'allowedOrganizationIds'>, channelRow: Pick<ProductChannelScopeRecord, 'audience'> | undefined): AudienceRule;
|
|
96
106
|
/** Minimum order quantity and the returnable flag in a channel (FR-100). */
|
|
97
|
-
export declare function effectiveOrderRules(global: Pick<ProductGlobalScopeFields, 'minOrderQuantity' | 'returnable'>, channelRow: Pick<ProductChannelScopeRecord, 'minOrderQuantity' | 'returnable'> | undefined): {
|
|
107
|
+
export declare function effectiveOrderRules(global: Pick<ProductGlobalScopeFields, 'minOrderQuantity' | 'returnable'>, channelRow: Pick<ProductChannelScopeRecord, 'minOrderQuantity' | 'minOrderQuantityOverridden' | 'returnable'> | undefined): {
|
|
98
108
|
minOrderQuantity: number | null;
|
|
99
109
|
returnable: boolean;
|
|
100
110
|
};
|
|
@@ -167,7 +177,7 @@ export declare function pairsTurningOn(before: ScopeSnapshot, after: ScopeSnapsh
|
|
|
167
177
|
* BCP-47 codes, while the prose resolver normalises to the platform's UI languages.
|
|
168
178
|
*/
|
|
169
179
|
export declare function resolveScopeLanguage(channel: ScopeChannel, requestedTag: string | null | undefined): string;
|
|
170
|
-
export {
|
|
180
|
+
export { sameLanguage } from './product-scope-model.js';
|
|
171
181
|
/**
|
|
172
182
|
* A channel record as the scope rule reads it. The default language is always
|
|
173
183
|
* one of the languages: a channel whose list is empty, or omits its own
|
|
@@ -228,14 +238,24 @@ export interface CatalogProductAvailabilityPort {
|
|
|
228
238
|
/** Projection for whole-channel consumers (search documents, sitemap, feeds). Non-members are absent. */
|
|
229
239
|
describeChannelAvailability(productIds: readonly string[], channelId: string): Promise<Map<string, ChannelAvailability>>;
|
|
230
240
|
/**
|
|
231
|
-
* FR-
|
|
232
|
-
*
|
|
233
|
-
* `null` = the channel's default language (an
|
|
241
|
+
* Feature 174 (FR-030, `contracts/readers.md` §2) — the effective name and description
|
|
242
|
+
* per id at (channel, language) along C×L → C → G; an empty description override
|
|
243
|
+
* answers `null`. `languageCode` `null` = the channel's default language (an
|
|
244
|
+
* operator, N2). Applies no availability: an id not found is absent.
|
|
245
|
+
*/
|
|
246
|
+
effectiveTexts(productIds: readonly string[], scope: {
|
|
247
|
+
channelId: string;
|
|
248
|
+
languageCode: string | null;
|
|
249
|
+
}): Promise<Map<string, EffectiveProductTexts>>;
|
|
250
|
+
/**
|
|
251
|
+
* Feature 174 — the effective packaging-unit name per unit id at (channel, language);
|
|
252
|
+
* `null` = an empty override (nothing shown). Basket and quote snapshots take it at
|
|
253
|
+
* the line's scope and never re-resolve it.
|
|
234
254
|
*/
|
|
235
|
-
|
|
255
|
+
effectivePackagingUnitNames(unitIds: readonly string[], scope: {
|
|
236
256
|
channelId: string;
|
|
237
257
|
languageCode: string | null;
|
|
238
|
-
}): Promise<Map<string, string>>;
|
|
258
|
+
}): Promise<Map<string, string | null>>;
|
|
239
259
|
/**
|
|
240
260
|
* FR-100 — the effective minimum order quantity and returnable flag in the channel.
|
|
241
261
|
*
|
|
@@ -249,47 +269,131 @@ export interface CatalogProductAvailabilityPort {
|
|
|
249
269
|
returnable: boolean;
|
|
250
270
|
}>>;
|
|
251
271
|
}
|
|
252
|
-
/**
|
|
253
|
-
export interface
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
orderRules?: Array<{
|
|
272
|
-
channelId: string;
|
|
273
|
-
minOrderQuantity?: number | null;
|
|
274
|
-
returnable?: boolean | null;
|
|
275
|
-
}>;
|
|
276
|
-
urlKeys?: ProductUrlKeyWrite[];
|
|
272
|
+
/** {@link CatalogProductAvailabilityPort.effectiveTexts}' answer for one product. */
|
|
273
|
+
export interface EffectiveProductTexts {
|
|
274
|
+
name: string;
|
|
275
|
+
/** `null` = no description at this scope (none anywhere, or an empty override). */
|
|
276
|
+
description: string | null;
|
|
277
|
+
}
|
|
278
|
+
/** One cell of a connector or import write: one field at one scope (`pim-locale-mapping.md` §4). */
|
|
279
|
+
export interface ProductScopedWriteCell {
|
|
280
|
+
scope: ScopeRef;
|
|
281
|
+
field: FieldPath;
|
|
282
|
+
op: ScopedWriteOp<unknown>;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Feature 174 — what an integration writes through {@link CatalogProductScopeWritePort} (v2):
|
|
286
|
+
* only the named (field, scope) cells are touched (FR-044), so writing Global values removes
|
|
287
|
+
* no operator override.
|
|
288
|
+
*/
|
|
289
|
+
export interface ProductScopedWriteInput {
|
|
290
|
+
cells: ProductScopedWriteCell[];
|
|
277
291
|
}
|
|
278
|
-
|
|
279
|
-
|
|
292
|
+
/** The most cells one call of the scope write port carries (R13a). */
|
|
293
|
+
export declare const PRODUCT_SCOPED_WRITE_CELLS_MAX = 2000;
|
|
294
|
+
/**
|
|
295
|
+
* The field paths of data-model §9, as a grammar: a family, a subject uuid where the family has
|
|
296
|
+
* one, an attribute key. Global-only fields are not paths.
|
|
297
|
+
*/
|
|
298
|
+
export declare const fieldPathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<"description" | "name" | "status" | "window" | "audience" | "minOrderQuantity" | "returnable" | "urlKey" | "seo:description" | "seo:title" | "seo:ogTitle" | "seo:ogDescription" | "seo:ogImageUrl" | `attribute:${string}` | `gallery:${string}:altText` | `gallery:${string}:hidden` | "galleryRole:base_image" | "galleryRole:small_image" | "galleryRole:thumbnail" | `attachment:${string}:description` | `attachment:${string}:name` | `attachment:${string}:hidden` | `packagingUnit:${string}:name`, string>>;
|
|
299
|
+
/** A scope as a request names it (`scoped-values-api.md` §1): neither → G, channel → C, both → C×L. */
|
|
300
|
+
export declare const scopeRequestSchema: z.ZodObject<{
|
|
301
|
+
channelId: z.ZodOptional<z.ZodString>;
|
|
302
|
+
languageCode: z.ZodOptional<z.ZodString>;
|
|
303
|
+
}, z.core.$strict>;
|
|
304
|
+
/** The wire form of {@link ProductScopedWriteInput}: `value` in the write encoding. */
|
|
305
|
+
export declare const productScopedWriteInputSchema: z.ZodPipe<z.ZodObject<{
|
|
306
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
307
|
+
scope: z.ZodObject<{
|
|
308
|
+
channelId: z.ZodOptional<z.ZodString>;
|
|
309
|
+
languageCode: z.ZodOptional<z.ZodString>;
|
|
310
|
+
}, z.core.$strict>;
|
|
311
|
+
field: z.ZodPipe<z.ZodString, z.ZodTransform<"description" | "name" | "status" | "window" | "audience" | "minOrderQuantity" | "returnable" | "urlKey" | "seo:description" | "seo:title" | "seo:ogTitle" | "seo:ogDescription" | "seo:ogImageUrl" | `attribute:${string}` | `gallery:${string}:altText` | `gallery:${string}:hidden` | "galleryRole:base_image" | "galleryRole:small_image" | "galleryRole:thumbnail" | `attachment:${string}:description` | `attachment:${string}:name` | `attachment:${string}:hidden` | `packagingUnit:${string}:name`, string>>;
|
|
312
|
+
value: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
313
|
+
inherit: z.ZodLiteral<true>;
|
|
314
|
+
}, z.core.$strict>, z.ZodUnknown & z.ZodType<{} | null, unknown, z.core.$ZodTypeInternals<{} | null, unknown>>]>>>;
|
|
315
|
+
}, z.core.$strict>>;
|
|
316
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
317
|
+
cells: {
|
|
318
|
+
scope: ScopeRef;
|
|
319
|
+
field: "description" | "name" | "status" | "window" | "audience" | "minOrderQuantity" | "returnable" | "urlKey" | "seo:description" | "seo:title" | "seo:ogTitle" | "seo:ogDescription" | "seo:ogImageUrl" | `attribute:${string}` | `gallery:${string}:altText` | `gallery:${string}:hidden` | "galleryRole:base_image" | "galleryRole:small_image" | "galleryRole:thumbnail" | `attachment:${string}:description` | `attachment:${string}:name` | `attachment:${string}:hidden` | `packagingUnit:${string}:name`;
|
|
320
|
+
op: ScopedWriteOp<{}> | undefined;
|
|
321
|
+
}[];
|
|
322
|
+
}, {
|
|
323
|
+
cells: {
|
|
324
|
+
scope: {
|
|
325
|
+
channelId?: string | undefined;
|
|
326
|
+
languageCode?: string | undefined;
|
|
327
|
+
};
|
|
328
|
+
field: "description" | "name" | "status" | "window" | "audience" | "minOrderQuantity" | "returnable" | "urlKey" | "seo:description" | "seo:title" | "seo:ogTitle" | "seo:ogDescription" | "seo:ogImageUrl" | `attribute:${string}` | `gallery:${string}:altText` | `gallery:${string}:hidden` | "galleryRole:base_image" | "galleryRole:small_image" | "galleryRole:thumbnail" | `attachment:${string}:description` | `attachment:${string}:name` | `attachment:${string}:hidden` | `packagingUnit:${string}:name`;
|
|
329
|
+
value?: {} | {
|
|
330
|
+
inherit: true;
|
|
331
|
+
} | null | undefined;
|
|
332
|
+
}[];
|
|
333
|
+
}>>;
|
|
334
|
+
/**
|
|
335
|
+
* Feature 174 (`pim-locale-mapping.md` §4, R13a, R21) — why one cell of an integration write was
|
|
336
|
+
* not applied. The rest of the call still applies (per-cell tolerant):
|
|
337
|
+
*
|
|
338
|
+
* - `not_supported` — the field family is outside the integration allowlist
|
|
339
|
+
* ({@link integrationWritableField});
|
|
340
|
+
* - `SCOPE_INVALID` — a channel the product is not a member of, or a language it does not offer;
|
|
341
|
+
* - `FIELD_NOT_AT_SCOPE` — the field has no value at the scope's level (data-model §9);
|
|
342
|
+
* - `required_empty`, `not_emptyable`, `inherit_at_global` — `validateScopedWrite`'s refusals;
|
|
343
|
+
* - `subject_not_found` — a gallery item, attachment or packaging unit that is not the product's;
|
|
344
|
+
* - `invalid` — a value its field's own schema refuses (type, length, an attribute outside the
|
|
345
|
+
* product's set, an option the attribute does not have).
|
|
346
|
+
*
|
|
347
|
+
* A `urlKey` cell another product holds is not a refusal: it is reported in `urlKeys`.
|
|
348
|
+
*/
|
|
349
|
+
export type ProductScopedWriteRefusalCode = 'not_supported' | 'SCOPE_INVALID' | 'FIELD_NOT_AT_SCOPE' | 'required_empty' | 'not_emptyable' | 'inherit_at_global' | 'subject_not_found' | 'invalid';
|
|
350
|
+
export interface ProductScopedWriteResult {
|
|
351
|
+
/** Cells written. */
|
|
352
|
+
applied: number;
|
|
353
|
+
/** Cells refused; `index` is the cell's position in `input.cells`. */
|
|
354
|
+
refused: Array<{
|
|
355
|
+
index: number;
|
|
356
|
+
scope: ScopeRef;
|
|
357
|
+
field: FieldPath;
|
|
358
|
+
code: ProductScopedWriteRefusalCode;
|
|
359
|
+
}>;
|
|
360
|
+
/** One outcome per `urlKey` cell, in order. */
|
|
280
361
|
urlKeys: UrlKeyWriteOutcome[];
|
|
281
362
|
}
|
|
282
363
|
/**
|
|
283
|
-
*
|
|
364
|
+
* R13a (plan decision Q6) — whether an integration (a PIM connector, the products import) may
|
|
365
|
+
* write `field` at all: `name`, `description`, `attribute:<key>`, `gallery:<id>:altText`,
|
|
366
|
+
* `attachment:<id>:name|description`, `packagingUnit:<id>:name`, `urlKey`, `status`, `window`.
|
|
367
|
+
* Every other family — `audience`, `product.*`, `seo:*`, `galleryRole:*`, `*:hidden`,
|
|
368
|
+
* `minOrderQuantity`, `returnable` — is `not_supported`. Pure; the port applies it per cell.
|
|
369
|
+
*/
|
|
370
|
+
export declare function integrationWritableField(field: string): boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Container name: `catalogProductScopeWritePort`. Owner: `catalog` (R17, feature 174 v2,
|
|
373
|
+
* `contracts/pim-locale-mapping.md` §4).
|
|
284
374
|
*
|
|
285
|
-
* Scoped writes for
|
|
286
|
-
*
|
|
287
|
-
*
|
|
375
|
+
* Scoped writes for connectors: one Command `product.scoped_values.import` per call (one audit
|
|
376
|
+
* entry, `source` in it, `product.updated.v1` after commit, `products.scope_version` bumped),
|
|
377
|
+
* per-cell tolerant (each refused cell is reported with a {@link ProductScopedWriteRefusalCode},
|
|
378
|
+
* the rest applied; a call where every cell is refused writes, audits and bumps nothing). Each
|
|
379
|
+
* value is checked against its field's own schema (the save's — lengths `PRODUCT_NAME_MAX`,
|
|
380
|
+
* `PRODUCT_DESCRIPTION_MAX`, attribute value types and options) and `validateScopedWrite`
|
|
381
|
+
* (`required_empty`, `not_emptyable`, `inherit_at_global`); every subject id must be the
|
|
382
|
+
* product's. Never the completeness gate (A-6); URL keys through the URL-key service in
|
|
383
|
+
* `integration` mode — a key another product holds is reported in `urlKeys`, a redirect is never
|
|
384
|
+
* taken over (FR-093). Allowlist: {@link integrationWritableField}.
|
|
385
|
+
*
|
|
386
|
+
* The call itself is refused — nothing written — with:
|
|
387
|
+
* - `404 PRODUCT_NOT_FOUND` for an unknown or deleted product;
|
|
388
|
+
* - `422 VALIDATION_FAILED` `details.field = 'source'` when `options.source` is not a module id
|
|
389
|
+
* (`^[a-z][a-z0-9_]{1,63}$`) present in the module registry;
|
|
390
|
+
* - `422 VALIDATION_FAILED` `details.field = 'cells'` for more than
|
|
391
|
+
* {@link PRODUCT_SCOPED_WRITE_CELLS_MAX} cells or the same (field, scope) twice.
|
|
288
392
|
*/
|
|
289
393
|
export interface CatalogProductScopeWritePort {
|
|
290
|
-
applyScopes(productId: string, input:
|
|
394
|
+
applyScopes(productId: string, input: ProductScopedWriteInput, options: {
|
|
291
395
|
source: string;
|
|
292
|
-
}): Promise<
|
|
396
|
+
}): Promise<ProductScopedWriteResult>;
|
|
293
397
|
}
|
|
294
398
|
/**
|
|
295
399
|
* What the completeness gate reports missing at a (channel, language) — one
|
|
@@ -337,6 +441,7 @@ export declare const productScopesSchema: z.ZodObject<{
|
|
|
337
441
|
allowedOrganizationIds: z.ZodArray<z.ZodString>;
|
|
338
442
|
nonMemberOrganizationIds: z.ZodArray<z.ZodString>;
|
|
339
443
|
}, z.core.$strip>>;
|
|
444
|
+
minOrderQuantityOverridden: z.ZodBoolean;
|
|
340
445
|
minOrderQuantity: z.ZodNullable<z.ZodNumber>;
|
|
341
446
|
returnable: z.ZodNullable<z.ZodBoolean>;
|
|
342
447
|
languageStatuses: z.ZodArray<z.ZodObject<{
|
|
@@ -394,6 +499,7 @@ export declare const productScopesResponseSchema: z.ZodObject<{
|
|
|
394
499
|
allowedOrganizationIds: z.ZodArray<z.ZodString>;
|
|
395
500
|
nonMemberOrganizationIds: z.ZodArray<z.ZodString>;
|
|
396
501
|
}, z.core.$strip>>;
|
|
502
|
+
minOrderQuantityOverridden: z.ZodBoolean;
|
|
397
503
|
minOrderQuantity: z.ZodNullable<z.ZodNumber>;
|
|
398
504
|
returnable: z.ZodNullable<z.ZodBoolean>;
|
|
399
505
|
languageStatuses: z.ZodArray<z.ZodObject<{
|
|
@@ -414,38 +520,54 @@ export declare const productScopesResponseSchema: z.ZodObject<{
|
|
|
414
520
|
}, z.core.$strip>;
|
|
415
521
|
export type ProductScopesResponse = z.infer<typeof productScopesResponseSchema>;
|
|
416
522
|
/**
|
|
417
|
-
* §2 — `PATCH /api/v1/admin/catalog/products/:id/scopes
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
523
|
+
* §2 — `PATCH /api/v1/admin/catalog/products/:id/scopes`, in the one write encoding
|
|
524
|
+
* (feature 174, `contracts/write-encoding.md` §5, FR-116): absent or `""` = no change,
|
|
525
|
+
* `{ inherit: true }` = use inherited (deletes the override), `null` = the empty override
|
|
526
|
+
* where the field takes one — `minOrderQuantity: null` = no minimum in this channel,
|
|
527
|
+
* `window: null` = an open window override; `status`, `audience` and `returnable` refuse
|
|
528
|
+
* `null` (`SCOPED_VALUE_INVALID`, `not_emptyable`, from the service). A window whose
|
|
529
|
+
* `from` is not before its `until` is refused with `VALIDATION_FAILED`,
|
|
530
|
+
* `details.field = 'window'`.
|
|
421
531
|
*/
|
|
422
532
|
export declare const patchProductScopesRequestSchema: z.ZodObject<{
|
|
423
533
|
channels: z.ZodArray<z.ZodObject<{
|
|
424
534
|
channelId: z.ZodString;
|
|
425
|
-
status: z.ZodOptional<z.
|
|
535
|
+
status: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
536
|
+
inherit: z.ZodLiteral<true>;
|
|
537
|
+
}, z.core.$strict>, z.ZodEnum<{
|
|
426
538
|
active: "active";
|
|
427
539
|
inactive: "inactive";
|
|
428
|
-
}>>>;
|
|
429
|
-
window: z.ZodOptional<z.
|
|
540
|
+
}>]>>>;
|
|
541
|
+
window: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
542
|
+
inherit: z.ZodLiteral<true>;
|
|
543
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
430
544
|
from: z.ZodNullable<z.ZodString>;
|
|
431
545
|
until: z.ZodNullable<z.ZodString>;
|
|
432
|
-
}, z.core.$
|
|
433
|
-
audience: z.ZodOptional<z.
|
|
546
|
+
}, z.core.$strict>]>>>;
|
|
547
|
+
audience: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
548
|
+
inherit: z.ZodLiteral<true>;
|
|
549
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
434
550
|
visibility: z.ZodEnum<{
|
|
435
551
|
public: "public";
|
|
436
552
|
logged_in_only: "logged_in_only";
|
|
437
553
|
organization_restricted: "organization_restricted";
|
|
438
554
|
}>;
|
|
439
555
|
allowedOrganizationIds: z.ZodArray<z.ZodString>;
|
|
440
|
-
}, z.core.$
|
|
441
|
-
minOrderQuantity: z.ZodOptional<z.
|
|
442
|
-
|
|
556
|
+
}, z.core.$strict>]>>>;
|
|
557
|
+
minOrderQuantity: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
558
|
+
inherit: z.ZodLiteral<true>;
|
|
559
|
+
}, z.core.$strict>, z.ZodNumber]>>>;
|
|
560
|
+
returnable: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
561
|
+
inherit: z.ZodLiteral<true>;
|
|
562
|
+
}, z.core.$strict>, z.ZodBoolean]>>>;
|
|
443
563
|
languageStatuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
444
564
|
languageCode: z.ZodString;
|
|
445
|
-
status: z.
|
|
565
|
+
status: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
566
|
+
inherit: z.ZodLiteral<true>;
|
|
567
|
+
}, z.core.$strict>, z.ZodEnum<{
|
|
446
568
|
active: "active";
|
|
447
569
|
inactive: "inactive";
|
|
448
|
-
}
|
|
570
|
+
}>]>>>;
|
|
449
571
|
}, z.core.$strip>>>;
|
|
450
572
|
}, z.core.$strip>>;
|
|
451
573
|
global: z.ZodOptional<z.ZodObject<{
|
|
@@ -504,6 +626,7 @@ export declare const patchProductScopesResponseSchema: z.ZodObject<{
|
|
|
504
626
|
allowedOrganizationIds: z.ZodArray<z.ZodString>;
|
|
505
627
|
nonMemberOrganizationIds: z.ZodArray<z.ZodString>;
|
|
506
628
|
}, z.core.$strip>>;
|
|
629
|
+
minOrderQuantityOverridden: z.ZodBoolean;
|
|
507
630
|
minOrderQuantity: z.ZodNullable<z.ZodNumber>;
|
|
508
631
|
returnable: z.ZodNullable<z.ZodBoolean>;
|
|
509
632
|
languageStatuses: z.ZodArray<z.ZodObject<{
|
|
@@ -552,8 +675,8 @@ export declare const scopeIncompleteDetailsSchema: z.ZodObject<{
|
|
|
552
675
|
}, z.core.$strip>>;
|
|
553
676
|
}, z.core.$strip>;
|
|
554
677
|
export type ScopeIncompleteDetails = z.infer<typeof scopeIncompleteDetailsSchema>;
|
|
678
|
+
/** Feature 174 (FR-010) — there is no Language scope: an override sits at C or C×L. */
|
|
555
679
|
export declare const scopeLevelSchema: z.ZodEnum<{
|
|
556
|
-
language: "language";
|
|
557
680
|
channel: "channel";
|
|
558
681
|
channel_language: "channel_language";
|
|
559
682
|
}>;
|
|
@@ -576,14 +699,13 @@ export declare const scopeOverviewResponseSchema: z.ZodObject<{
|
|
|
576
699
|
inactive: "inactive";
|
|
577
700
|
}>;
|
|
578
701
|
statusSource: z.ZodEnum<{
|
|
579
|
-
channel: "channel";
|
|
580
702
|
global: "global";
|
|
703
|
+
channel: "channel";
|
|
581
704
|
channel_language: "channel_language";
|
|
582
705
|
}>;
|
|
583
706
|
overriddenFields: z.ZodArray<z.ZodObject<{
|
|
584
707
|
field: z.ZodString;
|
|
585
708
|
level: z.ZodEnum<{
|
|
586
|
-
language: "language";
|
|
587
709
|
channel: "channel";
|
|
588
710
|
channel_language: "channel_language";
|
|
589
711
|
}>;
|
|
@@ -594,10 +716,6 @@ export declare const scopeOverviewResponseSchema: z.ZodObject<{
|
|
|
594
716
|
channelId: z.ZodString;
|
|
595
717
|
overriddenFields: z.ZodArray<z.ZodString>;
|
|
596
718
|
}, z.core.$strip>>;
|
|
597
|
-
languageColumns: z.ZodArray<z.ZodObject<{
|
|
598
|
-
languageCode: z.ZodString;
|
|
599
|
-
overriddenFields: z.ZodArray<z.ZodString>;
|
|
600
|
-
}, z.core.$strip>>;
|
|
601
719
|
orphans: z.ZodArray<z.ZodObject<{
|
|
602
720
|
field: z.ZodString;
|
|
603
721
|
channelId: z.ZodNullable<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-scopes.d.ts","sourceRoot":"","sources":["../src/product-scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"product-scopes.d.ts","sourceRoot":"","sources":["../src/product-scopes.ts"],"names":[],"mappings":"AAAA,OAAO,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from './common.js';
|
|
2
|
+
import { isoDateTimeSchema, multilingualStringSchema, productVisibilitySchema, UUID_SHAPE_PATTERN, uuidSchema, } from './common.js';
|
|
3
3
|
import { isProductVisibleTo, productStatusSchema } from './catalog.js';
|
|
4
4
|
import { ORDER_MINIMUM_MAX } from './order-minimums.js';
|
|
5
|
+
import { scopeFromRequest } from './product-scope-model.js';
|
|
6
|
+
import { scopedWrite, toScopedWriteOp } from './scoped-write-encoding.js';
|
|
5
7
|
/**
|
|
6
8
|
* Feature 163 (`specs/163-product-data-scopes/`) — product data scopes per sales
|
|
7
9
|
* channel and language: the one rule of effective availability, its admin shapes and
|
|
@@ -57,7 +59,7 @@ export function effectiveAudience(global, channelRow) {
|
|
|
57
59
|
/** Minimum order quantity and the returnable flag in a channel (FR-100). */
|
|
58
60
|
export function effectiveOrderRules(global, channelRow) {
|
|
59
61
|
return {
|
|
60
|
-
minOrderQuantity: channelRow?.minOrderQuantity
|
|
62
|
+
minOrderQuantity: channelRow?.minOrderQuantityOverridden ? channelRow.minOrderQuantity : global.minOrderQuantity,
|
|
61
63
|
returnable: channelRow?.returnable ?? global.returnable,
|
|
62
64
|
};
|
|
63
65
|
}
|
|
@@ -157,7 +159,7 @@ export function resolveScopeLanguage(channel, requestedTag) {
|
|
|
157
159
|
const sameBase = channel.languages.find((language) => baseLanguage(language.toLowerCase()) === base);
|
|
158
160
|
return sameBase ?? channel.defaultLanguage;
|
|
159
161
|
}
|
|
160
|
-
export {
|
|
162
|
+
export { sameLanguage } from './product-scope-model.js';
|
|
161
163
|
/**
|
|
162
164
|
* A channel record as the scope rule reads it. The default language is always
|
|
163
165
|
* one of the languages: a channel whose list is empty, or omits its own
|
|
@@ -194,6 +196,72 @@ function baseLanguage(tag) {
|
|
|
194
196
|
const dash = tag.indexOf('-');
|
|
195
197
|
return dash === -1 ? tag : tag.slice(0, dash);
|
|
196
198
|
}
|
|
199
|
+
/** The most cells one call of the scope write port carries (R13a). */
|
|
200
|
+
export const PRODUCT_SCOPED_WRITE_CELLS_MAX = 2000;
|
|
201
|
+
/** The subject uuid of a field path: the shared shape, lowercase only (issue #781). */
|
|
202
|
+
const LOWERCASE_UUID = UUID_SHAPE_PATTERN.replaceAll('a-fA-F', 'a-f');
|
|
203
|
+
/**
|
|
204
|
+
* The field paths of data-model §9, as a grammar: a family, a subject uuid where the family has
|
|
205
|
+
* one, an attribute key. Global-only fields are not paths.
|
|
206
|
+
*/
|
|
207
|
+
export const fieldPathSchema = z
|
|
208
|
+
.string()
|
|
209
|
+
.max(128)
|
|
210
|
+
.regex(new RegExp(`^(name|description|status|window|audience|minOrderQuantity|returnable|urlKey|seo:(title|description|ogTitle|ogDescription|ogImageUrl)|attribute:[a-z0-9_]{1,64}|gallery:${LOWERCASE_UUID}:(altText|hidden)|galleryRole:(base_image|small_image|thumbnail)|attachment:${LOWERCASE_UUID}:(name|description|hidden)|packagingUnit:${LOWERCASE_UUID}:name)$`), 'field path')
|
|
211
|
+
.transform((path) => path);
|
|
212
|
+
/** A scope as a request names it (`scoped-values-api.md` §1): neither → G, channel → C, both → C×L. */
|
|
213
|
+
export const scopeRequestSchema = z
|
|
214
|
+
.object({
|
|
215
|
+
channelId: uuidSchema.optional(),
|
|
216
|
+
languageCode: z.string().max(16).regex(/^[a-z]{2,3}(-[a-z]{2})?$/i, 'BCP-47 language tag').optional(),
|
|
217
|
+
})
|
|
218
|
+
.strict();
|
|
219
|
+
/** The wire form of {@link ProductScopedWriteInput}: `value` in the write encoding. */
|
|
220
|
+
export const productScopedWriteInputSchema = z
|
|
221
|
+
.object({
|
|
222
|
+
cells: z
|
|
223
|
+
.array(z
|
|
224
|
+
.object({
|
|
225
|
+
scope: scopeRequestSchema,
|
|
226
|
+
field: fieldPathSchema,
|
|
227
|
+
value: scopedWrite(z.unknown().refine((value) => value !== undefined)),
|
|
228
|
+
})
|
|
229
|
+
.strict())
|
|
230
|
+
.max(PRODUCT_SCOPED_WRITE_CELLS_MAX),
|
|
231
|
+
})
|
|
232
|
+
.strict()
|
|
233
|
+
.superRefine((input, ctx) => {
|
|
234
|
+
const seen = new Set();
|
|
235
|
+
input.cells.forEach((cell, index) => {
|
|
236
|
+
if (!scopeFromRequest(cell.scope).ok) {
|
|
237
|
+
ctx.addIssue({ code: 'custom', path: ['cells', index, 'scope'], message: 'A language needs a channel.' });
|
|
238
|
+
}
|
|
239
|
+
const key = `${cell.field}@${cell.scope.channelId ?? ''}/${cell.scope.languageCode?.toLowerCase() ?? ''}`;
|
|
240
|
+
if (seen.has(key))
|
|
241
|
+
ctx.addIssue({ code: 'custom', path: ['cells', index], message: 'Duplicate (field, scope) cell.' });
|
|
242
|
+
seen.add(key);
|
|
243
|
+
});
|
|
244
|
+
})
|
|
245
|
+
.transform((input) => ({
|
|
246
|
+
cells: input.cells.map((cell) => {
|
|
247
|
+
const resolved = scopeFromRequest(cell.scope);
|
|
248
|
+
return {
|
|
249
|
+
scope: resolved.ok ? resolved.scope : { level: 'global' },
|
|
250
|
+
field: cell.field,
|
|
251
|
+
op: toScopedWriteOp(cell.value),
|
|
252
|
+
};
|
|
253
|
+
}),
|
|
254
|
+
}));
|
|
255
|
+
/**
|
|
256
|
+
* R13a (plan decision Q6) — whether an integration (a PIM connector, the products import) may
|
|
257
|
+
* write `field` at all: `name`, `description`, `attribute:<key>`, `gallery:<id>:altText`,
|
|
258
|
+
* `attachment:<id>:name|description`, `packagingUnit:<id>:name`, `urlKey`, `status`, `window`.
|
|
259
|
+
* Every other family — `audience`, `product.*`, `seo:*`, `galleryRole:*`, `*:hidden`,
|
|
260
|
+
* `minOrderQuantity`, `returnable` — is `not_supported`. Pure; the port applies it per cell.
|
|
261
|
+
*/
|
|
262
|
+
export function integrationWritableField(field) {
|
|
263
|
+
return /^(name|description|urlKey|status|window|attribute:[a-z0-9_]{1,64}|gallery:[0-9a-f-]{36}:altText|attachment:[0-9a-f-]{36}:(name|description)|packagingUnit:[0-9a-f-]{36}:name)$/.test(field);
|
|
264
|
+
}
|
|
197
265
|
// --- 4. Admin shapes (admin-scopes-api.md) -----------------------------------------
|
|
198
266
|
/**
|
|
199
267
|
* A channel content language as a request names it: the BCP-47 shape the dictionary
|
|
@@ -253,6 +321,8 @@ export const productScopesSchema = z.object({
|
|
|
253
321
|
nonMemberOrganizationIds: z.array(uuidSchema),
|
|
254
322
|
})
|
|
255
323
|
.nullable(),
|
|
324
|
+
/** Feature 174 — whether the channel overrides the minimum; then `minOrderQuantity` `null` = none here. */
|
|
325
|
+
minOrderQuantityOverridden: z.boolean(),
|
|
256
326
|
minOrderQuantity: z.number().int().nullable(),
|
|
257
327
|
returnable: z.boolean().nullable(),
|
|
258
328
|
languageStatuses: z.array(z.object({ languageCode: z.string(), status: productScopeStatusSchema, orphaned: z.boolean() })),
|
|
@@ -269,25 +339,26 @@ export const productScopesSchema = z.object({
|
|
|
269
339
|
});
|
|
270
340
|
export const productScopesResponseSchema = z.object({ data: productScopesSchema });
|
|
271
341
|
/**
|
|
272
|
-
* §2 — `PATCH /api/v1/admin/catalog/products/:id/scopes
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
342
|
+
* §2 — `PATCH /api/v1/admin/catalog/products/:id/scopes`, in the one write encoding
|
|
343
|
+
* (feature 174, `contracts/write-encoding.md` §5, FR-116): absent or `""` = no change,
|
|
344
|
+
* `{ inherit: true }` = use inherited (deletes the override), `null` = the empty override
|
|
345
|
+
* where the field takes one — `minOrderQuantity: null` = no minimum in this channel,
|
|
346
|
+
* `window: null` = an open window override; `status`, `audience` and `returnable` refuse
|
|
347
|
+
* `null` (`SCOPED_VALUE_INVALID`, `not_emptyable`, from the service). A window whose
|
|
348
|
+
* `from` is not before its `until` is refused with `VALIDATION_FAILED`,
|
|
349
|
+
* `details.field = 'window'`.
|
|
276
350
|
*/
|
|
277
351
|
export const patchProductScopesRequestSchema = z.object({
|
|
278
352
|
channels: z
|
|
279
353
|
.array(z.object({
|
|
280
354
|
channelId: uuidSchema,
|
|
281
|
-
status: productScopeStatusSchema
|
|
282
|
-
window: z
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
audience: audienceRuleSchema.nullable().optional(),
|
|
287
|
-
minOrderQuantity: orderMinimumSchema.nullable().optional(),
|
|
288
|
-
returnable: z.boolean().nullable().optional(),
|
|
355
|
+
status: scopedWrite(productScopeStatusSchema),
|
|
356
|
+
window: scopedWrite(z.object({ from: isoDateTimeSchema.nullable(), until: isoDateTimeSchema.nullable() }).strict()),
|
|
357
|
+
audience: scopedWrite(audienceRuleSchema.strict()),
|
|
358
|
+
minOrderQuantity: scopedWrite(orderMinimumSchema),
|
|
359
|
+
returnable: scopedWrite(z.boolean()),
|
|
289
360
|
languageStatuses: z
|
|
290
|
-
.array(z.object({ languageCode: languageCodeSchema, status: productScopeStatusSchema
|
|
361
|
+
.array(z.object({ languageCode: languageCodeSchema, status: scopedWrite(productScopeStatusSchema) }))
|
|
291
362
|
.max(SCOPE_LANGUAGE_STATUSES_MAX)
|
|
292
363
|
.optional(),
|
|
293
364
|
}))
|
|
@@ -320,7 +391,8 @@ export const scopeInvalidDetailsSchema = z.object({
|
|
|
320
391
|
export const scopeIncompleteDetailsSchema = z.object({
|
|
321
392
|
pairs: z.array(z.object({ channelId: uuidSchema, languageCode: z.string(), missing: z.array(scopeMissingValueSchema) })),
|
|
322
393
|
});
|
|
323
|
-
|
|
394
|
+
/** Feature 174 (FR-010) — there is no Language scope: an override sits at C or C×L. */
|
|
395
|
+
export const scopeLevelSchema = z.enum(['channel_language', 'channel']);
|
|
324
396
|
/** §3 — `GET /api/v1/admin/catalog/products/:id/scope-overview`. */
|
|
325
397
|
export const scopeOverviewResponseSchema = z.object({
|
|
326
398
|
data: z.object({
|
|
@@ -344,7 +416,6 @@ export const scopeOverviewResponseSchema = z.object({
|
|
|
344
416
|
missing: z.array(scopeMissingValueSchema).optional(),
|
|
345
417
|
})),
|
|
346
418
|
channelRows: z.array(z.object({ channelId: uuidSchema, overriddenFields: z.array(z.string()) })),
|
|
347
|
-
languageColumns: z.array(z.object({ languageCode: z.string(), overriddenFields: z.array(z.string()) })),
|
|
348
419
|
orphans: z.array(z.object({
|
|
349
420
|
field: z.string(),
|
|
350
421
|
channelId: uuidSchema.nullable(),
|