@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
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { isoDateTimeSchema, OriginReferenceSchema, uuidSchema } from './common.js';
3
3
  import { lineGroupInputSchema, lineGroupKeySchema, lineGroupSchema, newLineGroupInputSchema, refineLineGrouping, } from './line-groups.js';
4
- import { customFieldCarrySkipSchema } from './custom-fields.js';
4
+ import { customFieldCarrySkipSchema, customFieldValuesSchema } from './custom-fields.js';
5
5
  import { fourDecimalUnitPrice } from './money-input.js';
6
+ import { lineQuantitySchema, REQUEST_LINE_ITEMS_MAX } from './line-bounds.js';
6
7
  /**
7
8
  * Quote Requests (RFQ) module contracts — feature 008 workflow rewrite.
8
9
  * Source of truth per Principle V; the backend re-uses these schemas as
@@ -259,6 +260,50 @@ export const quoteRequestHistoryEntryKindSchema = z.enum([
259
260
  // Feature 162.
260
261
  'custom_field_carry_skipped',
261
262
  ]);
263
+ /**
264
+ * `specs/179-rfq-and-customer-notifications/` — one notification delivery of a
265
+ * history entry (`contracts/delivery-and-ports.md` §4): who was told, through
266
+ * which channel, and with what outcome. Admin history only; the customer
267
+ * projection never carries it (FR-071). The recipient's address is never part
268
+ * of it — `displayName` is resolved at read, `''` when the person is gone.
269
+ */
270
+ export const quoteRequestDeliveryChannelSchema = z.enum([
271
+ 'admin_in_app',
272
+ 'admin_email',
273
+ 'customer_email',
274
+ 'customer_in_app',
275
+ 'customer_push',
276
+ ]);
277
+ export const quoteRequestDeliveryStatusSchema = z.enum([
278
+ 'pending',
279
+ 'sent',
280
+ 'skipped_stale',
281
+ 'skipped_module_off',
282
+ 'skipped_deactivated',
283
+ 'skipped_no_transport',
284
+ 'skipped_logged',
285
+ 'skipped_no_recipient',
286
+ 'skipped_preference',
287
+ 'skipped_no_subscription',
288
+ 'failed',
289
+ ]);
290
+ export const quoteRequestDeliverySchema = z
291
+ .object({
292
+ id: uuidSchema,
293
+ channel: quoteRequestDeliveryChannelSchema,
294
+ recipient: z
295
+ .object({
296
+ kind: z.enum(['admin', 'customer']),
297
+ id: uuidSchema,
298
+ displayName: z.string(),
299
+ })
300
+ .strict(),
301
+ status: quoteRequestDeliveryStatusSchema,
302
+ attempts: z.number().int().nonnegative(),
303
+ lastError: z.string().nullable(),
304
+ closedAt: isoDateTimeSchema.nullable(),
305
+ })
306
+ .strict();
262
307
  export const quoteRequestHistoryEntrySchema = z.object({
263
308
  /** Id of the first merged event. */
264
309
  id: uuidSchema,
@@ -305,6 +350,11 @@ export const quoteRequestHistoryEntrySchema = z.object({
305
350
  })
306
351
  .nullable()
307
352
  .optional(),
353
+ /**
354
+ * Feature 179 — admin history only: the notification deliveries whose source
355
+ * event is one of `eventIds`. Absent on the customer route (FR-071).
356
+ */
357
+ deliveries: z.array(quoteRequestDeliverySchema).optional(),
308
358
  });
309
359
  /**
310
360
  * How many of a quote request's most recent events its history is built from
@@ -542,6 +592,12 @@ export const quoteRequestSummarySchema = z.object({
542
592
  */
543
593
  amount: quoteRequestAmountSchema.shape.amount.optional(),
544
594
  agreement: quoteRequestAgreementSchema.optional(),
595
+ /**
596
+ * Issue #455 — `status` named in the response language, in this module's
597
+ * own wording (`QuoteRequestReadPort.statusName`), for another module's link
598
+ * picker to show. **Admin list only**; declared by issue #1270.
599
+ */
600
+ statusName: z.string().optional(),
545
601
  });
546
602
  // ---------------------------------------------------------------------------
547
603
  // Customer-facing request schemas
