@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
@@ -68,13 +68,13 @@ export type AttributePromotionCriterion = z.infer<typeof attributeCriterionSchem
68
68
  */
69
69
  export declare const promotionRuleOpSchema: z.ZodEnum<{
70
70
  in: "in";
71
+ contains: "contains";
71
72
  startsWith: "startsWith";
72
73
  eq: "eq";
73
74
  gt: "gt";
74
75
  gte: "gte";
75
76
  lt: "lt";
76
77
  lte: "lte";
77
- contains: "contains";
78
78
  neq: "neq";
79
79
  between: "between";
80
80
  notIn: "notIn";
@@ -83,8 +83,8 @@ export type PromotionRuleOp = z.infer<typeof promotionRuleOpSchema>;
83
83
  /** Built-in cart-context / relationship fields available to the Rule Builder. */
84
84
  export declare const promotionRuleBuiltinFieldSchema: z.ZodEnum<{
85
85
  category: "category";
86
- paymentMethod: "paymentMethod";
87
86
  organization: "organization";
87
+ paymentMethod: "paymentMethod";
88
88
  deliveryMethod: "deliveryMethod";
89
89
  customerGroup: "customerGroup";
90
90
  cartTotal: "cartTotal";
@@ -97,8 +97,8 @@ export declare const promotionRuleFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObj
97
97
  kind: z.ZodLiteral<"builtin">;
98
98
  key: z.ZodEnum<{
99
99
  category: "category";
100
- paymentMethod: "paymentMethod";
101
100
  organization: "organization";
101
+ paymentMethod: "paymentMethod";
102
102
  deliveryMethod: "deliveryMethod";
103
103
  customerGroup: "customerGroup";
104
104
  cartTotal: "cartTotal";
@@ -304,6 +304,110 @@ export declare const promotionSchema: z.ZodObject<{
304
304
  updatedAt: z.ZodString;
305
305
  }, z.core.$strip>;
306
306
  export type Promotion = z.infer<typeof promotionSchema>;
307
+ /** `GET /api/v1/admin/promotions` — every promotion (issue #599). */
308
+ export declare const promotionListResponseSchema: z.ZodObject<{
309
+ data: z.ZodArray<z.ZodObject<{
310
+ id: z.ZodString;
311
+ code: z.ZodNullable<z.ZodString>;
312
+ name: z.ZodString;
313
+ kind: z.ZodNullable<z.ZodEnum<{
314
+ free_delivery: "free_delivery";
315
+ percentage_off: "percentage_off";
316
+ amount_off: "amount_off";
317
+ }>>;
318
+ value: z.ZodNullable<z.ZodNumber>;
319
+ currency: z.ZodNullable<z.ZodString>;
320
+ minCartSubtotal: z.ZodNullable<z.ZodNumber>;
321
+ validFrom: z.ZodNullable<z.ZodString>;
322
+ validUntil: z.ZodNullable<z.ZodString>;
323
+ organizationId: z.ZodNullable<z.ZodString>;
324
+ customerGroupId: z.ZodNullable<z.ZodString>;
325
+ categoryId: z.ZodNullable<z.ZodString>;
326
+ productId: z.ZodNullable<z.ZodString>;
327
+ criteria: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
328
+ type: z.ZodLiteral<"attribute">;
329
+ attributeKey: z.ZodString;
330
+ op: z.ZodEnum<{
331
+ in: "in";
332
+ range: "range";
333
+ equals: "equals";
334
+ }>;
335
+ values: z.ZodArray<z.ZodUnknown>;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ type: z.ZodLiteral<"category">;
338
+ categoryIds: z.ZodArray<z.ZodString>;
339
+ }, z.core.$strip>, z.ZodObject<{
340
+ type: z.ZodLiteral<"product">;
341
+ productIds: z.ZodArray<z.ZodString>;
342
+ }, z.core.$strip>, z.ZodObject<{
343
+ type: z.ZodLiteral<"customerGroup">;
344
+ customerGroupIds: z.ZodArray<z.ZodString>;
345
+ }, z.core.$strip>, z.ZodObject<{
346
+ type: z.ZodLiteral<"organization">;
347
+ organizationIds: z.ZodArray<z.ZodString>;
348
+ }, z.core.$strip>], "type">>>;
349
+ isActive: z.ZodBoolean;
350
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
351
+ priority: z.ZodDefault<z.ZodNumber>;
352
+ stopFurther: z.ZodDefault<z.ZodBoolean>;
353
+ action: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
354
+ type: z.ZodLiteral<"free_delivery">;
355
+ }, z.core.$strip>, z.ZodObject<{
356
+ type: z.ZodLiteral<"percentage_off_cart">;
357
+ percent: z.ZodNumber;
358
+ }, z.core.$strip>, z.ZodObject<{
359
+ type: z.ZodLiteral<"amount_off_cart">;
360
+ amount: z.ZodNumber;
361
+ currency: z.ZodString;
362
+ }, z.core.$strip>, z.ZodObject<{
363
+ type: z.ZodLiteral<"buy_x_get_y_free">;
364
+ buyQuantity: z.ZodNumber;
365
+ freeQuantity: z.ZodNumber;
366
+ target: z.ZodEnum<{
367
+ cheapest: "cheapest";
368
+ most_expensive: "most_expensive";
369
+ }>;
370
+ }, z.core.$strip>, z.ZodObject<{
371
+ type: z.ZodLiteral<"spend_x_percent_off">;
372
+ spendStep: z.ZodNumber;
373
+ percent: z.ZodNumber;
374
+ currency: z.ZodString;
375
+ }, z.core.$strip>, z.ZodObject<{
376
+ type: z.ZodLiteral<"spend_x_amount_off">;
377
+ spendStep: z.ZodNumber;
378
+ amount: z.ZodNumber;
379
+ currency: z.ZodString;
380
+ }, z.core.$strip>, z.ZodObject<{
381
+ type: z.ZodLiteral<"every_nth_product_percent_off">;
382
+ nth: z.ZodNumber;
383
+ percent: z.ZodNumber;
384
+ }, z.core.$strip>, z.ZodObject<{
385
+ type: z.ZodLiteral<"buy_x_units_y_free">;
386
+ productId: z.ZodString;
387
+ buyUnits: z.ZodNumber;
388
+ freeUnits: z.ZodNumber;
389
+ }, z.core.$strip>, z.ZodObject<{
390
+ type: z.ZodLiteral<"buy_x_units_percent_off">;
391
+ productId: z.ZodString;
392
+ buyUnits: z.ZodNumber;
393
+ percent: z.ZodNumber;
394
+ }, z.core.$strip>, z.ZodObject<{
395
+ type: z.ZodLiteral<"buy_x_units_amount_off">;
396
+ productId: z.ZodString;
397
+ buyUnits: z.ZodNumber;
398
+ amount: z.ZodNumber;
399
+ currency: z.ZodString;
400
+ }, z.core.$strip>], "type">>>;
401
+ ruleId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
402
+ rule: z.ZodDefault<z.ZodNullable<z.ZodType<PromotionRule, unknown, z.core.$ZodTypeInternals<PromotionRule, unknown>>>>;
403
+ usageLimitGlobal: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
404
+ usageLimitPerOrganization: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
405
+ usageLimitPerCustomer: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
406
+ createdAt: z.ZodString;
407
+ updatedAt: z.ZodString;
408
+ }, z.core.$strip>>;
409
+ }, z.core.$strip>;
410
+ export type PromotionListResponse = z.infer<typeof promotionListResponseSchema>;
307
411
  export declare const upsertPromotionRequestSchema: z.ZodObject<{
308
412
  code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
309
413
  name: z.ZodString;
@@ -435,6 +539,38 @@ export declare const promotionRuleRecordSchema: z.ZodObject<{
435
539
  updatedAt: z.ZodString;
436
540
  }, z.core.$strip>;
437
541
  export type PromotionRuleRecord = z.infer<typeof promotionRuleRecordSchema>;
542
+ /** `GET /api/v1/admin/promotion-rules` — every named rule (issue #599). */
543
+ export declare const promotionRuleListResponseSchema: z.ZodObject<{
544
+ data: z.ZodArray<z.ZodObject<{
545
+ id: z.ZodString;
546
+ name: z.ZodString;
547
+ description: z.ZodNullable<z.ZodString>;
548
+ definition: z.ZodType<PromotionRule, unknown, z.core.$ZodTypeInternals<PromotionRule, unknown>>;
549
+ createdAt: z.ZodString;
550
+ updatedAt: z.ZodString;
551
+ }, z.core.$strip>>;
552
+ }, z.core.$strip>;
553
+ export type PromotionRuleListResponse = z.infer<typeof promotionRuleListResponseSchema>;
554
+ /**
555
+ * `GET /api/v1/admin/promotion-rules/:id` — the rule, and beside the envelope's
556
+ * `data` the promotions that reference it, which is what refuses its deletion
557
+ * (issue #599).
558
+ */
559
+ export declare const promotionRuleDetailResponseSchema: z.ZodObject<{
560
+ data: z.ZodObject<{
561
+ id: z.ZodString;
562
+ name: z.ZodString;
563
+ description: z.ZodNullable<z.ZodString>;
564
+ definition: z.ZodType<PromotionRule, unknown, z.core.$ZodTypeInternals<PromotionRule, unknown>>;
565
+ createdAt: z.ZodString;
566
+ updatedAt: z.ZodString;
567
+ }, z.core.$strip>;
568
+ usedBy: z.ZodArray<z.ZodObject<{
569
+ id: z.ZodString;
570
+ name: z.ZodString;
571
+ }, z.core.$strip>>;
572
+ }, z.core.$strip>;
573
+ export type PromotionRuleDetailResponse = z.infer<typeof promotionRuleDetailResponseSchema>;
438
574
  export declare const upsertPromotionRuleRequestSchema: z.ZodObject<{
439
575
  name: z.ZodString;
440
576
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -465,6 +601,22 @@ export declare const promotionCouponSchema: z.ZodObject<{
465
601
  createdAt: z.ZodString;
466
602
  }, z.core.$strip>;
467
603
  export type PromotionCouponDto = z.infer<typeof promotionCouponSchema>;
604
+ /** `GET /api/v1/admin/promotions/:id/coupons` — a promotion's coupons (issue #599). */
605
+ export declare const promotionCouponListResponseSchema: z.ZodObject<{
606
+ data: z.ZodArray<z.ZodObject<{
607
+ id: z.ZodString;
608
+ promotionId: z.ZodString;
609
+ batchId: z.ZodNullable<z.ZodString>;
610
+ code: z.ZodString;
611
+ limitScope: z.ZodEnum<{
612
+ per_coupon: "per_coupon";
613
+ shared_batch: "shared_batch";
614
+ }>;
615
+ isActive: z.ZodBoolean;
616
+ createdAt: z.ZodString;
617
+ }, z.core.$strip>>;
618
+ }, z.core.$strip>;
619
+ export type PromotionCouponListResponse = z.infer<typeof promotionCouponListResponseSchema>;
468
620
  export declare const generateCouponsRequestSchema: z.ZodObject<{
469
621
  count: z.ZodNumber;
470
622
  length: z.ZodNumber;
@@ -577,9 +729,9 @@ export declare const promotionRuleAttributeSchema: z.ZodObject<{
577
729
  boolean: "boolean";
578
730
  date: "date";
579
731
  enum: "enum";
732
+ select: "select";
580
733
  multiselect: "multiselect";
581
734
  price: "price";
582
- select: "select";
583
735
  }>;
584
736
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
585
737
  value: z.ZodString;
@@ -601,9 +753,9 @@ export declare const promotionRuleAttributesResponseSchema: z.ZodObject<{
601
753
  boolean: "boolean";
602
754
  date: "date";
603
755
  enum: "enum";
756
+ select: "select";
604
757
  multiselect: "multiselect";
605
758
  price: "price";
606
- select: "select";
607
759
  }>;
608
760
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
609
761
  value: z.ZodString;
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { isoDateTimeSchema, moneySchema, uuidSchema } from './common.js';
3
3
  import { addAmountPrecisionIssue, hasAtMostTwoDecimals, twoDecimalAmount } from './money-input.js';
4
+ import { lineQuantitySchema } from './line-bounds.js';
4
5
  /**
5
6
  * Promotion contracts (T129, T132 / FR-052).
6
7
  *
@@ -243,6 +244,10 @@ export const promotionSchema = z.object({
243
244
  createdAt: isoDateTimeSchema,
244
245
  updatedAt: isoDateTimeSchema,
245
246
  });
247
+ /** `GET /api/v1/admin/promotions` — every promotion (issue #599). */
248
+ export const promotionListResponseSchema = z.object({
249
+ data: z.array(promotionSchema),
250
+ });
246
251
  export const upsertPromotionRequestSchema = z
247
252
  .object({
248
253
  code: z.string().min(1).max(64).nullable().optional(),
@@ -363,6 +368,19 @@ export const promotionRuleRecordSchema = z.object({
363
368
  createdAt: isoDateTimeSchema,
364
369
  updatedAt: isoDateTimeSchema,
365
370
  });
371
+ /** `GET /api/v1/admin/promotion-rules` — every named rule (issue #599). */
372
+ export const promotionRuleListResponseSchema = z.object({
373
+ data: z.array(promotionRuleRecordSchema),
374
+ });
375
+ /**
376
+ * `GET /api/v1/admin/promotion-rules/:id` — the rule, and beside the envelope's
377
+ * `data` the promotions that reference it, which is what refuses its deletion
378
+ * (issue #599).
379
+ */
380
+ export const promotionRuleDetailResponseSchema = z.object({
381
+ data: promotionRuleRecordSchema,
382
+ usedBy: z.array(z.object({ id: uuidSchema, name: z.string() })),
383
+ });
366
384
  export const upsertPromotionRuleRequestSchema = z.object({
367
385
  name: z.string().min(1).max(160),
368
386
  description: z.string().max(2000).nullable().optional(),
@@ -380,6 +398,10 @@ export const promotionCouponSchema = z.object({
380
398
  isActive: z.boolean(),
381
399
  createdAt: isoDateTimeSchema,
382
400
  });
401
+ /** `GET /api/v1/admin/promotions/:id/coupons` — a promotion's coupons (issue #599). */
402
+ export const promotionCouponListResponseSchema = z.object({
403
+ data: z.array(promotionCouponSchema),
404
+ });
383
405
  export const generateCouponsRequestSchema = z.object({
384
406
  count: z.number().int().positive().max(100_000),
385
407
  length: z.number().int().min(3).max(40),
@@ -400,7 +422,7 @@ export const cartLineSchema = z.object({
400
422
  productId: uuidSchema,
401
423
  variantId: uuidSchema.nullable(),
402
424
  categoryIds: z.array(uuidSchema),
403
- quantity: z.number().int().positive(),
425
+ quantity: lineQuantitySchema,
404
426
  unitPrice: moneySchema,
405
427
  /**
406
428
  * Feature 012 / US8 — optional attribute snapshot for line-level
package/dist/pwa.d.ts CHANGED
@@ -325,4 +325,43 @@ export interface PushProviderRegistryPort {
325
325
  get(key: string): PushProvider | undefined;
326
326
  resolveDefault(salesChannelId: string): Promise<PushProvider>;
327
327
  }
328
+ /** The automatic push category a producer pushes under; `order` stays on pwa's own subscription. */
329
+ export type CustomerPushCategory = 'quote';
330
+ export interface CustomerPushInput {
331
+ organizationId: string;
332
+ customerAccountId: string;
333
+ /** The channel whose push settings apply; `null` = the system default channel. */
334
+ salesChannelId: string | null;
335
+ category: CustomerPushCategory;
336
+ /** Already rendered by the caller in the language it chose. */
337
+ title: string;
338
+ body: string;
339
+ /** Storefront-relative path the notification opens. */
340
+ url: string;
341
+ /** Idempotency key; becomes `push_messages.source_event_id` under trigger `quote_request`. */
342
+ sourceKey: string;
343
+ }
344
+ export type CustomerPushOutcome = 'enqueued'
345
+ /** `pwa.push_enabled` or the category's setting is off on the channel. */
346
+ | 'skipped:switched_off'
347
+ /** The account's preference for the category is off. */
348
+ | 'skipped:customer_preference'
349
+ /** The account is deleted or anonymised. */
350
+ | 'skipped:no_account'
351
+ /** The account has no active device subscription. */
352
+ | 'skipped:no_subscription';
353
+ /**
354
+ * Container name: `customerPushPort`. Owner: `pwa`
355
+ * (`specs/179-rfq-and-customer-notifications/` WP-10). Owner off: fails
356
+ * closed; callers decide presence first (D-60).
357
+ *
358
+ * Producer only: it writes the push message and enqueues pwa's own delivery
359
+ * worker; it never sends inline (Principle X). Gates, in order: channel →
360
+ * `pwa.push_enabled` and the category setting → account live → preference →
361
+ * subscriptions → enqueue. A repeated `sourceKey` answers `enqueued` and writes
362
+ * nothing (`push_messages_trigger_event_uniq`).
363
+ */
364
+ export interface CustomerPushPort {
365
+ push(input: CustomerPushInput): Promise<CustomerPushOutcome>;
366
+ }
328
367
  //# sourceMappingURL=pwa.d.ts.map
@@ -475,7 +475,7 @@ export interface PreferenceAuditContext {
475
475
  *
476
476
  * A discriminated union, not a bag of optional ids, and that is the point: a
477
477
  * buyer editing their own defaults, an Organization administrator editing a member's, a
478
- * salesperson editing an assigned organisation's and a platform admin editing
478
+ * salesperson editing an organisation in their reach and a platform admin editing
479
479
  * anybody's are four different authorisations, and each carries exactly the
480
480
  * one identifier its rule needs. A shape with four optional fields has twelve
481
481
  * states the rules cannot answer for.
@@ -495,9 +495,15 @@ export type PreferenceActor = {
495
495
  | {
496
496
  kind: 'administrator';
497
497
  organizationId: string;
498
- } | {
498
+ }
499
+ /**
500
+ * A sales representative. Issue #305: their reach is every organisation
501
+ * nobody else governs — assigned, roll-up and unassigned — which no list of
502
+ * ids names, so the actor carries the question rather than an answer.
503
+ */
504
+ | {
499
505
  kind: 'salesperson';
500
- assignedOrganizationIds: string[];
506
+ reaches: (organizationId: string) => Promise<boolean>;
501
507
  } | {
502
508
  kind: 'platform_admin';
503
509
  };
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { uuidSchema } from './common.js';
3
3
  import { nextActionSchema } from './orders.js';
4
+ import { lineQuantitySchema, REQUEST_LINE_ITEMS_MAX } from './line-bounds.js';
4
5
  /**
5
6
  * Quick-order contracts (feature 039). The quick-order page lets buyers
6
7
  * build a Cart or a Quote Request from a CSV / Excel file (`sku,quantity`
@@ -163,7 +164,7 @@ export const quickOrderTargetSchema = z.enum(['cart', 'quote_request']);
163
164
  export const quickOrderBuildLineSchema = z.object({
164
165
  productId: uuidSchema,
165
166
  variantId: uuidSchema.nullable().optional(),
166
- quantity: z.number().int().positive(),
167
+ quantity: lineQuantitySchema,
167
168
  });
168
169
  /**
169
170
  * Feature 155 (FR-038, research R20) — the most items a build accepts, either target.
@@ -171,7 +172,7 @@ export const quickOrderBuildLineSchema = z.object({
171
172
  * `details: { code: 'too_many_items', maximum }`), deliberately not by a schema `.max()`,
172
173
  * which would answer 400.
173
174
  */
174
- export const QUICK_ORDER_BUILD_MAX_ITEMS = 200;
175
+ export const QUICK_ORDER_BUILD_MAX_ITEMS = REQUEST_LINE_ITEMS_MAX;
175
176
  export const quickOrderBuildRequestSchema = z.object({
176
177
  target: quickOrderTargetSchema,
177
178
  items: z.array(quickOrderBuildLineSchema).min(1),
@@ -278,7 +279,7 @@ export const quickOrderOneClickEligibilitySchema = z.object({
278
279
  export const quickOrderOneClickRequestSchema = z.object({
279
280
  productId: uuidSchema,
280
281
  variantId: uuidSchema.nullable().optional(),
281
- quantity: z.number().int().positive().optional(),
282
+ quantity: lineQuantitySchema.optional(),
282
283
  idempotencyKey: z.string().max(200).optional(),
283
284
  });
284
285
  export const quickOrderOneClickResponseSchema = z.object({
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import type { SupportedLanguage } from './platform-language.js';
2
3
  import { type OriginReference } from './common.js';
3
4
  /**
4
5
  * Quote Requests (RFQ) module contracts — feature 008 workflow rewrite.
@@ -255,6 +256,70 @@ export declare const quoteRequestHistoryEntryKindSchema: z.ZodEnum<{
255
256
  custom_field_carry_skipped: "custom_field_carry_skipped";
256
257
  }>;
257
258
  export type QuoteRequestHistoryEntryKind = z.infer<typeof quoteRequestHistoryEntryKindSchema>;
259
+ /**
260
+ * `specs/179-rfq-and-customer-notifications/` — one notification delivery of a
261
+ * history entry (`contracts/delivery-and-ports.md` §4): who was told, through
262
+ * which channel, and with what outcome. Admin history only; the customer
263
+ * projection never carries it (FR-071). The recipient's address is never part
264
+ * of it — `displayName` is resolved at read, `''` when the person is gone.
265
+ */
266
+ export declare const quoteRequestDeliveryChannelSchema: z.ZodEnum<{
267
+ admin_in_app: "admin_in_app";
268
+ admin_email: "admin_email";
269
+ customer_email: "customer_email";
270
+ customer_in_app: "customer_in_app";
271
+ customer_push: "customer_push";
272
+ }>;
273
+ export type QuoteRequestDeliveryChannel = z.infer<typeof quoteRequestDeliveryChannelSchema>;
274
+ export declare const quoteRequestDeliveryStatusSchema: z.ZodEnum<{
275
+ pending: "pending";
276
+ failed: "failed";
277
+ sent: "sent";
278
+ skipped_stale: "skipped_stale";
279
+ skipped_module_off: "skipped_module_off";
280
+ skipped_deactivated: "skipped_deactivated";
281
+ skipped_no_transport: "skipped_no_transport";
282
+ skipped_logged: "skipped_logged";
283
+ skipped_no_recipient: "skipped_no_recipient";
284
+ skipped_preference: "skipped_preference";
285
+ skipped_no_subscription: "skipped_no_subscription";
286
+ }>;
287
+ export type QuoteRequestDeliveryStatus = z.infer<typeof quoteRequestDeliveryStatusSchema>;
288
+ export declare const quoteRequestDeliverySchema: z.ZodObject<{
289
+ id: z.ZodString;
290
+ channel: z.ZodEnum<{
291
+ admin_in_app: "admin_in_app";
292
+ admin_email: "admin_email";
293
+ customer_email: "customer_email";
294
+ customer_in_app: "customer_in_app";
295
+ customer_push: "customer_push";
296
+ }>;
297
+ recipient: z.ZodObject<{
298
+ kind: z.ZodEnum<{
299
+ customer: "customer";
300
+ admin: "admin";
301
+ }>;
302
+ id: z.ZodString;
303
+ displayName: z.ZodString;
304
+ }, z.core.$strict>;
305
+ status: z.ZodEnum<{
306
+ pending: "pending";
307
+ failed: "failed";
308
+ sent: "sent";
309
+ skipped_stale: "skipped_stale";
310
+ skipped_module_off: "skipped_module_off";
311
+ skipped_deactivated: "skipped_deactivated";
312
+ skipped_no_transport: "skipped_no_transport";
313
+ skipped_logged: "skipped_logged";
314
+ skipped_no_recipient: "skipped_no_recipient";
315
+ skipped_preference: "skipped_preference";
316
+ skipped_no_subscription: "skipped_no_subscription";
317
+ }>;
318
+ attempts: z.ZodNumber;
319
+ lastError: z.ZodNullable<z.ZodString>;
320
+ closedAt: z.ZodNullable<z.ZodString>;
321
+ }, z.core.$strict>;
322
+ export type QuoteRequestDelivery = z.infer<typeof quoteRequestDeliverySchema>;
258
323
  export declare const quoteRequestHistoryEntrySchema: z.ZodObject<{
259
324
  id: z.ZodString;
260
325
  eventIds: z.ZodArray<z.ZodString>;
@@ -429,6 +494,40 @@ export declare const quoteRequestHistoryEntrySchema: z.ZodObject<{
429
494
  }, z.core.$strip>>;
430
495
  }, z.core.$strip>>;
431
496
  }, z.core.$strip>>>;
497
+ deliveries: z.ZodOptional<z.ZodArray<z.ZodObject<{
498
+ id: z.ZodString;
499
+ channel: z.ZodEnum<{
500
+ admin_in_app: "admin_in_app";
501
+ admin_email: "admin_email";
502
+ customer_email: "customer_email";
503
+ customer_in_app: "customer_in_app";
504
+ customer_push: "customer_push";
505
+ }>;
506
+ recipient: z.ZodObject<{
507
+ kind: z.ZodEnum<{
508
+ customer: "customer";
509
+ admin: "admin";
510
+ }>;
511
+ id: z.ZodString;
512
+ displayName: z.ZodString;
513
+ }, z.core.$strict>;
514
+ status: z.ZodEnum<{
515
+ pending: "pending";
516
+ failed: "failed";
517
+ sent: "sent";
518
+ skipped_stale: "skipped_stale";
519
+ skipped_module_off: "skipped_module_off";
520
+ skipped_deactivated: "skipped_deactivated";
521
+ skipped_no_transport: "skipped_no_transport";
522
+ skipped_logged: "skipped_logged";
523
+ skipped_no_recipient: "skipped_no_recipient";
524
+ skipped_preference: "skipped_preference";
525
+ skipped_no_subscription: "skipped_no_subscription";
526
+ }>;
527
+ attempts: z.ZodNumber;
528
+ lastError: z.ZodNullable<z.ZodString>;
529
+ closedAt: z.ZodNullable<z.ZodString>;
530
+ }, z.core.$strict>>>;
432
531
  }, z.core.$strip>;
433
532
  export type QuoteRequestHistoryEntry = z.infer<typeof quoteRequestHistoryEntrySchema>;
434
533
  /**
@@ -617,6 +716,40 @@ export declare const quoteRequestHistorySchema: z.ZodObject<{
617
716
  }, z.core.$strip>>;
618
717
  }, z.core.$strip>>;
619
718
  }, z.core.$strip>>>;
719
+ deliveries: z.ZodOptional<z.ZodArray<z.ZodObject<{
720
+ id: z.ZodString;
721
+ channel: z.ZodEnum<{
722
+ admin_in_app: "admin_in_app";
723
+ admin_email: "admin_email";
724
+ customer_email: "customer_email";
725
+ customer_in_app: "customer_in_app";
726
+ customer_push: "customer_push";
727
+ }>;
728
+ recipient: z.ZodObject<{
729
+ kind: z.ZodEnum<{
730
+ customer: "customer";
731
+ admin: "admin";
732
+ }>;
733
+ id: z.ZodString;
734
+ displayName: z.ZodString;
735
+ }, z.core.$strict>;
736
+ status: z.ZodEnum<{
737
+ pending: "pending";
738
+ failed: "failed";
739
+ sent: "sent";
740
+ skipped_stale: "skipped_stale";
741
+ skipped_module_off: "skipped_module_off";
742
+ skipped_deactivated: "skipped_deactivated";
743
+ skipped_no_transport: "skipped_no_transport";
744
+ skipped_logged: "skipped_logged";
745
+ skipped_no_recipient: "skipped_no_recipient";
746
+ skipped_preference: "skipped_preference";
747
+ skipped_no_subscription: "skipped_no_subscription";
748
+ }>;
749
+ attempts: z.ZodNumber;
750
+ lastError: z.ZodNullable<z.ZodString>;
751
+ closedAt: z.ZodNullable<z.ZodString>;
752
+ }, z.core.$strict>>>;
620
753
  }, z.core.$strip>>;
621
754
  truncated: z.ZodBoolean;
622
755
  }, z.core.$strip>;
@@ -919,6 +1052,7 @@ export declare const quoteRequestSummarySchema: z.ZodObject<{
919
1052
  agreed: "agreed";
920
1053
  partial: "partial";
921
1054
  }>>;
1055
+ statusName: z.ZodOptional<z.ZodString>;
922
1056
  }, z.core.$strip>;
923
1057
  export type QuoteRequestSummary = z.infer<typeof quoteRequestSummarySchema>;
924
1058
  export declare const createQuoteRequestLineSchema: z.ZodObject<{
@@ -1009,6 +1143,7 @@ export declare const adminCreateQuoteRequestSchema: z.ZodObject<{
1009
1143
  type: z.ZodString;
1010
1144
  id: z.ZodString;
1011
1145
  }, z.core.$strict>>;
1146
+ customFieldValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1012
1147
  }, z.core.$strip>;
1013
1148
  export type AdminCreateQuoteRequest = z.infer<typeof adminCreateQuoteRequestSchema>;
1014
1149
  /**
@@ -1139,8 +1274,8 @@ export declare const quoteRequestAccountNegotiationSchema: z.ZodObject<{
1139
1274
  effectivePriceProposalsAllowed: z.ZodBoolean;
1140
1275
  effectiveSource: z.ZodEnum<{
1141
1276
  default: "default";
1142
- account: "account";
1143
1277
  organization: "organization";
1278
+ account: "account";
1144
1279
  }>;
1145
1280
  updatedAt: z.ZodNullable<z.ZodString>;
1146
1281
  }, z.core.$strip>;
@@ -1282,6 +1417,15 @@ export interface QuoteRequestLineRecord {
1282
1417
  */
1283
1418
  export interface QuoteRequestReadPort {
1284
1419
  findById(id: string): Promise<QuoteRequestRecord | null>;
1420
+ /**
1421
+ * A status's name in `language`, in this module's own wording (the one its
1422
+ * global-search results use); a code outside {@link rfqStatusSchema} answers
1423
+ * as it is. Published for issue #455, so that a module showing a linked
1424
+ * Quote Request names its status as `quote_requests` does rather than
1425
+ * showing the stored code or keeping a copy of the wording. Reads no quote,
1426
+ * so it checks no permission.
1427
+ */
1428
+ statusName(status: string, language: SupportedLanguage): Promise<string>;
1285
1429
  /**
1286
1430
  * Open quotes for the given organisations. Empty `organizationIds` answers
1287
1431
  * the empty array rather than every quote — a rep assigned nothing sees
@@ -1315,6 +1459,24 @@ export interface QuoteRequestReadPort {
1315
1459
  * over `listItems`, and the quote desk list a third, different one.
1316
1460
  */
1317
1461
  amountOf(quoteRequestId: string): Promise<QuoteRequestAmount | null>;
1462
+ /**
1463
+ * The quotes of `ids` in the caller's tenant scope, in no particular order —
1464
+ * what {@link findById} answers for each id, in one read. A missing,
1465
+ * out-of-scope or malformed id is simply absent.
1466
+ *
1467
+ * Added for issue #457: `projects` read the Quote Requests linked to a
1468
+ * Project one `findById` at a time.
1469
+ */
1470
+ findByIds(ids: readonly string[]): Promise<QuoteRequestRecord[]>;
1471
+ /**
1472
+ * What each quote of `quoteRequestIds` is worth, keyed by quote id — what
1473
+ * {@link amountOf} answers for each id, in a fixed number of reads. A quote
1474
+ * `amountOf` answers `null` for (missing, out of scope, malformed id) has no
1475
+ * entry.
1476
+ *
1477
+ * Added for issue #457, beside {@link findByIds}.
1478
+ */
1479
+ amountsOf(quoteRequestIds: readonly string[]): Promise<Map<string, QuoteRequestAmount>>;
1318
1480
  }
1319
1481
  /** Who is asking, on a customer-facing quote path. */
1320
1482
  export interface RfqCustomerContext {
@@ -1376,10 +1538,11 @@ export interface CreateForCustomerOptions {
1376
1538
  */
1377
1539
  language?: string;
1378
1540
  /**
1379
- * Feature 163 — the buyer request's language tag (the first `Accept-Language` tag,
1380
- * `firstLanguageTag`), which the scope language L of every line is resolved from
1381
- * against the channel's own languages (`scopeLanguageOf`), as the basket's is. Absent:
1382
- * the channel's default language. Distinct from `language`, which falls back to a
1541
+ * Feature 163 — the buyer request's language tag, which the scope language L of every
1542
+ * line is resolved from against the channel's own languages (`scopeLanguageOf`), as the
1543
+ * basket's is. The customer routes pass the channel language the whole `Accept-Language`
1544
+ * asks for (`requestScopeLanguage`, issue #1011), which resolves to itself. Absent: the
1545
+ * channel's default language. Distinct from `language`, which falls back to a
1383
1546
  * bundle language the channel may switch a product off in. In-process only.
1384
1547
  */
1385
1548
  languageTag?: string;