@endora-commerce/contracts 0.100.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 (327) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -0
  3. package/dist/actor.d.ts +79 -0
  4. package/dist/actor.d.ts.map +1 -0
  5. package/dist/actor.js +41 -0
  6. package/dist/actor.js.map +1 -0
  7. package/dist/addresses.d.ts +134 -0
  8. package/dist/addresses.d.ts.map +1 -0
  9. package/dist/addresses.js +16 -0
  10. package/dist/addresses.js.map +1 -0
  11. package/dist/admin-actions.d.ts +367 -0
  12. package/dist/admin-actions.d.ts.map +1 -0
  13. package/dist/admin-actions.js +287 -0
  14. package/dist/admin-actions.js.map +1 -0
  15. package/dist/admin-contributions.d.ts +518 -0
  16. package/dist/admin-contributions.d.ts.map +1 -0
  17. package/dist/admin-contributions.js +495 -0
  18. package/dist/admin-contributions.js.map +1 -0
  19. package/dist/admin-i18n.d.ts +135 -0
  20. package/dist/admin-i18n.d.ts.map +1 -0
  21. package/dist/admin-i18n.js +72 -0
  22. package/dist/admin-i18n.js.map +1 -0
  23. package/dist/admin-notifications.d.ts +55 -0
  24. package/dist/admin-notifications.d.ts.map +1 -0
  25. package/dist/admin-notifications.js +16 -0
  26. package/dist/admin-notifications.js.map +1 -0
  27. package/dist/admin-roles.d.ts +125 -0
  28. package/dist/admin-roles.d.ts.map +1 -0
  29. package/dist/admin-roles.js +2 -0
  30. package/dist/admin-roles.js.map +1 -0
  31. package/dist/admin-users.d.ts +178 -0
  32. package/dist/admin-users.d.ts.map +1 -0
  33. package/dist/admin-users.js +14 -0
  34. package/dist/admin-users.js.map +1 -0
  35. package/dist/admin.d.ts +243 -0
  36. package/dist/admin.d.ts.map +1 -0
  37. package/dist/admin.js +246 -0
  38. package/dist/admin.js.map +1 -0
  39. package/dist/analytics.d.ts +123 -0
  40. package/dist/analytics.d.ts.map +1 -0
  41. package/dist/analytics.js +68 -0
  42. package/dist/analytics.js.map +1 -0
  43. package/dist/api-keys.d.ts +97 -0
  44. package/dist/api-keys.d.ts.map +1 -0
  45. package/dist/api-keys.js +64 -0
  46. package/dist/api-keys.js.map +1 -0
  47. package/dist/assets-library.d.ts +684 -0
  48. package/dist/assets-library.d.ts.map +1 -0
  49. package/dist/assets-library.js +181 -0
  50. package/dist/assets-library.js.map +1 -0
  51. package/dist/audit-logs.d.ts +141 -0
  52. package/dist/audit-logs.d.ts.map +1 -0
  53. package/dist/audit-logs.js +31 -0
  54. package/dist/audit-logs.js.map +1 -0
  55. package/dist/auth.d.ts +174 -0
  56. package/dist/auth.d.ts.map +1 -0
  57. package/dist/auth.js +27 -0
  58. package/dist/auth.js.map +1 -0
  59. package/dist/blog.d.ts +669 -0
  60. package/dist/blog.d.ts.map +1 -0
  61. package/dist/blog.js +360 -0
  62. package/dist/blog.js.map +1 -0
  63. package/dist/capabilities.d.ts +40 -0
  64. package/dist/capabilities.d.ts.map +1 -0
  65. package/dist/capabilities.js +38 -0
  66. package/dist/capabilities.js.map +1 -0
  67. package/dist/carts.d.ts +1367 -0
  68. package/dist/carts.d.ts.map +1 -0
  69. package/dist/carts.js +405 -0
  70. package/dist/carts.js.map +1 -0
  71. package/dist/catalog.d.ts +2855 -0
  72. package/dist/catalog.d.ts.map +1 -0
  73. package/dist/catalog.js +1543 -0
  74. package/dist/catalog.js.map +1 -0
  75. package/dist/cms.d.ts +872 -0
  76. package/dist/cms.d.ts.map +1 -0
  77. package/dist/cms.js +468 -0
  78. package/dist/cms.js.map +1 -0
  79. package/dist/common.d.ts +82 -0
  80. package/dist/common.d.ts.map +1 -0
  81. package/dist/common.js +72 -0
  82. package/dist/common.js.map +1 -0
  83. package/dist/comparisons.d.ts +487 -0
  84. package/dist/comparisons.d.ts.map +1 -0
  85. package/dist/comparisons.js +221 -0
  86. package/dist/comparisons.js.map +1 -0
  87. package/dist/credentials.d.ts +292 -0
  88. package/dist/credentials.d.ts.map +1 -0
  89. package/dist/credentials.js +142 -0
  90. package/dist/credentials.js.map +1 -0
  91. package/dist/credit-limits.d.ts +111 -0
  92. package/dist/credit-limits.d.ts.map +1 -0
  93. package/dist/credit-limits.js +35 -0
  94. package/dist/credit-limits.js.map +1 -0
  95. package/dist/currencies.d.ts +127 -0
  96. package/dist/currencies.d.ts.map +1 -0
  97. package/dist/currencies.js +20 -0
  98. package/dist/currencies.js.map +1 -0
  99. package/dist/custom-fields.d.ts +345 -0
  100. package/dist/custom-fields.d.ts.map +1 -0
  101. package/dist/custom-fields.js +185 -0
  102. package/dist/custom-fields.js.map +1 -0
  103. package/dist/customer-accounts.d.ts +690 -0
  104. package/dist/customer-accounts.d.ts.map +1 -0
  105. package/dist/customer-accounts.js +41 -0
  106. package/dist/customer-accounts.js.map +1 -0
  107. package/dist/customers.d.ts +305 -0
  108. package/dist/customers.d.ts.map +1 -0
  109. package/dist/customers.js +158 -0
  110. package/dist/customers.js.map +1 -0
  111. package/dist/dictionary.d.ts +580 -0
  112. package/dist/dictionary.d.ts.map +1 -0
  113. package/dist/dictionary.js +297 -0
  114. package/dist/dictionary.js.map +1 -0
  115. package/dist/email-address.d.ts +62 -0
  116. package/dist/email-address.d.ts.map +1 -0
  117. package/dist/email-address.js +64 -0
  118. package/dist/email-address.js.map +1 -0
  119. package/dist/email.d.ts +175 -0
  120. package/dist/email.d.ts.map +1 -0
  121. package/dist/email.js +45 -0
  122. package/dist/email.js.map +1 -0
  123. package/dist/envelopes.d.ts +15 -0
  124. package/dist/envelopes.d.ts.map +1 -0
  125. package/dist/envelopes.js +16 -0
  126. package/dist/envelopes.js.map +1 -0
  127. package/dist/environment-inputs.d.ts +306 -0
  128. package/dist/environment-inputs.d.ts.map +1 -0
  129. package/dist/environment-inputs.js +277 -0
  130. package/dist/environment-inputs.js.map +1 -0
  131. package/dist/erp-connector.d.ts +52 -0
  132. package/dist/erp-connector.d.ts.map +1 -0
  133. package/dist/erp-connector.js +34 -0
  134. package/dist/erp-connector.js.map +1 -0
  135. package/dist/errors.d.ts +455 -0
  136. package/dist/errors.d.ts.map +1 -0
  137. package/dist/errors.js +532 -0
  138. package/dist/errors.js.map +1 -0
  139. package/dist/google-analytics.d.ts +181 -0
  140. package/dist/google-analytics.d.ts.map +1 -0
  141. package/dist/google-analytics.js +176 -0
  142. package/dist/google-analytics.js.map +1 -0
  143. package/dist/google-tag-manager.d.ts +111 -0
  144. package/dist/google-tag-manager.d.ts.map +1 -0
  145. package/dist/google-tag-manager.js +129 -0
  146. package/dist/google-tag-manager.js.map +1 -0
  147. package/dist/i18n.d.ts +69 -0
  148. package/dist/i18n.d.ts.map +1 -0
  149. package/dist/i18n.js +59 -0
  150. package/dist/i18n.js.map +1 -0
  151. package/dist/import-export.d.ts +63 -0
  152. package/dist/import-export.d.ts.map +1 -0
  153. package/dist/import-export.js +37 -0
  154. package/dist/import-export.js.map +1 -0
  155. package/dist/index.d.ts +82 -0
  156. package/dist/index.d.ts.map +1 -0
  157. package/dist/index.js +126 -0
  158. package/dist/index.js.map +1 -0
  159. package/dist/inventory.d.ts +673 -0
  160. package/dist/inventory.d.ts.map +1 -0
  161. package/dist/inventory.js +412 -0
  162. package/dist/inventory.js.map +1 -0
  163. package/dist/invoice-ledger.d.ts +366 -0
  164. package/dist/invoice-ledger.d.ts.map +1 -0
  165. package/dist/invoice-ledger.js +114 -0
  166. package/dist/invoice-ledger.js.map +1 -0
  167. package/dist/invoices.d.ts +845 -0
  168. package/dist/invoices.d.ts.map +1 -0
  169. package/dist/invoices.js +314 -0
  170. package/dist/invoices.js.map +1 -0
  171. package/dist/kernel.d.ts +49 -0
  172. package/dist/kernel.d.ts.map +1 -0
  173. package/dist/kernel.js +19 -0
  174. package/dist/kernel.js.map +1 -0
  175. package/dist/languages.d.ts +122 -0
  176. package/dist/languages.d.ts.map +1 -0
  177. package/dist/languages.js +24 -0
  178. package/dist/languages.js.map +1 -0
  179. package/dist/linkedin-ads.d.ts +167 -0
  180. package/dist/linkedin-ads.d.ts.map +1 -0
  181. package/dist/linkedin-ads.js +156 -0
  182. package/dist/linkedin-ads.js.map +1 -0
  183. package/dist/megamenu.d.ts +556 -0
  184. package/dist/megamenu.d.ts.map +1 -0
  185. package/dist/megamenu.js +186 -0
  186. package/dist/megamenu.js.map +1 -0
  187. package/dist/meta-ads.d.ts +126 -0
  188. package/dist/meta-ads.d.ts.map +1 -0
  189. package/dist/meta-ads.js +112 -0
  190. package/dist/meta-ads.js.map +1 -0
  191. package/dist/mfa.d.ts +274 -0
  192. package/dist/mfa.d.ts.map +1 -0
  193. package/dist/mfa.js +187 -0
  194. package/dist/mfa.js.map +1 -0
  195. package/dist/modules.d.ts +1706 -0
  196. package/dist/modules.d.ts.map +1 -0
  197. package/dist/modules.js +1390 -0
  198. package/dist/modules.js.map +1 -0
  199. package/dist/newsletter.d.ts +611 -0
  200. package/dist/newsletter.d.ts.map +1 -0
  201. package/dist/newsletter.js +345 -0
  202. package/dist/newsletter.js.map +1 -0
  203. package/dist/orders.d.ts +1175 -0
  204. package/dist/orders.d.ts.map +1 -0
  205. package/dist/orders.js +630 -0
  206. package/dist/orders.js.map +1 -0
  207. package/dist/organizations.d.ts +938 -0
  208. package/dist/organizations.d.ts.map +1 -0
  209. package/dist/organizations.js +418 -0
  210. package/dist/organizations.js.map +1 -0
  211. package/dist/pagination.d.ts +21 -0
  212. package/dist/pagination.d.ts.map +1 -0
  213. package/dist/pagination.js +22 -0
  214. package/dist/pagination.js.map +1 -0
  215. package/dist/payment-methods.d.ts +472 -0
  216. package/dist/payment-methods.d.ts.map +1 -0
  217. package/dist/payment-methods.js +175 -0
  218. package/dist/payment-methods.js.map +1 -0
  219. package/dist/payment-return-url.d.ts +53 -0
  220. package/dist/payment-return-url.d.ts.map +1 -0
  221. package/dist/payment-return-url.js +35 -0
  222. package/dist/payment-return-url.js.map +1 -0
  223. package/dist/payments.d.ts +386 -0
  224. package/dist/payments.d.ts.map +1 -0
  225. package/dist/payments.js +84 -0
  226. package/dist/payments.js.map +1 -0
  227. package/dist/pim-connector.d.ts +60 -0
  228. package/dist/pim-connector.d.ts.map +1 -0
  229. package/dist/pim-connector.js +43 -0
  230. package/dist/pim-connector.js.map +1 -0
  231. package/dist/pim-field-path.d.ts +6 -0
  232. package/dist/pim-field-path.d.ts.map +1 -0
  233. package/dist/pim-field-path.js +101 -0
  234. package/dist/pim-field-path.js.map +1 -0
  235. package/dist/platform-language.d.ts +20 -0
  236. package/dist/platform-language.d.ts.map +1 -0
  237. package/dist/platform-language.js +22 -0
  238. package/dist/platform-language.js.map +1 -0
  239. package/dist/price-lists.d.ts +685 -0
  240. package/dist/price-lists.d.ts.map +1 -0
  241. package/dist/price-lists.js +330 -0
  242. package/dist/price-lists.js.map +1 -0
  243. package/dist/product-feeds.d.ts +2837 -0
  244. package/dist/product-feeds.d.ts.map +1 -0
  245. package/dist/product-feeds.js +1504 -0
  246. package/dist/product-feeds.js.map +1 -0
  247. package/dist/product-scope-overrides.d.ts +134 -0
  248. package/dist/product-scope-overrides.d.ts.map +1 -0
  249. package/dist/product-scope-overrides.js +82 -0
  250. package/dist/product-scope-overrides.js.map +1 -0
  251. package/dist/product-value-resolver.d.ts +88 -0
  252. package/dist/product-value-resolver.d.ts.map +1 -0
  253. package/dist/product-value-resolver.js +128 -0
  254. package/dist/product-value-resolver.js.map +1 -0
  255. package/dist/promotions.d.ts +678 -0
  256. package/dist/promotions.d.ts.map +1 -0
  257. package/dist/promotions.js +479 -0
  258. package/dist/promotions.js.map +1 -0
  259. package/dist/prompt-actions.d.ts +582 -0
  260. package/dist/prompt-actions.d.ts.map +1 -0
  261. package/dist/prompt-actions.js +221 -0
  262. package/dist/prompt-actions.js.map +1 -0
  263. package/dist/pwa.d.ts +293 -0
  264. package/dist/pwa.d.ts.map +1 -0
  265. package/dist/pwa.js +204 -0
  266. package/dist/pwa.js.map +1 -0
  267. package/dist/quick-order.d.ts +340 -0
  268. package/dist/quick-order.d.ts.map +1 -0
  269. package/dist/quick-order.js +177 -0
  270. package/dist/quick-order.js.map +1 -0
  271. package/dist/quote-requests.d.ts +538 -0
  272. package/dist/quote-requests.d.ts.map +1 -0
  273. package/dist/quote-requests.js +308 -0
  274. package/dist/quote-requests.js.map +1 -0
  275. package/dist/returns.d.ts +774 -0
  276. package/dist/returns.d.ts.map +1 -0
  277. package/dist/returns.js +389 -0
  278. package/dist/returns.js.map +1 -0
  279. package/dist/sales-channels.d.ts +392 -0
  280. package/dist/sales-channels.d.ts.map +1 -0
  281. package/dist/sales-channels.js +285 -0
  282. package/dist/sales-channels.js.map +1 -0
  283. package/dist/scope-notice.d.ts +60 -0
  284. package/dist/scope-notice.d.ts.map +1 -0
  285. package/dist/scope-notice.js +56 -0
  286. package/dist/scope-notice.js.map +1 -0
  287. package/dist/search.d.ts +321 -0
  288. package/dist/search.d.ts.map +1 -0
  289. package/dist/search.js +160 -0
  290. package/dist/search.js.map +1 -0
  291. package/dist/seo.d.ts +113 -0
  292. package/dist/seo.d.ts.map +1 -0
  293. package/dist/seo.js +63 -0
  294. package/dist/seo.js.map +1 -0
  295. package/dist/settings.d.ts +453 -0
  296. package/dist/settings.d.ts.map +1 -0
  297. package/dist/settings.js +337 -0
  298. package/dist/settings.js.map +1 -0
  299. package/dist/shipments.d.ts +140 -0
  300. package/dist/shipments.d.ts.map +1 -0
  301. package/dist/shipments.js +14 -0
  302. package/dist/shipments.js.map +1 -0
  303. package/dist/shipping-methods.d.ts +350 -0
  304. package/dist/shipping-methods.d.ts.map +1 -0
  305. package/dist/shipping-methods.js +99 -0
  306. package/dist/shipping-methods.js.map +1 -0
  307. package/dist/shopping-lists.d.ts +122 -0
  308. package/dist/shopping-lists.d.ts.map +1 -0
  309. package/dist/shopping-lists.js +92 -0
  310. package/dist/shopping-lists.js.map +1 -0
  311. package/dist/taxes.d.ts +106 -0
  312. package/dist/taxes.d.ts.map +1 -0
  313. package/dist/taxes.js +80 -0
  314. package/dist/taxes.js.map +1 -0
  315. package/dist/text-normalization.d.ts +199 -0
  316. package/dist/text-normalization.d.ts.map +1 -0
  317. package/dist/text-normalization.js +205 -0
  318. package/dist/text-normalization.js.map +1 -0
  319. package/dist/transactional-emails.d.ts +459 -0
  320. package/dist/transactional-emails.d.ts.map +1 -0
  321. package/dist/transactional-emails.js +212 -0
  322. package/dist/transactional-emails.js.map +1 -0
  323. package/dist/webhooks.d.ts +69 -0
  324. package/dist/webhooks.d.ts.map +1 -0
  325. package/dist/webhooks.js +53 -0
  326. package/dist/webhooks.js.map +1 -0
  327. package/package.json +46 -0