@@ -549,7 +605,7 @@ export const quoteRequestSummarySchema = z.object({
549
605
  export const createQuoteRequestLineSchema = z.object({
550
606
  productId: uuidSchema,
551
607
  variantId: uuidSchema.optional(),
552
- quantity: z.number().int().positive(),
608
+ quantity: lineQuantitySchema,
553
609
  desiredUnitPrice: fourDecimalUnitPrice(z.number().finite().nonnegative()).optional(),
554
610
  lineNote: z.string().max(2000).optional(),
555
611
  /** Feature 043 — snapshot when the line was added as a packaging unit. */
@@ -565,12 +621,12 @@ export const createQuoteRequestLineSchema = z.object({
565
621
  */
566
622
  export const createQuoteRequestSchema = z.object({
567
623
  headerNote: z.string().max(2000).optional(),
568
- items: z.array(createQuoteRequestLineSchema).min(1).max(200),
624
+ items: z.array(createQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX),
569
625
  });
570
626
  export const patchQuoteRequestSchema = z
571
627
  .object({
572
628
  headerNote: z.string().max(2000).nullable().optional(),
573
- items: z.array(createQuoteRequestLineSchema).min(1).max(200).optional(),
629
+ items: z.array(createQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX).optional(),
574
630
  })
575
631
  .strict();
576
632
  export const acceptRevisionSchema = z.object({
@@ -591,7 +647,7 @@ export const resubmitQuoteRequestSchema = z
591
647
  export const adminCreateQuoteRequestLineSchema = z.object({
592
648
  productId: uuidSchema,
593
649
  variantId: uuidSchema.optional(),
594
- quantity: z.number().int().positive(),
650
+ quantity: lineQuantitySchema,
595
651
  agreedUnitPrice: fourDecimalUnitPrice(z.number().finite().nonnegative()),
596
652
  lineNote: z.string().max(2000).optional(),
597
653
  /** Feature 159 — the `groups[].key` this line belongs to; absent or `null` = ungrouped. */
@@ -605,7 +661,7 @@ export const adminCreateQuoteRequestSchema = z
605
661
  /** Feature 159 — the new quote's groups in display order; lines name them by `groupKey`. */
606
662
  groups: z.array(newLineGroupInputSchema).optional(),
607
663
  /** In display order: each group's lines, then the ungrouped lines. */
608
- items: z.array(adminCreateQuoteRequestLineSchema).min(1),
664
+ items: z.array(adminCreateQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX),
609
665
  expiresInDays: z.number().int().nonnegative().optional(),
610
666
  /**
611
667
  * Feature 163 (FR-018) — the sales channel the operator raises the request on:
@@ -623,6 +679,11 @@ export const adminCreateQuoteRequestSchema = z
623
679
  * Not stored and not returned.
624
680
  */
625
681
  origin: OriginReferenceSchema.optional(),
682
+ /**
683
+ * Feature 175 (FR-019) — the request's custom-field values, validated with
684
+ * the administrator's rules inside the creating Command.
685
+ */
686
+ customFieldValues: customFieldValuesSchema.optional(),
626
687
  })
627
688
  .superRefine((body, ctx) => refineLineGrouping(ctx, body));
628
689
  /**
@@ -645,7 +706,7 @@ export const adminPatchQuoteRequestLineSchema = z.object({
645
706
  id: uuidSchema.optional(),
646
707
  productId: uuidSchema,
647
708
  variantId: uuidSchema.optional(),
648
- quantity: z.number().int().positive(),
709
+ quantity: lineQuantitySchema,
649
710
  agreedUnitPrice: fourDecimalUnitPrice(z.number().finite().nonnegative()).nullable().optional(),
650
711
  lineNote: z.string().max(2000).nullable().optional(),
651
712
  /** Feature 159 — the `groups[].key` this line belongs to; `null` = ungrouped. */
@@ -669,7 +730,7 @@ export const adminPatchQuoteRequestSchema = z
669
730
  */
670
731
  groups: z.array(lineGroupInputSchema).optional(),
671
732
  /** In display order: each group's lines, then the ungrouped lines. */
672
- items: z.array(adminPatchQuoteRequestLineSchema).min(1).optional(),
733
+ items: z.array(adminPatchQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX).optional(),
673
734
  expiresInDays: z.number().int().nonnegative().optional(),
674
735
  /** Feature 055 — custom-field values for this quote request (validated on write). */
675
736
  customFieldValues: z.record(z.string(), z.unknown()).optional(),
@@ -22,13 +22,13 @@ import { z } from 'zod';
22
22
  */
23
23
  export declare const RECORD_REFERENCE_TYPES: readonly ["product", "order", "admin_user", "quote_request", "task", "opportunity", "project"];
24
24
  export declare const recordReferenceTypeSchema: z.ZodEnum<{
25
- product: "product";
26
25
  order: "order";
27
- admin_user: "admin_user";
28
26
  quote_request: "quote_request";
29
- task: "task";
27
+ product: "product";
30
28
  opportunity: "opportunity";
31
29
  project: "project";
30
+ task: "task";
31
+ admin_user: "admin_user";
32
32
  }>;
33
33
  export type RecordReferenceType = z.infer<typeof recordReferenceTypeSchema>;
34
34
  /**
@@ -82,13 +82,13 @@ export type RecordReferenceOrder = z.infer<typeof RecordReferenceOrderSchema>;
82
82
  */
83
83
  export declare const RecordReferenceSchema: z.ZodObject<{
84
84
  type: z.ZodEnum<{
85
- product: "product";
86
85
  order: "order";
87
- admin_user: "admin_user";
88
86
  quote_request: "quote_request";
89
- task: "task";
87
+ product: "product";
90
88
  opportunity: "opportunity";
91
89
  project: "project";
90
+ task: "task";
91
+ admin_user: "admin_user";
92
92
  }>;
93
93
  id: z.ZodString;
94
94
  available: z.ZodBoolean;
@@ -111,9 +111,9 @@ export declare const RECORD_DOCUMENT_KINDS: readonly ["order", "quote_request",
111
111
  export declare const recordDocumentKindSchema: z.ZodEnum<{
112
112
  order: "order";
113
113
  quote_request: "quote_request";
114
- task: "task";
115
114
  opportunity: "opportunity";
116
115
  project: "project";
116
+ task: "task";
117
117
  }>;
118
118
  export type RecordDocumentKind = z.infer<typeof recordDocumentKindSchema>;
119
119
  export declare const RecordDocumentLookupItemSchema: z.ZodObject<{
@@ -126,9 +126,9 @@ export declare const RecordDocumentLookupGroupSchema: z.ZodObject<{
126
126
  kind: z.ZodEnum<{
127
127
  order: "order";
128
128
  quote_request: "quote_request";
129
- task: "task";
130
129
  opportunity: "opportunity";
131
130
  project: "project";
131
+ task: "task";
132
132
  }>;
133
133
  items: z.ZodArray<z.ZodObject<{
134
134
  id: z.ZodString;
@@ -149,9 +149,9 @@ export declare const RecordDocumentLookupResponseSchema: z.ZodObject<{
149
149
  kind: z.ZodEnum<{
150
150
  order: "order";
151
151
  quote_request: "quote_request";
152
- task: "task";
153
152
  opportunity: "opportunity";
154
153
  project: "project";
154
+ task: "task";
155
155
  }>;
156
156
  items: z.ZodArray<z.ZodObject<{
157
157
  id: z.ZodString;
@@ -179,13 +179,13 @@ export declare const RecordHistoryEntrySchema: z.ZodObject<{
179
179
  after: z.ZodNullable<z.ZodUnknown>;
180
180
  references: z.ZodArray<z.ZodObject<{
181
181
  type: z.ZodEnum<{
182
- product: "product";
183
182
  order: "order";
184
- admin_user: "admin_user";
185
183
  quote_request: "quote_request";
186
- task: "task";
184
+ product: "product";
187
185
  opportunity: "opportunity";
188
186
  project: "project";
187
+ task: "task";
188
+ admin_user: "admin_user";
189
189
  }>;
190
190
  id: z.ZodString;
191
191
  available: z.ZodBoolean;
@@ -220,13 +220,13 @@ export declare const RecordHistoryPageSchema: z.ZodObject<{
220
220
  after: z.ZodNullable<z.ZodUnknown>;
221
221
  references: z.ZodArray<z.ZodObject<{
222
222
  type: z.ZodEnum<{
223
- product: "product";
224
223
  order: "order";
225
- admin_user: "admin_user";
226
224
  quote_request: "quote_request";
227
- task: "task";
225
+ product: "product";
228
226
  opportunity: "opportunity";
229
227
  project: "project";
228
+ task: "task";
229
+ admin_user: "admin_user";
230
230
  }>;
231
231
  id: z.ZodString;
232
232
  available: z.ZodBoolean;
package/dist/returns.d.ts CHANGED
@@ -847,6 +847,12 @@ export interface OrderReturnContext {
847
847
  currency: string;
848
848
  /** When the order entered its fulfilment-completing status; null if it has not. */
849
849
  completingStatusEnteredAt: Date | null;
850
+ /**
851
+ * When the order was placed (`specs/177-tax-id-scope/`, FR-040): an
852
+ * organization converted from personal to company keeps a consumer's
853
+ * withdrawal right for an order placed before its `convertedToCompanyAt`.
854
+ */
855
+ placedAt: Date;
850
856
  /**
851
857
  * The payment method the order was paid with (issue #905): a consumer's
852
858
  * withdrawal is refunded by the same means of payment unless they agree
package/dist/returns.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { isoDateTimeSchema, uuidSchema } from './common.js';
3
3
  import { twoDecimalAmount } from './money-input.js';
4
+ import { lineQuantitySchema, REQUEST_LINE_ITEMS_MAX } from './line-bounds.js';
4
5
  /**
5
6
  * Returns & Complaints (Refunds, RMA) — feature 046.
6
7
  *
@@ -242,11 +243,12 @@ export const createReturnCaseRequestSchema = z.object({
242
243
  lines: z
243
244
  .array(z.object({
244
245
  orderItemId: uuidSchema,
245
- quantity: z.number().int().positive(),
246
+ quantity: lineQuantitySchema,
246
247
  reasonId: uuidSchema,
247
248
  description: z.string().max(2000).optional(),
248
249
  }))
249
- .min(1),
250
+ .min(1)
251
+ .max(REQUEST_LINE_ITEMS_MAX),
250
252
  attachmentAssetIds: z.array(uuidSchema).optional(),
251
253
  comment: z.string().max(2000).optional(),
252
254
  });
@@ -198,9 +198,9 @@ export type SalesChannelListResponse = z.infer<typeof SalesChannelListResponseSc
198
198
  /** Channel-scoped entity types tracked by the M:N membership service. */
199
199
  export declare const ChannelMemberEntityTypeSchema: z.ZodEnum<{
200
200
  customer: "customer";
201
- product: "product";
202
201
  category: "category";
203
202
  organization: "organization";
203
+ product: "product";
204
204
  "payment-method": "payment-method";
205
205
  "delivery-method": "delivery-method";
206
206
  tax: "tax";
@@ -209,7 +209,34 @@ export declare const ChannelMemberEntityTypeSchema: z.ZodEnum<{
209
209
  "price-list": "price-list";
210
210
  }>;
211
211
  export type ChannelMemberEntityType = z.infer<typeof ChannelMemberEntityTypeSchema>;
212
- /** `GET /api/v1/admin/sales-channels/{code}/{entityType}` — list members. */
212
+ /** `GET /api/v1/admin/sales-channels/{code}/{entityType}` — the ids of one entity type's members of a channel, paginated (`page` is 0-based). */
213
+ export declare const ChannelMemberIdListResponseSchema: z.ZodObject<{
214
+ salesChannelCode: z.ZodString;
215
+ entityType: z.ZodEnum<{
216
+ customer: "customer";
217
+ category: "category";
218
+ organization: "organization";
219
+ product: "product";
220
+ "payment-method": "payment-method";
221
+ "delivery-method": "delivery-method";
222
+ tax: "tax";
223
+ promotion: "promotion";
224
+ "cms-page": "cms-page";
225
+ "price-list": "price-list";
226
+ }>;
227
+ entityIds: z.ZodArray<z.ZodString>;
228
+ page: z.ZodNumber;
229
+ pageSize: z.ZodNumber;
230
+ total: z.ZodNumber;
231
+ }, z.core.$strip>;
232
+ export type ChannelMemberIdListResponse = z.infer<typeof ChannelMemberIdListResponseSchema>;
233
+ /**
234
+ * A `{ channels }` list of channel summaries. No route answers this shape; the
235
+ * entity-side list is {@link EntityMembershipListResponseSchema}.
236
+ *
237
+ * @deprecated Since issue #1160 — it never described the route it names: that route answers
238
+ * {@link ChannelMemberIdListResponseSchema}. Kept for one minor release, then removed (issue #1162).
239
+ */
213
240
  export declare const ChannelMembershipListResponseSchema: z.ZodObject<{
214
241
  channels: z.ZodArray<z.ZodObject<{
215
242
  id: z.ZodString;
@@ -228,14 +255,18 @@ export declare const ChannelMembershipListResponseSchema: z.ZodObject<{
228
255
  updatedAt: z.ZodString;
229
256
  }, z.core.$strip>>;
230
257
  }, z.core.$strip>;
258
+ /**
259
+ * @deprecated Since issue #1160 — it never described the route it names: that route answers
260
+ * {@link ChannelMemberIdListResponse}. Kept for one minor release, then removed (issue #1162).
261
+ */
231
262
  export type ChannelMembershipListResponse = z.infer<typeof ChannelMembershipListResponseSchema>;
232
263
  /** `GET /api/v1/admin/{entityType}/{id}/sales-channels` — list channels of an entity. */
233
264
  export declare const EntityMembershipListResponseSchema: z.ZodObject<{
234
265
  entityType: z.ZodEnum<{
235
266
  customer: "customer";
236
- product: "product";
237
267
  category: "category";
238
268
  organization: "organization";
269
+ product: "product";
239
270
  "payment-method": "payment-method";
240
271
  "delivery-method": "delivery-method";
241
272
  tax: "tax";
@@ -235,7 +235,22 @@ export const ChannelMemberEntityTypeSchema = z.enum([
235
235
  // Feature 160 (D-287 P1) — a price book's channel set, `sales_channel_price_lists`.
236
236
  'price-list',
237
237
  ]);
238
- /** `GET /api/v1/admin/sales-channels/{code}/{entityType}` — list members. */
238
+ /** `GET /api/v1/admin/sales-channels/{code}/{entityType}` — the ids of one entity type's members of a channel, paginated (`page` is 0-based). */
239
+ export const ChannelMemberIdListResponseSchema = z.object({
240
+ salesChannelCode: SalesChannelCodeSchema,
241
+ entityType: ChannelMemberEntityTypeSchema,
242
+ entityIds: z.array(uuidSchema),
243
+ page: z.number().int().nonnegative(),
244
+ pageSize: z.number().int().positive(),
245
+ total: z.number().int().nonnegative(),
246
+ });
247
+ /**
248
+ * A `{ channels }` list of channel summaries. No route answers this shape; the
249
+ * entity-side list is {@link EntityMembershipListResponseSchema}.
250
+ *
251
+ * @deprecated Since issue #1160 — it never described the route it names: that route answers
252
+ * {@link ChannelMemberIdListResponseSchema}. Kept for one minor release, then removed (issue #1162).
253
+ */
239
254
  export const ChannelMembershipListResponseSchema = z.object({
240
255
  channels: z.array(SalesChannelSummarySchema),
241
256
  });
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ import { CUSTOM_FIELD_HOST_BINDINGS } from './custom-fields.js';
3
+ /**
4
+ * Declared extension columns on core tables (`specs/178-extensible-columns/`)
5
+ * — the wire half (FR-050, data-model §7).
6
+ *
7
+ * An installed module package may declare additive `x_<moduleId>_*` columns on
8
+ * a custom-field host table. The declaration API, the generated DDL and the
9
+ * accessor are `@endora-commerce/platform/kernel`'s; what lives here is what a
10
+ * consumer of an admin read sees: the `?extensions=` query parameter and the
11
+ * `extensions` attribute a host record gains when it names a module.
12
+ */
13
+ /** A table an extension may declare columns on — derived from {@link CUSTOM_FIELD_HOST_BINDINGS}. */
14
+ export type ExtensibleHostTable = (typeof CUSTOM_FIELD_HOST_BINDINGS)[keyof typeof CUSTOM_FIELD_HOST_BINDINGS]['table'];
15
+ /**
16
+ * Every extensible host table, derived and never listed (OD-15): every
17
+ * custom-field host table is extensible. Which of them the platform has rolled
18
+ * out is the platform's, not this package's.
19
+ */
20
+ export declare const EXTENSIBLE_HOST_TABLES: readonly ExtensibleHostTable[];
21
+ /**
22
+ * `?extensions=<moduleId>[,<moduleId>…]`, at most eight, merged into an
23
+ * extensible host's admin detail and list query schemas (FR-051).
24
+ */
25
+ export declare const ExtensionsQuerySchema: z.ZodObject<{
26
+ extensions: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>;
28
+ export type ExtensionsQuery = z.infer<typeof ExtensionsQuerySchema>;
29
+ /**
30
+ * `extensions` on a host record: per requested module, its declared keys and
31
+ * their values. Present only when the request named the module and the module
32
+ * exposes the host on admin reads (FR-052).
33
+ */
34
+ export declare const ExtensionAttributesSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
35
+ export type ExtensionAttributes = z.infer<typeof ExtensionAttributesSchema>;
36
+ //# sourceMappingURL=schema-extensions.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ import { CUSTOM_FIELD_HOST_BINDINGS } from './custom-fields.js';
3
+ /**
4
+ * Every extensible host table, derived and never listed (OD-15): every
5
+ * custom-field host table is extensible. Which of them the platform has rolled
6
+ * out is the platform's, not this package's.
7
+ */
8
+ export const EXTENSIBLE_HOST_TABLES = [
9
+ ...new Set(Object.values(CUSTOM_FIELD_HOST_BINDINGS).map((binding) => binding.table)),
10
+ ];
11
+ /** A module id as an extension names it — the manifest id grammar without a leading underscore. */
12
+ const extensionModuleIdSchema = z.string().regex(/^[a-z][a-z0-9_]*$/);
13
+ /**
14
+ * `?extensions=<moduleId>[,<moduleId>…]`, at most eight, merged into an
15
+ * extensible host's admin detail and list query schemas (FR-051).
16
+ */
17
+ export const ExtensionsQuerySchema = z.object({
18
+ extensions: z
19
+ .string()
20
+ .regex(/^[a-z][a-z0-9_]*(,[a-z][a-z0-9_]*){0,7}$/)
21
+ .optional(),
22
+ });
23
+ /**
24
+ * `extensions` on a host record: per requested module, its declared keys and
25
+ * their values. Present only when the request named the module and the module
26
+ * exposes the host on admin reads (FR-052).
27
+ */
28
+ export const ExtensionAttributesSchema = z.record(extensionModuleIdSchema, z.record(z.string(), z.json()));
29
+ //# sourceMappingURL=schema-extensions.js.map
package/dist/seo.d.ts CHANGED
@@ -9,8 +9,8 @@ import type { ScopedWriteOp } from './scoped-write-encoding.js';
9
9
  * renders public pages for can carry meta overrides.
10
10
  */
11
11
  export declare const seoEntityTypeSchema: z.ZodEnum<{
12
- product: "product";
13
12
  category: "category";
13
+ product: "product";
14
14
  cms_page: "cms_page";
15
15
  }>;
16
16
  export type SeoEntityType = z.infer<typeof seoEntityTypeSchema>;
@@ -32,8 +32,8 @@ export type ResolvedMeta = z.infer<typeof resolvedMetaSchema>;
32
32
  export declare const seoMetaOverrideSchema: z.ZodObject<{
33
33
  id: z.ZodString;
34
34
  entityType: z.ZodEnum<{
35
- product: "product";
36
35
  category: "category";
36
+ product: "product";
37
37
  cms_page: "cms_page";
38
38
  }>;
39
39
  entityId: z.ZodString;
@@ -275,6 +275,47 @@ export declare const SettingsListResponseSchema: z.ZodObject<{
275
275
  }, z.core.$strip>>;
276
276
  }, z.core.$strip>>;
277
277
  }, z.core.$strip>;
278
+ export type SettingsListResponse = z.infer<typeof SettingsListResponseSchema>;
279
+ /**
280
+ * A setting group without its settings — the reply to `POST
281
+ * /api/v1/admin/settings/groups` and `PATCH /api/v1/admin/settings/groups/:code`
282
+ * (issue #599).
283
+ */
284
+ export declare const SettingGroupSummaryDtoSchema: z.ZodObject<{
285
+ id: z.ZodUUID;
286
+ code: z.ZodString;
287
+ name: z.ZodString;
288
+ ownerModule: z.ZodString;
289
+ salesChannelCodes: z.ZodArray<z.ZodString>;
290
+ isSystemProtected: z.ZodBoolean;
291
+ }, z.core.$strip>;
292
+ export type SettingGroupSummaryDto = z.infer<typeof SettingGroupSummaryDtoSchema>;
293
+ /** One row of `GET /api/v1/admin/settings/groups`: the group, how many settings it holds, and when it last changed. */
294
+ export declare const SettingGroupRowDtoSchema: z.ZodObject<{
295
+ id: z.ZodUUID;
296
+ code: z.ZodString;
297
+ name: z.ZodString;
298
+ ownerModule: z.ZodString;
299
+ salesChannelCodes: z.ZodArray<z.ZodString>;
300
+ isSystemProtected: z.ZodBoolean;
301
+ settingCount: z.ZodNumber;
302
+ updatedAt: z.ZodISODateTime;
303
+ }, z.core.$strip>;
304
+ export type SettingGroupRowDto = z.infer<typeof SettingGroupRowDtoSchema>;
305
+ /** `GET /api/v1/admin/settings/groups` — every group, without its settings (issue #599). */
306
+ export declare const SettingGroupRowsResponseSchema: z.ZodObject<{
307
+ groups: z.ZodArray<z.ZodObject<{
308
+ id: z.ZodUUID;
309
+ code: z.ZodString;
310
+ name: z.ZodString;
311
+ ownerModule: z.ZodString;
312
+ salesChannelCodes: z.ZodArray<z.ZodString>;
313
+ isSystemProtected: z.ZodBoolean;
314
+ settingCount: z.ZodNumber;
315
+ updatedAt: z.ZodISODateTime;
316
+ }, z.core.$strip>>;
317
+ }, z.core.$strip>;
318
+ export type SettingGroupRowsResponse = z.infer<typeof SettingGroupRowsResponseSchema>;
278
319
  export declare const SettingsListQuerySchema: z.ZodObject<{
279
320
  groupCode: z.ZodOptional<z.ZodString>;
280
321
  }, z.core.$strip>;
@@ -351,6 +392,7 @@ export declare const SettingDetailResponseSchema: z.ZodObject<{
351
392
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
352
393
  }, z.core.$strip>>;
353
394
  }, z.core.$strip>;
395
+ export type SettingDetailResponse = z.infer<typeof SettingDetailResponseSchema>;
354
396
  /**
355
397
  * Public shop / company contact information resolved for the active sales
356
398
  * channel. Backs the storefront footer, the 404 "need help?" block and the
@@ -439,8 +481,8 @@ export type HomepageConfigResponse = z.infer<typeof HomepageConfigResponseSchema
439
481
  /**
440
482
  * The reporting time zone: the calendar in which a report counts a day, a
441
483
  * month or any other range of days. A setting of the `analytics` module, so
442
- * that no single reporting module owns it — Projects analytics reads it, CRM
443
- * may follow (#474). An IANA name; default `UTC`. Read it through
484
+ * that no single reporting module owns it — Projects and CRM analytics read
485
+ * it (#474). An IANA name; default `UTC`. Read it through
444
486
  * {@link ReportingTimeZonePort}, never by code: `analytics` can be switched
445
487
  * off, and a reader then counts in `UTC`.
446
488
  */
package/dist/settings.js CHANGED
@@ -293,6 +293,21 @@ export const SettingGroupDtoSchema = z.object({
293
293
  export const SettingsListResponseSchema = z.object({
294
294
  groups: z.array(SettingGroupDtoSchema),
295
295
  });
296
+ /**
297
+ * A setting group without its settings — the reply to `POST
298
+ * /api/v1/admin/settings/groups` and `PATCH /api/v1/admin/settings/groups/:code`
299
+ * (issue #599).
300
+ */
301
+ export const SettingGroupSummaryDtoSchema = SettingGroupDtoSchema.omit({ settings: true });
302
+ /** One row of `GET /api/v1/admin/settings/groups`: the group, how many settings it holds, and when it last changed. */
303
+ export const SettingGroupRowDtoSchema = SettingGroupSummaryDtoSchema.extend({
304
+ settingCount: z.number().int().nonnegative(),
305
+ updatedAt: z.iso.datetime(),
306
+ });
307
+ /** `GET /api/v1/admin/settings/groups` — every group, without its settings (issue #599). */
308
+ export const SettingGroupRowsResponseSchema = z.object({
309
+ groups: z.array(SettingGroupRowDtoSchema),
310
+ });
296
311
  export const SettingsListQuerySchema = z.object({
297
312
  groupCode: z.string().optional(),
298
313
  });
@@ -401,8 +416,8 @@ export const HomepageConfigResponseSchema = z.object({ data: HomepageConfigSchem
401
416
  /**
402
417
  * The reporting time zone: the calendar in which a report counts a day, a
403
418
  * month or any other range of days. A setting of the `analytics` module, so
404
- * that no single reporting module owns it — Projects analytics reads it, CRM
405
- * may follow (#474). An IANA name; default `UTC`. Read it through
419
+ * that no single reporting module owns it — Projects and CRM analytics read
420
+ * it (#474). An IANA name; default `UTC`. Read it through
406
421
  * {@link ReportingTimeZonePort}, never by code: `analytics` can be switched
407
422
  * off, and a reader then counts in `UTC`.
408
423
  */
@@ -44,6 +44,29 @@ export declare const shoppingListSchema: z.ZodObject<{
44
44
  updatedAt: z.ZodString;
45
45
  }, z.core.$strip>;
46
46
  export type ShoppingList = z.infer<typeof shoppingListSchema>;
47
+ /** `GET /api/v1/shopping-lists` — the signed-in customer's lists, each with its items (issue #599). */
48
+ export declare const shoppingListListResponseSchema: z.ZodObject<{
49
+ data: z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ organizationId: z.ZodString;
52
+ customerAccountId: z.ZodString;
53
+ name: z.ZodString;
54
+ isDefault: z.ZodBoolean;
55
+ items: z.ZodArray<z.ZodObject<{
56
+ id: z.ZodString;
57
+ shoppingListId: z.ZodString;
58
+ productId: z.ZodString;
59
+ variantId: z.ZodNullable<z.ZodString>;
60
+ quantity: z.ZodNumber;
61
+ note: z.ZodNullable<z.ZodString>;
62
+ createdAt: z.ZodString;
63
+ updatedAt: z.ZodString;
64
+ }, z.core.$strip>>;
65
+ createdAt: z.ZodString;
66
+ updatedAt: z.ZodString;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>;
69
+ export type ShoppingListListResponse = z.infer<typeof shoppingListListResponseSchema>;
47
70
  /**
48
71
  * The name `shopping_lists` stores on the default list it creates for every
49
72
  * customer (at registration, or on the first default-list read). It is data,
@@ -80,6 +103,21 @@ export declare const renameShoppingListRequestSchema: z.ZodObject<{
80
103
  name: z.ZodString;
81
104
  }, z.core.$strict>;
82
105
  export type RenameShoppingListRequest = z.infer<typeof renameShoppingListRequestSchema>;
106
+ /**
107
+ * Issue #1251 — `PATCH /api/v1/shopping-lists/:id`: the list's name, the quantities of any of
108
+ * its lines, or both, written together or not at all — the one *Save changes* of the
109
+ * storefront list page. Every body {@link renameShoppingListRequestSchema} accepts is accepted
110
+ * here. A line appears once, at most {@link REQUEST_LINE_ITEMS_MAX} of them; a line that is
111
+ * not on the list refuses the whole write.
112
+ */
113
+ export declare const updateShoppingListRequestSchema: z.ZodObject<{
114
+ name: z.ZodOptional<z.ZodString>;
115
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ id: z.ZodString;
117
+ quantity: z.ZodNumber;
118
+ }, z.core.$strict>>>;
119
+ }, z.core.$strict>;
120
+ export type UpdateShoppingListRequest = z.infer<typeof updateShoppingListRequestSchema>;
83
121
  export declare const addShoppingListItemRequestSchema: z.ZodObject<{
84
122
  productId: z.ZodString;
85
123
  variantId: z.ZodOptional<z.ZodString>;
@@ -149,7 +187,7 @@ export declare const convertToCartResponseSchema: z.ZodObject<{
149
187
  export type ConvertToCartResponse = z.infer<typeof convertToCartResponseSchema>;
150
188
  export declare const convertToRfqResponseSchema: z.ZodObject<{
151
189
  shoppingListId: z.ZodString;
152
- rfqId: z.ZodString;
190
+ rfqId: z.ZodNullable<z.ZodString>;
153
191
  added: z.ZodNumber;
154
192
  skipped: z.ZodArray<z.ZodObject<{
155
193
  itemId: z.ZodString;