@endora-commerce/contracts 0.108.0 → 0.109.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/admin-actions.d.ts +12 -3
- package/dist/admin-actions.d.ts.map +1 -1
- package/dist/admin-actions.js +34 -3
- package/dist/admin-actions.js.map +1 -1
- package/dist/admin-contributions.d.ts +35 -6
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +46 -0
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-notifications.d.ts +17 -1
- package/dist/admin-notifications.d.ts.map +1 -1
- package/dist/admin-preferences.d.ts +108 -0
- package/dist/admin-preferences.d.ts.map +1 -0
- package/dist/admin-preferences.js +133 -0
- package/dist/admin-preferences.js.map +1 -0
- package/dist/admin.d.ts +15 -1
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +7 -0
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +97 -3
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +5 -0
- package/dist/assets-library.js.map +1 -1
- package/dist/blog.d.ts +57 -0
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +63 -1
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +113 -56
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +66 -13
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +273 -34
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +256 -20
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +2233 -0
- package/dist/cms-brand.d.ts.map +1 -0
- package/dist/cms-brand.js +311 -0
- package/dist/cms-brand.js.map +1 -0
- package/dist/cms-contact-form.d.ts +55 -0
- package/dist/cms-contact-form.d.ts.map +1 -0
- package/dist/cms-contact-form.js +100 -0
- package/dist/cms-contact-form.js.map +1 -0
- package/dist/cms.d.ts +537 -3
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +251 -0
- package/dist/cms.js.map +1 -1
- package/dist/crm-rich-text.d.ts +10 -61
- package/dist/crm-rich-text.d.ts.map +1 -1
- package/dist/crm-rich-text.js +10 -300
- package/dist/crm-rich-text.js.map +1 -1
- package/dist/crm.d.ts +110 -82
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +29 -88
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +27 -9
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +6 -0
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +30 -0
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +31 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/document-templates.d.ts +27 -15
- package/dist/document-templates.d.ts.map +1 -1
- package/dist/document-values.d.ts +8 -0
- package/dist/document-values.d.ts.map +1 -1
- package/dist/document-values.js +24 -6
- package/dist/document-values.js.map +1 -1
- package/dist/email.d.ts +5 -0
- package/dist/email.d.ts.map +1 -1
- package/dist/errors.d.ts +105 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +123 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +3 -3
- package/dist/invoices.d.ts +6 -2
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +3 -0
- package/dist/invoices.js.map +1 -1
- package/dist/megamenu.d.ts +674 -0
- package/dist/megamenu.d.ts.map +1 -1
- package/dist/megamenu.js +96 -3
- package/dist/megamenu.js.map +1 -1
- package/dist/mfa.d.ts +1 -0
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +8 -2
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +8 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +5 -0
- package/dist/modules.js.map +1 -1
- package/dist/newsletter.d.ts +3 -3
- package/dist/orders.d.ts +25 -0
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +14 -0
- package/dist/orders.js.map +1 -1
- package/dist/page-builder-props.d.ts +1401 -0
- package/dist/page-builder-props.d.ts.map +1 -0
- package/dist/page-builder-props.js +266 -0
- package/dist/page-builder-props.js.map +1 -0
- package/dist/page-builder-values.d.ts +95 -0
- package/dist/page-builder-values.d.ts.map +1 -0
- package/dist/page-builder-values.js +164 -0
- package/dist/page-builder-values.js.map +1 -0
- package/dist/pim-connector.d.ts +1 -1
- package/dist/platform-language.d.ts +9 -0
- package/dist/platform-language.d.ts.map +1 -1
- package/dist/platform-language.js +14 -0
- package/dist/platform-language.js.map +1 -1
- package/dist/price-books.d.ts +60 -60
- package/dist/price-lists.d.ts +44 -10
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +24 -1
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +115 -55
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +18 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scopes.d.ts +628 -0
- package/dist/product-scopes.d.ts.map +1 -0
- package/dist/product-scopes.js +365 -0
- package/dist/product-scopes.js.map +1 -0
- package/dist/product-summary-text.d.ts +23 -0
- package/dist/product-summary-text.d.ts.map +1 -0
- package/dist/product-summary-text.js +64 -0
- package/dist/product-summary-text.js.map +1 -0
- package/dist/product-url-keys.d.ts +204 -0
- package/dist/product-url-keys.d.ts.map +1 -0
- package/dist/product-url-keys.js +166 -0
- package/dist/product-url-keys.js.map +1 -0
- package/dist/projects.d.ts +2355 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +837 -0
- package/dist/projects.js.map +1 -0
- package/dist/prompt-actions.d.ts +19 -1
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +31 -2
- package/dist/prompt-actions.js.map +1 -1
- package/dist/quick-order.d.ts +0 -1
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +1 -1
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +36 -1
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +24 -0
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts +252 -0
- package/dist/record-references.d.ts.map +1 -0
- package/dist/record-references.js +179 -0
- package/dist/record-references.js.map +1 -0
- package/dist/record-rich-text.d.ts +66 -0
- package/dist/record-rich-text.d.ts.map +1 -0
- package/dist/record-rich-text.js +303 -0
- package/dist/record-rich-text.js.map +1 -0
- package/dist/returns.d.ts +26 -0
- package/dist/returns.d.ts.map +1 -1
- package/dist/sales-channels.d.ts +51 -7
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +38 -4
- package/dist/sales-channels.js.map +1 -1
- package/dist/saved-list-views.d.ts +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-translations.d.ts +48 -0
- package/dist/scoped-translations.d.ts.map +1 -0
- package/dist/scoped-translations.js +78 -0
- package/dist/scoped-translations.js.map +1 -0
- package/dist/search.d.ts +15 -7
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +64 -5
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +31 -4
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +32 -3
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +37 -3
- package/dist/settings.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +29 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +24 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-language-path.d.ts +77 -0
- package/dist/storefront-language-path.d.ts.map +1 -0
- package/dist/storefront-language-path.js +123 -0
- package/dist/storefront-language-path.js.map +1 -0
- package/dist/tasks.d.ts +2842 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +901 -0
- package/dist/tasks.js.map +1 -0
- package/dist/transactional-emails.d.ts +7 -4
- package/dist/transactional-emails.d.ts.map +1 -1
- package/dist/transactional-emails.js +13 -0
- package/dist/transactional-emails.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-language.js","sourceRoot":"","sources":["../src/platform-language.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,gEAAgE;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAG5D,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,OAAO,CAAC;AAEnE,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAsB,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"platform-language.js","sourceRoot":"","sources":["../src/platform-language.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,gEAAgE;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAG5D,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,OAAO,CAAC;AAEnE,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAsB,IAAI,CAAC;AAEzD;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAA8B;IAChE,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IAC5E,OAAQ,mBAAyC,CAAC,QAAQ,CAAC,OAAO,CAAC;QACjE,CAAC,CAAE,OAA6B;QAChC,CAAC,CAAC,iBAAiB,CAAC;AACxB,CAAC"}
|
package/dist/price-books.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export declare const priceBookTypeSchema: z.ZodEnum<{
|
|
|
16
16
|
export type PriceBookType = z.infer<typeof priceBookTypeSchema>;
|
|
17
17
|
export declare const priceBookStatusSchema: z.ZodEnum<{
|
|
18
18
|
expired: "expired";
|
|
19
|
-
draft: "draft";
|
|
20
19
|
active: "active";
|
|
20
|
+
draft: "draft";
|
|
21
21
|
scheduled: "scheduled";
|
|
22
22
|
}>;
|
|
23
23
|
export type PriceBookStatus = z.infer<typeof priceBookStatusSchema>;
|
|
@@ -93,10 +93,10 @@ export type PriceBookPatch = z.infer<typeof priceBookPatchSchema>;
|
|
|
93
93
|
/** Derived from which selection coordinates are set; never stored. */
|
|
94
94
|
export declare const priceBookSelectionKindSchema: z.ZodEnum<{
|
|
95
95
|
all: "all";
|
|
96
|
-
|
|
96
|
+
variant: "variant";
|
|
97
97
|
product: "product";
|
|
98
|
+
category: "category";
|
|
98
99
|
attribute: "attribute";
|
|
99
|
-
variant: "variant";
|
|
100
100
|
category_attribute: "category_attribute";
|
|
101
101
|
}>;
|
|
102
102
|
export type PriceBookSelectionKind = z.infer<typeof priceBookSelectionKindSchema>;
|
|
@@ -283,17 +283,17 @@ export declare const basePricesWriteSchema: z.ZodObject<{
|
|
|
283
283
|
export type BasePricesWrite = z.infer<typeof basePricesWriteSchema>;
|
|
284
284
|
/** Which tier priced a line (FR-030). */
|
|
285
285
|
export declare const priceSourceSchema: z.ZodEnum<{
|
|
286
|
-
buyer: "buyer";
|
|
287
286
|
base: "base";
|
|
287
|
+
buyer: "buyer";
|
|
288
288
|
catalogue: "catalogue";
|
|
289
289
|
sale: "sale";
|
|
290
290
|
}>;
|
|
291
291
|
export type PriceSource = z.infer<typeof priceSourceSchema>;
|
|
292
292
|
/** What a cart or order line records about its unit price: a tier, or an agreed price. */
|
|
293
293
|
export declare const linePriceSourceSchema: z.ZodEnum<{
|
|
294
|
+
base: "base";
|
|
294
295
|
buyer: "buyer";
|
|
295
296
|
agreed: "agreed";
|
|
296
|
-
base: "base";
|
|
297
297
|
catalogue: "catalogue";
|
|
298
298
|
sale: "sale";
|
|
299
299
|
}>;
|
|
@@ -359,8 +359,8 @@ export declare const priceBookExplanationCandidateSchema: z.ZodObject<{
|
|
|
359
359
|
}, z.core.$strip>;
|
|
360
360
|
export declare const priceBookExplanationSchema: z.ZodObject<{
|
|
361
361
|
tier: z.ZodNullable<z.ZodEnum<{
|
|
362
|
-
buyer: "buyer";
|
|
363
362
|
base: "base";
|
|
363
|
+
buyer: "buyer";
|
|
364
364
|
catalogue: "catalogue";
|
|
365
365
|
sale: "sale";
|
|
366
366
|
}>>;
|
|
@@ -475,8 +475,8 @@ export declare const priceBookSchema: z.ZodObject<{
|
|
|
475
475
|
}>;
|
|
476
476
|
status: z.ZodEnum<{
|
|
477
477
|
expired: "expired";
|
|
478
|
-
draft: "draft";
|
|
479
478
|
active: "active";
|
|
479
|
+
draft: "draft";
|
|
480
480
|
scheduled: "scheduled";
|
|
481
481
|
}>;
|
|
482
482
|
currencyCode: z.ZodString;
|
|
@@ -508,10 +508,10 @@ export declare const priceBookRowMatchSchema: z.ZodObject<{
|
|
|
508
508
|
rowId: z.ZodString;
|
|
509
509
|
selectionKind: z.ZodEnum<{
|
|
510
510
|
all: "all";
|
|
511
|
-
|
|
511
|
+
variant: "variant";
|
|
512
512
|
product: "product";
|
|
513
|
+
category: "category";
|
|
513
514
|
attribute: "attribute";
|
|
514
|
-
variant: "variant";
|
|
515
515
|
category_attribute: "category_attribute";
|
|
516
516
|
}>;
|
|
517
517
|
minQuantity: z.ZodNumber;
|
|
@@ -538,8 +538,8 @@ export declare const priceBookSummarySchema: z.ZodObject<{
|
|
|
538
538
|
}>;
|
|
539
539
|
status: z.ZodEnum<{
|
|
540
540
|
expired: "expired";
|
|
541
|
-
draft: "draft";
|
|
542
541
|
active: "active";
|
|
542
|
+
draft: "draft";
|
|
543
543
|
scheduled: "scheduled";
|
|
544
544
|
}>;
|
|
545
545
|
currencyCode: z.ZodString;
|
|
@@ -563,10 +563,10 @@ export declare const priceBookSummarySchema: z.ZodObject<{
|
|
|
563
563
|
rowId: z.ZodString;
|
|
564
564
|
selectionKind: z.ZodEnum<{
|
|
565
565
|
all: "all";
|
|
566
|
-
|
|
566
|
+
variant: "variant";
|
|
567
567
|
product: "product";
|
|
568
|
+
category: "category";
|
|
568
569
|
attribute: "attribute";
|
|
569
|
-
variant: "variant";
|
|
570
570
|
category_attribute: "category_attribute";
|
|
571
571
|
}>;
|
|
572
572
|
minQuantity: z.ZodNumber;
|
|
@@ -597,8 +597,8 @@ export declare const priceBookListQuerySchema: z.ZodObject<{
|
|
|
597
597
|
}>>>>;
|
|
598
598
|
status: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
599
599
|
expired: "expired";
|
|
600
|
-
draft: "draft";
|
|
601
600
|
active: "active";
|
|
601
|
+
draft: "draft";
|
|
602
602
|
scheduled: "scheduled";
|
|
603
603
|
}>>>>;
|
|
604
604
|
currency: z.ZodOptional<z.ZodString>;
|
|
@@ -631,8 +631,8 @@ export declare const priceBookListResponseSchema: z.ZodObject<{
|
|
|
631
631
|
}>;
|
|
632
632
|
status: z.ZodEnum<{
|
|
633
633
|
expired: "expired";
|
|
634
|
-
draft: "draft";
|
|
635
634
|
active: "active";
|
|
635
|
+
draft: "draft";
|
|
636
636
|
scheduled: "scheduled";
|
|
637
637
|
}>;
|
|
638
638
|
currencyCode: z.ZodString;
|
|
@@ -656,10 +656,10 @@ export declare const priceBookListResponseSchema: z.ZodObject<{
|
|
|
656
656
|
rowId: z.ZodString;
|
|
657
657
|
selectionKind: z.ZodEnum<{
|
|
658
658
|
all: "all";
|
|
659
|
-
|
|
659
|
+
variant: "variant";
|
|
660
660
|
product: "product";
|
|
661
|
+
category: "category";
|
|
661
662
|
attribute: "attribute";
|
|
662
|
-
variant: "variant";
|
|
663
663
|
category_attribute: "category_attribute";
|
|
664
664
|
}>;
|
|
665
665
|
minQuantity: z.ZodNumber;
|
|
@@ -749,10 +749,10 @@ export declare const priceBookRowSchema: z.ZodObject<{
|
|
|
749
749
|
id: z.ZodString;
|
|
750
750
|
selectionKind: z.ZodEnum<{
|
|
751
751
|
all: "all";
|
|
752
|
-
|
|
752
|
+
variant: "variant";
|
|
753
753
|
product: "product";
|
|
754
|
+
category: "category";
|
|
754
755
|
attribute: "attribute";
|
|
755
|
-
variant: "variant";
|
|
756
756
|
category_attribute: "category_attribute";
|
|
757
757
|
}>;
|
|
758
758
|
selection: z.ZodObject<{
|
|
@@ -806,10 +806,10 @@ export type PriceBookRow = z.infer<typeof priceBookRowSchema>;
|
|
|
806
806
|
export declare const priceBookRowsQuerySchema: z.ZodObject<{
|
|
807
807
|
selectionKind: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
808
808
|
all: "all";
|
|
809
|
-
|
|
809
|
+
variant: "variant";
|
|
810
810
|
product: "product";
|
|
811
|
+
category: "category";
|
|
811
812
|
attribute: "attribute";
|
|
812
|
-
variant: "variant";
|
|
813
813
|
category_attribute: "category_attribute";
|
|
814
814
|
}>>>>;
|
|
815
815
|
productId: z.ZodOptional<z.ZodString>;
|
|
@@ -834,10 +834,10 @@ export declare const PRICE_BOOK_LINES_MAX_PAGE_SIZE = 500;
|
|
|
834
834
|
export declare const priceBookLinesQuerySchema: z.ZodObject<{
|
|
835
835
|
kind: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
836
836
|
all: "all";
|
|
837
|
-
|
|
837
|
+
variant: "variant";
|
|
838
838
|
product: "product";
|
|
839
|
+
category: "category";
|
|
839
840
|
attribute: "attribute";
|
|
840
|
-
variant: "variant";
|
|
841
841
|
category_attribute: "category_attribute";
|
|
842
842
|
}>>>>;
|
|
843
843
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -850,10 +850,10 @@ export declare const priceBookVariantLineSchema: z.ZodObject<{
|
|
|
850
850
|
selectionKey: z.ZodString;
|
|
851
851
|
selectionKind: z.ZodEnum<{
|
|
852
852
|
all: "all";
|
|
853
|
-
|
|
853
|
+
variant: "variant";
|
|
854
854
|
product: "product";
|
|
855
|
+
category: "category";
|
|
855
856
|
attribute: "attribute";
|
|
856
|
-
variant: "variant";
|
|
857
857
|
category_attribute: "category_attribute";
|
|
858
858
|
}>;
|
|
859
859
|
selection: z.ZodObject<{
|
|
@@ -893,10 +893,10 @@ export declare const priceBookVariantLineSchema: z.ZodObject<{
|
|
|
893
893
|
id: z.ZodString;
|
|
894
894
|
selectionKind: z.ZodEnum<{
|
|
895
895
|
all: "all";
|
|
896
|
-
|
|
896
|
+
variant: "variant";
|
|
897
897
|
product: "product";
|
|
898
|
+
category: "category";
|
|
898
899
|
attribute: "attribute";
|
|
899
|
-
variant: "variant";
|
|
900
900
|
category_attribute: "category_attribute";
|
|
901
901
|
}>;
|
|
902
902
|
selection: z.ZodObject<{
|
|
@@ -957,10 +957,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
|
|
|
957
957
|
selectionKey: z.ZodString;
|
|
958
958
|
selectionKind: z.ZodEnum<{
|
|
959
959
|
all: "all";
|
|
960
|
-
|
|
960
|
+
variant: "variant";
|
|
961
961
|
product: "product";
|
|
962
|
+
category: "category";
|
|
962
963
|
attribute: "attribute";
|
|
963
|
-
variant: "variant";
|
|
964
964
|
category_attribute: "category_attribute";
|
|
965
965
|
}>;
|
|
966
966
|
selection: z.ZodObject<{
|
|
@@ -1000,10 +1000,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
|
|
|
1000
1000
|
id: z.ZodString;
|
|
1001
1001
|
selectionKind: z.ZodEnum<{
|
|
1002
1002
|
all: "all";
|
|
1003
|
-
|
|
1003
|
+
variant: "variant";
|
|
1004
1004
|
product: "product";
|
|
1005
|
+
category: "category";
|
|
1005
1006
|
attribute: "attribute";
|
|
1006
|
-
variant: "variant";
|
|
1007
1007
|
category_attribute: "category_attribute";
|
|
1008
1008
|
}>;
|
|
1009
1009
|
selection: z.ZodObject<{
|
|
@@ -1056,10 +1056,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
|
|
|
1056
1056
|
selectionKey: z.ZodString;
|
|
1057
1057
|
selectionKind: z.ZodEnum<{
|
|
1058
1058
|
all: "all";
|
|
1059
|
-
|
|
1059
|
+
variant: "variant";
|
|
1060
1060
|
product: "product";
|
|
1061
|
+
category: "category";
|
|
1061
1062
|
attribute: "attribute";
|
|
1062
|
-
variant: "variant";
|
|
1063
1063
|
category_attribute: "category_attribute";
|
|
1064
1064
|
}>;
|
|
1065
1065
|
selection: z.ZodObject<{
|
|
@@ -1099,10 +1099,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
|
|
|
1099
1099
|
id: z.ZodString;
|
|
1100
1100
|
selectionKind: z.ZodEnum<{
|
|
1101
1101
|
all: "all";
|
|
1102
|
-
|
|
1102
|
+
variant: "variant";
|
|
1103
1103
|
product: "product";
|
|
1104
|
+
category: "category";
|
|
1104
1105
|
attribute: "attribute";
|
|
1105
|
-
variant: "variant";
|
|
1106
1106
|
category_attribute: "category_attribute";
|
|
1107
1107
|
}>;
|
|
1108
1108
|
selection: z.ZodObject<{
|
|
@@ -1179,10 +1179,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
|
|
|
1179
1179
|
selectionKey: z.ZodString;
|
|
1180
1180
|
selectionKind: z.ZodEnum<{
|
|
1181
1181
|
all: "all";
|
|
1182
|
-
|
|
1182
|
+
variant: "variant";
|
|
1183
1183
|
product: "product";
|
|
1184
|
+
category: "category";
|
|
1184
1185
|
attribute: "attribute";
|
|
1185
|
-
variant: "variant";
|
|
1186
1186
|
category_attribute: "category_attribute";
|
|
1187
1187
|
}>;
|
|
1188
1188
|
selection: z.ZodObject<{
|
|
@@ -1222,10 +1222,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
|
|
|
1222
1222
|
id: z.ZodString;
|
|
1223
1223
|
selectionKind: z.ZodEnum<{
|
|
1224
1224
|
all: "all";
|
|
1225
|
-
|
|
1225
|
+
variant: "variant";
|
|
1226
1226
|
product: "product";
|
|
1227
|
+
category: "category";
|
|
1227
1228
|
attribute: "attribute";
|
|
1228
|
-
variant: "variant";
|
|
1229
1229
|
category_attribute: "category_attribute";
|
|
1230
1230
|
}>;
|
|
1231
1231
|
selection: z.ZodObject<{
|
|
@@ -1278,10 +1278,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
|
|
|
1278
1278
|
selectionKey: z.ZodString;
|
|
1279
1279
|
selectionKind: z.ZodEnum<{
|
|
1280
1280
|
all: "all";
|
|
1281
|
-
|
|
1281
|
+
variant: "variant";
|
|
1282
1282
|
product: "product";
|
|
1283
|
+
category: "category";
|
|
1283
1284
|
attribute: "attribute";
|
|
1284
|
-
variant: "variant";
|
|
1285
1285
|
category_attribute: "category_attribute";
|
|
1286
1286
|
}>;
|
|
1287
1287
|
selection: z.ZodObject<{
|
|
@@ -1321,10 +1321,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
|
|
|
1321
1321
|
id: z.ZodString;
|
|
1322
1322
|
selectionKind: z.ZodEnum<{
|
|
1323
1323
|
all: "all";
|
|
1324
|
-
|
|
1324
|
+
variant: "variant";
|
|
1325
1325
|
product: "product";
|
|
1326
|
+
category: "category";
|
|
1326
1327
|
attribute: "attribute";
|
|
1327
|
-
variant: "variant";
|
|
1328
1328
|
category_attribute: "category_attribute";
|
|
1329
1329
|
}>;
|
|
1330
1330
|
selection: z.ZodObject<{
|
|
@@ -1505,10 +1505,10 @@ export declare const priceBookDiffRowSchema: z.ZodObject<{
|
|
|
1505
1505
|
id: z.ZodOptional<z.ZodString>;
|
|
1506
1506
|
selectionKind: z.ZodEnum<{
|
|
1507
1507
|
all: "all";
|
|
1508
|
-
|
|
1508
|
+
variant: "variant";
|
|
1509
1509
|
product: "product";
|
|
1510
|
+
category: "category";
|
|
1510
1511
|
attribute: "attribute";
|
|
1511
|
-
variant: "variant";
|
|
1512
1512
|
category_attribute: "category_attribute";
|
|
1513
1513
|
}>;
|
|
1514
1514
|
selection: z.ZodObject<{
|
|
@@ -1550,10 +1550,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
|
|
|
1550
1550
|
id: z.ZodOptional<z.ZodString>;
|
|
1551
1551
|
selectionKind: z.ZodEnum<{
|
|
1552
1552
|
all: "all";
|
|
1553
|
-
|
|
1553
|
+
variant: "variant";
|
|
1554
1554
|
product: "product";
|
|
1555
|
+
category: "category";
|
|
1555
1556
|
attribute: "attribute";
|
|
1556
|
-
variant: "variant";
|
|
1557
1557
|
category_attribute: "category_attribute";
|
|
1558
1558
|
}>;
|
|
1559
1559
|
selection: z.ZodObject<{
|
|
@@ -1592,10 +1592,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
|
|
|
1592
1592
|
id: z.ZodOptional<z.ZodString>;
|
|
1593
1593
|
selectionKind: z.ZodEnum<{
|
|
1594
1594
|
all: "all";
|
|
1595
|
-
|
|
1595
|
+
variant: "variant";
|
|
1596
1596
|
product: "product";
|
|
1597
|
+
category: "category";
|
|
1597
1598
|
attribute: "attribute";
|
|
1598
|
-
variant: "variant";
|
|
1599
1599
|
category_attribute: "category_attribute";
|
|
1600
1600
|
}>;
|
|
1601
1601
|
selection: z.ZodObject<{
|
|
@@ -1634,10 +1634,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
|
|
|
1634
1634
|
id: z.ZodOptional<z.ZodString>;
|
|
1635
1635
|
selectionKind: z.ZodEnum<{
|
|
1636
1636
|
all: "all";
|
|
1637
|
-
|
|
1637
|
+
variant: "variant";
|
|
1638
1638
|
product: "product";
|
|
1639
|
+
category: "category";
|
|
1639
1640
|
attribute: "attribute";
|
|
1640
|
-
variant: "variant";
|
|
1641
1641
|
category_attribute: "category_attribute";
|
|
1642
1642
|
}>;
|
|
1643
1643
|
selection: z.ZodObject<{
|
|
@@ -1675,10 +1675,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
|
|
|
1675
1675
|
id: z.ZodOptional<z.ZodString>;
|
|
1676
1676
|
selectionKind: z.ZodEnum<{
|
|
1677
1677
|
all: "all";
|
|
1678
|
-
|
|
1678
|
+
variant: "variant";
|
|
1679
1679
|
product: "product";
|
|
1680
|
+
category: "category";
|
|
1680
1681
|
attribute: "attribute";
|
|
1681
|
-
variant: "variant";
|
|
1682
1682
|
category_attribute: "category_attribute";
|
|
1683
1683
|
}>;
|
|
1684
1684
|
selection: z.ZodObject<{
|
|
@@ -1717,10 +1717,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
|
|
|
1717
1717
|
id: z.ZodOptional<z.ZodString>;
|
|
1718
1718
|
selectionKind: z.ZodEnum<{
|
|
1719
1719
|
all: "all";
|
|
1720
|
-
|
|
1720
|
+
variant: "variant";
|
|
1721
1721
|
product: "product";
|
|
1722
|
+
category: "category";
|
|
1722
1723
|
attribute: "attribute";
|
|
1723
|
-
variant: "variant";
|
|
1724
1724
|
category_attribute: "category_attribute";
|
|
1725
1725
|
}>;
|
|
1726
1726
|
selection: z.ZodObject<{
|
|
@@ -1796,10 +1796,10 @@ export declare const priceBookRowsWriteResultSchema: z.ZodObject<{
|
|
|
1796
1796
|
id: z.ZodOptional<z.ZodString>;
|
|
1797
1797
|
selectionKind: z.ZodEnum<{
|
|
1798
1798
|
all: "all";
|
|
1799
|
-
|
|
1799
|
+
variant: "variant";
|
|
1800
1800
|
product: "product";
|
|
1801
|
+
category: "category";
|
|
1801
1802
|
attribute: "attribute";
|
|
1802
|
-
variant: "variant";
|
|
1803
1803
|
category_attribute: "category_attribute";
|
|
1804
1804
|
}>;
|
|
1805
1805
|
selection: z.ZodObject<{
|
|
@@ -1841,10 +1841,10 @@ export declare const priceBookRowsResponseSchema: z.ZodObject<{
|
|
|
1841
1841
|
id: z.ZodString;
|
|
1842
1842
|
selectionKind: z.ZodEnum<{
|
|
1843
1843
|
all: "all";
|
|
1844
|
-
|
|
1844
|
+
variant: "variant";
|
|
1845
1845
|
product: "product";
|
|
1846
|
+
category: "category";
|
|
1846
1847
|
attribute: "attribute";
|
|
1847
|
-
variant: "variant";
|
|
1848
1848
|
category_attribute: "category_attribute";
|
|
1849
1849
|
}>;
|
|
1850
1850
|
selection: z.ZodObject<{
|
|
@@ -2035,8 +2035,8 @@ export declare const priceBookResolvedLineSchema: z.ZodObject<{
|
|
|
2035
2035
|
amount: z.ZodString;
|
|
2036
2036
|
currency: z.ZodString;
|
|
2037
2037
|
source: z.ZodEnum<{
|
|
2038
|
-
buyer: "buyer";
|
|
2039
2038
|
base: "base";
|
|
2039
|
+
buyer: "buyer";
|
|
2040
2040
|
catalogue: "catalogue";
|
|
2041
2041
|
sale: "sale";
|
|
2042
2042
|
}>;
|
|
@@ -2044,8 +2044,8 @@ export declare const priceBookResolvedLineSchema: z.ZodObject<{
|
|
|
2044
2044
|
}, z.core.$strip>>;
|
|
2045
2045
|
explanation: z.ZodObject<{
|
|
2046
2046
|
tier: z.ZodNullable<z.ZodEnum<{
|
|
2047
|
-
buyer: "buyer";
|
|
2048
2047
|
base: "base";
|
|
2048
|
+
buyer: "buyer";
|
|
2049
2049
|
catalogue: "catalogue";
|
|
2050
2050
|
sale: "sale";
|
|
2051
2051
|
}>>;
|
package/dist/price-lists.d.ts
CHANGED
|
@@ -2,12 +2,26 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { ProductResolvedPrice } from './catalog.js';
|
|
3
3
|
import { type PriceSource } from './price-books.js';
|
|
4
4
|
export declare const displayModeSchema: z.ZodEnum<{
|
|
5
|
-
both: "both";
|
|
6
5
|
none: "none";
|
|
6
|
+
both: "both";
|
|
7
7
|
gross_only: "gross_only";
|
|
8
8
|
net_only: "net_only";
|
|
9
9
|
}>;
|
|
10
10
|
export type DisplayMode = z.infer<typeof displayModeSchema>;
|
|
11
|
+
/**
|
|
12
|
+
* Issue #491 — whether a resolved display mode withholds every amount from the
|
|
13
|
+
* viewer it was resolved for.
|
|
14
|
+
*
|
|
15
|
+
* `none` is "price on request": the shop does not show this viewer a price, and
|
|
16
|
+
* the server does not send one. `price_lists` applies it where it maps a
|
|
17
|
+
* resolution onto the published listing and engine shapes
|
|
18
|
+
* (`ListingPriceDetail`, `ListingPrice`, the resolved-price endpoint), so every
|
|
19
|
+
* catalogue surface gets no amount and `displayMode: 'none'`. A **line** answer
|
|
20
|
+
* ({@link LinePriceResult}) keeps its amount, because it is what a charging
|
|
21
|
+
* consumer refuses as quote-only; a consumer that publishes a line amount to a
|
|
22
|
+
* viewer asks this function first rather than re-stating the rule.
|
|
23
|
+
*/
|
|
24
|
+
export declare function displayModeWithholdsAmounts(mode: DisplayMode): boolean;
|
|
11
25
|
/**
|
|
12
26
|
* Feature 160 (FR-029, owner ruling 2026-10-23) — why a price book pinned to a
|
|
13
27
|
* product feed publishes no prices now. A feed is fetched by a provider, which
|
|
@@ -36,21 +50,21 @@ export type PinnedPriceBookPublishability = {
|
|
|
36
50
|
reason: PinnedPriceBookUnpublishableReason;
|
|
37
51
|
};
|
|
38
52
|
export declare const displayModeOverrideScopeSchema: z.ZodEnum<{
|
|
39
|
-
category: "category";
|
|
40
53
|
product: "product";
|
|
54
|
+
category: "category";
|
|
41
55
|
organization: "organization";
|
|
42
56
|
}>;
|
|
43
57
|
export type DisplayModeOverrideScope = z.infer<typeof displayModeOverrideScopeSchema>;
|
|
44
58
|
export declare const displayModeOverrideSchema: z.ZodObject<{
|
|
45
59
|
scope: z.ZodEnum<{
|
|
46
|
-
category: "category";
|
|
47
60
|
product: "product";
|
|
61
|
+
category: "category";
|
|
48
62
|
organization: "organization";
|
|
49
63
|
}>;
|
|
50
64
|
targetId: z.ZodString;
|
|
51
65
|
mode: z.ZodEnum<{
|
|
52
|
-
both: "both";
|
|
53
66
|
none: "none";
|
|
67
|
+
both: "both";
|
|
54
68
|
gross_only: "gross_only";
|
|
55
69
|
net_only: "net_only";
|
|
56
70
|
}>;
|
|
@@ -59,8 +73,8 @@ export declare const displayModeOverrideSchema: z.ZodObject<{
|
|
|
59
73
|
export type DisplayModeOverride = z.infer<typeof displayModeOverrideSchema>;
|
|
60
74
|
export declare const upsertDisplayModeOverrideRequestSchema: z.ZodObject<{
|
|
61
75
|
mode: z.ZodUnion<[z.ZodEnum<{
|
|
62
|
-
both: "both";
|
|
63
76
|
none: "none";
|
|
77
|
+
both: "both";
|
|
64
78
|
gross_only: "gross_only";
|
|
65
79
|
net_only: "net_only";
|
|
66
80
|
}>, z.ZodLiteral<"inherit">]>;
|
|
@@ -69,6 +83,11 @@ export declare const upsertDisplayModeOverrideRequestSchema: z.ZodObject<{
|
|
|
69
83
|
* `GET /api/v1/storefront/products/:id/resolved-price`. A product no price book
|
|
70
84
|
* prices for the buyer (FR-018) is **unpriced**: `baseListId`, `basePrice` and
|
|
71
85
|
* `quantityBracket` are all `null` together — never an empty-string id.
|
|
86
|
+
*
|
|
87
|
+
* Issue #491 — a product whose display mode resolves to `none` for the viewer
|
|
88
|
+
* answers the same way: no book, no amount, no bracket, no sale, `source` and
|
|
89
|
+
* `compareAt` `null` and no `listPrice`, with `displayMode: 'none'` so the page
|
|
90
|
+
* can tell "price on request" from "no price".
|
|
72
91
|
*/
|
|
73
92
|
export declare const resolvedPriceEngineSchema: z.ZodObject<{
|
|
74
93
|
baseListId: z.ZodNullable<z.ZodString>;
|
|
@@ -82,8 +101,8 @@ export declare const resolvedPriceEngineSchema: z.ZodObject<{
|
|
|
82
101
|
currency: z.ZodString;
|
|
83
102
|
}, z.core.$strip>>;
|
|
84
103
|
displayMode: z.ZodEnum<{
|
|
85
|
-
both: "both";
|
|
86
104
|
none: "none";
|
|
105
|
+
both: "both";
|
|
87
106
|
gross_only: "gross_only";
|
|
88
107
|
net_only: "net_only";
|
|
89
108
|
}>;
|
|
@@ -93,8 +112,8 @@ export declare const resolvedPriceEngineSchema: z.ZodObject<{
|
|
|
93
112
|
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
94
113
|
}, z.core.$strip>>;
|
|
95
114
|
source: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
96
|
-
buyer: "buyer";
|
|
97
115
|
base: "base";
|
|
116
|
+
buyer: "buyer";
|
|
98
117
|
catalogue: "catalogue";
|
|
99
118
|
sale: "sale";
|
|
100
119
|
}>>>;
|
|
@@ -113,7 +132,9 @@ export type ResolvedPriceEngine = z.infer<typeof resolvedPriceEngineSchema>;
|
|
|
113
132
|
* `price_list` — a price book priced this product for this buyer (the base
|
|
114
133
|
* book, an everyone book of the channel, a buyer book or a
|
|
115
134
|
* sale; `priceSource` names the tier);
|
|
116
|
-
* `none` — nothing prices it,
|
|
135
|
+
* `none` — nothing prices it, or the viewer's display mode is `none`
|
|
136
|
+
* (issue #491: the amount is withheld on the server), and the
|
|
137
|
+
* listing renders no price.
|
|
117
138
|
*
|
|
118
139
|
* Feature 160 removed the third arm, `product` — the price assigned directly
|
|
119
140
|
* to the Product (the legacy `defaultPrice` attribute): a product has no price
|
|
@@ -137,8 +158,8 @@ export declare const listingPriceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
137
158
|
priceListId: z.ZodString;
|
|
138
159
|
isSale: z.ZodBoolean;
|
|
139
160
|
priceSource: z.ZodOptional<z.ZodEnum<{
|
|
140
|
-
buyer: "buyer";
|
|
141
161
|
base: "base";
|
|
162
|
+
buyer: "buyer";
|
|
142
163
|
catalogue: "catalogue";
|
|
143
164
|
sale: "sale";
|
|
144
165
|
}>>;
|
|
@@ -240,6 +261,11 @@ export interface ListingPriceInput {
|
|
|
240
261
|
* the listing chain's answer (`price`, what `ProductSummary.price` is built
|
|
241
262
|
* from) and the base / sale / display-mode split a product page, a home-page
|
|
242
263
|
* card and a typeahead suggestion show (D-287 P0).
|
|
264
|
+
*
|
|
265
|
+
* Issue #491 — under `displayMode: 'none'` it carries **no amount**: `price` is
|
|
266
|
+
* the `none` arm, `basePrice` and `salePrice` are `null`, `listPrice` is absent
|
|
267
|
+
* and every `tiers` entry is `null`. The engine resolved them and withholds them
|
|
268
|
+
* here, once, so no consumer can forward them by mistake.
|
|
243
269
|
*/
|
|
244
270
|
export interface ListingPriceDetail extends ProductResolvedPrice {
|
|
245
271
|
price: ListingPrice;
|
|
@@ -539,7 +565,15 @@ export interface ListingPriceOrderChunk {
|
|
|
539
565
|
*/
|
|
540
566
|
unordered?: boolean;
|
|
541
567
|
}
|
|
542
|
-
/**
|
|
568
|
+
/**
|
|
569
|
+
* What a resolved line price is, once the whole chain has run.
|
|
570
|
+
*
|
|
571
|
+
* A line keeps its amount under `displayMode: 'none'` (issue #491): it is the
|
|
572
|
+
* charging path, and every charging consumer refuses such a line as quote-only
|
|
573
|
+
* by the mode beside the amount. A consumer that **publishes** a line amount to
|
|
574
|
+
* a viewer — the external catalogue API — withholds it first, through
|
|
575
|
+
* {@link displayModeWithholdsAmounts}.
|
|
576
|
+
*/
|
|
543
577
|
export interface LinePriceResult {
|
|
544
578
|
/** Decimal string — it lands verbatim on the cart line and then the order. */
|
|
545
579
|
amount: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"price-lists.d.ts","sourceRoot":"","sources":["../src/price-lists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAuBvE,eAAO,MAAM,iBAAiB;;;;;EAK5B,CAAC;AACH,MAAM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 export const displayModeSchema = z.enum([
|
|
|
25
25
|
'both',
|
|
26
26
|
'none',
|
|
27
27
|
]);
|
|
28
|
+
/**
|
|
29
|
+
* Issue #491 — whether a resolved display mode withholds every amount from the
|
|
30
|
+
* viewer it was resolved for.
|
|
31
|
+
*
|
|
32
|
+
* `none` is "price on request": the shop does not show this viewer a price, and
|
|
33
|
+
* the server does not send one. `price_lists` applies it where it maps a
|
|
34
|
+
* resolution onto the published listing and engine shapes
|
|
35
|
+
* (`ListingPriceDetail`, `ListingPrice`, the resolved-price endpoint), so every
|
|
36
|
+
* catalogue surface gets no amount and `displayMode: 'none'`. A **line** answer
|
|
37
|
+
* ({@link LinePriceResult}) keeps its amount, because it is what a charging
|
|
38
|
+
* consumer refuses as quote-only; a consumer that publishes a line amount to a
|
|
39
|
+
* viewer asks this function first rather than re-stating the rule.
|
|
40
|
+
*/
|
|
41
|
+
export function displayModeWithholdsAmounts(mode) {
|
|
42
|
+
return mode === 'none';
|
|
43
|
+
}
|
|
28
44
|
/**
|
|
29
45
|
* Feature 160 (FR-029, owner ruling 2026-10-23) — why a price book pinned to a
|
|
30
46
|
* product feed publishes no prices now. A feed is fetched by a provider, which
|
|
@@ -72,6 +88,11 @@ const RESOLVED_MONEY = z.object({ amount: DECIMAL_STRING, currency: CURRENCY });
|
|
|
72
88
|
* `GET /api/v1/storefront/products/:id/resolved-price`. A product no price book
|
|
73
89
|
* prices for the buyer (FR-018) is **unpriced**: `baseListId`, `basePrice` and
|
|
74
90
|
* `quantityBracket` are all `null` together — never an empty-string id.
|
|
91
|
+
*
|
|
92
|
+
* Issue #491 — a product whose display mode resolves to `none` for the viewer
|
|
93
|
+
* answers the same way: no book, no amount, no bracket, no sale, `source` and
|
|
94
|
+
* `compareAt` `null` and no `listPrice`, with `displayMode: 'none'` so the page
|
|
95
|
+
* can tell "price on request" from "no price".
|
|
75
96
|
*/
|
|
76
97
|
export const resolvedPriceEngineSchema = z
|
|
77
98
|
.object({
|
|
@@ -113,7 +134,9 @@ export const resolvedPriceEngineSchema = z
|
|
|
113
134
|
* `price_list` — a price book priced this product for this buyer (the base
|
|
114
135
|
* book, an everyone book of the channel, a buyer book or a
|
|
115
136
|
* sale; `priceSource` names the tier);
|
|
116
|
-
* `none` — nothing prices it,
|
|
137
|
+
* `none` — nothing prices it, or the viewer's display mode is `none`
|
|
138
|
+
* (issue #491: the amount is withheld on the server), and the
|
|
139
|
+
* listing renders no price.
|
|
117
140
|
*
|
|
118
141
|
* Feature 160 removed the third arm, `product` — the price assigned directly
|
|
119
142
|
* to the Product (the legacy `defaultPrice` attribute): a product has no price
|