@endora-commerce/contracts 0.110.0 → 0.111.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/dist/accept-language.d.ts +31 -0
  2. package/dist/accept-language.js +64 -0
  3. package/dist/admin-actions.d.ts +2 -0
  4. package/dist/admin-actions.js +18 -0
  5. package/dist/admin-contributions.d.ts +37 -5
  6. package/dist/admin-contributions.js +9 -2
  7. package/dist/admin-roles.d.ts +9 -0
  8. package/dist/admin.d.ts +37 -0
  9. package/dist/admin.js +19 -0
  10. package/dist/api-keys.d.ts +22 -0
  11. package/dist/api-keys.js +4 -0
  12. package/dist/assets-library.d.ts +19 -0
  13. package/dist/assets-library.js +14 -0
  14. package/dist/auth.d.ts +9 -0
  15. package/dist/auth.js +9 -0
  16. package/dist/carts.d.ts +30 -1
  17. package/dist/carts.js +20 -5
  18. package/dist/catalog.d.ts +61 -22
  19. package/dist/catalog.js +32 -6
  20. package/dist/cms.d.ts +33 -3
  21. package/dist/cms.js +15 -0
  22. package/dist/command-hooks.d.ts +301 -0
  23. package/dist/command-hooks.js +248 -0
  24. package/dist/comparisons.d.ts +14 -14
  25. package/dist/credit-limits.d.ts +21 -0
  26. package/dist/credit-limits.js +21 -0
  27. package/dist/crm.d.ts +81 -55
  28. package/dist/crm.js +15 -5
  29. package/dist/custom-fields.d.ts +403 -49
  30. package/dist/custom-fields.js +127 -0
  31. package/dist/customer-accounts.d.ts +138 -0
  32. package/dist/customer-accounts.js +4 -0
  33. package/dist/customer-notifications.d.ts +143 -0
  34. package/dist/customer-notifications.js +41 -0
  35. package/dist/customers.d.ts +52 -0
  36. package/dist/customers.js +53 -0
  37. package/dist/dictionary.d.ts +53 -0
  38. package/dist/dictionary.js +25 -0
  39. package/dist/document-templates.d.ts +4 -4
  40. package/dist/email.d.ts +34 -0
  41. package/dist/email.js +6 -0
  42. package/dist/errors.d.ts +312 -2
  43. package/dist/errors.js +377 -2
  44. package/dist/forms.d.ts +88 -88
  45. package/dist/i18n.d.ts +34 -0
  46. package/dist/i18n.js +15 -0
  47. package/dist/index.d.ts +7 -1
  48. package/dist/index.js +12 -1
  49. package/dist/invoice-ledger.d.ts +6 -6
  50. package/dist/invoices.d.ts +126 -0
  51. package/dist/invoices.js +49 -0
  52. package/dist/line-bounds.d.ts +53 -0
  53. package/dist/line-bounds.js +65 -0
  54. package/dist/megamenu.d.ts +27 -27
  55. package/dist/mfa.d.ts +86 -0
  56. package/dist/mfa.js +90 -0
  57. package/dist/modules.d.ts +21 -5
  58. package/dist/modules.js +60 -3
  59. package/dist/orders.d.ts +141 -0
  60. package/dist/orders.js +80 -3
  61. package/dist/organization-hooks.d.ts +99 -0
  62. package/dist/organization-hooks.js +22 -0
  63. package/dist/organization-registry-lookup.d.ts +5 -5
  64. package/dist/organization-roles.d.ts +1 -0
  65. package/dist/organization-roles.js +7 -0
  66. package/dist/organizations.d.ts +954 -17
  67. package/dist/organizations.js +229 -8
  68. package/dist/price-books.d.ts +173 -25
  69. package/dist/price-books.js +41 -0
  70. package/dist/price-lists.d.ts +5 -2
  71. package/dist/product-feeds.d.ts +157 -8
  72. package/dist/product-feeds.js +41 -2
  73. package/dist/product-scopes.d.ts +17 -0
  74. package/dist/product-scopes.js +31 -5
  75. package/dist/projects.d.ts +61 -28
  76. package/dist/projects.js +47 -9
  77. package/dist/promotions.d.ts +157 -5
  78. package/dist/promotions.js +23 -1
  79. package/dist/pwa.d.ts +39 -0
  80. package/dist/quick-order.d.ts +9 -3
  81. package/dist/quick-order.js +4 -3
  82. package/dist/quote-requests.d.ts +168 -5
  83. package/dist/quote-requests.js +69 -8
  84. package/dist/record-references.d.ts +15 -15
  85. package/dist/returns.d.ts +6 -0
  86. package/dist/returns.js +4 -2
  87. package/dist/sales-channels.d.ts +34 -3
  88. package/dist/sales-channels.js +16 -1
  89. package/dist/schema-extensions.d.ts +36 -0
  90. package/dist/schema-extensions.js +29 -0
  91. package/dist/seo.d.ts +2 -2
  92. package/dist/settings.d.ts +44 -2
  93. package/dist/settings.js +17 -2
  94. package/dist/shopping-lists.d.ts +39 -1
  95. package/dist/shopping-lists.js +37 -3
  96. package/dist/storefront-cache-tags.d.ts +10 -0
  97. package/dist/tasks.d.ts +21 -21
  98. package/dist/taxes.d.ts +27 -0
  99. package/dist/taxes.js +4 -0
  100. package/dist/transactional-emails.d.ts +39 -13
  101. package/dist/webhooks.d.ts +75 -0
  102. package/dist/webhooks.js +24 -0
  103. package/package.json +4 -2
  104. package/dist/actor.d.ts.map +0 -1
  105. package/dist/actor.js.map +0 -1
  106. package/dist/addresses.d.ts.map +0 -1
  107. package/dist/addresses.js.map +0 -1
  108. package/dist/admin-actions.d.ts.map +0 -1
  109. package/dist/admin-actions.js.map +0 -1
  110. package/dist/admin-contributions.d.ts.map +0 -1
  111. package/dist/admin-contributions.js.map +0 -1
  112. package/dist/admin-feedback.d.ts.map +0 -1
  113. package/dist/admin-feedback.js.map +0 -1
  114. package/dist/admin-i18n.d.ts.map +0 -1
  115. package/dist/admin-i18n.js.map +0 -1
  116. package/dist/admin-name.d.ts.map +0 -1
  117. package/dist/admin-name.js.map +0 -1
  118. package/dist/admin-notifications.d.ts.map +0 -1
  119. package/dist/admin-notifications.js.map +0 -1
  120. package/dist/admin-preferences.d.ts.map +0 -1
  121. package/dist/admin-preferences.js.map +0 -1
  122. package/dist/admin-roles.d.ts.map +0 -1
  123. package/dist/admin-roles.js.map +0 -1
  124. package/dist/admin-search.d.ts.map +0 -1
  125. package/dist/admin-search.js.map +0 -1
  126. package/dist/admin-users.d.ts.map +0 -1
  127. package/dist/admin-users.js.map +0 -1
  128. package/dist/admin.d.ts.map +0 -1
  129. package/dist/admin.js.map +0 -1
  130. package/dist/analytics.d.ts.map +0 -1
  131. package/dist/analytics.js.map +0 -1
  132. package/dist/api-keys.d.ts.map +0 -1
  133. package/dist/api-keys.js.map +0 -1
  134. package/dist/assets-library.d.ts.map +0 -1
  135. package/dist/assets-library.js.map +0 -1
  136. package/dist/audit-logs.d.ts.map +0 -1
  137. package/dist/audit-logs.js.map +0 -1
  138. package/dist/auth.d.ts.map +0 -1
  139. package/dist/auth.js.map +0 -1
  140. package/dist/blog.d.ts.map +0 -1
  141. package/dist/blog.js.map +0 -1
  142. package/dist/capabilities.d.ts.map +0 -1
  143. package/dist/capabilities.js.map +0 -1
  144. package/dist/carts.d.ts.map +0 -1
  145. package/dist/carts.js.map +0 -1
  146. package/dist/catalog.d.ts.map +0 -1
  147. package/dist/catalog.js.map +0 -1
  148. package/dist/cms-brand.d.ts.map +0 -1
  149. package/dist/cms-brand.js.map +0 -1
  150. package/dist/cms-contact-form.d.ts.map +0 -1
  151. package/dist/cms-contact-form.js.map +0 -1
  152. package/dist/cms.d.ts.map +0 -1
  153. package/dist/cms.js.map +0 -1
  154. package/dist/common.d.ts.map +0 -1
  155. package/dist/common.js.map +0 -1
  156. package/dist/comparisons.d.ts.map +0 -1
  157. package/dist/comparisons.js.map +0 -1
  158. package/dist/credentials.d.ts.map +0 -1
  159. package/dist/credentials.js.map +0 -1
  160. package/dist/credit-limits.d.ts.map +0 -1
  161. package/dist/credit-limits.js.map +0 -1
  162. package/dist/crm-rich-text.d.ts.map +0 -1
  163. package/dist/crm-rich-text.js.map +0 -1
  164. package/dist/crm.d.ts.map +0 -1
  165. package/dist/crm.js.map +0 -1
  166. package/dist/currencies.d.ts.map +0 -1
  167. package/dist/currencies.js.map +0 -1
  168. package/dist/custom-fields.d.ts.map +0 -1
  169. package/dist/custom-fields.js.map +0 -1
  170. package/dist/customer-accounts.d.ts.map +0 -1
  171. package/dist/customer-accounts.js.map +0 -1
  172. package/dist/customers.d.ts.map +0 -1
  173. package/dist/customers.js.map +0 -1
  174. package/dist/dictionary.d.ts.map +0 -1
  175. package/dist/dictionary.js.map +0 -1
  176. package/dist/document-templates.d.ts.map +0 -1
  177. package/dist/document-templates.js.map +0 -1
  178. package/dist/document-values.d.ts.map +0 -1
  179. package/dist/document-values.js.map +0 -1
  180. package/dist/email-address.d.ts.map +0 -1
  181. package/dist/email-address.js.map +0 -1
  182. package/dist/email.d.ts.map +0 -1
  183. package/dist/email.js.map +0 -1
  184. package/dist/envelopes.d.ts.map +0 -1
  185. package/dist/envelopes.js.map +0 -1
  186. package/dist/environment-inputs.d.ts.map +0 -1
  187. package/dist/environment-inputs.js.map +0 -1
  188. package/dist/erp-connector.d.ts.map +0 -1
  189. package/dist/erp-connector.js.map +0 -1
  190. package/dist/errors.d.ts.map +0 -1
  191. package/dist/errors.js.map +0 -1
  192. package/dist/forms-logic.d.ts.map +0 -1
  193. package/dist/forms-logic.fixtures.d.ts.map +0 -1
  194. package/dist/forms-logic.fixtures.js.map +0 -1
  195. package/dist/forms-logic.js.map +0 -1
  196. package/dist/forms.d.ts.map +0 -1
  197. package/dist/forms.js.map +0 -1
  198. package/dist/google-analytics.d.ts.map +0 -1
  199. package/dist/google-analytics.js.map +0 -1
  200. package/dist/google-tag-manager.d.ts.map +0 -1
  201. package/dist/google-tag-manager.js.map +0 -1
  202. package/dist/i18n.d.ts.map +0 -1
  203. package/dist/i18n.js.map +0 -1
  204. package/dist/import-export.d.ts.map +0 -1
  205. package/dist/import-export.js.map +0 -1
  206. package/dist/index.d.ts.map +0 -1
  207. package/dist/index.js.map +0 -1
  208. package/dist/inventory.d.ts.map +0 -1
  209. package/dist/inventory.js.map +0 -1
  210. package/dist/invoice-ledger.d.ts.map +0 -1
  211. package/dist/invoice-ledger.js.map +0 -1
  212. package/dist/invoices.d.ts.map +0 -1
  213. package/dist/invoices.js.map +0 -1
  214. package/dist/kernel.d.ts.map +0 -1
  215. package/dist/kernel.js.map +0 -1
  216. package/dist/languages.d.ts.map +0 -1
  217. package/dist/languages.js.map +0 -1
  218. package/dist/line-groups.d.ts.map +0 -1
  219. package/dist/line-groups.js.map +0 -1
  220. package/dist/linkedin-ads.d.ts.map +0 -1
  221. package/dist/linkedin-ads.js.map +0 -1
  222. package/dist/localized-name.d.ts.map +0 -1
  223. package/dist/localized-name.js.map +0 -1
  224. package/dist/megamenu.d.ts.map +0 -1
  225. package/dist/megamenu.js.map +0 -1
  226. package/dist/meta-ads.d.ts.map +0 -1
  227. package/dist/meta-ads.js.map +0 -1
  228. package/dist/mfa.d.ts.map +0 -1
  229. package/dist/mfa.js.map +0 -1
  230. package/dist/modules.d.ts.map +0 -1
  231. package/dist/modules.js.map +0 -1
  232. package/dist/money-decimal.d.ts.map +0 -1
  233. package/dist/money-decimal.js.map +0 -1
  234. package/dist/money-input.d.ts.map +0 -1
  235. package/dist/money-input.js.map +0 -1
  236. package/dist/newsletter.d.ts.map +0 -1
  237. package/dist/newsletter.js.map +0 -1
  238. package/dist/order-minimums.d.ts.map +0 -1
  239. package/dist/order-minimums.js.map +0 -1
  240. package/dist/orders.d.ts.map +0 -1
  241. package/dist/orders.js.map +0 -1
  242. package/dist/organization-registry-lookup.d.ts.map +0 -1
  243. package/dist/organization-registry-lookup.js.map +0 -1
  244. package/dist/organization-roles.d.ts.map +0 -1
  245. package/dist/organization-roles.js.map +0 -1
  246. package/dist/organizations.d.ts.map +0 -1
  247. package/dist/organizations.js.map +0 -1
  248. package/dist/page-builder-props.d.ts.map +0 -1
  249. package/dist/page-builder-props.js.map +0 -1
  250. package/dist/page-builder-values.d.ts.map +0 -1
  251. package/dist/page-builder-values.js.map +0 -1
  252. package/dist/pagination.d.ts.map +0 -1
  253. package/dist/pagination.js.map +0 -1
  254. package/dist/payment-methods.d.ts.map +0 -1
  255. package/dist/payment-methods.js.map +0 -1
  256. package/dist/payment-return-url.d.ts.map +0 -1
  257. package/dist/payment-return-url.js.map +0 -1
  258. package/dist/payments.d.ts.map +0 -1
  259. package/dist/payments.js.map +0 -1
  260. package/dist/pim-connector.d.ts.map +0 -1
  261. package/dist/pim-connector.js.map +0 -1
  262. package/dist/pim-field-path.d.ts.map +0 -1
  263. package/dist/pim-field-path.js.map +0 -1
  264. package/dist/pim-locale-mapping.d.ts.map +0 -1
  265. package/dist/pim-locale-mapping.js.map +0 -1
  266. package/dist/platform-info.d.ts.map +0 -1
  267. package/dist/platform-info.js.map +0 -1
  268. package/dist/platform-language.d.ts.map +0 -1
  269. package/dist/platform-language.js.map +0 -1
  270. package/dist/price-book-decimal.d.ts.map +0 -1
  271. package/dist/price-book-decimal.js.map +0 -1
  272. package/dist/price-books.d.ts.map +0 -1
  273. package/dist/price-books.js.map +0 -1
  274. package/dist/price-lists.d.ts.map +0 -1
  275. package/dist/price-lists.js.map +0 -1
  276. package/dist/product-feeds.d.ts.map +0 -1
  277. package/dist/product-feeds.js.map +0 -1
  278. package/dist/product-scope-model.d.ts.map +0 -1
  279. package/dist/product-scope-model.js.map +0 -1
  280. package/dist/product-scope-overrides.d.ts.map +0 -1
  281. package/dist/product-scope-overrides.js.map +0 -1
  282. package/dist/product-scoped-values.d.ts.map +0 -1
  283. package/dist/product-scoped-values.js.map +0 -1
  284. package/dist/product-scopes.d.ts.map +0 -1
  285. package/dist/product-scopes.js.map +0 -1
  286. package/dist/product-summary-text.d.ts.map +0 -1
  287. package/dist/product-summary-text.js.map +0 -1
  288. package/dist/product-tax-rates.d.ts.map +0 -1
  289. package/dist/product-tax-rates.js.map +0 -1
  290. package/dist/product-url-keys.d.ts.map +0 -1
  291. package/dist/product-url-keys.js.map +0 -1
  292. package/dist/product-value-resolver.d.ts.map +0 -1
  293. package/dist/product-value-resolver.js.map +0 -1
  294. package/dist/projects.d.ts.map +0 -1
  295. package/dist/projects.js.map +0 -1
  296. package/dist/promotions.d.ts.map +0 -1
  297. package/dist/promotions.js.map +0 -1
  298. package/dist/prompt-actions.d.ts.map +0 -1
  299. package/dist/prompt-actions.js.map +0 -1
  300. package/dist/pwa.d.ts.map +0 -1
  301. package/dist/pwa.js.map +0 -1
  302. package/dist/quick-order.d.ts.map +0 -1
  303. package/dist/quick-order.js.map +0 -1
  304. package/dist/quote-requests.d.ts.map +0 -1
  305. package/dist/quote-requests.js.map +0 -1
  306. package/dist/record-references.d.ts.map +0 -1
  307. package/dist/record-references.js.map +0 -1
  308. package/dist/record-rich-text.d.ts.map +0 -1
  309. package/dist/record-rich-text.js.map +0 -1
  310. package/dist/returns.d.ts.map +0 -1
  311. package/dist/returns.js.map +0 -1
  312. package/dist/sales-channels.d.ts.map +0 -1
  313. package/dist/sales-channels.js.map +0 -1
  314. package/dist/saved-list-views.d.ts.map +0 -1
  315. package/dist/saved-list-views.js.map +0 -1
  316. package/dist/scope-notice.d.ts.map +0 -1
  317. package/dist/scope-notice.js.map +0 -1
  318. package/dist/scoped-write-encoding.d.ts.map +0 -1
  319. package/dist/scoped-write-encoding.js.map +0 -1
  320. package/dist/search.d.ts.map +0 -1
  321. package/dist/search.js.map +0 -1
  322. package/dist/seo.d.ts.map +0 -1
  323. package/dist/seo.js.map +0 -1
  324. package/dist/settings.d.ts.map +0 -1
  325. package/dist/settings.js.map +0 -1
  326. package/dist/shipments.d.ts.map +0 -1
  327. package/dist/shipments.js.map +0 -1
  328. package/dist/shipping-methods.d.ts.map +0 -1
  329. package/dist/shipping-methods.js.map +0 -1
  330. package/dist/shopping-lists.d.ts.map +0 -1
  331. package/dist/shopping-lists.js.map +0 -1
  332. package/dist/storefront-cache-tags.d.ts.map +0 -1
  333. package/dist/storefront-cache-tags.js.map +0 -1
  334. package/dist/storefront-language-path.d.ts.map +0 -1
  335. package/dist/storefront-language-path.js.map +0 -1
  336. package/dist/storefront-value-overrides.d.ts.map +0 -1
  337. package/dist/storefront-value-overrides.js.map +0 -1
  338. package/dist/tasks.d.ts.map +0 -1
  339. package/dist/tasks.js.map +0 -1
  340. package/dist/taxes.d.ts.map +0 -1
  341. package/dist/taxes.js.map +0 -1
  342. package/dist/text-normalization.d.ts.map +0 -1
  343. package/dist/text-normalization.js.map +0 -1
  344. package/dist/transactional-emails.d.ts.map +0 -1
  345. package/dist/transactional-emails.js.map +0 -1
  346. package/dist/webhooks.d.ts.map +0 -1
  347. package/dist/webhooks.js.map +0 -1