@@ -0,0 +1,1367 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Cart + CartItem contracts. The Cart can be anonymous (cookie-held) or
4
+ * logged-in; `mergeAnonymousOnLogin` merges the anonymous basket into the
5
+ * authenticated Cart on sign-in (R-09, FR-010).
6
+ *
7
+ * Feature 027 (Carts consolidation) extends this surface additively with:
8
+ * - the full cart-view payload (status / approval / discount / dropped
9
+ * lines / re-resolved per-line pricing)
10
+ * - the mini-cart payload (lightweight header dropdown)
11
+ * - coupon application / clear request and per-reason failure body
12
+ * - the three conversion requests (Cart→QR, QR→Cart, ShoppingList→Cart)
13
+ * - the organization-cart visibility list + detail
14
+ * - the per-Organization cart-approval policy toggle
15
+ * - the admin platform-wide carts list / detail / audit / reject
16
+ */
17
+ export declare const cartItemSchema: z.ZodObject<{
18
+ id: z.ZodString;
19
+ productId: z.ZodString;
20
+ productSnapshot: z.ZodObject<{
21
+ sku: z.ZodString;
22
+ name: z.ZodString;
23
+ primaryAssetUrl: z.ZodNullable<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ variantId: z.ZodNullable<z.ZodString>;
26
+ variantSnapshot: z.ZodNullable<z.ZodObject<{
27
+ sku: z.ZodString;
28
+ label: z.ZodString;
29
+ }, z.core.$strip>>;
30
+ quantity: z.ZodNumber;
31
+ unitPrice: z.ZodObject<{
32
+ amount: z.ZodNumber;
33
+ currency: z.ZodString;
34
+ }, z.core.$strip>;
35
+ lineTotal: z.ZodObject<{
36
+ amount: z.ZodNumber;
37
+ currency: z.ZodString;
38
+ }, z.core.$strip>;
39
+ }, z.core.$strip>;
40
+ export type CartItem = z.infer<typeof cartItemSchema>;
41
+ export declare const cartSchema: z.ZodObject<{
42
+ id: z.ZodString;
43
+ customerAccountId: z.ZodNullable<z.ZodString>;
44
+ organizationId: z.ZodNullable<z.ZodString>;
45
+ anonymousCartToken: z.ZodNullable<z.ZodString>;
46
+ items: z.ZodArray<z.ZodObject<{
47
+ id: z.ZodString;
48
+ productId: z.ZodString;
49
+ productSnapshot: z.ZodObject<{
50
+ sku: z.ZodString;
51
+ name: z.ZodString;
52
+ primaryAssetUrl: z.ZodNullable<z.ZodString>;
53
+ }, z.core.$strip>;
54
+ variantId: z.ZodNullable<z.ZodString>;
55
+ variantSnapshot: z.ZodNullable<z.ZodObject<{
56
+ sku: z.ZodString;
57
+ label: z.ZodString;
58
+ }, z.core.$strip>>;
59
+ quantity: z.ZodNumber;
60
+ unitPrice: z.ZodObject<{
61
+ amount: z.ZodNumber;
62
+ currency: z.ZodString;
63
+ }, z.core.$strip>;
64
+ lineTotal: z.ZodObject<{
65
+ amount: z.ZodNumber;
66
+ currency: z.ZodString;
67
+ }, z.core.$strip>;
68
+ }, z.core.$strip>>;
69
+ subtotal: z.ZodObject<{
70
+ amount: z.ZodNumber;
71
+ currency: z.ZodString;
72
+ }, z.core.$strip>;
73
+ itemCount: z.ZodNumber;
74
+ createdAt: z.ZodString;
75
+ updatedAt: z.ZodString;
76
+ }, z.core.$strip>;
77
+ export type Cart = z.infer<typeof cartSchema>;
78
+ export declare const addCartItemRequestSchema: z.ZodObject<{
79
+ productId: z.ZodString;
80
+ variantId: z.ZodOptional<z.ZodString>;
81
+ quantity: z.ZodNumber;
82
+ packagingUnitId: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>;
84
+ export type AddCartItemRequest = z.infer<typeof addCartItemRequestSchema>;
85
+ export declare const updateCartItemRequestStrictSchema: z.ZodObject<{
86
+ quantity: z.ZodNumber;
87
+ }, z.core.$strip>;
88
+ export type UpdateCartItemRequestStrict = z.infer<typeof updateCartItemRequestStrictSchema>;
89
+ export declare const updateCartItemRequestSchema: z.ZodObject<{
90
+ quantity: z.ZodNumber;
91
+ }, z.core.$strip>;
92
+ export type UpdateCartItemRequest = z.infer<typeof updateCartItemRequestSchema>;
93
+ export declare const cartStatusSchema: z.ZodEnum<{
94
+ completed: "completed";
95
+ active: "active";
96
+ rejected: "rejected";
97
+ abandoned: "abandoned";
98
+ }>;
99
+ export type CartStatus = z.infer<typeof cartStatusSchema>;
100
+ export declare const cartApprovalStatusSchema: z.ZodEnum<{
101
+ pending: "pending";
102
+ not_required: "not_required";
103
+ approved: "approved";
104
+ rejected_by_org_admin: "rejected_by_org_admin";
105
+ }>;
106
+ export type CartApprovalStatus = z.infer<typeof cartApprovalStatusSchema>;
107
+ export declare const cartPrimaryCtaSchema: z.ZodEnum<{
108
+ checkout: "checkout";
109
+ submit_for_approval: "submit_for_approval";
110
+ awaiting_approval: "awaiting_approval";
111
+ blocked_by_organization: "blocked_by_organization";
112
+ }>;
113
+ export type CartPrimaryCta = z.infer<typeof cartPrimaryCtaSchema>;
114
+ export declare const couponDropReasonSchema: z.ZodEnum<{
115
+ invalid_code: "invalid_code";
116
+ expired: "expired";
117
+ below_min_spend: "below_min_spend";
118
+ wrong_channel: "wrong_channel";
119
+ wrong_customer_group: "wrong_customer_group";
120
+ wrong_organization: "wrong_organization";
121
+ coupon_format_invalid: "coupon_format_invalid";
122
+ }>;
123
+ export type CouponDropReason = z.infer<typeof couponDropReasonSchema>;
124
+ export declare const cartDroppedLineReasonSchema: z.ZodEnum<{
125
+ not_purchasable: "not_purchasable";
126
+ out_of_stock: "out_of_stock";
127
+ no_price_in_customer_list: "no_price_in_customer_list";
128
+ removed_by_conversion: "removed_by_conversion";
129
+ }>;
130
+ export type CartDroppedLineReason = z.infer<typeof cartDroppedLineReasonSchema>;
131
+ export declare const cartLineUnavailableReasonSchema: z.ZodEnum<{
132
+ not_purchasable: "not_purchasable";
133
+ out_of_stock: "out_of_stock";
134
+ no_price_in_customer_list: "no_price_in_customer_list";
135
+ }>;
136
+ export type CartLineUnavailableReason = z.infer<typeof cartLineUnavailableReasonSchema>;
137
+ export declare const cartViewLineSchema: z.ZodObject<{
138
+ id: z.ZodString;
139
+ productId: z.ZodString;
140
+ variantId: z.ZodNullable<z.ZodString>;
141
+ productName: z.ZodString;
142
+ productSlug: z.ZodOptional<z.ZodString>;
143
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
144
+ quantity: z.ZodNumber;
145
+ unitPrice: z.ZodObject<{
146
+ amount: z.ZodNumber;
147
+ currency: z.ZodString;
148
+ }, z.core.$strip>;
149
+ lineTotal: z.ZodObject<{
150
+ amount: z.ZodNumber;
151
+ currency: z.ZodString;
152
+ }, z.core.$strip>;
153
+ unavailable: z.ZodBoolean;
154
+ unavailableReason: z.ZodNullable<z.ZodEnum<{
155
+ not_purchasable: "not_purchasable";
156
+ out_of_stock: "out_of_stock";
157
+ no_price_in_customer_list: "no_price_in_customer_list";
158
+ }>>;
159
+ packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
+ packagingUnitBaseQuantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
161
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ }, z.core.$strip>;
163
+ export type CartViewLine = z.infer<typeof cartViewLineSchema>;
164
+ export declare const cartMiniLineSchema: z.ZodObject<{
165
+ id: z.ZodString;
166
+ productId: z.ZodString;
167
+ productName: z.ZodString;
168
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
169
+ quantity: z.ZodNumber;
170
+ unitPrice: z.ZodObject<{
171
+ amount: z.ZodNumber;
172
+ currency: z.ZodString;
173
+ }, z.core.$strip>;
174
+ lineTotal: z.ZodObject<{
175
+ amount: z.ZodNumber;
176
+ currency: z.ZodString;
177
+ }, z.core.$strip>;
178
+ }, z.core.$strip>;
179
+ export type CartMiniLine = z.infer<typeof cartMiniLineSchema>;
180
+ /** Feature 045 — one applied promotion's contribution to the cart discount. */
181
+ export declare const cartAppliedPromotionSchema: z.ZodObject<{
182
+ promotionId: z.ZodString;
183
+ couponId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
184
+ amount: z.ZodNumber;
185
+ currency: z.ZodString;
186
+ }, z.core.$strip>;
187
+ export type CartAppliedPromotion = z.infer<typeof cartAppliedPromotionSchema>;
188
+ export declare const cartFullPayloadSchema: z.ZodObject<{
189
+ id: z.ZodNullable<z.ZodString>;
190
+ customerAccountId: z.ZodNullable<z.ZodString>;
191
+ organizationId: z.ZodNullable<z.ZodString>;
192
+ salesChannelId: z.ZodNullable<z.ZodString>;
193
+ anonymousCartToken: z.ZodNullable<z.ZodString>;
194
+ status: z.ZodEnum<{
195
+ completed: "completed";
196
+ active: "active";
197
+ rejected: "rejected";
198
+ abandoned: "abandoned";
199
+ }>;
200
+ approvalStatus: z.ZodEnum<{
201
+ pending: "pending";
202
+ not_required: "not_required";
203
+ approved: "approved";
204
+ rejected_by_org_admin: "rejected_by_org_admin";
205
+ }>;
206
+ items: z.ZodArray<z.ZodObject<{
207
+ id: z.ZodString;
208
+ productId: z.ZodString;
209
+ variantId: z.ZodNullable<z.ZodString>;
210
+ productName: z.ZodString;
211
+ productSlug: z.ZodOptional<z.ZodString>;
212
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
213
+ quantity: z.ZodNumber;
214
+ unitPrice: z.ZodObject<{
215
+ amount: z.ZodNumber;
216
+ currency: z.ZodString;
217
+ }, z.core.$strip>;
218
+ lineTotal: z.ZodObject<{
219
+ amount: z.ZodNumber;
220
+ currency: z.ZodString;
221
+ }, z.core.$strip>;
222
+ unavailable: z.ZodBoolean;
223
+ unavailableReason: z.ZodNullable<z.ZodEnum<{
224
+ not_purchasable: "not_purchasable";
225
+ out_of_stock: "out_of_stock";
226
+ no_price_in_customer_list: "no_price_in_customer_list";
227
+ }>>;
228
+ packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ packagingUnitBaseQuantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
230
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
+ }, z.core.$strip>>;
232
+ itemCount: z.ZodNumber;
233
+ subtotal: z.ZodObject<{
234
+ amount: z.ZodNumber;
235
+ currency: z.ZodString;
236
+ }, z.core.$strip>;
237
+ discount: z.ZodNullable<z.ZodObject<{
238
+ code: z.ZodNullable<z.ZodString>;
239
+ amount: z.ZodNumber;
240
+ currency: z.ZodString;
241
+ }, z.core.$strip>>;
242
+ appliedPromotions: z.ZodDefault<z.ZodArray<z.ZodObject<{
243
+ promotionId: z.ZodString;
244
+ couponId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
245
+ amount: z.ZodNumber;
246
+ currency: z.ZodString;
247
+ }, z.core.$strip>>>;
248
+ grandTotal: z.ZodObject<{
249
+ amount: z.ZodNumber;
250
+ currency: z.ZodString;
251
+ }, z.core.$strip>;
252
+ primaryCta: z.ZodEnum<{
253
+ checkout: "checkout";
254
+ submit_for_approval: "submit_for_approval";
255
+ awaiting_approval: "awaiting_approval";
256
+ blocked_by_organization: "blocked_by_organization";
257
+ }>;
258
+ droppedLines: z.ZodArray<z.ZodObject<{
259
+ productId: z.ZodString;
260
+ productName: z.ZodString;
261
+ reason: z.ZodEnum<{
262
+ not_purchasable: "not_purchasable";
263
+ out_of_stock: "out_of_stock";
264
+ no_price_in_customer_list: "no_price_in_customer_list";
265
+ removed_by_conversion: "removed_by_conversion";
266
+ }>;
267
+ }, z.core.$strip>>;
268
+ couponDroppedThisRead: z.ZodNullable<z.ZodObject<{
269
+ code: z.ZodString;
270
+ reason: z.ZodEnum<{
271
+ invalid_code: "invalid_code";
272
+ expired: "expired";
273
+ below_min_spend: "below_min_spend";
274
+ wrong_channel: "wrong_channel";
275
+ wrong_customer_group: "wrong_customer_group";
276
+ wrong_organization: "wrong_organization";
277
+ coupon_format_invalid: "coupon_format_invalid";
278
+ }>;
279
+ }, z.core.$strip>>;
280
+ createdAt: z.ZodString;
281
+ updatedAt: z.ZodString;
282
+ lastActivityAt: z.ZodString;
283
+ }, z.core.$strip>;
284
+ export type CartFullPayload = z.infer<typeof cartFullPayloadSchema>;
285
+ export declare const cartFullResponseSchema: z.ZodObject<{
286
+ data: z.ZodObject<{
287
+ id: z.ZodNullable<z.ZodString>;
288
+ customerAccountId: z.ZodNullable<z.ZodString>;
289
+ organizationId: z.ZodNullable<z.ZodString>;
290
+ salesChannelId: z.ZodNullable<z.ZodString>;
291
+ anonymousCartToken: z.ZodNullable<z.ZodString>;
292
+ status: z.ZodEnum<{
293
+ completed: "completed";
294
+ active: "active";
295
+ rejected: "rejected";
296
+ abandoned: "abandoned";
297
+ }>;
298
+ approvalStatus: z.ZodEnum<{
299
+ pending: "pending";
300
+ not_required: "not_required";
301
+ approved: "approved";
302
+ rejected_by_org_admin: "rejected_by_org_admin";
303
+ }>;
304
+ items: z.ZodArray<z.ZodObject<{
305
+ id: z.ZodString;
306
+ productId: z.ZodString;
307
+ variantId: z.ZodNullable<z.ZodString>;
308
+ productName: z.ZodString;
309
+ productSlug: z.ZodOptional<z.ZodString>;
310
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
311
+ quantity: z.ZodNumber;
312
+ unitPrice: z.ZodObject<{
313
+ amount: z.ZodNumber;
314
+ currency: z.ZodString;
315
+ }, z.core.$strip>;
316
+ lineTotal: z.ZodObject<{
317
+ amount: z.ZodNumber;
318
+ currency: z.ZodString;
319
+ }, z.core.$strip>;
320
+ unavailable: z.ZodBoolean;
321
+ unavailableReason: z.ZodNullable<z.ZodEnum<{
322
+ not_purchasable: "not_purchasable";
323
+ out_of_stock: "out_of_stock";
324
+ no_price_in_customer_list: "no_price_in_customer_list";
325
+ }>>;
326
+ packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
+ packagingUnitBaseQuantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
328
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
329
+ }, z.core.$strip>>;
330
+ itemCount: z.ZodNumber;
331
+ subtotal: z.ZodObject<{
332
+ amount: z.ZodNumber;
333
+ currency: z.ZodString;
334
+ }, z.core.$strip>;
335
+ discount: z.ZodNullable<z.ZodObject<{
336
+ code: z.ZodNullable<z.ZodString>;
337
+ amount: z.ZodNumber;
338
+ currency: z.ZodString;
339
+ }, z.core.$strip>>;
340
+ appliedPromotions: z.ZodDefault<z.ZodArray<z.ZodObject<{
341
+ promotionId: z.ZodString;
342
+ couponId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
343
+ amount: z.ZodNumber;
344
+ currency: z.ZodString;
345
+ }, z.core.$strip>>>;
346
+ grandTotal: z.ZodObject<{
347
+ amount: z.ZodNumber;
348
+ currency: z.ZodString;
349
+ }, z.core.$strip>;
350
+ primaryCta: z.ZodEnum<{
351
+ checkout: "checkout";
352
+ submit_for_approval: "submit_for_approval";
353
+ awaiting_approval: "awaiting_approval";
354
+ blocked_by_organization: "blocked_by_organization";
355
+ }>;
356
+ droppedLines: z.ZodArray<z.ZodObject<{
357
+ productId: z.ZodString;
358
+ productName: z.ZodString;
359
+ reason: z.ZodEnum<{
360
+ not_purchasable: "not_purchasable";
361
+ out_of_stock: "out_of_stock";
362
+ no_price_in_customer_list: "no_price_in_customer_list";
363
+ removed_by_conversion: "removed_by_conversion";
364
+ }>;
365
+ }, z.core.$strip>>;
366
+ couponDroppedThisRead: z.ZodNullable<z.ZodObject<{
367
+ code: z.ZodString;
368
+ reason: z.ZodEnum<{
369
+ invalid_code: "invalid_code";
370
+ expired: "expired";
371
+ below_min_spend: "below_min_spend";
372
+ wrong_channel: "wrong_channel";
373
+ wrong_customer_group: "wrong_customer_group";
374
+ wrong_organization: "wrong_organization";
375
+ coupon_format_invalid: "coupon_format_invalid";
376
+ }>;
377
+ }, z.core.$strip>>;
378
+ createdAt: z.ZodString;
379
+ updatedAt: z.ZodString;
380
+ lastActivityAt: z.ZodString;
381
+ }, z.core.$strip>;
382
+ }, z.core.$strip>;
383
+ export type CartFullResponse = z.infer<typeof cartFullResponseSchema>;
384
+ export declare const cartMiniPayloadSchema: z.ZodObject<{
385
+ id: z.ZodNullable<z.ZodString>;
386
+ status: z.ZodEnum<{
387
+ completed: "completed";
388
+ active: "active";
389
+ rejected: "rejected";
390
+ abandoned: "abandoned";
391
+ }>;
392
+ approvalStatus: z.ZodEnum<{
393
+ pending: "pending";
394
+ not_required: "not_required";
395
+ approved: "approved";
396
+ rejected_by_org_admin: "rejected_by_org_admin";
397
+ }>;
398
+ items: z.ZodArray<z.ZodObject<{
399
+ id: z.ZodString;
400
+ productId: z.ZodString;
401
+ productName: z.ZodString;
402
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
403
+ quantity: z.ZodNumber;
404
+ unitPrice: z.ZodObject<{
405
+ amount: z.ZodNumber;
406
+ currency: z.ZodString;
407
+ }, z.core.$strip>;
408
+ lineTotal: z.ZodObject<{
409
+ amount: z.ZodNumber;
410
+ currency: z.ZodString;
411
+ }, z.core.$strip>;
412
+ }, z.core.$strip>>;
413
+ itemCount: z.ZodNumber;
414
+ grandTotal: z.ZodObject<{
415
+ amount: z.ZodNumber;
416
+ currency: z.ZodString;
417
+ }, z.core.$strip>;
418
+ primaryCta: z.ZodEnum<{
419
+ checkout: "checkout";
420
+ submit_for_approval: "submit_for_approval";
421
+ awaiting_approval: "awaiting_approval";
422
+ blocked_by_organization: "blocked_by_organization";
423
+ }>;
424
+ }, z.core.$strip>;
425
+ export type CartMiniPayload = z.infer<typeof cartMiniPayloadSchema>;
426
+ export declare const cartMiniResponseSchema: z.ZodObject<{
427
+ data: z.ZodObject<{
428
+ id: z.ZodNullable<z.ZodString>;
429
+ status: z.ZodEnum<{
430
+ completed: "completed";
431
+ active: "active";
432
+ rejected: "rejected";
433
+ abandoned: "abandoned";
434
+ }>;
435
+ approvalStatus: z.ZodEnum<{
436
+ pending: "pending";
437
+ not_required: "not_required";
438
+ approved: "approved";
439
+ rejected_by_org_admin: "rejected_by_org_admin";
440
+ }>;
441
+ items: z.ZodArray<z.ZodObject<{
442
+ id: z.ZodString;
443
+ productId: z.ZodString;
444
+ productName: z.ZodString;
445
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
446
+ quantity: z.ZodNumber;
447
+ unitPrice: z.ZodObject<{
448
+ amount: z.ZodNumber;
449
+ currency: z.ZodString;
450
+ }, z.core.$strip>;
451
+ lineTotal: z.ZodObject<{
452
+ amount: z.ZodNumber;
453
+ currency: z.ZodString;
454
+ }, z.core.$strip>;
455
+ }, z.core.$strip>>;
456
+ itemCount: z.ZodNumber;
457
+ grandTotal: z.ZodObject<{
458
+ amount: z.ZodNumber;
459
+ currency: z.ZodString;
460
+ }, z.core.$strip>;
461
+ primaryCta: z.ZodEnum<{
462
+ checkout: "checkout";
463
+ submit_for_approval: "submit_for_approval";
464
+ awaiting_approval: "awaiting_approval";
465
+ blocked_by_organization: "blocked_by_organization";
466
+ }>;
467
+ }, z.core.$strip>;
468
+ }, z.core.$strip>;
469
+ export type CartMiniResponse = z.infer<typeof cartMiniResponseSchema>;
470
+ export declare const saveCartItemToListSchema: z.ZodObject<{
471
+ shoppingListId: z.ZodString;
472
+ }, z.core.$strip>;
473
+ export type SaveCartItemToList = z.infer<typeof saveCartItemToListSchema>;
474
+ export declare const upsellProductSchema: z.ZodObject<{
475
+ productId: z.ZodString;
476
+ productName: z.ZodString;
477
+ productSlug: z.ZodString;
478
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
479
+ unitPrice: z.ZodNullable<z.ZodObject<{
480
+ amount: z.ZodNumber;
481
+ currency: z.ZodString;
482
+ }, z.core.$strip>>;
483
+ matchCount: z.ZodNumber;
484
+ }, z.core.$strip>;
485
+ export type UpsellProduct = z.infer<typeof upsellProductSchema>;
486
+ export declare const upsellsResponseSchema: z.ZodObject<{
487
+ data: z.ZodArray<z.ZodObject<{
488
+ productId: z.ZodString;
489
+ productName: z.ZodString;
490
+ productSlug: z.ZodString;
491
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
492
+ unitPrice: z.ZodNullable<z.ZodObject<{
493
+ amount: z.ZodNumber;
494
+ currency: z.ZodString;
495
+ }, z.core.$strip>>;
496
+ matchCount: z.ZodNumber;
497
+ }, z.core.$strip>>;
498
+ }, z.core.$strip>;
499
+ export type UpsellsResponse = z.infer<typeof upsellsResponseSchema>;
500
+ export declare const cartUpsellsQuerySchema: z.ZodObject<{
501
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
502
+ }, z.core.$strip>;
503
+ export type CartUpsellsQuery = z.infer<typeof cartUpsellsQuerySchema>;
504
+ export declare const applyCartCouponSchema: z.ZodObject<{
505
+ code: z.ZodNullable<z.ZodString>;
506
+ }, z.core.$strip>;
507
+ export type ApplyCartCoupon = z.infer<typeof applyCartCouponSchema>;
508
+ export declare const couponFailureBodySchema: z.ZodObject<{
509
+ error: z.ZodObject<{
510
+ code: z.ZodLiteral<"CART_COUPON_REJECTED">;
511
+ message: z.ZodString;
512
+ details: z.ZodObject<{
513
+ reason: z.ZodEnum<{
514
+ invalid_code: "invalid_code";
515
+ expired: "expired";
516
+ below_min_spend: "below_min_spend";
517
+ wrong_channel: "wrong_channel";
518
+ wrong_customer_group: "wrong_customer_group";
519
+ wrong_organization: "wrong_organization";
520
+ coupon_format_invalid: "coupon_format_invalid";
521
+ }>;
522
+ shortfall: z.ZodOptional<z.ZodObject<{
523
+ amount: z.ZodNumber;
524
+ currency: z.ZodString;
525
+ }, z.core.$strip>>;
526
+ }, z.core.$strip>;
527
+ }, z.core.$strip>;
528
+ }, z.core.$strip>;
529
+ export type CouponFailureBody = z.infer<typeof couponFailureBodySchema>;
530
+ export declare const convertCartToQrSchema: z.ZodObject<{
531
+ note: z.ZodOptional<z.ZodString>;
532
+ }, z.core.$strip>;
533
+ export type ConvertCartToQr = z.infer<typeof convertCartToQrSchema>;
534
+ export declare const convertCartToQrResponseSchema: z.ZodObject<{
535
+ data: z.ZodObject<{
536
+ quoteRequestId: z.ZodString;
537
+ cartId: z.ZodString;
538
+ quoteRequestSlug: z.ZodString;
539
+ }, z.core.$strip>;
540
+ }, z.core.$strip>;
541
+ export type ConvertCartToQrResponse = z.infer<typeof convertCartToQrResponseSchema>;
542
+ export declare const cartFromQrResponseSchema: z.ZodObject<{
543
+ data: z.ZodObject<{
544
+ cartId: z.ZodString;
545
+ appendedLineCount: z.ZodNumber;
546
+ droppedLines: z.ZodArray<z.ZodObject<{
547
+ productId: z.ZodString;
548
+ productName: z.ZodString;
549
+ reason: z.ZodEnum<{
550
+ not_purchasable: "not_purchasable";
551
+ out_of_stock: "out_of_stock";
552
+ no_price_in_customer_list: "no_price_in_customer_list";
553
+ removed_by_conversion: "removed_by_conversion";
554
+ }>;
555
+ }, z.core.$strip>>;
556
+ }, z.core.$strip>;
557
+ }, z.core.$strip>;
558
+ export type CartFromQrResponse = z.infer<typeof cartFromQrResponseSchema>;
559
+ export declare const cartFromShoppingListResponseSchema: z.ZodObject<{
560
+ data: z.ZodObject<{
561
+ cartId: z.ZodString;
562
+ appendedLineCount: z.ZodNumber;
563
+ droppedLines: z.ZodArray<z.ZodObject<{
564
+ productId: z.ZodString;
565
+ productName: z.ZodString;
566
+ reason: z.ZodEnum<{
567
+ not_purchasable: "not_purchasable";
568
+ out_of_stock: "out_of_stock";
569
+ no_price_in_customer_list: "no_price_in_customer_list";
570
+ removed_by_conversion: "removed_by_conversion";
571
+ }>;
572
+ }, z.core.$strip>>;
573
+ }, z.core.$strip>;
574
+ }, z.core.$strip>;
575
+ export type CartFromShoppingListResponse = z.infer<typeof cartFromShoppingListResponseSchema>;
576
+ export declare const orgCartSummarySchema: z.ZodObject<{
577
+ id: z.ZodString;
578
+ ownerCustomerAccountId: z.ZodString;
579
+ ownerDisplayName: z.ZodString;
580
+ status: z.ZodEnum<{
581
+ completed: "completed";
582
+ active: "active";
583
+ rejected: "rejected";
584
+ abandoned: "abandoned";
585
+ }>;
586
+ approvalStatus: z.ZodEnum<{
587
+ pending: "pending";
588
+ not_required: "not_required";
589
+ approved: "approved";
590
+ rejected_by_org_admin: "rejected_by_org_admin";
591
+ }>;
592
+ itemCount: z.ZodNumber;
593
+ total: z.ZodObject<{
594
+ amount: z.ZodNumber;
595
+ currency: z.ZodString;
596
+ }, z.core.$strip>;
597
+ lastActivityAt: z.ZodString;
598
+ submittedForApprovalAt: z.ZodNullable<z.ZodString>;
599
+ }, z.core.$strip>;
600
+ export type OrgCartSummary = z.infer<typeof orgCartSummarySchema>;
601
+ export declare const orgCartsListResponseSchema: z.ZodObject<{
602
+ data: z.ZodArray<z.ZodObject<{
603
+ id: z.ZodString;
604
+ ownerCustomerAccountId: z.ZodString;
605
+ ownerDisplayName: z.ZodString;
606
+ status: z.ZodEnum<{
607
+ completed: "completed";
608
+ active: "active";
609
+ rejected: "rejected";
610
+ abandoned: "abandoned";
611
+ }>;
612
+ approvalStatus: z.ZodEnum<{
613
+ pending: "pending";
614
+ not_required: "not_required";
615
+ approved: "approved";
616
+ rejected_by_org_admin: "rejected_by_org_admin";
617
+ }>;
618
+ itemCount: z.ZodNumber;
619
+ total: z.ZodObject<{
620
+ amount: z.ZodNumber;
621
+ currency: z.ZodString;
622
+ }, z.core.$strip>;
623
+ lastActivityAt: z.ZodString;
624
+ submittedForApprovalAt: z.ZodNullable<z.ZodString>;
625
+ }, z.core.$strip>>;
626
+ meta: z.ZodObject<{
627
+ page: z.ZodNumber;
628
+ pageSize: z.ZodNumber;
629
+ totalCount: z.ZodNumber;
630
+ }, z.core.$strip>;
631
+ }, z.core.$strip>;
632
+ export type OrgCartsListResponse = z.infer<typeof orgCartsListResponseSchema>;
633
+ export declare const cartAuditFeedEntrySchema: z.ZodObject<{
634
+ occurredAt: z.ZodString;
635
+ actorType: z.ZodEnum<{
636
+ customer: "customer";
637
+ system: "system";
638
+ org_admin: "org_admin";
639
+ platform_admin: "platform_admin";
640
+ sweep: "sweep";
641
+ }>;
642
+ actorDisplayName: z.ZodNullable<z.ZodString>;
643
+ action: z.ZodString;
644
+ fromState: z.ZodNullable<z.ZodString>;
645
+ toState: z.ZodNullable<z.ZodString>;
646
+ reason: z.ZodNullable<z.ZodString>;
647
+ }, z.core.$strip>;
648
+ export type CartAuditFeedEntry = z.infer<typeof cartAuditFeedEntrySchema>;
649
+ export declare const orgCartDetailPayloadSchema: z.ZodObject<{
650
+ id: z.ZodNullable<z.ZodString>;
651
+ customerAccountId: z.ZodNullable<z.ZodString>;
652
+ organizationId: z.ZodNullable<z.ZodString>;
653
+ salesChannelId: z.ZodNullable<z.ZodString>;
654
+ anonymousCartToken: z.ZodNullable<z.ZodString>;
655
+ status: z.ZodEnum<{
656
+ completed: "completed";
657
+ active: "active";
658
+ rejected: "rejected";
659
+ abandoned: "abandoned";
660
+ }>;
661
+ approvalStatus: z.ZodEnum<{
662
+ pending: "pending";
663
+ not_required: "not_required";
664
+ approved: "approved";
665
+ rejected_by_org_admin: "rejected_by_org_admin";
666
+ }>;
667
+ items: z.ZodArray<z.ZodObject<{
668
+ id: z.ZodString;
669
+ productId: z.ZodString;
670
+ variantId: z.ZodNullable<z.ZodString>;
671
+ productName: z.ZodString;
672
+ productSlug: z.ZodOptional<z.ZodString>;
673
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
674
+ quantity: z.ZodNumber;
675
+ unitPrice: z.ZodObject<{
676
+ amount: z.ZodNumber;
677
+ currency: z.ZodString;
678
+ }, z.core.$strip>;
679
+ lineTotal: z.ZodObject<{
680
+ amount: z.ZodNumber;
681
+ currency: z.ZodString;
682
+ }, z.core.$strip>;
683
+ unavailable: z.ZodBoolean;
684
+ unavailableReason: z.ZodNullable<z.ZodEnum<{
685
+ not_purchasable: "not_purchasable";
686
+ out_of_stock: "out_of_stock";
687
+ no_price_in_customer_list: "no_price_in_customer_list";
688
+ }>>;
689
+ packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
690
+ packagingUnitBaseQuantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
691
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
692
+ }, z.core.$strip>>;
693
+ itemCount: z.ZodNumber;
694
+ subtotal: z.ZodObject<{
695
+ amount: z.ZodNumber;
696
+ currency: z.ZodString;
697
+ }, z.core.$strip>;
698
+ discount: z.ZodNullable<z.ZodObject<{
699
+ code: z.ZodNullable<z.ZodString>;
700
+ amount: z.ZodNumber;
701
+ currency: z.ZodString;
702
+ }, z.core.$strip>>;
703
+ appliedPromotions: z.ZodDefault<z.ZodArray<z.ZodObject<{
704
+ promotionId: z.ZodString;
705
+ couponId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
706
+ amount: z.ZodNumber;
707
+ currency: z.ZodString;
708
+ }, z.core.$strip>>>;
709
+ grandTotal: z.ZodObject<{
710
+ amount: z.ZodNumber;
711
+ currency: z.ZodString;
712
+ }, z.core.$strip>;
713
+ primaryCta: z.ZodEnum<{
714
+ checkout: "checkout";
715
+ submit_for_approval: "submit_for_approval";
716
+ awaiting_approval: "awaiting_approval";
717
+ blocked_by_organization: "blocked_by_organization";
718
+ }>;
719
+ droppedLines: z.ZodArray<z.ZodObject<{
720
+ productId: z.ZodString;
721
+ productName: z.ZodString;
722
+ reason: z.ZodEnum<{
723
+ not_purchasable: "not_purchasable";
724
+ out_of_stock: "out_of_stock";
725
+ no_price_in_customer_list: "no_price_in_customer_list";
726
+ removed_by_conversion: "removed_by_conversion";
727
+ }>;
728
+ }, z.core.$strip>>;
729
+ couponDroppedThisRead: z.ZodNullable<z.ZodObject<{
730
+ code: z.ZodString;
731
+ reason: z.ZodEnum<{
732
+ invalid_code: "invalid_code";
733
+ expired: "expired";
734
+ below_min_spend: "below_min_spend";
735
+ wrong_channel: "wrong_channel";
736
+ wrong_customer_group: "wrong_customer_group";
737
+ wrong_organization: "wrong_organization";
738
+ coupon_format_invalid: "coupon_format_invalid";
739
+ }>;
740
+ }, z.core.$strip>>;
741
+ createdAt: z.ZodString;
742
+ updatedAt: z.ZodString;
743
+ lastActivityAt: z.ZodString;
744
+ ownerCustomerAccountId: z.ZodString;
745
+ ownerDisplayName: z.ZodString;
746
+ auditEntries: z.ZodArray<z.ZodObject<{
747
+ occurredAt: z.ZodString;
748
+ actorType: z.ZodEnum<{
749
+ customer: "customer";
750
+ system: "system";
751
+ org_admin: "org_admin";
752
+ platform_admin: "platform_admin";
753
+ sweep: "sweep";
754
+ }>;
755
+ actorDisplayName: z.ZodNullable<z.ZodString>;
756
+ action: z.ZodString;
757
+ fromState: z.ZodNullable<z.ZodString>;
758
+ toState: z.ZodNullable<z.ZodString>;
759
+ reason: z.ZodNullable<z.ZodString>;
760
+ }, z.core.$strip>>;
761
+ }, z.core.$strip>;
762
+ export type OrgCartDetailPayload = z.infer<typeof orgCartDetailPayloadSchema>;
763
+ export declare const orgCartDetailResponseSchema: z.ZodObject<{
764
+ data: z.ZodObject<{
765
+ id: z.ZodNullable<z.ZodString>;
766
+ customerAccountId: z.ZodNullable<z.ZodString>;
767
+ organizationId: z.ZodNullable<z.ZodString>;
768
+ salesChannelId: z.ZodNullable<z.ZodString>;
769
+ anonymousCartToken: z.ZodNullable<z.ZodString>;
770
+ status: z.ZodEnum<{
771
+ completed: "completed";
772
+ active: "active";
773
+ rejected: "rejected";
774
+ abandoned: "abandoned";
775
+ }>;
776
+ approvalStatus: z.ZodEnum<{
777
+ pending: "pending";
778
+ not_required: "not_required";
779
+ approved: "approved";
780
+ rejected_by_org_admin: "rejected_by_org_admin";
781
+ }>;
782
+ items: z.ZodArray<z.ZodObject<{
783
+ id: z.ZodString;
784
+ productId: z.ZodString;
785
+ variantId: z.ZodNullable<z.ZodString>;
786
+ productName: z.ZodString;
787
+ productSlug: z.ZodOptional<z.ZodString>;
788
+ productThumbnailUrl: z.ZodNullable<z.ZodString>;
789
+ quantity: z.ZodNumber;
790
+ unitPrice: z.ZodObject<{
791
+ amount: z.ZodNumber;
792
+ currency: z.ZodString;
793
+ }, z.core.$strip>;
794
+ lineTotal: z.ZodObject<{
795
+ amount: z.ZodNumber;
796
+ currency: z.ZodString;
797
+ }, z.core.$strip>;
798
+ unavailable: z.ZodBoolean;
799
+ unavailableReason: z.ZodNullable<z.ZodEnum<{
800
+ not_purchasable: "not_purchasable";
801
+ out_of_stock: "out_of_stock";
802
+ no_price_in_customer_list: "no_price_in_customer_list";
803
+ }>>;
804
+ packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
805
+ packagingUnitBaseQuantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
806
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
807
+ }, z.core.$strip>>;
808
+ itemCount: z.ZodNumber;
809
+ subtotal: z.ZodObject<{
810
+ amount: z.ZodNumber;
811
+ currency: z.ZodString;
812
+ }, z.core.$strip>;
813
+ discount: z.ZodNullable<z.ZodObject<{
814
+ code: z.ZodNullable<z.ZodString>;
815
+ amount: z.ZodNumber;
816
+ currency: z.ZodString;
817
+ }, z.core.$strip>>;
818
+ appliedPromotions: z.ZodDefault<z.ZodArray<z.ZodObject<{
819
+ promotionId: z.ZodString;
820
+ couponId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
821
+ amount: z.ZodNumber;
822
+ currency: z.ZodString;
823
+ }, z.core.$strip>>>;
824
+ grandTotal: z.ZodObject<{
825
+ amount: z.ZodNumber;
826
+ currency: z.ZodString;
827
+ }, z.core.$strip>;
828
+ primaryCta: z.ZodEnum<{
829
+ checkout: "checkout";
830
+ submit_for_approval: "submit_for_approval";
831
+ awaiting_approval: "awaiting_approval";
832
+ blocked_by_organization: "blocked_by_organization";
833
+ }>;
834
+ droppedLines: z.ZodArray<z.ZodObject<{
835
+ productId: z.ZodString;
836
+ productName: z.ZodString;
837
+ reason: z.ZodEnum<{
838
+ not_purchasable: "not_purchasable";
839
+ out_of_stock: "out_of_stock";
840
+ no_price_in_customer_list: "no_price_in_customer_list";
841
+ removed_by_conversion: "removed_by_conversion";
842
+ }>;
843
+ }, z.core.$strip>>;
844
+ couponDroppedThisRead: z.ZodNullable<z.ZodObject<{
845
+ code: z.ZodString;
846
+ reason: z.ZodEnum<{
847
+ invalid_code: "invalid_code";
848
+ expired: "expired";
849
+ below_min_spend: "below_min_spend";
850
+ wrong_channel: "wrong_channel";
851
+ wrong_customer_group: "wrong_customer_group";
852
+ wrong_organization: "wrong_organization";
853
+ coupon_format_invalid: "coupon_format_invalid";
854
+ }>;
855
+ }, z.core.$strip>>;
856
+ createdAt: z.ZodString;
857
+ updatedAt: z.ZodString;
858
+ lastActivityAt: z.ZodString;
859
+ ownerCustomerAccountId: z.ZodString;
860
+ ownerDisplayName: z.ZodString;
861
+ auditEntries: z.ZodArray<z.ZodObject<{
862
+ occurredAt: z.ZodString;
863
+ actorType: z.ZodEnum<{
864
+ customer: "customer";
865
+ system: "system";
866
+ org_admin: "org_admin";
867
+ platform_admin: "platform_admin";
868
+ sweep: "sweep";
869
+ }>;
870
+ actorDisplayName: z.ZodNullable<z.ZodString>;
871
+ action: z.ZodString;
872
+ fromState: z.ZodNullable<z.ZodString>;
873
+ toState: z.ZodNullable<z.ZodString>;
874
+ reason: z.ZodNullable<z.ZodString>;
875
+ }, z.core.$strip>>;
876
+ }, z.core.$strip>;
877
+ }, z.core.$strip>;
878
+ export type OrgCartDetailResponse = z.infer<typeof orgCartDetailResponseSchema>;
879
+ export declare const setCartApprovalPolicySchema: z.ZodObject<{
880
+ requiresCartApproval: z.ZodBoolean;
881
+ }, z.core.$strip>;
882
+ export type SetCartApprovalPolicy = z.infer<typeof setCartApprovalPolicySchema>;
883
+ export declare const cartApprovalPolicyResponseSchema: z.ZodObject<{
884
+ data: z.ZodObject<{
885
+ organizationId: z.ZodString;
886
+ requiresCartApproval: z.ZodBoolean;
887
+ updatedAt: z.ZodString;
888
+ }, z.core.$strip>;
889
+ }, z.core.$strip>;
890
+ export type CartApprovalPolicyResponse = z.infer<typeof cartApprovalPolicyResponseSchema>;
891
+ export declare const rejectOrgCartSchema: z.ZodObject<{
892
+ reason: z.ZodString;
893
+ }, z.core.$strip>;
894
+ export type RejectOrgCart = z.infer<typeof rejectOrgCartSchema>;
895
+ export declare const adminCartSortSchema: z.ZodEnum<{
896
+ last_activity_desc: "last_activity_desc";
897
+ last_activity_asc: "last_activity_asc";
898
+ total_desc: "total_desc";
899
+ total_asc: "total_asc";
900
+ created_desc: "created_desc";
901
+ }>;
902
+ export type AdminCartSort = z.infer<typeof adminCartSortSchema>;
903
+ export declare const adminCartSummarySchema: z.ZodObject<{
904
+ id: z.ZodString;
905
+ ownerCustomerAccountId: z.ZodNullable<z.ZodString>;
906
+ ownerDisplayName: z.ZodNullable<z.ZodString>;
907
+ organizationId: z.ZodNullable<z.ZodString>;
908
+ organizationDisplayName: z.ZodNullable<z.ZodString>;
909
+ salesChannelId: z.ZodNullable<z.ZodString>;
910
+ salesChannelCode: z.ZodNullable<z.ZodString>;
911
+ status: z.ZodEnum<{
912
+ completed: "completed";
913
+ active: "active";
914
+ rejected: "rejected";
915
+ abandoned: "abandoned";
916
+ }>;
917
+ approvalStatus: z.ZodEnum<{
918
+ pending: "pending";
919
+ not_required: "not_required";
920
+ approved: "approved";
921
+ rejected_by_org_admin: "rejected_by_org_admin";
922
+ }>;
923
+ itemCount: z.ZodNumber;
924
+ total: z.ZodObject<{
925
+ amount: z.ZodNumber;
926
+ currency: z.ZodString;
927
+ }, z.core.$strip>;
928
+ appliedPromotionCode: z.ZodNullable<z.ZodString>;
929
+ lastActivityAt: z.ZodString;
930
+ createdAt: z.ZodString;
931
+ }, z.core.$strip>;
932
+ export type AdminCartSummary = z.infer<typeof adminCartSummarySchema>;
933
+ export declare const adminCartsListResponseSchema: z.ZodObject<{
934
+ data: z.ZodArray<z.ZodObject<{
935
+ id: z.ZodString;
936
+ ownerCustomerAccountId: z.ZodNullable<z.ZodString>;
937
+ ownerDisplayName: z.ZodNullable<z.ZodString>;
938
+ organizationId: z.ZodNullable<z.ZodString>;
939
+ organizationDisplayName: z.ZodNullable<z.ZodString>;
940
+ salesChannelId: z.ZodNullable<z.ZodString>;
941
+ salesChannelCode: z.ZodNullable<z.ZodString>;
942
+ status: z.ZodEnum<{
943
+ completed: "completed";
944
+ active: "active";
945
+ rejected: "rejected";
946
+ abandoned: "abandoned";
947
+ }>;
948
+ approvalStatus: z.ZodEnum<{
949
+ pending: "pending";
950
+ not_required: "not_required";
951
+ approved: "approved";
952
+ rejected_by_org_admin: "rejected_by_org_admin";
953
+ }>;
954
+ itemCount: z.ZodNumber;
955
+ total: z.ZodObject<{
956
+ amount: z.ZodNumber;
957
+ currency: z.ZodString;
958
+ }, z.core.$strip>;
959
+ appliedPromotionCode: z.ZodNullable<z.ZodString>;
960
+ lastActivityAt: z.ZodString;
961
+ createdAt: z.ZodString;
962
+ }, z.core.$strip>>;
963
+ meta: z.ZodObject<{
964
+ page: z.ZodNumber;
965
+ pageSize: z.ZodNumber;
966
+ totalCount: z.ZodNumber;
967
+ }, z.core.$strip>;
968
+ }, z.core.$strip>;
969
+ export type AdminCartsListResponse = z.infer<typeof adminCartsListResponseSchema>;
970
+ export declare const adminCartsListQuerySchema: z.ZodObject<{
971
+ status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
972
+ completed: "completed";
973
+ active: "active";
974
+ rejected: "rejected";
975
+ abandoned: "abandoned";
976
+ }>>>;
977
+ approvalStatus: z.ZodOptional<z.ZodArray<z.ZodEnum<{
978
+ pending: "pending";
979
+ not_required: "not_required";
980
+ approved: "approved";
981
+ rejected_by_org_admin: "rejected_by_org_admin";
982
+ }>>>;
983
+ organizationId: z.ZodOptional<z.ZodString>;
984
+ customerAccountId: z.ZodOptional<z.ZodString>;
985
+ salesChannelId: z.ZodOptional<z.ZodString>;
986
+ lastActivityFrom: z.ZodOptional<z.ZodString>;
987
+ lastActivityTo: z.ZodOptional<z.ZodString>;
988
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
989
+ pageSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
990
+ sort: z.ZodOptional<z.ZodEnum<{
991
+ last_activity_desc: "last_activity_desc";
992
+ last_activity_asc: "last_activity_asc";
993
+ total_desc: "total_desc";
994
+ total_asc: "total_asc";
995
+ created_desc: "created_desc";
996
+ }>>;
997
+ }, z.core.$strip>;
998
+ export type AdminCartsListQuery = z.infer<typeof adminCartsListQuerySchema>;
999
+ export declare const adminCartLineSchema: z.ZodObject<{
1000
+ id: z.ZodString;
1001
+ productId: z.ZodString;
1002
+ productName: z.ZodString;
1003
+ variantId: z.ZodNullable<z.ZodString>;
1004
+ quantity: z.ZodNumber;
1005
+ unitPrice: z.ZodObject<{
1006
+ amount: z.ZodNumber;
1007
+ currency: z.ZodString;
1008
+ }, z.core.$strip>;
1009
+ lineTotal: z.ZodObject<{
1010
+ amount: z.ZodNumber;
1011
+ currency: z.ZodString;
1012
+ }, z.core.$strip>;
1013
+ }, z.core.$strip>;
1014
+ export type AdminCartLine = z.infer<typeof adminCartLineSchema>;
1015
+ export declare const adminCartDetailPayloadSchema: z.ZodObject<{
1016
+ id: z.ZodString;
1017
+ ownerCustomerAccountId: z.ZodNullable<z.ZodString>;
1018
+ ownerDisplayName: z.ZodNullable<z.ZodString>;
1019
+ organizationId: z.ZodNullable<z.ZodString>;
1020
+ organizationDisplayName: z.ZodNullable<z.ZodString>;
1021
+ salesChannelId: z.ZodNullable<z.ZodString>;
1022
+ salesChannelCode: z.ZodNullable<z.ZodString>;
1023
+ status: z.ZodEnum<{
1024
+ completed: "completed";
1025
+ active: "active";
1026
+ rejected: "rejected";
1027
+ abandoned: "abandoned";
1028
+ }>;
1029
+ approvalStatus: z.ZodEnum<{
1030
+ pending: "pending";
1031
+ not_required: "not_required";
1032
+ approved: "approved";
1033
+ rejected_by_org_admin: "rejected_by_org_admin";
1034
+ }>;
1035
+ itemCount: z.ZodNumber;
1036
+ total: z.ZodObject<{
1037
+ amount: z.ZodNumber;
1038
+ currency: z.ZodString;
1039
+ }, z.core.$strip>;
1040
+ appliedPromotionCode: z.ZodNullable<z.ZodString>;
1041
+ lastActivityAt: z.ZodString;
1042
+ createdAt: z.ZodString;
1043
+ items: z.ZodArray<z.ZodObject<{
1044
+ id: z.ZodString;
1045
+ productId: z.ZodString;
1046
+ productName: z.ZodString;
1047
+ variantId: z.ZodNullable<z.ZodString>;
1048
+ quantity: z.ZodNumber;
1049
+ unitPrice: z.ZodObject<{
1050
+ amount: z.ZodNumber;
1051
+ currency: z.ZodString;
1052
+ }, z.core.$strip>;
1053
+ lineTotal: z.ZodObject<{
1054
+ amount: z.ZodNumber;
1055
+ currency: z.ZodString;
1056
+ }, z.core.$strip>;
1057
+ }, z.core.$strip>>;
1058
+ discount: z.ZodNullable<z.ZodObject<{
1059
+ code: z.ZodNullable<z.ZodString>;
1060
+ amount: z.ZodNumber;
1061
+ currency: z.ZodString;
1062
+ }, z.core.$strip>>;
1063
+ convertedToQuoteRequestId: z.ZodNullable<z.ZodString>;
1064
+ submittedForApprovalAt: z.ZodNullable<z.ZodString>;
1065
+ approvedAt: z.ZodNullable<z.ZodString>;
1066
+ approvedByCustomerAccountId: z.ZodNullable<z.ZodString>;
1067
+ rejectedAt: z.ZodNullable<z.ZodString>;
1068
+ rejectedByActor: z.ZodNullable<z.ZodString>;
1069
+ rejectedReason: z.ZodNullable<z.ZodString>;
1070
+ }, z.core.$strip>;
1071
+ export type AdminCartDetailPayload = z.infer<typeof adminCartDetailPayloadSchema>;
1072
+ export declare const adminCartDetailResponseSchema: z.ZodObject<{
1073
+ data: z.ZodObject<{
1074
+ id: z.ZodString;
1075
+ ownerCustomerAccountId: z.ZodNullable<z.ZodString>;
1076
+ ownerDisplayName: z.ZodNullable<z.ZodString>;
1077
+ organizationId: z.ZodNullable<z.ZodString>;
1078
+ organizationDisplayName: z.ZodNullable<z.ZodString>;
1079
+ salesChannelId: z.ZodNullable<z.ZodString>;
1080
+ salesChannelCode: z.ZodNullable<z.ZodString>;
1081
+ status: z.ZodEnum<{
1082
+ completed: "completed";
1083
+ active: "active";
1084
+ rejected: "rejected";
1085
+ abandoned: "abandoned";
1086
+ }>;
1087
+ approvalStatus: z.ZodEnum<{
1088
+ pending: "pending";
1089
+ not_required: "not_required";
1090
+ approved: "approved";
1091
+ rejected_by_org_admin: "rejected_by_org_admin";
1092
+ }>;
1093
+ itemCount: z.ZodNumber;
1094
+ total: z.ZodObject<{
1095
+ amount: z.ZodNumber;
1096
+ currency: z.ZodString;
1097
+ }, z.core.$strip>;
1098
+ appliedPromotionCode: z.ZodNullable<z.ZodString>;
1099
+ lastActivityAt: z.ZodString;
1100
+ createdAt: z.ZodString;
1101
+ items: z.ZodArray<z.ZodObject<{
1102
+ id: z.ZodString;
1103
+ productId: z.ZodString;
1104
+ productName: z.ZodString;
1105
+ variantId: z.ZodNullable<z.ZodString>;
1106
+ quantity: z.ZodNumber;
1107
+ unitPrice: z.ZodObject<{
1108
+ amount: z.ZodNumber;
1109
+ currency: z.ZodString;
1110
+ }, z.core.$strip>;
1111
+ lineTotal: z.ZodObject<{
1112
+ amount: z.ZodNumber;
1113
+ currency: z.ZodString;
1114
+ }, z.core.$strip>;
1115
+ }, z.core.$strip>>;
1116
+ discount: z.ZodNullable<z.ZodObject<{
1117
+ code: z.ZodNullable<z.ZodString>;
1118
+ amount: z.ZodNumber;
1119
+ currency: z.ZodString;
1120
+ }, z.core.$strip>>;
1121
+ convertedToQuoteRequestId: z.ZodNullable<z.ZodString>;
1122
+ submittedForApprovalAt: z.ZodNullable<z.ZodString>;
1123
+ approvedAt: z.ZodNullable<z.ZodString>;
1124
+ approvedByCustomerAccountId: z.ZodNullable<z.ZodString>;
1125
+ rejectedAt: z.ZodNullable<z.ZodString>;
1126
+ rejectedByActor: z.ZodNullable<z.ZodString>;
1127
+ rejectedReason: z.ZodNullable<z.ZodString>;
1128
+ }, z.core.$strip>;
1129
+ }, z.core.$strip>;
1130
+ export type AdminCartDetailResponse = z.infer<typeof adminCartDetailResponseSchema>;
1131
+ export declare const adminCartAuditEntrySchema: z.ZodObject<{
1132
+ id: z.ZodString;
1133
+ occurredAt: z.ZodString;
1134
+ actorType: z.ZodEnum<{
1135
+ customer: "customer";
1136
+ system: "system";
1137
+ org_admin: "org_admin";
1138
+ platform_admin: "platform_admin";
1139
+ sweep: "sweep";
1140
+ }>;
1141
+ actorId: z.ZodNullable<z.ZodString>;
1142
+ actorDisplayName: z.ZodNullable<z.ZodString>;
1143
+ action: z.ZodString;
1144
+ fromState: z.ZodNullable<z.ZodString>;
1145
+ toState: z.ZodNullable<z.ZodString>;
1146
+ reason: z.ZodNullable<z.ZodString>;
1147
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1148
+ }, z.core.$strip>;
1149
+ export type AdminCartAuditEntry = z.infer<typeof adminCartAuditEntrySchema>;
1150
+ export declare const adminCartAuditResponseSchema: z.ZodObject<{
1151
+ data: z.ZodArray<z.ZodObject<{
1152
+ id: z.ZodString;
1153
+ occurredAt: z.ZodString;
1154
+ actorType: z.ZodEnum<{
1155
+ customer: "customer";
1156
+ system: "system";
1157
+ org_admin: "org_admin";
1158
+ platform_admin: "platform_admin";
1159
+ sweep: "sweep";
1160
+ }>;
1161
+ actorId: z.ZodNullable<z.ZodString>;
1162
+ actorDisplayName: z.ZodNullable<z.ZodString>;
1163
+ action: z.ZodString;
1164
+ fromState: z.ZodNullable<z.ZodString>;
1165
+ toState: z.ZodNullable<z.ZodString>;
1166
+ reason: z.ZodNullable<z.ZodString>;
1167
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1168
+ }, z.core.$strip>>;
1169
+ meta: z.ZodObject<{
1170
+ page: z.ZodNumber;
1171
+ pageSize: z.ZodNumber;
1172
+ totalCount: z.ZodNumber;
1173
+ }, z.core.$strip>;
1174
+ }, z.core.$strip>;
1175
+ export type AdminCartAuditResponse = z.infer<typeof adminCartAuditResponseSchema>;
1176
+ export declare const adminRejectCartSchema: z.ZodObject<{
1177
+ reason: z.ZodString;
1178
+ }, z.core.$strip>;
1179
+ export type AdminRejectCart = z.infer<typeof adminRejectCartSchema>;
1180
+ /** Who a cart belongs to. `organizationId` is null for a guest-style account. */
1181
+ export interface CartCustomerContext {
1182
+ customerAccountId: string;
1183
+ /**
1184
+ * Feature 026 US2 — null for guest-style customer accounts that have no
1185
+ * organisation. Carts persist `organization_id` nullable, so either case is
1186
+ * valid; a no-org cart falls back to platform-default prices.
1187
+ */
1188
+ organizationId: string | null;
1189
+ }
1190
+ /**
1191
+ * A cart as it crosses a module boundary — a plain shape, never the ORM entity
1192
+ * (FR-011). `version` travels because it is the optimistic-lock token a caller
1193
+ * has to pass back on a versioned write.
1194
+ */
1195
+ export interface CartRecord {
1196
+ id: string;
1197
+ customerAccountId: string | null;
1198
+ organizationId: string | null;
1199
+ anonymousCartToken: string | null;
1200
+ salesChannelId: string | null;
1201
+ status: CartStatus;
1202
+ approvalStatus: CartApprovalStatus;
1203
+ submittedForApprovalAt: Date | null;
1204
+ approvedAt: Date | null;
1205
+ approvedByCustomerAccountId: string | null;
1206
+ rejectedAt: Date | null;
1207
+ rejectedByActor: string | null;
1208
+ rejectedReason: string | null;
1209
+ appliedPromotionCode: string | null;
1210
+ convertedToQuoteRequestId: string | null;
1211
+ abandonmentNotifiedAt: Date | null;
1212
+ lastActivityAt: Date;
1213
+ version: number;
1214
+ createdAt: Date;
1215
+ updatedAt: Date;
1216
+ }
1217
+ /**
1218
+ * One cart line. The money columns stay strings — `decimal`, and the checkout
1219
+ * that reads them turns them into order lines verbatim.
1220
+ */
1221
+ export interface CartItemRecord {
1222
+ id: string;
1223
+ cartId: string;
1224
+ productId: string;
1225
+ variantId: string | null;
1226
+ quantity: number;
1227
+ unitPrice: string;
1228
+ currency: string;
1229
+ recomputedUnitPrice: string | null;
1230
+ recomputedAt: Date | null;
1231
+ recomputedCurrency: string | null;
1232
+ packagingUnitId: string | null;
1233
+ packagingUnitName: string | null;
1234
+ packagingUnitBaseQuantity: number | null;
1235
+ createdAt: Date;
1236
+ updatedAt: Date;
1237
+ }
1238
+ /** A cart with its lines — the unit every consumer actually wants. */
1239
+ export interface CartWithItems {
1240
+ cart: CartRecord;
1241
+ items: CartItemRecord[];
1242
+ }
1243
+ /** One line to seed a cart with. */
1244
+ export interface CartSeedLine {
1245
+ productId: string;
1246
+ variantId?: string | null;
1247
+ quantity: number;
1248
+ unitPrice: string;
1249
+ currency: string;
1250
+ }
1251
+ /**
1252
+ * Container name: `cartReadPort`. Owner: `carts`.
1253
+ *
1254
+ * `orders` and `quote_requests` both ask the same question at checkout and at
1255
+ * quote conversion: what is this customer's active cart, and what is on it?
1256
+ * Six sites spell it as `em.findOne(Cart, { …, status: 'active' })` followed
1257
+ * by `em.find(CartItem, { cartId })`, which is two round trips and one place
1258
+ * to forget the status filter.
1259
+ *
1260
+ * **The escalation is settled and the consumer is written down** (feature 080,
1261
+ * T048; D-169). This doc block used to say the port had none, and asked whoever
1262
+ * settled the question to retire it or name one here.
1263
+ *
1264
+ * The question was: `orders` reads the cart inside `em.transactional` and ends
1265
+ * by clearing it and marking it `completed`, with
1266
+ * `test/integration/orders/place-order-failure-preserves-cart.test.ts`
1267
+ * asserting that a failed placement leaves the basket intact — and a read
1268
+ * through *this* port runs on the owner's own `EntityManager`, outside that
1269
+ * transaction, so it could not serve that site. The answer is that there are
1270
+ * **two** questions and they take two ports. The completion, and the read that
1271
+ * belongs to it, moved into `carts` as `CartPlacementApplyPort` — declared in
1272
+ * that module's own `ports/` directory rather than here, because both of its
1273
+ * methods take the caller's `EntityManager` and FR-034 keeps a MikroORM type
1274
+ * out of a package `admin` and `storefront` both compile.
1275
+ *
1276
+ * What is left for this port is the read that never had a transaction:
1277
+ * `orders`' storefront **total preview**, which opens none and is its consumer
1278
+ * today. That split is D-169's rule rather than a preference — a read handed an
1279
+ * `EntityManager` is a write seam re-opened to serve a read — and it is why the
1280
+ * two ports exist side by side instead of one widening to cover both.
1281
+ *
1282
+ * When `carts` is off the read fails closed, which is right: a checkout that
1283
+ * cannot see the cart must refuse rather than place an empty order.
1284
+ *
1285
+ * Whether `carts` has an off state at all is its manifest's `activation` to
1286
+ * say, not this line's: a module declaring `nonDeactivatable` never enters one.
1287
+ */
1288
+ export interface CartReadPort {
1289
+ findActiveForCustomer(ctx: CartCustomerContext): Promise<CartWithItems | null>;
1290
+ findById(cartId: string): Promise<CartWithItems | null>;
1291
+ }
1292
+ /**
1293
+ * Container name: `cartWritePort`. Owner: `carts`.
1294
+ *
1295
+ * (It said `cartService` until feature 075's `quick_order` cut resolved it and
1296
+ * found the name taken: `carts/backend.ts` registers `cartService` for the
1297
+ * `CartService` **class**, which still hands `Cart` and `CartItem` entities
1298
+ * across, and `cartWritePort` for this adapter. A consumer copying the wrong
1299
+ * name out of this comment gets the class, and only `tsc` stops it.)
1300
+ *
1301
+ * The write surface `orders`, `quick_order` and `shopping_lists` reach today.
1302
+ * `replaceItemsForCustomer` is the one addition: `orders`' reorder and
1303
+ * `quote_requests`' quote-to-cart conversion both create a cart with
1304
+ * `em.create(Cart, …)` and then hand-build `CartItem` rows — two modules
1305
+ * writing another module's two tables, with the clear-then-seed rule spelled
1306
+ * out twice and the `lastActivityAt` bookkeeping in neither.
1307
+ *
1308
+ * **Owner off:** the seam fails closed — resolving this port throws
1309
+ * `ModuleDisabledError` and the call answers 503 `MODULE_DISABLED`, so nothing
1310
+ * half-executes. Whether `carts` has an off state at all is its manifest's
1311
+ * `activation` to say, not this line's: a module declaring
1312
+ * `nonDeactivatable` never enters one.
1313
+ */
1314
+ export interface CartWritePort {
1315
+ getOrCreateForCustomer(ctx: CartCustomerContext): Promise<CartRecord>;
1316
+ addItem(actor: {
1317
+ customer?: CartCustomerContext;
1318
+ anonymousToken?: string;
1319
+ }, input: {
1320
+ productId: string;
1321
+ variantId?: string;
1322
+ quantity: number;
1323
+ packagingUnitId?: string;
1324
+ }): Promise<CartWithItems>;
1325
+ clearForCustomer(ctx: CartCustomerContext): Promise<void>;
1326
+ /**
1327
+ * Clear the customer's active cart and seed it with these lines, creating
1328
+ * the cart when there is none. The single-active-cart model admin
1329
+ * order-create, reorder and RFQ conversion all assume.
1330
+ */
1331
+ replaceItemsForCustomer(ctx: CartCustomerContext, lines: readonly CartSeedLine[]): Promise<CartWithItems>;
1332
+ }
1333
+ export interface CartItemView {
1334
+ productId: string;
1335
+ variantId: string | null;
1336
+ quantity: number;
1337
+ unitPrice: string;
1338
+ currency: string;
1339
+ }
1340
+ export interface CartView {
1341
+ id: string;
1342
+ status: string;
1343
+ lastActivityAt: string | null;
1344
+ items: CartItemView[];
1345
+ }
1346
+ export interface CustomerCartsView {
1347
+ current: CartView | null;
1348
+ abandoned: CartView[];
1349
+ }
1350
+ /**
1351
+ * Container name: `cartQueryPort`. Owner: `carts`.
1352
+ *
1353
+ * The customer-detail panels in `customers` (feature 040, US5 / FR-030,
1354
+ * FR-031): the account's current cart and its abandoned ones. A reporting
1355
+ * read, deliberately separate from {@link CartReadPort}, which is the
1356
+ * transactional one.
1357
+ *
1358
+ * **Owner off:** the seam fails closed — resolving this port throws
1359
+ * `ModuleDisabledError` and the call answers 503 `MODULE_DISABLED`, so nothing
1360
+ * half-executes. Whether `carts` has an off state at all is its manifest's
1361
+ * `activation` to say, not this line's: a module declaring
1362
+ * `nonDeactivatable` never enters one.
1363
+ */
1364
+ export interface CartQueryPort {
1365
+ listForCustomer(customerAccountId: string): Promise<CustomerCartsView>;
1366
+ }
1367
+ //# sourceMappingURL=carts.d.ts.map