@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
package/dist/i18n.d.ts CHANGED
@@ -9,6 +9,22 @@ export declare const languageSchema: z.ZodObject<{
9
9
  updatedAt: z.ZodString;
10
10
  }, z.core.$strip>;
11
11
  export type Language = z.infer<typeof languageSchema>;
12
+ /**
13
+ * `GET /api/v1/admin/languages` — every language row, active or not, the
14
+ * available catalogue included (issue #599).
15
+ */
16
+ export declare const languageListResponseSchema: z.ZodObject<{
17
+ data: z.ZodArray<z.ZodObject<{
18
+ code: z.ZodString;
19
+ label: z.ZodString;
20
+ isDefault: z.ZodBoolean;
21
+ isActive: z.ZodBoolean;
22
+ sortOrder: z.ZodNumber;
23
+ createdAt: z.ZodString;
24
+ updatedAt: z.ZodString;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>;
27
+ export type LanguageListResponse = z.infer<typeof languageListResponseSchema>;
12
28
  export declare const upsertLanguageRequestSchema: z.ZodObject<{
13
29
  label: z.ZodString;
14
30
  isActive: z.ZodOptional<z.ZodBoolean>;
@@ -28,6 +44,24 @@ export declare const currencySchema: z.ZodObject<{
28
44
  updatedAt: z.ZodString;
29
45
  }, z.core.$strip>;
30
46
  export type Currency = z.infer<typeof currencySchema>;
47
+ /**
48
+ * `GET /api/v1/admin/currencies` — every currency, active or not (issue #599).
49
+ * The rows are `currencySchema`: the catalogue's `symbolPosition` and
50
+ * `decimalPlaces` are `dictionaries`' admin screen to answer, not this one.
51
+ */
52
+ export declare const currencyListResponseSchema: z.ZodObject<{
53
+ data: z.ZodArray<z.ZodObject<{
54
+ code: z.ZodString;
55
+ label: z.ZodString;
56
+ symbol: z.ZodString;
57
+ isDefault: z.ZodBoolean;
58
+ isActive: z.ZodBoolean;
59
+ sortOrder: z.ZodNumber;
60
+ createdAt: z.ZodString;
61
+ updatedAt: z.ZodString;
62
+ }, z.core.$strip>>;
63
+ }, z.core.$strip>;
64
+ export type CurrencyListResponse = z.infer<typeof currencyListResponseSchema>;
31
65
  export declare const upsertCurrencyRequestSchema: z.ZodObject<{
32
66
  label: z.ZodString;
33
67
  symbol: z.ZodString;
package/dist/i18n.js CHANGED
@@ -18,6 +18,13 @@ export const languageSchema = z.object({
18
18
  createdAt: isoDateTimeSchema,
19
19
  updatedAt: isoDateTimeSchema,
20
20
  });
21
+ /**
22
+ * `GET /api/v1/admin/languages` — every language row, active or not, the
23
+ * available catalogue included (issue #599).
24
+ */
25
+ export const languageListResponseSchema = z.object({
26
+ data: z.array(languageSchema),
27
+ });
21
28
  export const upsertLanguageRequestSchema = z.object({
22
29
  label: z.string().min(1).max(64),
23
30
  isActive: z.boolean().optional(),
@@ -36,6 +43,14 @@ export const currencySchema = z.object({
36
43
  createdAt: isoDateTimeSchema,
37
44
  updatedAt: isoDateTimeSchema,
38
45
  });
46
+ /**
47
+ * `GET /api/v1/admin/currencies` — every currency, active or not (issue #599).
48
+ * The rows are `currencySchema`: the catalogue's `symbolPosition` and
49
+ * `decimalPlaces` are `dictionaries`' admin screen to answer, not this one.
50
+ */
51
+ export const currencyListResponseSchema = z.object({
52
+ data: z.array(currencySchema),
53
+ });
39
54
  export const upsertCurrencyRequestSchema = z.object({
40
55
  label: z.string().min(1).max(64),
41
56
  symbol: z.string().min(1).max(8),
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './common.js';
6
6
  export * from './scope-notice.js';
7
7
  export * from './catalog.js';
8
8
  export * from './order-minimums.js';
9
+ export * from './line-bounds.js';
9
10
  export * from './localized-name.js';
10
11
  export * from './product-summary-text.js';
11
12
  export * from './line-groups.js';
@@ -45,8 +46,9 @@ export * from './analytics.js';
45
46
  export * from './seo.js';
46
47
  export * from './i18n.js';
47
48
  export * from './platform-language.js';
49
+ export * from './accept-language.js';
48
50
  export * from './admin-i18n.js';
49
- export { cmsPageStatusSchema, cmsContentEnvelopeSchema, cmsPageSummarySchema, cmsBreadcrumbsSchemeSchema, cmsPageDetailSchema, createCmsPageRequestSchema, patchCmsPageRequestSchema, putCmsPageContentRequestSchema, cmsBlockSummarySchema, cmsBlockDetailSchema, createCmsBlockRequestSchema, patchCmsBlockRequestSchema, cmsTemplateSummarySchema, cmsTemplateDetailSchema, createCmsTemplateRequestSchema, patchCmsTemplateRequestSchema, cmsHookSummarySchema, cmsHookDetailSchema, createCmsHookRequestSchema, patchCmsHookRequestSchema, cmsHookAttachmentRequestSchema, cmsFieldDescriptorSchema, cmsPageBuilderDescriptorSchema, blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema, cmsPageIndexEntrySchema, cmsPageIndexResponseSchema, cmsReservedSegmentsResponseSchema, firstSlugSegment, CMS_PAGE_PATH_MAX_LEVELS, cmsPagePublicPaths, type CmsPagePathNode, cmsPageTranslationSchema, cmsPageTranslationsSchema, cmsLocalizedPage, cmsPageUrl, type CmsPageTranslation, type CmsPageTranslations, type CmsLocalizablePage, type CmsPageUrlInput, translatablePathRe, blockTranslatableTextSchema, blockTranslatableSchema, CMS_TRANSLATION_MAX_SOURCE_CHARACTERS_BOUNDS, CMS_TRANSLATION_DEFAULT_MAX_SOURCE_CHARACTERS, cmsPageBuilderTranslationStatusSchema, cmsPageBuilderTranslationCapabilitySchema, cmsPuckDataSchema, cmsPageBuilderTranslationScopeSchema, cmsPageBuilderTranslateRequestSchema, cmsPageBuilderTranslateResponseSchema, type BlockTranslatableText, type CmsPageBuilderTranslationStatus, type CmsPageBuilderTranslationCapability, type CmsPuckData, type CmsPageBuilderTranslationScope, type CmsPageBuilderTranslateRequest, type CmsPageBuilderTranslateResponse, type CmsPageStatus, type CmsContentEnvelope, type CmsPageSummary, type CmsBreadcrumbsScheme, type CmsPageDetail, type CreateCmsPageRequest, type PatchCmsPageRequest, type PutCmsPageContentRequest, type CmsBlockSummary, type CmsBlockDetail, type CreateCmsBlockRequest, type PatchCmsBlockRequest, type CmsTemplateSummary, type CmsTemplateDetail, type CreateCmsTemplateRequest, type PatchCmsTemplateRequest, type CmsHookSummary, type CmsHookDetail, type CreateCmsHookRequest, type PatchCmsHookRequest, type CmsHookAttachmentRequest, type CmsFieldDescriptor, type CmsPageBuilderDescriptor, type BlockDefinition, type BlockCategory, type CmsColorPaletteEntry, type CmsColorPalette, type PutCmsColorPaletteRequest, type CmsAssetEmbedResolution, type CmsResolvedBlock, type CmsResolvedTemplate, type CmsResolvedPage, type CmsResolvedHook, type CmsPageIndexEntry, type CmsPageIndexResponse, type CmsReservedSegmentsResponse, type CmsReference, type CmsExternalReferenceScanner, type CmsReferenceRegistryPort, type CmsPageRecord, type CmsPageReadPort, type CmsReservedSegmentContributor, type CmsReservedSegmentRegistryPort, type CmsPageStorefrontLink, type CmsPageStorefrontLinkScope, type CmsSeededBlock, type CmsBlockSeedPort, type CmsBlockRecord, type CmsLocalizedBlockRecord, type CmsBlockReadPort, } from './cms.js';
51
+ export { cmsPageStatusSchema, cmsContentEnvelopeSchema, cmsPageSummarySchema, cmsBreadcrumbsSchemeSchema, cmsPageDetailSchema, createCmsPageRequestSchema, patchCmsPageRequestSchema, putCmsPageContentRequestSchema, cmsBlockSummarySchema, cmsBlockDetailSchema, createCmsBlockRequestSchema, patchCmsBlockRequestSchema, cmsTemplateSummarySchema, cmsTemplateDetailSchema, createCmsTemplateRequestSchema, patchCmsTemplateRequestSchema, cmsHookSummarySchema, cmsHookDetailSchema, createCmsHookRequestSchema, patchCmsHookRequestSchema, cmsHookAttachmentRequestSchema, cmsFieldDescriptorSchema, cmsPageBuilderDescriptorSchema, blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedBlockByCodeSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema, cmsPageIndexEntrySchema, cmsPageIndexResponseSchema, cmsReservedSegmentsResponseSchema, firstSlugSegment, CMS_PAGE_PATH_MAX_LEVELS, cmsPagePublicPaths, type CmsPagePathNode, cmsPageTranslationSchema, cmsPageTranslationsSchema, cmsLocalizedPage, cmsPageUrl, type CmsPageTranslation, type CmsPageTranslations, type CmsLocalizablePage, type CmsPageUrlInput, translatablePathRe, blockTranslatableTextSchema, blockTranslatableSchema, CMS_TRANSLATION_MAX_SOURCE_CHARACTERS_BOUNDS, CMS_TRANSLATION_DEFAULT_MAX_SOURCE_CHARACTERS, cmsPageBuilderTranslationStatusSchema, cmsPageBuilderTranslationCapabilitySchema, cmsPuckDataSchema, cmsPageBuilderTranslationScopeSchema, cmsPageBuilderTranslateRequestSchema, cmsPageBuilderTranslateResponseSchema, type BlockTranslatableText, type CmsPageBuilderTranslationStatus, type CmsPageBuilderTranslationCapability, type CmsPuckData, type CmsPageBuilderTranslationScope, type CmsPageBuilderTranslateRequest, type CmsPageBuilderTranslateResponse, type CmsPageStatus, type CmsContentEnvelope, type CmsPageSummary, type CmsBreadcrumbsScheme, type CmsPageDetail, type CreateCmsPageRequest, type PatchCmsPageRequest, type PutCmsPageContentRequest, type CmsBlockSummary, type CmsBlockDetail, type CreateCmsBlockRequest, type PatchCmsBlockRequest, type CmsTemplateSummary, type CmsTemplateDetail, type CreateCmsTemplateRequest, type PatchCmsTemplateRequest, type CmsHookSummary, type CmsHookDetail, type CreateCmsHookRequest, type PatchCmsHookRequest, type CmsHookAttachmentRequest, type CmsFieldDescriptor, type CmsPageBuilderDescriptor, type BlockDefinition, type BlockCategory, type CmsColorPaletteEntry, type CmsColorPalette, type PutCmsColorPaletteRequest, type CmsAssetEmbedResolution, type CmsResolvedBlock, type CmsResolvedBlockByCode, type CmsResolvedTemplate, type CmsResolvedPage, type CmsResolvedHook, type CmsPageIndexEntry, type CmsPageIndexResponse, type CmsReservedSegmentsResponse, type CmsReference, type CmsExternalReferenceScanner, type CmsReferenceRegistryPort, type CmsPageRecord, type CmsPageReadPort, type CmsReservedSegmentContributor, type CmsReservedSegmentRegistryPort, type CmsPageStorefrontLink, type CmsPageStorefrontLinkScope, type CmsSeededBlock, type CmsBlockSeedPort, type CmsBlockRecord, type CmsLocalizedBlockRecord, type CmsBlockReadPort, } from './cms.js';
50
52
  export * from './page-builder-props.js';
51
53
  export * from './cms-brand.js';
52
54
  export * from './cms-contact-form.js';
@@ -62,6 +64,8 @@ export * from './storefront-cache-tags.js';
62
64
  export * from './blog.js';
63
65
  export * from './dictionary.js';
64
66
  export * from './modules.js';
67
+ export * from './command-hooks.js';
68
+ export * from './organization-hooks.js';
65
69
  export * from './platform-info.js';
66
70
  export * from './admin-feedback.js';
67
71
  export * from './admin-actions.js';
@@ -108,6 +112,7 @@ export * from './admin-users.js';
108
112
  export * from './addresses.js';
109
113
  export * from './shipments.js';
110
114
  export * from './admin-notifications.js';
115
+ export * from './customer-notifications.js';
111
116
  export * from './audit-logs.js';
112
117
  export * from './import-export.js';
113
118
  export * from './text-normalization.js';
@@ -117,4 +122,5 @@ export * from './admin-search.js';
117
122
  export * from './document-templates.js';
118
123
  export * from './forms.js';
119
124
  export * from './forms-logic.js';
125
+ export * from './schema-extensions.js';
120
126
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -16,6 +16,8 @@ export * from './scope-notice.js';
16
16
  export * from './catalog.js';
17
17
  // Feature 155 — the minimum-order rule (specs/155-catalog-order-constraints/).
18
18
  export * from './order-minimums.js';
19
+ // Issue #351 — the line quantity and line count bounds every line-carrying request shares.
20
+ export * from './line-bounds.js';
19
21
  export * from './localized-name.js';
20
22
  // Feature 163, T196 — the product card's summary, shared by the catalogue and the page editor's preview.
21
23
  export * from './product-summary-text.js';
@@ -67,6 +69,7 @@ export * from './analytics.js';
67
69
  export * from './seo.js';
68
70
  export * from './i18n.js';
69
71
  export * from './platform-language.js';
72
+ export * from './accept-language.js';
70
73
  export * from './admin-i18n.js';
71
74
  export {
72
75
  // `cmsPageStatusSchema` and `CmsPageStatus` are on this list because feature
@@ -79,7 +82,7 @@ cmsPageStatusSchema, cmsContentEnvelopeSchema, cmsPageSummarySchema, cmsBreadcru
79
82
  // Feature 096 — the Page Builder block vocabulary. `blockNameRe` is the one
80
83
  // authored copy of the persisted-name grammar; `page-builder-core` imports it
81
84
  // rather than restating it.
82
- blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema,
85
+ blockNameRe, blockCategoryKeyRe, BlockDefinitionSchema, BlockCategorySchema, cmsColorPaletteEntrySchema, cmsColorPaletteSchema, putCmsColorPaletteRequestSchema, cmsAssetEmbedResolutionSchema, cmsResolvedBlockSchema, cmsResolvedBlockByCodeSchema, cmsResolvedTemplateSchema, cmsResolvedPageSchema, cmsResolvedHookSchema,
83
86
  // Feature 105, Phase 3 — what the shop advertises to a crawler.
84
87
  cmsPageIndexEntrySchema, cmsPageIndexResponseSchema,
85
88
  // Feature 105, Phase 4 — the reserved set the editor and the refusal share.
@@ -109,6 +112,9 @@ export * from './storefront-cache-tags.js';
109
112
  export * from './blog.js';
110
113
  export * from './dictionary.js';
111
114
  export * from './modules.js';
115
+ // `specs/176-command-hooks-outbox/` P2 — command-hook refs, and `organizations`' first four.
116
+ export * from './command-hooks.js';
117
+ export * from './organization-hooks.js';
112
118
  export * from './platform-info.js';
113
119
  export * from './admin-feedback.js';
114
120
  export * from './admin-actions.js';
@@ -167,6 +173,8 @@ export * from './admin-users.js';
167
173
  export * from './addresses.js';
168
174
  export * from './shipments.js';
169
175
  export * from './admin-notifications.js';
176
+ // The buyer's notification centre (feature 179): port types + storefront API shapes.
177
+ export * from './customer-notifications.js';
170
178
  // The audit-log reference registry (feature 075, D-87 drain). Not an API shape:
171
179
  // the in-process seam each module answers "what is this row of mine called, and
172
180
  // where does the admin app show it?" through.
@@ -198,4 +206,7 @@ export * from './document-templates.js';
198
206
  // storefront renderer and the admin preview all run (research R-5).
199
207
  export * from './forms.js';
200
208
  export * from './forms-logic.js';
209
+ // Declared extension columns on core tables (`specs/178-extensible-columns/`): the
210
+ // `?extensions=` query parameter and the `extensions` attribute of an admin read.
211
+ export * from './schema-extensions.js';
201
212
  //# sourceMappingURL=index.js.map
@@ -32,8 +32,8 @@ export declare const invoiceLedgerDeliveryStatusSchema: z.ZodEnum<{
32
32
  failed: "failed";
33
33
  queued: "queued";
34
34
  succeeded: "succeeded";
35
- awaiting_remote: "awaiting_remote";
36
35
  dead: "dead";
36
+ awaiting_remote: "awaiting_remote";
37
37
  }>;
38
38
  export type InvoiceLedgerDeliveryStatus = z.infer<typeof invoiceLedgerDeliveryStatusSchema>;
39
39
  export declare const INVOICE_LEDGER_DELIVERY_KINDS: readonly ["invoice", "correction"];
@@ -103,8 +103,8 @@ export declare const invoiceLedgerDeliveryAttemptSchema: z.ZodObject<{
103
103
  failed: "failed";
104
104
  queued: "queued";
105
105
  succeeded: "succeeded";
106
- awaiting_remote: "awaiting_remote";
107
106
  dead: "dead";
107
+ awaiting_remote: "awaiting_remote";
108
108
  }>;
109
109
  at: z.ZodString;
110
110
  error: z.ZodNullable<z.ZodString>;
@@ -137,8 +137,8 @@ export declare const ledgerDeliveryRecordSchema: z.ZodObject<{
137
137
  failed: "failed";
138
138
  queued: "queued";
139
139
  succeeded: "succeeded";
140
- awaiting_remote: "awaiting_remote";
141
140
  dead: "dead";
141
+ awaiting_remote: "awaiting_remote";
142
142
  }>;
143
143
  asyncTaskId: z.ZodNullable<z.ZodString>;
144
144
  remoteDocumentId: z.ZodNullable<z.ZodString>;
@@ -149,8 +149,8 @@ export declare const ledgerDeliveryRecordSchema: z.ZodObject<{
149
149
  failed: "failed";
150
150
  queued: "queued";
151
151
  succeeded: "succeeded";
152
- awaiting_remote: "awaiting_remote";
153
152
  dead: "dead";
153
+ awaiting_remote: "awaiting_remote";
154
154
  }>;
155
155
  at: z.ZodString;
156
156
  error: z.ZodNullable<z.ZodString>;
@@ -339,8 +339,8 @@ export declare const invoiceLedgerDeliveryListItemSchema: z.ZodObject<{
339
339
  failed: "failed";
340
340
  queued: "queued";
341
341
  succeeded: "succeeded";
342
- awaiting_remote: "awaiting_remote";
343
342
  dead: "dead";
343
+ awaiting_remote: "awaiting_remote";
344
344
  }>;
345
345
  lastError: z.ZodNullable<z.ZodString>;
346
346
  environment: z.ZodString;
@@ -356,8 +356,8 @@ export declare const invoiceLedgerDeliveryListQuerySchema: z.ZodObject<{
356
356
  failed: "failed";
357
357
  queued: "queued";
358
358
  succeeded: "succeeded";
359
- awaiting_remote: "awaiting_remote";
360
359
  dead: "dead";
360
+ awaiting_remote: "awaiting_remote";
361
361
  }>>;
362
362
  salesChannelId: z.ZodOptional<z.ZodString>;
363
363
  invoiceId: z.ZodOptional<z.ZodString>;
@@ -224,6 +224,104 @@ export declare const invoiceDetailSchema: z.ZodObject<{
224
224
  }, z.core.$strip>;
225
225
  }, z.core.$strip>;
226
226
  export type InvoiceDetail = z.infer<typeof invoiceDetailSchema>;
227
+ /**
228
+ * One row of `GET /api/v1/admin/invoices` (issue #599). A platform invoice
229
+ * carries its order; an ERP-imported sale document may have none, and then
230
+ * `orderId` and `orderBusinessId` are both `null`.
231
+ */
232
+ export declare const adminInvoiceListItemSchema: z.ZodObject<{
233
+ id: z.ZodString;
234
+ orderId: z.ZodNullable<z.ZodString>;
235
+ orderBusinessId: z.ZodNullable<z.ZodString>;
236
+ salesChannelId: z.ZodNullable<z.ZodString>;
237
+ kind: z.ZodEnum<{
238
+ invoice: "invoice";
239
+ proforma: "proforma";
240
+ correction: "correction";
241
+ wz: "wz";
242
+ }>;
243
+ number: z.ZodString;
244
+ issuedAt: z.ZodString;
245
+ currency: z.ZodString;
246
+ total: z.ZodNumber;
247
+ status: z.ZodEnum<{
248
+ pending: "pending";
249
+ cancelled: "cancelled";
250
+ ready: "ready";
251
+ }>;
252
+ pdfReady: z.ZodBoolean;
253
+ createdAt: z.ZodString;
254
+ updatedAt: z.ZodString;
255
+ }, z.core.$strip>;
256
+ export type AdminInvoiceListItem = z.infer<typeof adminInvoiceListItemSchema>;
257
+ export declare const adminInvoiceListResponseSchema: z.ZodObject<{
258
+ data: z.ZodArray<z.ZodObject<{
259
+ id: z.ZodString;
260
+ orderId: z.ZodNullable<z.ZodString>;
261
+ orderBusinessId: z.ZodNullable<z.ZodString>;
262
+ salesChannelId: z.ZodNullable<z.ZodString>;
263
+ kind: z.ZodEnum<{
264
+ invoice: "invoice";
265
+ proforma: "proforma";
266
+ correction: "correction";
267
+ wz: "wz";
268
+ }>;
269
+ number: z.ZodString;
270
+ issuedAt: z.ZodString;
271
+ currency: z.ZodString;
272
+ total: z.ZodNumber;
273
+ status: z.ZodEnum<{
274
+ pending: "pending";
275
+ cancelled: "cancelled";
276
+ ready: "ready";
277
+ }>;
278
+ pdfReady: z.ZodBoolean;
279
+ createdAt: z.ZodString;
280
+ updatedAt: z.ZodString;
281
+ }, z.core.$strip>>;
282
+ pagination: z.ZodObject<{
283
+ cursor: z.ZodNullable<z.ZodString>;
284
+ hasMore: z.ZodBoolean;
285
+ limit: z.ZodNumber;
286
+ }, z.core.$strip>;
287
+ }, z.core.$strip>;
288
+ export type AdminInvoiceListResponse = z.infer<typeof adminInvoiceListResponseSchema>;
289
+ /**
290
+ * One row of `GET /api/v1/orders/:id/invoices` — a `ready` invoice of an order
291
+ * the buyer may read (issue #599). `downloadHref` is the API path of its PDF.
292
+ */
293
+ export declare const orderInvoiceListItemSchema: z.ZodObject<{
294
+ id: z.ZodString;
295
+ kind: z.ZodEnum<{
296
+ invoice: "invoice";
297
+ proforma: "proforma";
298
+ correction: "correction";
299
+ wz: "wz";
300
+ }>;
301
+ number: z.ZodString;
302
+ issuedAt: z.ZodString;
303
+ currency: z.ZodString;
304
+ total: z.ZodNumber;
305
+ downloadHref: z.ZodString;
306
+ }, z.core.$strip>;
307
+ export type OrderInvoiceListItem = z.infer<typeof orderInvoiceListItemSchema>;
308
+ export declare const orderInvoiceListResponseSchema: z.ZodObject<{
309
+ data: z.ZodArray<z.ZodObject<{
310
+ id: z.ZodString;
311
+ kind: z.ZodEnum<{
312
+ invoice: "invoice";
313
+ proforma: "proforma";
314
+ correction: "correction";
315
+ wz: "wz";
316
+ }>;
317
+ number: z.ZodString;
318
+ issuedAt: z.ZodString;
319
+ currency: z.ZodString;
320
+ total: z.ZodNumber;
321
+ downloadHref: z.ZodString;
322
+ }, z.core.$strip>>;
323
+ }, z.core.$strip>;
324
+ export type OrderInvoiceListResponse = z.infer<typeof orderInvoiceListResponseSchema>;
227
325
  /**
228
326
  * What `invoices` hands the document render port
229
327
  * (`specs/152-compare-pdf-template/contracts/invoice-document.md` §1–§2).
@@ -861,6 +959,34 @@ export declare const erpSaleDocumentListItemSchema: z.ZodObject<{
861
959
  }, z.core.$strip>>;
862
960
  }, z.core.$strip>;
863
961
  export type ErpSaleDocumentListItem = z.infer<typeof erpSaleDocumentListItemSchema>;
962
+ /** `GET /api/v1/account/organization/invoices` — the Organization's ERP-imported sale documents (issue #599). */
963
+ export declare const erpSaleDocumentListResponseSchema: z.ZodObject<{
964
+ data: z.ZodArray<z.ZodObject<{
965
+ id: z.ZodString;
966
+ kind: z.ZodEnum<{
967
+ invoice: "invoice";
968
+ proforma: "proforma";
969
+ correction: "correction";
970
+ wz: "wz";
971
+ }>;
972
+ number: z.ZodString;
973
+ documentKind: z.ZodEnum<{
974
+ invoice: "invoice";
975
+ wz: "wz";
976
+ }>;
977
+ issuedAt: z.ZodString;
978
+ currency: z.ZodString;
979
+ total: z.ZodNumber;
980
+ orderId: z.ZodNullable<z.ZodString>;
981
+ attachments: z.ZodArray<z.ZodObject<{
982
+ id: z.ZodString;
983
+ fileName: z.ZodString;
984
+ contentType: z.ZodNullable<z.ZodString>;
985
+ downloadHref: z.ZodString;
986
+ }, z.core.$strip>>;
987
+ }, z.core.$strip>>;
988
+ }, z.core.$strip>;
989
+ export type ErpSaleDocumentListResponse = z.infer<typeof erpSaleDocumentListResponseSchema>;
864
990
  /**
865
991
  * Container name: `erpSaleDocumentWritePort`. Owner: `invoices`.
866
992
  *
package/dist/invoices.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { isoDateTimeSchema, uuidSchema } from './common.js';
3
3
  import { twoDecimalAmountString } from './money-input.js';
4
+ import { paginationSchema } from './pagination.js';
4
5
  /**
5
6
  * Invoices (FR-080 + feature 047-invoices-module). Produces proforma, VAT
6
7
  * invoice, and corrective (credit-note) PDFs against orders. The binary
@@ -125,6 +126,50 @@ export const invoiceDetailSchema = invoiceSchema.extend({
125
126
  seller: sellerCompanyDataSchema,
126
127
  buyer: invoiceBuyerSchema,
127
128
  });
129
+ /**
130
+ * One row of `GET /api/v1/admin/invoices` (issue #599). A platform invoice
131
+ * carries its order; an ERP-imported sale document may have none, and then
132
+ * `orderId` and `orderBusinessId` are both `null`.
133
+ */
134
+ export const adminInvoiceListItemSchema = z.object({
135
+ id: uuidSchema,
136
+ orderId: uuidSchema.nullable(),
137
+ /** Human-readable order business id (e.g. `ORD-…`); null without an order or when it is gone. */
138
+ orderBusinessId: z.string().nullable(),
139
+ salesChannelId: uuidSchema.nullable(),
140
+ kind: invoiceKindSchema,
141
+ number: z.string(),
142
+ issuedAt: isoDateTimeSchema,
143
+ currency: z.string().length(3),
144
+ /** The gross total. */
145
+ total: z.number().finite(),
146
+ status: invoiceStatusSchema,
147
+ /** `status === 'ready'`: the PDF can be downloaded. */
148
+ pdfReady: z.boolean(),
149
+ createdAt: isoDateTimeSchema,
150
+ updatedAt: isoDateTimeSchema,
151
+ });
152
+ export const adminInvoiceListResponseSchema = z.object({
153
+ data: z.array(adminInvoiceListItemSchema),
154
+ pagination: paginationSchema,
155
+ });
156
+ /**
157
+ * One row of `GET /api/v1/orders/:id/invoices` — a `ready` invoice of an order
158
+ * the buyer may read (issue #599). `downloadHref` is the API path of its PDF.
159
+ */
160
+ export const orderInvoiceListItemSchema = z.object({
161
+ id: uuidSchema,
162
+ kind: invoiceKindSchema,
163
+ number: z.string(),
164
+ issuedAt: isoDateTimeSchema,
165
+ currency: z.string().length(3),
166
+ /** The gross total. */
167
+ total: z.number().finite(),
168
+ downloadHref: z.string(),
169
+ });
170
+ export const orderInvoiceListResponseSchema = z.object({
171
+ data: z.array(orderInvoiceListItemSchema),
172
+ });
128
173
  /**
129
174
  * What `invoices` hands the document render port
130
175
  * (`specs/152-compare-pdf-template/contracts/invoice-document.md` §1–§2).
@@ -330,6 +375,10 @@ export const erpSaleDocumentListItemSchema = z.object({
330
375
  orderId: uuidSchema.nullable(),
331
376
  attachments: z.array(erpSaleDocumentAttachmentListItemSchema),
332
377
  });
378
+ /** `GET /api/v1/account/organization/invoices` — the Organization's ERP-imported sale documents (issue #599). */
379
+ export const erpSaleDocumentListResponseSchema = z.object({
380
+ data: z.array(erpSaleDocumentListItemSchema),
381
+ });
333
382
  // ---------------------------------------------------------------------------
334
383
  // ERP attachment fetch — the seam an importing connector contributes to
335
384
  // (feature 134, T061; `specs/134-paid-module-extraction/research.md` D12)
@@ -0,0 +1,53 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Issue #351 — the bounds every request that carries order lines shares.
4
+ *
5
+ * Imports nothing but zod and the order-minimum ceiling, so every
6
+ * request-schema file (`carts`, `orders`, `quote-requests`, `quick-order`,
7
+ * `shopping-lists`, `returns`, `catalog`, `promotions`) can import it without a
8
+ * load-order cycle.
9
+ */
10
+ /**
11
+ * The most pieces one line may carry. The order-minimum ceiling on purpose: the
12
+ * largest minimum a product can carry is still orderable, and a quantity this
13
+ * size is far below the integer column it is stored in and stays exact in any
14
+ * arithmetic done on it before it is stored (totals, per-product sums).
15
+ */
16
+ export declare const LINE_QUANTITY_MAX = 1000000;
17
+ /**
18
+ * The refusal of a line quantity past {@link LINE_QUANTITY_MAX} (architect
19
+ * ruling R1 on PR #1009). Built like `AMOUNT_PRECISION_EXCEEDED`: a request
20
+ * schema tags the Zod issue with it, and the error envelope
21
+ * (`@endora-commerce/platform/http`) answers a request whose only failures are
22
+ * this one with `400 LINE_QUANTITY_EXCEEDED`, a code it translates —
23
+ * `VALIDATION_FAILED` it never does. A request valid on its own whose line would
24
+ * end past the bound (an add onto an existing basket line, a packaging unit's
25
+ * pieces) is refused by the service with `422 LINE_QUANTITY_EXCEEDED`,
26
+ * `details: { quantity, maximum }`.
27
+ */
28
+ export declare const LINE_QUANTITY_EXCEEDED: "LINE_QUANTITY_EXCEEDED";
29
+ /**
30
+ * A whole-number schema refusing a value past {@link LINE_QUANTITY_MAX} with the
31
+ * tagged issue. Its own floor (`positive()`, `min(0)`) stays a plain issue.
32
+ */
33
+ export declare function boundedLineQuantity<T extends z.ZodNumber>(schema: T): T;
34
+ /** A request line's quantity: a whole number in 1…{@link LINE_QUANTITY_MAX}. */
35
+ export declare const lineQuantitySchema: z.ZodNumber;
36
+ /** Whether a Zod issue (or a Fastify-wrapped one, whose `params` carry the issue's) is the line-quantity issue. */
37
+ export declare function isLineQuantityExceededIssue(issue: unknown): boolean;
38
+ /**
39
+ * The most lines one request may carry — the basket, quick order, the admin and
40
+ * API order intake, quote requests and returns. **The value is shared; the
41
+ * refusal is not** (architect ruling R2 on PR #1009): the quote request and
42
+ * return schemas bound their arrays with it, so one line more is
43
+ * `400 VALIDATION_FAILED`; the order intakes (admin create and preview,
44
+ * external API) and the quick-order build judge it in their services as their
45
+ * first step, `422 VALIDATION_FAILED` with
46
+ * `details: { code: 'too_many_items', maximum }` — a released contract that
47
+ * their request schemas must not turn into a 400 by adding a `.max()`. The
48
+ * basket's own cap (`CART_MAX_LINES` in `carts`) answers
49
+ * `422 CART_LINE_CAP_EXCEEDED`. `ADMIN_ORDER_MAX_ITEMS` and
50
+ * `QUICK_ORDER_BUILD_MAX_ITEMS` are this constant under their own names.
51
+ */
52
+ export declare const REQUEST_LINE_ITEMS_MAX = 200;
53
+ //# sourceMappingURL=line-bounds.d.ts.map
@@ -0,0 +1,65 @@
1
+ import { z } from 'zod';
2
+ import { ORDER_MINIMUM_MAX } from './order-minimums.js';
3
+ /**
4
+ * Issue #351 — the bounds every request that carries order lines shares.
5
+ *
6
+ * Imports nothing but zod and the order-minimum ceiling, so every
7
+ * request-schema file (`carts`, `orders`, `quote-requests`, `quick-order`,
8
+ * `shopping-lists`, `returns`, `catalog`, `promotions`) can import it without a
9
+ * load-order cycle.
10
+ */
11
+ /**
12
+ * The most pieces one line may carry. The order-minimum ceiling on purpose: the
13
+ * largest minimum a product can carry is still orderable, and a quantity this
14
+ * size is far below the integer column it is stored in and stays exact in any
15
+ * arithmetic done on it before it is stored (totals, per-product sums).
16
+ */
17
+ export const LINE_QUANTITY_MAX = ORDER_MINIMUM_MAX;
18
+ /**
19
+ * The refusal of a line quantity past {@link LINE_QUANTITY_MAX} (architect
20
+ * ruling R1 on PR #1009). Built like `AMOUNT_PRECISION_EXCEEDED`: a request
21
+ * schema tags the Zod issue with it, and the error envelope
22
+ * (`@endora-commerce/platform/http`) answers a request whose only failures are
23
+ * this one with `400 LINE_QUANTITY_EXCEEDED`, a code it translates —
24
+ * `VALIDATION_FAILED` it never does. A request valid on its own whose line would
25
+ * end past the bound (an add onto an existing basket line, a packaging unit's
26
+ * pieces) is refused by the service with `422 LINE_QUANTITY_EXCEEDED`,
27
+ * `details: { quantity, maximum }`.
28
+ */
29
+ export const LINE_QUANTITY_EXCEEDED = 'LINE_QUANTITY_EXCEEDED';
30
+ /** A fresh object each time: Zod normalises a refinement's params in place. */
31
+ function lineQuantityIssue() {
32
+ return { message: LINE_QUANTITY_EXCEEDED, params: { code: LINE_QUANTITY_EXCEEDED } };
33
+ }
34
+ /**
35
+ * A whole-number schema refusing a value past {@link LINE_QUANTITY_MAX} with the
36
+ * tagged issue. Its own floor (`positive()`, `min(0)`) stays a plain issue.
37
+ */
38
+ export function boundedLineQuantity(schema) {
39
+ return schema.refine((value) => value <= LINE_QUANTITY_MAX, lineQuantityIssue());
40
+ }
41
+ /** A request line's quantity: a whole number in 1…{@link LINE_QUANTITY_MAX}. */
42
+ export const lineQuantitySchema = boundedLineQuantity(z.number().int().positive());
43
+ /** Whether a Zod issue (or a Fastify-wrapped one, whose `params` carry the issue's) is the line-quantity issue. */
44
+ export function isLineQuantityExceededIssue(issue) {
45
+ if (!issue || typeof issue !== 'object')
46
+ return false;
47
+ const params = issue.params;
48
+ return params?.code === LINE_QUANTITY_EXCEEDED || params?.params?.code === LINE_QUANTITY_EXCEEDED;
49
+ }
50
+ /**
51
+ * The most lines one request may carry — the basket, quick order, the admin and
52
+ * API order intake, quote requests and returns. **The value is shared; the
53
+ * refusal is not** (architect ruling R2 on PR #1009): the quote request and
54
+ * return schemas bound their arrays with it, so one line more is
55
+ * `400 VALIDATION_FAILED`; the order intakes (admin create and preview,
56
+ * external API) and the quick-order build judge it in their services as their
57
+ * first step, `422 VALIDATION_FAILED` with
58
+ * `details: { code: 'too_many_items', maximum }` — a released contract that
59
+ * their request schemas must not turn into a 400 by adding a `.max()`. The
60
+ * basket's own cap (`CART_MAX_LINES` in `carts`) answers
61
+ * `422 CART_LINE_CAP_EXCEEDED`. `ADMIN_ORDER_MAX_ITEMS` and
62
+ * `QUICK_ORDER_BUILD_MAX_ITEMS` are this constant under their own names.
63
+ */
64
+ export const REQUEST_LINE_ITEMS_MAX = 200;
65
+ //# sourceMappingURL=line-bounds.js.map