@@ -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
+ category: "category";
96
97
  product: "product";
97
98
  attribute: "attribute";
98
99
  variant: "variant";
99
- category: "category";
100
100
  category_attribute: "category_attribute";
101
101
  }>;
102
102
  export type PriceBookSelectionKind = z.infer<typeof priceBookSelectionKindSchema>;
@@ -281,6 +281,17 @@ export declare const basePricesWriteSchema: z.ZodObject<{
281
281
  }, z.core.$strip>>;
282
282
  }, z.core.$strip>;
283
283
  export type BasePricesWrite = z.infer<typeof basePricesWriteSchema>;
284
+ /**
285
+ * Feature 180 (FR-021) — the answer of `PUT …/base-prices/:productId?dryRun=true`, the
286
+ * product editor's pre-check of a base-price write: every rule passed and nothing was written. A
287
+ * refusal answers as the real write does.
288
+ */
289
+ export declare const basePricesDryRunResponseSchema: z.ZodObject<{
290
+ data: z.ZodObject<{
291
+ valid: z.ZodLiteral<true>;
292
+ }, z.core.$strip>;
293
+ }, z.core.$strip>;
294
+ export type BasePricesDryRunResponse = z.infer<typeof basePricesDryRunResponseSchema>;
284
295
  /** Which tier priced a line (FR-030). */
285
296
  export declare const priceSourceSchema: z.ZodEnum<{
286
297
  base: "base";
@@ -508,10 +519,10 @@ export declare const priceBookRowMatchSchema: z.ZodObject<{
508
519
  rowId: z.ZodString;
509
520
  selectionKind: z.ZodEnum<{
510
521
  all: "all";
522
+ category: "category";
511
523
  product: "product";
512
524
  attribute: "attribute";
513
525
  variant: "variant";
514
- category: "category";
515
526
  category_attribute: "category_attribute";
516
527
  }>;
517
528
  minQuantity: z.ZodNumber;
@@ -563,10 +574,10 @@ export declare const priceBookSummarySchema: z.ZodObject<{
563
574
  rowId: z.ZodString;
564
575
  selectionKind: z.ZodEnum<{
565
576
  all: "all";
577
+ category: "category";
566
578
  product: "product";
567
579
  attribute: "attribute";
568
580
  variant: "variant";
569
- category: "category";
570
581
  category_attribute: "category_attribute";
571
582
  }>;
572
583
  minQuantity: z.ZodNumber;
@@ -656,10 +667,10 @@ export declare const priceBookListResponseSchema: z.ZodObject<{
656
667
  rowId: z.ZodString;
657
668
  selectionKind: z.ZodEnum<{
658
669
  all: "all";
670
+ category: "category";
659
671
  product: "product";
660
672
  attribute: "attribute";
661
673
  variant: "variant";
662
- category: "category";
663
674
  category_attribute: "category_attribute";
664
675
  }>;
665
676
  minQuantity: z.ZodNumber;
@@ -749,10 +760,10 @@ export declare const priceBookRowSchema: z.ZodObject<{
749
760
  id: z.ZodString;
750
761
  selectionKind: z.ZodEnum<{
751
762
  all: "all";
763
+ category: "category";
752
764
  product: "product";
753
765
  attribute: "attribute";
754
766
  variant: "variant";
755
- category: "category";
756
767
  category_attribute: "category_attribute";
757
768
  }>;
758
769
  selection: z.ZodObject<{
@@ -806,10 +817,10 @@ export type PriceBookRow = z.infer<typeof priceBookRowSchema>;
806
817
  export declare const priceBookRowsQuerySchema: z.ZodObject<{
807
818
  selectionKind: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
808
819
  all: "all";
820
+ category: "category";
809
821
  product: "product";
810
822
  attribute: "attribute";
811
823
  variant: "variant";
812
- category: "category";
813
824
  category_attribute: "category_attribute";
814
825
  }>>>>;
815
826
  productId: z.ZodOptional<z.ZodString>;
@@ -834,10 +845,10 @@ export declare const PRICE_BOOK_LINES_MAX_PAGE_SIZE = 500;
834
845
  export declare const priceBookLinesQuerySchema: z.ZodObject<{
835
846
  kind: z.ZodPipe<z.ZodTransform<any[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
836
847
  all: "all";
848
+ category: "category";
837
849
  product: "product";
838
850
  attribute: "attribute";
839
851
  variant: "variant";
840
- category: "category";
841
852
  category_attribute: "category_attribute";
842
853
  }>>>>;
843
854
  search: z.ZodOptional<z.ZodString>;
@@ -850,10 +861,10 @@ export declare const priceBookVariantLineSchema: z.ZodObject<{
850
861
  selectionKey: z.ZodString;
851
862
  selectionKind: z.ZodEnum<{
852
863
  all: "all";
864
+ category: "category";
853
865
  product: "product";
854
866
  attribute: "attribute";
855
867
  variant: "variant";
856
- category: "category";
857
868
  category_attribute: "category_attribute";
858
869
  }>;
859
870
  selection: z.ZodObject<{
@@ -893,10 +904,10 @@ export declare const priceBookVariantLineSchema: z.ZodObject<{
893
904
  id: z.ZodString;
894
905
  selectionKind: z.ZodEnum<{
895
906
  all: "all";
907
+ category: "category";
896
908
  product: "product";
897
909
  attribute: "attribute";
898
910
  variant: "variant";
899
- category: "category";
900
911
  category_attribute: "category_attribute";
901
912
  }>;
902
913
  selection: z.ZodObject<{
@@ -957,10 +968,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
957
968
  selectionKey: z.ZodString;
958
969
  selectionKind: z.ZodEnum<{
959
970
  all: "all";
971
+ category: "category";
960
972
  product: "product";
961
973
  attribute: "attribute";
962
974
  variant: "variant";
963
- category: "category";
964
975
  category_attribute: "category_attribute";
965
976
  }>;
966
977
  selection: z.ZodObject<{
@@ -1000,10 +1011,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
1000
1011
  id: z.ZodString;
1001
1012
  selectionKind: z.ZodEnum<{
1002
1013
  all: "all";
1014
+ category: "category";
1003
1015
  product: "product";
1004
1016
  attribute: "attribute";
1005
1017
  variant: "variant";
1006
- category: "category";
1007
1018
  category_attribute: "category_attribute";
1008
1019
  }>;
1009
1020
  selection: z.ZodObject<{
@@ -1056,10 +1067,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
1056
1067
  selectionKey: z.ZodString;
1057
1068
  selectionKind: z.ZodEnum<{
1058
1069
  all: "all";
1070
+ category: "category";
1059
1071
  product: "product";
1060
1072
  attribute: "attribute";
1061
1073
  variant: "variant";
1062
- category: "category";
1063
1074
  category_attribute: "category_attribute";
1064
1075
  }>;
1065
1076
  selection: z.ZodObject<{
@@ -1099,10 +1110,10 @@ export declare const priceBookLineSchema: z.ZodObject<{
1099
1110
  id: z.ZodString;
1100
1111
  selectionKind: z.ZodEnum<{
1101
1112
  all: "all";
1113
+ category: "category";
1102
1114
  product: "product";
1103
1115
  attribute: "attribute";
1104
1116
  variant: "variant";
1105
- category: "category";
1106
1117
  category_attribute: "category_attribute";
1107
1118
  }>;
1108
1119
  selection: z.ZodObject<{
@@ -1179,10 +1190,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
1179
1190
  selectionKey: z.ZodString;
1180
1191
  selectionKind: z.ZodEnum<{
1181
1192
  all: "all";
1193
+ category: "category";
1182
1194
  product: "product";
1183
1195
  attribute: "attribute";
1184
1196
  variant: "variant";
1185
- category: "category";
1186
1197
  category_attribute: "category_attribute";
1187
1198
  }>;
1188
1199
  selection: z.ZodObject<{
@@ -1222,10 +1233,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
1222
1233
  id: z.ZodString;
1223
1234
  selectionKind: z.ZodEnum<{
1224
1235
  all: "all";
1236
+ category: "category";
1225
1237
  product: "product";
1226
1238
  attribute: "attribute";
1227
1239
  variant: "variant";
1228
- category: "category";
1229
1240
  category_attribute: "category_attribute";
1230
1241
  }>;
1231
1242
  selection: z.ZodObject<{
@@ -1278,10 +1289,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
1278
1289
  selectionKey: z.ZodString;
1279
1290
  selectionKind: z.ZodEnum<{
1280
1291
  all: "all";
1292
+ category: "category";
1281
1293
  product: "product";
1282
1294
  attribute: "attribute";
1283
1295
  variant: "variant";
1284
- category: "category";
1285
1296
  category_attribute: "category_attribute";
1286
1297
  }>;
1287
1298
  selection: z.ZodObject<{
@@ -1321,10 +1332,10 @@ export declare const priceBookLinesResponseSchema: z.ZodObject<{
1321
1332
  id: z.ZodString;
1322
1333
  selectionKind: z.ZodEnum<{
1323
1334
  all: "all";
1335
+ category: "category";
1324
1336
  product: "product";
1325
1337
  attribute: "attribute";
1326
1338
  variant: "variant";
1327
- category: "category";
1328
1339
  category_attribute: "category_attribute";
1329
1340
  }>;
1330
1341
  selection: z.ZodObject<{
@@ -1505,10 +1516,10 @@ export declare const priceBookDiffRowSchema: z.ZodObject<{
1505
1516
  id: z.ZodOptional<z.ZodString>;
1506
1517
  selectionKind: z.ZodEnum<{
1507
1518
  all: "all";
1519
+ category: "category";
1508
1520
  product: "product";
1509
1521
  attribute: "attribute";
1510
1522
  variant: "variant";
1511
- category: "category";
1512
1523
  category_attribute: "category_attribute";
1513
1524
  }>;
1514
1525
  selection: z.ZodObject<{
@@ -1550,10 +1561,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
1550
1561
  id: z.ZodOptional<z.ZodString>;
1551
1562
  selectionKind: z.ZodEnum<{
1552
1563
  all: "all";
1564
+ category: "category";
1553
1565
  product: "product";
1554
1566
  attribute: "attribute";
1555
1567
  variant: "variant";
1556
- category: "category";
1557
1568
  category_attribute: "category_attribute";
1558
1569
  }>;
1559
1570
  selection: z.ZodObject<{
@@ -1592,10 +1603,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
1592
1603
  id: z.ZodOptional<z.ZodString>;
1593
1604
  selectionKind: z.ZodEnum<{
1594
1605
  all: "all";
1606
+ category: "category";
1595
1607
  product: "product";
1596
1608
  attribute: "attribute";
1597
1609
  variant: "variant";
1598
- category: "category";
1599
1610
  category_attribute: "category_attribute";
1600
1611
  }>;
1601
1612
  selection: z.ZodObject<{
@@ -1634,10 +1645,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
1634
1645
  id: z.ZodOptional<z.ZodString>;
1635
1646
  selectionKind: z.ZodEnum<{
1636
1647
  all: "all";
1648
+ category: "category";
1637
1649
  product: "product";
1638
1650
  attribute: "attribute";
1639
1651
  variant: "variant";
1640
- category: "category";
1641
1652
  category_attribute: "category_attribute";
1642
1653
  }>;
1643
1654
  selection: z.ZodObject<{
@@ -1675,10 +1686,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
1675
1686
  id: z.ZodOptional<z.ZodString>;
1676
1687
  selectionKind: z.ZodEnum<{
1677
1688
  all: "all";
1689
+ category: "category";
1678
1690
  product: "product";
1679
1691
  attribute: "attribute";
1680
1692
  variant: "variant";
1681
- category: "category";
1682
1693
  category_attribute: "category_attribute";
1683
1694
  }>;
1684
1695
  selection: z.ZodObject<{
@@ -1717,10 +1728,10 @@ export declare const priceBookRowsDryRunSchema: z.ZodObject<{
1717
1728
  id: z.ZodOptional<z.ZodString>;
1718
1729
  selectionKind: z.ZodEnum<{
1719
1730
  all: "all";
1731
+ category: "category";
1720
1732
  product: "product";
1721
1733
  attribute: "attribute";
1722
1734
  variant: "variant";
1723
- category: "category";
1724
1735
  category_attribute: "category_attribute";
1725
1736
  }>;
1726
1737
  selection: z.ZodObject<{
@@ -1796,10 +1807,10 @@ export declare const priceBookRowsWriteResultSchema: z.ZodObject<{
1796
1807
  id: z.ZodOptional<z.ZodString>;
1797
1808
  selectionKind: z.ZodEnum<{
1798
1809
  all: "all";
1810
+ category: "category";
1799
1811
  product: "product";
1800
1812
  attribute: "attribute";
1801
1813
  variant: "variant";
1802
- category: "category";
1803
1814
  category_attribute: "category_attribute";
1804
1815
  }>;
1805
1816
  selection: z.ZodObject<{
@@ -1841,10 +1852,10 @@ export declare const priceBookRowsResponseSchema: z.ZodObject<{
1841
1852
  id: z.ZodString;
1842
1853
  selectionKind: z.ZodEnum<{
1843
1854
  all: "all";
1855
+ category: "category";
1844
1856
  product: "product";
1845
1857
  attribute: "attribute";
1846
1858
  variant: "variant";
1847
- category: "category";
1848
1859
  category_attribute: "category_attribute";
1849
1860
  }>;
1850
1861
  selection: z.ZodObject<{
@@ -2207,4 +2218,141 @@ export interface PriceBookWritePort {
2207
2218
  /** The books with a row naming the product (or the variant) directly — the admin G1 list, every page. */
2208
2219
  booksPricingProduct(productId: string, variantId?: string | null): Promise<PriceBookSummary[]>;
2209
2220
  }
2221
+ /** Container name of {@link PriceBookRowWritePort}. Owner: `price_lists`. */
2222
+ export declare const PRICE_BOOK_ROW_WRITE_PORT: "priceBookRowWritePort";
2223
+ /**
2224
+ * A variant's row in a non-base book: its own fixed tiers, or a percentage or
2225
+ * amount adjustment of the reference price the book's tier adjusts (the base
2226
+ * price for a catalogue book, the catalogue price for a buyer or sale book) at
2227
+ * every quantity. The shape of a base book's variant row, so one mapping serves
2228
+ * both ports.
2229
+ */
2230
+ export type VariantRowWrite = VariantBaseRow;
2231
+ /**
2232
+ * What {@link PriceBookRowWritePort.replaceBookRows} writes for one product in
2233
+ * one non-base book: the product's fixed tiers (the base-price tier type, at
2234
+ * most 50) and, optionally, a row per named variant — `null` removes that
2235
+ * variant's rows the port can say. A variant that is not named keeps its rows,
2236
+ * and a row the shape cannot say (see {@link bookProductRowsSchema}) is never
2237
+ * replaced or removed.
2238
+ */
2239
+ export declare const bookProductRowsWriteSchema: z.ZodObject<{
2240
+ product: z.ZodArray<z.ZodObject<{
2241
+ minQuantity: z.ZodNumber;
2242
+ maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2243
+ amount: z.ZodString;
2244
+ }, z.core.$strip>>;
2245
+ variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2246
+ type: z.ZodLiteral<"fixed">;
2247
+ tiers: z.ZodArray<z.ZodObject<{
2248
+ minQuantity: z.ZodNumber;
2249
+ maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2250
+ amount: z.ZodString;
2251
+ }, z.core.$strip>>;
2252
+ }, z.core.$strip>, z.ZodObject<{
2253
+ type: z.ZodLiteral<"percent">;
2254
+ percent: z.ZodString;
2255
+ }, z.core.$strip>, z.ZodObject<{
2256
+ type: z.ZodLiteral<"amount">;
2257
+ amount: z.ZodString;
2258
+ }, z.core.$strip>], "type">>>>;
2259
+ }, z.core.$strip>;
2260
+ export type BookProductRowsWrite = z.infer<typeof bookProductRowsWriteSchema>;
2261
+ /**
2262
+ * The rows one product holds in one non-base book, in the write's shape, so a
2263
+ * writer can compare before it writes. `variants` names only the variants that
2264
+ * have rows. `complete` is `false` when the book also holds rows of the product
2265
+ * that this shape cannot say — a product-level percentage or amount, or an
2266
+ * adjustment limited to a quantity range, entered in the admin. The port
2267
+ * leaves such rows as they are: neither a replace nor a remove touches them.
2268
+ */
2269
+ export declare const bookProductRowsSchema: z.ZodObject<{
2270
+ bookId: z.ZodString;
2271
+ productId: z.ZodString;
2272
+ currencyCode: z.ZodString;
2273
+ version: z.ZodNumber;
2274
+ product: z.ZodArray<z.ZodObject<{
2275
+ minQuantity: z.ZodNumber;
2276
+ maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2277
+ amount: z.ZodString;
2278
+ }, z.core.$strip>>;
2279
+ variants: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2280
+ type: z.ZodLiteral<"fixed">;
2281
+ tiers: z.ZodArray<z.ZodObject<{
2282
+ minQuantity: z.ZodNumber;
2283
+ maxQuantity: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2284
+ amount: z.ZodString;
2285
+ }, z.core.$strip>>;
2286
+ }, z.core.$strip>, z.ZodObject<{
2287
+ type: z.ZodLiteral<"percent">;
2288
+ percent: z.ZodString;
2289
+ }, z.core.$strip>, z.ZodObject<{
2290
+ type: z.ZodLiteral<"amount">;
2291
+ amount: z.ZodString;
2292
+ }, z.core.$strip>], "type">>;
2293
+ complete: z.ZodBoolean;
2294
+ }, z.core.$strip>;
2295
+ export type BookProductRows = z.infer<typeof bookProductRowsSchema>;
2296
+ /**
2297
+ * Container name: `priceBookRowWritePort` ({@link PRICE_BOOK_ROW_WRITE_PORT}).
2298
+ * Owner: `price_lists` (issue #1028).
2299
+ *
2300
+ * What another module — an ERP or PIM connector that synchronises a
2301
+ * customer-group, organization, catalogue or sale price — may do to the rows
2302
+ * of **one product in one non-base book**: read them, replace them and remove
2303
+ * them — only the rows its write shape can say (fixed tiers, and a variant's
2304
+ * adjustment at every quantity); a row an administrator entered that the shape
2305
+ * cannot say (a product-level adjustment, an adjustment limited to a quantity
2306
+ * range) is never replaced or removed, and `complete: false` reports it. It
2307
+ * does not create books or change a header (currency, channel set,
2308
+ * audience, validity, status): an administrator owns which books exist and
2309
+ * whom they price, and a module names a book by the id the administrator chose.
2310
+ *
2311
+ * Every write is the admin row batch's own write path
2312
+ * (`PUT /api/v1/admin/price-books/:id/rows`): the same row rules and
2313
+ * refusals, one audited Command Bus run with the caller's actor
2314
+ * (`price_list.book_rows_set`, `price_list.book_rows_remove`) whose entry
2315
+ * holds names and counts, never a price or a quantity (D-288: the values go
2316
+ * to the book's own price-change history, by `valueChangeId`), the book's
2317
+ * `version` moved, and one pricing-generation bump after the commit whose
2318
+ * surface change names the book and the product. A write that would change
2319
+ * nothing writes nothing (no audit entry, no bump).
2320
+ *
2321
+ * Refusals, each an `HttpError` with a code, written before anything is:
2322
+ * an unknown book `404 NOT_FOUND`; a base book `409 PRICE_BOOK_BASE_BOOK`
2323
+ * (write base prices through {@link PriceBookWritePort}); an expired book
2324
+ * `409 PRICE_BOOK_EXPIRED`; an unknown product `404 NOT_FOUND`; a malformed
2325
+ * write `400 VALIDATION_FAILED`; tiers that break the book's rules are refused
2326
+ * as the admin row batch refuses them — `409 PRICE_BOOK_ROW_OVERLAP` when every
2327
+ * failure is an overlap, `400 PRICE_BOOK_ROW_LIMIT` when the book would hold too
2328
+ * many rows, `400 PRICE_BOOK_ROW_SHAPE` otherwise — with `details.errors[]`
2329
+ * giving each failure's own code and reason and, as `field`, its path in the
2330
+ * write (`product.1.minQuantity`, `variants.<id>.tiers.0.price.amount`).
2331
+ *
2332
+ * **Owner off:** the seam fails closed — resolving this port throws
2333
+ * `ModuleDisabledError` (503 `MODULE_DISABLED`); resolve it per use with
2334
+ * `lazyPort`.
2335
+ */
2336
+ export interface PriceBookRowWritePort {
2337
+ /**
2338
+ * Replace the product's fixed tiers in one non-base book (in the book's one
2339
+ * currency) and, optionally, the rows of the variants named in `variants`.
2340
+ * Rows the write shape cannot say stay as they are; a tier that would overlap
2341
+ * one — even one starting at the same quantity — is refused
2342
+ * `409 PRICE_BOOK_ROW_OVERLAP` naming it, never written over it. Amounts are
2343
+ * decimal strings.
2344
+ */
2345
+ replaceBookRows(bookId: string, productId: string, write: {
2346
+ product: readonly BasePriceTier[];
2347
+ variants?: Readonly<Record<string, VariantRowWrite | null>>;
2348
+ }): Promise<BookProductRows>;
2349
+ /**
2350
+ * Remove the product's (and its variants') rows the port can say from one
2351
+ * non-base book — rows the write shape cannot say stay, as a replace leaves
2352
+ * them; a no-op when there are none.
2353
+ */
2354
+ removeBookRows(bookId: string, productId: string): Promise<void>;
2355
+ /** The product's rows in one non-base book, or `null` when it holds none at all. */
2356
+ bookRows(bookId: string, productId: string): Promise<BookProductRows | null>;
2357
+ }
2210
2358
  //# sourceMappingURL=price-books.d.ts.map
@@ -218,6 +218,14 @@ export const basePricesForCurrencySchema = z.object({
218
218
  export const basePricesWriteSchema = z.object({
219
219
  byCurrency: z.record(CURRENCY, basePricesForCurrencySchema),
220
220
  });
221
+ /**
222
+ * Feature 180 (FR-021) — the answer of `PUT …/base-prices/:productId?dryRun=true`, the
223
+ * product editor's pre-check of a base-price write: every rule passed and nothing was written. A
224
+ * refusal answers as the real write does.
225
+ */
226
+ export const basePricesDryRunResponseSchema = z.object({
227
+ data: z.object({ valid: z.literal(true) }),
228
+ });
221
229
  // --- Resolution: source, cells, explanation (FR-020) ----------------------------
222
230
  /** Which tier priced a line (FR-030). */
223
231
  export const priceSourceSchema = z.enum(['base', 'catalogue', 'buyer', 'sale']);
@@ -778,4 +786,37 @@ export const productBasePricesSchema = z.object({
778
786
  */
779
787
  writable: z.boolean(),
780
788
  });
789
+ // --- Cross-module writes of non-base book rows (issue #1028) --------------------
790
+ /** Container name of {@link PriceBookRowWritePort}. Owner: `price_lists`. */
791
+ export const PRICE_BOOK_ROW_WRITE_PORT = 'priceBookRowWritePort';
792
+ /**
793
+ * What {@link PriceBookRowWritePort.replaceBookRows} writes for one product in
794
+ * one non-base book: the product's fixed tiers (the base-price tier type, at
795
+ * most 50) and, optionally, a row per named variant — `null` removes that
796
+ * variant's rows the port can say. A variant that is not named keeps its rows,
797
+ * and a row the shape cannot say (see {@link bookProductRowsSchema}) is never
798
+ * replaced or removed.
799
+ */
800
+ export const bookProductRowsWriteSchema = z.object({
801
+ product: z.array(basePriceTierSchema).max(50),
802
+ variants: z.record(uuidSchema, variantBaseRowSchema.nullable()).optional(),
803
+ });
804
+ /**
805
+ * The rows one product holds in one non-base book, in the write's shape, so a
806
+ * writer can compare before it writes. `variants` names only the variants that
807
+ * have rows. `complete` is `false` when the book also holds rows of the product
808
+ * that this shape cannot say — a product-level percentage or amount, or an
809
+ * adjustment limited to a quantity range, entered in the admin. The port
810
+ * leaves such rows as they are: neither a replace nor a remove touches them.
811
+ */
812
+ export const bookProductRowsSchema = z.object({
813
+ bookId: uuidSchema,
814
+ productId: uuidSchema,
815
+ currencyCode: CURRENCY,
816
+ /** The book's version after the write, as the admin API reports it. */
817
+ version: z.number().int().positive(),
818
+ product: z.array(basePriceTierSchema),
819
+ variants: z.record(uuidSchema, variantBaseRowSchema),
820
+ complete: z.boolean(),
821
+ });
781
822
  //# sourceMappingURL=price-books.js.map
@@ -50,16 +50,16 @@ export type PinnedPriceBookPublishability = {
50
50
  reason: PinnedPriceBookUnpublishableReason;
51
51
  };
52
52
  export declare const displayModeOverrideScopeSchema: z.ZodEnum<{
53
- product: "product";
54
53
  category: "category";
55
54
  organization: "organization";
55
+ product: "product";
56
56
  }>;
57
57
  export type DisplayModeOverrideScope = z.infer<typeof displayModeOverrideScopeSchema>;
58
58
  export declare const displayModeOverrideSchema: z.ZodObject<{
59
59
  scope: z.ZodEnum<{
60
- product: "product";
61
60
  category: "category";
62
61
  organization: "organization";
62
+ product: "product";
63
63
  }>;
64
64
  targetId: z.ZodString;
65
65
  mode: z.ZodEnum<{
@@ -778,6 +778,9 @@ export interface BuyerLinePriceAnswer {
778
778
  *
779
779
  * A product that does not exist answers `price: null` for its line rather than
780
780
  * throwing; an unknown `salesChannelId` throws `HttpError(400, VALIDATION_FAILED)`.
781
+ * A `null` channel prices on the system-default channel; with none, which a
782
+ * booted deployment never has, it throws the platform's `NoSystemDefaultChannel`
783
+ * (`500 INTERNAL`, issue #636).
781
784
  * The implementation resolves in bounded chunks, and callers send lines in
782
785
  * chunks.
783
786
  *