@sixtyninecommerce/admin 0.10.0 → 0.12.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 (302) hide show
  1. package/README.md +5772 -118
  2. package/dist/auth/index.d.ts +7 -1
  3. package/dist/auth/index.js +8 -1
  4. package/dist/catalog/assets.d.ts +120 -8
  5. package/dist/catalog/assets.js +98 -12
  6. package/dist/catalog/collections.d.ts +279 -14
  7. package/dist/catalog/collections.js +246 -15
  8. package/dist/catalog/documents.d.ts +142 -0
  9. package/dist/catalog/documents.js +114 -0
  10. package/dist/catalog/index.d.ts +54 -6
  11. package/dist/catalog/index.js +10 -1
  12. package/dist/catalog/metadata.d.ts +244 -0
  13. package/dist/catalog/metadata.js +220 -0
  14. package/dist/catalog/products.d.ts +159 -19
  15. package/dist/catalog/products.js +88 -13
  16. package/dist/catalog/properties.d.ts +140 -14
  17. package/dist/catalog/properties.js +65 -1
  18. package/dist/catalog/recommendations.d.ts +288 -0
  19. package/dist/catalog/recommendations.js +237 -0
  20. package/dist/catalog/reviews.d.ts +381 -0
  21. package/dist/catalog/reviews.js +325 -0
  22. package/dist/catalog/types.d.ts +17 -1
  23. package/dist/catalog/types.js +10 -0
  24. package/dist/catalog/variant-find.d.ts +136 -0
  25. package/dist/catalog/variant-find.js +239 -0
  26. package/dist/catalog/variants.d.ts +293 -26
  27. package/dist/catalog/variants.js +164 -7
  28. package/dist/catalog/visibility.d.ts +38 -7
  29. package/dist/catalog/visibility.js +19 -1
  30. package/dist/client.d.ts +121 -9
  31. package/dist/client.js +53 -14
  32. package/dist/content/assets.d.ts +285 -0
  33. package/dist/content/assets.js +181 -0
  34. package/dist/content/forms.d.ts +332 -1
  35. package/dist/content/forms.js +140 -4
  36. package/dist/content/items.d.ts +292 -0
  37. package/dist/content/items.js +170 -0
  38. package/dist/content/menus.d.ts +254 -0
  39. package/dist/content/menus.js +70 -0
  40. package/dist/content/strings.d.ts +137 -0
  41. package/dist/content/strings.js +82 -0
  42. package/dist/content/types.d.ts +282 -0
  43. package/dist/content/types.js +100 -0
  44. package/dist/customers/age-verification.d.ts +66 -0
  45. package/dist/customers/age-verification.js +79 -0
  46. package/dist/customers/credit.d.ts +263 -0
  47. package/dist/customers/credit.js +244 -0
  48. package/dist/customers/delivery-preferences.d.ts +120 -0
  49. package/dist/customers/delivery-preferences.js +97 -0
  50. package/dist/customers/delivery-terms.d.ts +44 -0
  51. package/dist/customers/delivery-terms.js +32 -0
  52. package/dist/customers/groups.d.ts +207 -0
  53. package/dist/customers/groups.js +438 -0
  54. package/dist/customers/index.d.ts +462 -37
  55. package/dist/customers/index.js +317 -40
  56. package/dist/customers/invitation-status.d.ts +57 -0
  57. package/dist/customers/invitation-status.js +21 -0
  58. package/dist/customers/notes.d.ts +67 -0
  59. package/dist/customers/notes.js +51 -0
  60. package/dist/customers/notification-recipients.d.ts +97 -0
  61. package/dist/customers/notification-recipients.js +84 -0
  62. package/dist/customers/saved-lists.d.ts +42 -0
  63. package/dist/customers/saved-lists.js +61 -0
  64. package/dist/customers/vat.d.ts +83 -0
  65. package/dist/customers/vat.js +46 -0
  66. package/dist/customers/wire.d.ts +20 -0
  67. package/dist/customers/wire.js +35 -0
  68. package/dist/documents/ar.d.ts +307 -0
  69. package/dist/documents/ar.js +254 -0
  70. package/dist/documents/emails.d.ts +150 -0
  71. package/dist/documents/emails.js +220 -0
  72. package/dist/documents/index.d.ts +744 -21
  73. package/dist/documents/index.js +438 -24
  74. package/dist/documents/pdf.d.ts +2 -0
  75. package/dist/documents/pdf.js +11 -0
  76. package/dist/fulfillments/create.d.ts +167 -0
  77. package/dist/fulfillments/create.js +216 -0
  78. package/dist/fulfillments/index.d.ts +163 -11
  79. package/dist/fulfillments/index.js +135 -6
  80. package/dist/fulfillments/payment-policy.d.ts +64 -0
  81. package/dist/fulfillments/payment-policy.js +140 -0
  82. package/dist/fulfillments/warehouse.d.ts +724 -0
  83. package/dist/fulfillments/warehouse.js +914 -0
  84. package/dist/geo/index.d.ts +119 -0
  85. package/dist/geo/index.js +107 -0
  86. package/dist/index.d.ts +147 -39
  87. package/dist/index.js +51 -12
  88. package/dist/integrations/afas-actions.d.ts +234 -0
  89. package/dist/integrations/afas-actions.js +310 -0
  90. package/dist/integrations/afas-types.d.ts +483 -0
  91. package/dist/integrations/afas-types.js +5 -0
  92. package/dist/integrations/afas.d.ts +234 -0
  93. package/dist/integrations/afas.js +290 -0
  94. package/dist/integrations/connections.d.ts +103 -0
  95. package/dist/integrations/connections.js +55 -0
  96. package/dist/integrations/esp.d.ts +313 -0
  97. package/dist/integrations/esp.js +169 -0
  98. package/dist/integrations/exact-online-types.d.ts +965 -0
  99. package/dist/integrations/exact-online-types.js +6 -0
  100. package/dist/integrations/exact-online.d.ts +784 -0
  101. package/dist/integrations/exact-online.js +1089 -0
  102. package/dist/integrations/index.d.ts +44 -3
  103. package/dist/integrations/index.js +23 -3
  104. package/dist/integrations/pipeline-discoveries.d.ts +65 -0
  105. package/dist/integrations/pipeline-discoveries.js +65 -0
  106. package/dist/integrations/pipeline-keys.d.ts +13 -0
  107. package/dist/integrations/pipeline-keys.js +22 -0
  108. package/dist/integrations/pipeline-runs.d.ts +119 -0
  109. package/dist/integrations/pipeline-runs.js +87 -0
  110. package/dist/integrations/pipelines.d.ts +87 -15
  111. package/dist/integrations/pipelines.js +41 -22
  112. package/dist/integrations/price-import.d.ts +223 -0
  113. package/dist/integrations/price-import.js +124 -0
  114. package/dist/integrations/types.d.ts +367 -3
  115. package/dist/integrations/types.js +4 -3
  116. package/dist/locations/index.d.ts +66 -0
  117. package/dist/locations/index.js +31 -0
  118. package/dist/meta/index.d.ts +172 -0
  119. package/dist/metafields/index.d.ts +8 -1
  120. package/dist/metafields/index.js +10 -0
  121. package/dist/orders/cancel-with-money.d.ts +237 -0
  122. package/dist/orders/cancel-with-money.js +155 -0
  123. package/dist/orders/commit-edit.d.ts +23 -1
  124. package/dist/orders/commit-edit.js +19 -2
  125. package/dist/orders/deposit-policy.d.ts +3 -1
  126. package/dist/orders/drafts.d.ts +800 -0
  127. package/dist/orders/drafts.js +771 -0
  128. package/dist/orders/fields.d.ts +245 -0
  129. package/dist/orders/fields.js +188 -0
  130. package/dist/orders/get.d.ts +29 -19
  131. package/dist/orders/get.js +17 -8
  132. package/dist/orders/index.d.ts +66 -15
  133. package/dist/orders/index.js +25 -2
  134. package/dist/orders/lifecycle.d.ts +128 -0
  135. package/dist/orders/lifecycle.js +158 -0
  136. package/dist/orders/line-price-preview.d.ts +7 -2
  137. package/dist/orders/list.d.ts +243 -0
  138. package/dist/orders/list.js +487 -0
  139. package/dist/orders/manual-discounts.d.ts +13 -5
  140. package/dist/orders/manual-pricing.d.ts +5 -0
  141. package/dist/orders/money-view.d.ts +149 -0
  142. package/dist/orders/money-view.js +99 -0
  143. package/dist/orders/order-entry.d.ts +20 -7
  144. package/dist/orders/plan-edit.d.ts +34 -2
  145. package/dist/orders/plan-edit.js +112 -11
  146. package/dist/orders/settings.d.ts +201 -0
  147. package/dist/orders/settings.js +325 -0
  148. package/dist/orders/status.d.ts +159 -13
  149. package/dist/orders/status.js +21 -0
  150. package/dist/orders/surcharges.d.ts +20 -1
  151. package/dist/orders/surcharges.js +37 -11
  152. package/dist/payments/account-credit.d.ts +46 -0
  153. package/dist/payments/account-credit.js +42 -0
  154. package/dist/payments/ar.d.ts +292 -0
  155. package/dist/payments/ar.js +223 -0
  156. package/dist/payments/connected-account.d.ts +47 -0
  157. package/dist/payments/connected-account.js +61 -0
  158. package/dist/payments/credit-noted-fields.d.ts +19 -0
  159. package/dist/payments/credit-noted-fields.js +69 -0
  160. package/dist/payments/customer-consent.d.ts +30 -0
  161. package/dist/payments/customer-consent.js +49 -0
  162. package/dist/payments/index.d.ts +340 -19
  163. package/dist/payments/index.js +151 -1
  164. package/dist/payments/methods.d.ts +303 -8
  165. package/dist/payments/methods.js +337 -7
  166. package/dist/payments/mollie-methods.d.ts +159 -0
  167. package/dist/payments/mollie-methods.js +141 -0
  168. package/dist/payments/payment-links.d.ts +180 -0
  169. package/dist/payments/payment-links.js +97 -0
  170. package/dist/payments/provider-keys.d.ts +150 -0
  171. package/dist/payments/provider-keys.js +118 -0
  172. package/dist/payments/providers.d.ts +86 -11
  173. package/dist/payments/providers.js +29 -0
  174. package/dist/payments/requests.d.ts +147 -0
  175. package/dist/payments/requests.js +93 -0
  176. package/dist/payments/store-credit-fields.d.ts +15 -0
  177. package/dist/payments/store-credit-fields.js +51 -0
  178. package/dist/pickups/index.d.ts +106 -0
  179. package/dist/pickups/index.js +108 -0
  180. package/dist/platform/channels.d.ts +132 -0
  181. package/dist/platform/channels.js +128 -0
  182. package/dist/platform/email-gateways.d.ts +165 -0
  183. package/dist/platform/email-gateways.js +78 -0
  184. package/dist/platform/geo.d.ts +123 -0
  185. package/dist/platform/geo.js +144 -0
  186. package/dist/platform/tax.d.ts +162 -0
  187. package/dist/platform/tax.js +169 -0
  188. package/dist/pos/anomalies.d.ts +158 -0
  189. package/dist/pos/anomalies.js +64 -0
  190. package/dist/pos/assisted-selling.d.ts +79 -0
  191. package/dist/pos/assisted-selling.js +38 -0
  192. package/dist/pos/exchanges.d.ts +108 -0
  193. package/dist/pos/exchanges.js +22 -0
  194. package/dist/pos/gift-cards.d.ts +135 -0
  195. package/dist/pos/gift-cards.js +47 -0
  196. package/dist/pos/index.d.ts +2370 -58
  197. package/dist/pos/index.js +854 -7
  198. package/dist/pos/no-receipt.d.ts +94 -0
  199. package/dist/pos/no-receipt.js +25 -0
  200. package/dist/pos/offline-sales.d.ts +228 -0
  201. package/dist/pos/offline-sales.js +170 -0
  202. package/dist/pos/pay-by-link.d.ts +143 -0
  203. package/dist/pos/pay-by-link.js +57 -0
  204. package/dist/pos/quick-keys.d.ts +103 -0
  205. package/dist/pos/quick-keys.js +45 -0
  206. package/dist/pos/reports.d.ts +360 -0
  207. package/dist/pos/reports.js +62 -0
  208. package/dist/pos/returns.d.ts +244 -0
  209. package/dist/pos/returns.js +83 -0
  210. package/dist/pricing/bulk-coupons.d.ts +139 -0
  211. package/dist/pricing/bulk-coupons.js +112 -0
  212. package/dist/pricing/index.d.ts +174 -4
  213. package/dist/pricing/index.js +174 -1
  214. package/dist/pricing/price-lists.d.ts +606 -0
  215. package/dist/pricing/price-lists.js +600 -0
  216. package/dist/purchasing/alerts.d.ts +104 -0
  217. package/dist/purchasing/alerts.js +88 -0
  218. package/dist/purchasing/backorders.d.ts +61 -0
  219. package/dist/purchasing/backorders.js +92 -0
  220. package/dist/purchasing/cost.d.ts +110 -0
  221. package/dist/purchasing/cost.js +86 -0
  222. package/dist/purchasing/index.d.ts +54 -0
  223. package/dist/purchasing/index.js +24 -0
  224. package/dist/purchasing/links.d.ts +263 -0
  225. package/dist/purchasing/links.js +192 -0
  226. package/dist/purchasing/purchase-orders.d.ts +551 -0
  227. package/dist/purchasing/purchase-orders.js +491 -0
  228. package/dist/purchasing/receipts.d.ts +396 -0
  229. package/dist/purchasing/receipts.js +287 -0
  230. package/dist/purchasing/replenishment.d.ts +281 -0
  231. package/dist/purchasing/replenishment.js +240 -0
  232. package/dist/purchasing/returns.d.ts +273 -0
  233. package/dist/purchasing/returns.js +229 -0
  234. package/dist/purchasing/settings.d.ts +152 -0
  235. package/dist/purchasing/settings.js +181 -0
  236. package/dist/purchasing/suppliers.d.ts +476 -0
  237. package/dist/purchasing/suppliers.js +438 -0
  238. package/dist/quotes/index.d.ts +518 -0
  239. package/dist/quotes/index.js +439 -0
  240. package/dist/reports/index.d.ts +71 -8
  241. package/dist/reports/index.js +74 -11
  242. package/dist/returns/index.d.ts +675 -21
  243. package/dist/returns/index.js +756 -11
  244. package/dist/search/index.d.ts +76 -1
  245. package/dist/search/index.js +63 -0
  246. package/dist/seo/config.d.ts +128 -0
  247. package/dist/seo/config.js +95 -0
  248. package/dist/seo/redirects.d.ts +125 -0
  249. package/dist/seo/redirects.js +60 -1
  250. package/dist/seo/settings.d.ts +147 -0
  251. package/dist/seo/settings.js +209 -0
  252. package/dist/shipping/definitions.d.ts +29 -0
  253. package/dist/shipping/definitions.js +47 -0
  254. package/dist/shipping/fulfillment-profiles.d.ts +174 -0
  255. package/dist/shipping/fulfillment-profiles.js +104 -0
  256. package/dist/shipping/hendriks.d.ts +97 -0
  257. package/dist/shipping/hendriks.js +50 -0
  258. package/dist/shipping/index.d.ts +54 -0
  259. package/dist/shipping/index.js +27 -0
  260. package/dist/shipping/methods.d.ts +205 -0
  261. package/dist/shipping/methods.js +240 -0
  262. package/dist/shipping/myparcel.d.ts +668 -0
  263. package/dist/shipping/myparcel.js +466 -0
  264. package/dist/shipping/parcel-count-suggestion.d.ts +2 -0
  265. package/dist/shipping/parcel-rule.d.ts +6 -5
  266. package/dist/shipping/parcel-rule.js +21 -23
  267. package/dist/shipping/rate-tables.d.ts +324 -0
  268. package/dist/shipping/rate-tables.js +390 -0
  269. package/dist/shipping/ship-to-countries.d.ts +75 -0
  270. package/dist/shipping/ship-to-countries.js +47 -0
  271. package/dist/stock/by-location.d.ts +86 -0
  272. package/dist/stock/by-location.js +94 -0
  273. package/dist/stock/index.d.ts +18 -4
  274. package/dist/stock/index.js +7 -0
  275. package/dist/stock/locations.d.ts +144 -0
  276. package/dist/stock/locations.js +168 -0
  277. package/dist/stock/settings.d.ts +106 -0
  278. package/dist/stock/settings.js +103 -0
  279. package/dist/stock/transfers.d.ts +386 -52
  280. package/dist/stock/transfers.js +222 -17
  281. package/dist/stored-value/index.d.ts +312 -11
  282. package/dist/stored-value/index.js +223 -4
  283. package/dist/subscriptions/index.d.ts +682 -0
  284. package/dist/subscriptions/index.js +815 -0
  285. package/dist/tax/display-policy.d.ts +105 -0
  286. package/dist/tax/display-policy.js +84 -0
  287. package/dist/tax/index.d.ts +79 -1
  288. package/dist/tax/index.js +52 -0
  289. package/dist/tenant/email-style.d.ts +102 -0
  290. package/dist/tenant/email-style.js +72 -0
  291. package/dist/tenant/email-templates.d.ts +287 -0
  292. package/dist/tenant/email-templates.js +271 -0
  293. package/dist/tenant/notifications.d.ts +23 -17
  294. package/dist/tenant/settings-sources.d.ts +1 -1
  295. package/dist/tenant/time-zone.d.ts +17 -0
  296. package/dist/tenant/time-zone.js +11 -0
  297. package/dist/types.d.ts +50 -3
  298. package/dist/users/index.d.ts +3 -0
  299. package/dist/users/index.js +2 -0
  300. package/dist/users/warehouses.d.ts +50 -0
  301. package/dist/users/warehouses.js +51 -0
  302. package/package.json +2 -2
@@ -0,0 +1,965 @@
1
+ /**
2
+ * The shapes of `admin.integrations.exactOnline` (headless W10-55): the store's Exact Online
3
+ * connection, its settings, the read-only structure probes of the connected division, and the
4
+ * calls-per-day estimate of a sync schedule.
5
+ */
6
+ /** When an order auto-pushes to Exact, by lifecycle event (`off`: never). */
7
+ export type ExactAutoPushTrigger = 'off' | 'placed' | 'paid' | 'fulfilled';
8
+ export interface ExactAutoPushRule {
9
+ customerGroupId: string;
10
+ trigger: ExactAutoPushTrigger;
11
+ }
12
+ /** The store's automatic order push, per customer group: the first rule naming a group wins. */
13
+ export interface ExactAutoPushConfig {
14
+ /** Master switch: off, nothing auto-pushes whatever the rules say. */
15
+ enabled: boolean;
16
+ /** The trigger of a customer no rule names. */
17
+ defaultTrigger: ExactAutoPushTrigger;
18
+ rules: ExactAutoPushRule[];
19
+ }
20
+ /** Inbound account filter: sales accounts only, or every account. */
21
+ export type ExactCustomerAccountFilter = 'sales' | 'all';
22
+ /** Which side wins when a customer differs between Exact and the platform. */
23
+ export type ExactCustomerOverwritePolicy = 'exact-authoritative' | 'last-writer-wins';
24
+ /** The store's customer sync, both ways. */
25
+ export interface ExactCustomerSyncConfig {
26
+ /** Master switch: off, neither direction runs. */
27
+ enabled: boolean;
28
+ /** Inbound: an Accounts webhook from Exact starts a customer sync. */
29
+ webhookEnabled: boolean;
30
+ /** Outbound: a customer edited here is pushed to its Exact Account. */
31
+ pushEnabled: boolean;
32
+ accountFilter: ExactCustomerAccountFilter;
33
+ overwritePolicy: ExactCustomerOverwritePolicy;
34
+ /** The outbound fields. */
35
+ fields: {
36
+ name: boolean;
37
+ email: boolean;
38
+ address: boolean;
39
+ };
40
+ }
41
+ /** A payment method of the store, mapped to the Exact condition orders paid with it carry. */
42
+ export interface ExactPaymentMethodCondition {
43
+ paymentMethodId: string;
44
+ conditionCode: string;
45
+ }
46
+ /** Exact-owned customer payment terms. */
47
+ export interface ExactPaymentTermsConfig {
48
+ /** The mirrored Exact condition is authoritative for checkout and pay-on-account orders. */
49
+ enabled: boolean;
50
+ /** Mirror Exact's conditions and assignments, without changing checkout or orders. */
51
+ synchronizationEnabled: boolean;
52
+ /** The condition a brand-new Account the platform creates in Exact gets; never an existing one. */
53
+ newAccountPaymentConditionCode: string | null;
54
+ /** Prepaid payment-method overrides, applied when an order's terms are captured. */
55
+ paymentMethodConditions: ExactPaymentMethodCondition[];
56
+ }
57
+ /** Exact-owned customer delivery profiles. */
58
+ export interface ExactDeliveryTermsConfig {
59
+ enabled: boolean;
60
+ synchronizationEnabled: boolean;
61
+ /** Send the buyer's requested delivery day to Exact as the sales order's delivery date. */
62
+ forwardRequestedDeliveryDate: boolean;
63
+ /**
64
+ * Send where a pushed order ships as the sales order's delivery address. Optional here because
65
+ * a save that leaves it out keeps the stored switch; every read carries it.
66
+ */
67
+ sendDeliveryAddress?: boolean;
68
+ /** The defaults below seed only a brand-new Account the platform creates in Exact. */
69
+ newAccountShippingMethodId: string | null;
70
+ newAccountIncotermCode: string | null;
71
+ newAccountIncotermVersion: number | null;
72
+ newAccountIncotermAddress: string | null;
73
+ /** Dispatch lead time in days, not a promised arrival. Zero is valid. */
74
+ newAccountShippingLeadDays: number | null;
75
+ /** Exact's DeliveryAdvice: 0 partial, 1 complete, 2 partial without backorder. */
76
+ newAccountDeliveryAdvice: 0 | 1 | 2 | null;
77
+ }
78
+ /** One scheduled sweep: whether it runs, and the minutes between runs. */
79
+ export interface ExactSyncWindow {
80
+ enabled: boolean;
81
+ intervalMinutes: number;
82
+ }
83
+ /** The store's scheduled Exact → platform sweeps, and the advisory daily call budget. */
84
+ export interface ExactSyncSchedule {
85
+ /** Near-real-time price delta. */
86
+ delta: ExactSyncWindow;
87
+ /** Items, stock, warehouses, shipping methods and pictures: the full reconciler. */
88
+ full: ExactSyncWindow;
89
+ /** Inbound sales orders. */
90
+ order: ExactSyncWindow;
91
+ /** Inbound purchase orders, feeding incoming stock (storefront restock dates). */
92
+ purchaseOrders: ExactSyncWindow;
93
+ /** Prunes incoming stock of purchase orders deleted in Exact (the sweep above never sees one). */
94
+ purchaseOrdersReconcile: ExactSyncWindow;
95
+ /** Accounts and their payment conditions. */
96
+ customers: ExactSyncWindow;
97
+ /** B2B price agreements and named price lists: the integration's heaviest reads. */
98
+ priceLists: ExactSyncWindow;
99
+ /** Advisory only (0: none set); see {@link ExactSyncEstimate.overBudget}. */
100
+ dailyCallBudget: number;
101
+ }
102
+ /**
103
+ * A schedule to save or estimate. `delta`, `full`, `order` and the budget are always sent; a
104
+ * window left out keeps the stored one, an explicit `null` window its default.
105
+ */
106
+ export interface ExactSyncScheduleInput {
107
+ delta: ExactSyncWindow;
108
+ full: ExactSyncWindow;
109
+ order: ExactSyncWindow;
110
+ purchaseOrders?: ExactSyncWindow | null;
111
+ purchaseOrdersReconcile?: ExactSyncWindow | null;
112
+ customers?: ExactSyncWindow | null;
113
+ priceLists?: ExactSyncWindow | null;
114
+ dailyCallBudget: number;
115
+ }
116
+ /** What the catalogue import does with an Exact item that is not a stock item. */
117
+ export type ExactNonStockItemPolicy = 'public' | 'disabled' | 'skip';
118
+ /** What the catalogue import does with an Exact item with no usable sales price. */
119
+ export type ExactUnpricedItemPolicy = 'import' | 'disabled';
120
+ /** The tax basis Exact's prices arrive in: as the store keeps them, net or gross. */
121
+ export type ExactPriceBasis = 'channel' | 'net' | 'gross';
122
+ /** Whether, and how, Exact item pictures become product images. */
123
+ export type ExactPicturePolicy = 'off' | 'fill_missing' | 'exact_owns_featured';
124
+ /** Which Exact stock figure becomes on-hand: In stock, or Free stock (minus reserved). */
125
+ export type ExactStockBasis = 'in_stock' | 'free_stock';
126
+ /**
127
+ * Which Exact items may become publicly visible storefront products. Every read carries the
128
+ * RESOLVED policy: a store that never saved one reads the engine's defaults.
129
+ */
130
+ export interface ExactCatalogueImportPolicy {
131
+ /** Import only items whose Exact `IsWebshopItem` flag is set. */
132
+ requireWebshopFlag: boolean;
133
+ nonStockItems: ExactNonStockItemPolicy;
134
+ unpricedItems: ExactUnpricedItemPolicy;
135
+ priceBasis: ExactPriceBasis;
136
+ pictures: ExactPicturePolicy;
137
+ stockBasis: ExactStockBasis;
138
+ }
139
+ /**
140
+ * A catalogue-policy change, MERGED over the stored policy: a key left out keeps its value, an
141
+ * explicit `null` resets it to the default. Send only the keys that changed.
142
+ */
143
+ export interface ExactCatalogueImportPolicyInput {
144
+ requireWebshopFlag?: boolean | null;
145
+ nonStockItems?: ExactNonStockItemPolicy | null;
146
+ unpricedItems?: ExactUnpricedItemPolicy | null;
147
+ priceBasis?: ExactPriceBasis | null;
148
+ pictures?: ExactPicturePolicy | null;
149
+ stockBasis?: ExactStockBasis | null;
150
+ }
151
+ /**
152
+ * The store's Exact Online connection and settings. The client secret, the webhook secret and
153
+ * the OAuth tokens are write-only: no read returns them in any form.
154
+ */
155
+ export interface ExactOnlineConfig {
156
+ id: string;
157
+ /** The integration's runtime switch (the scheduled sweeps and automatic pushes follow it). */
158
+ enabled: boolean;
159
+ /** An Exact division is connected (OAuth) and its refresh token is held. */
160
+ connected: boolean;
161
+ /** Where the Exact administration lives: `nl`, `be`, `de`, `uk`, `fr`, `es` or `com`. */
162
+ region: string;
163
+ division: string | null;
164
+ companyName: string | null;
165
+ /** The store's own Exact app client id. */
166
+ clientId: string | null;
167
+ /** The store has stored its Exact app's client id AND secret: it can connect. */
168
+ hasCustomCredentials: boolean;
169
+ hasWebhookSecret: boolean;
170
+ lastConnectedAt: string | null;
171
+ lastRefreshedAt: string | null;
172
+ accessTokenExpiresAt: string | null;
173
+ /** The Exact item the shipping-cost line of a pushed sales order is booked on. */
174
+ shippingItemCode: string | null;
175
+ /** The Exact item a pushed order's promotion discount is booked on; null folds it into prices. */
176
+ discountItemCode: string | null;
177
+ /** The Exact item externally priced order lines are booked on. */
178
+ externalLineItemCode: string | null;
179
+ /** A pushed sales order carries the order's surcharges, one line each. */
180
+ pushSurcharges: boolean;
181
+ surchargeItemCode: string | null;
182
+ negativeSurchargeItemCode: string | null;
183
+ /** Advice (never a refusal) when surcharges push while auto-push sends orders early. */
184
+ pushSurchargesWarning: string | null;
185
+ autoPush: ExactAutoPushConfig;
186
+ customerSync: ExactCustomerSyncConfig;
187
+ paymentTerms: ExactPaymentTermsConfig;
188
+ deliveryTerms: ExactDeliveryTermsConfig;
189
+ syncSchedule: ExactSyncSchedule;
190
+ catalogueImportPolicy: ExactCatalogueImportPolicy;
191
+ /** When each sweep was last QUEUED (null: never); how it ended is in the sync log. */
192
+ deltaLastEnqueuedAt: string | null;
193
+ fullLastEnqueuedAt: string | null;
194
+ orderLastEnqueuedAt: string | null;
195
+ purchaseOrderLastEnqueuedAt: string | null;
196
+ purchaseOrderReconcileLastEnqueuedAt: string | null;
197
+ customerLastEnqueuedAt: string | null;
198
+ priceListLastEnqueuedAt: string | null;
199
+ }
200
+ /** A payment-terms section to save; `paymentMethodConditions` left out keeps the stored list. */
201
+ export interface ExactPaymentTermsConfigInput {
202
+ enabled: boolean;
203
+ synchronizationEnabled?: boolean | null;
204
+ newAccountPaymentConditionCode?: string | null;
205
+ paymentMethodConditions?: ExactPaymentMethodCondition[] | null;
206
+ }
207
+ /** A delivery-terms section to save; `sendDeliveryAddress` left out keeps the stored switch. */
208
+ export interface ExactDeliveryTermsConfigInput {
209
+ enabled: boolean;
210
+ synchronizationEnabled?: boolean | null;
211
+ forwardRequestedDeliveryDate?: boolean | null;
212
+ sendDeliveryAddress?: boolean | null;
213
+ newAccountShippingMethodId?: string | null;
214
+ newAccountIncotermCode?: string | null;
215
+ newAccountIncotermVersion?: number | null;
216
+ newAccountIncotermAddress?: string | null;
217
+ newAccountShippingLeadDays?: number | null;
218
+ newAccountDeliveryAdvice?: number | null;
219
+ }
220
+ /**
221
+ * A settings change: every key optional, a key left out keeps the stored value. `autoPush` and
222
+ * `customerSync` replace their whole setting (`null`: the default); `syncSchedule` and
223
+ * `catalogueImportPolicy` merge over the stored one. The OAuth connection and the app
224
+ * credentials have their own methods.
225
+ *
226
+ * `region`, `enabled`, `shippingItemCode`, `discountItemCode`, `paymentTerms` and `deliveryTerms`
227
+ * take no `null` (the engine cannot store one): the SDK refuses it before sending.
228
+ */
229
+ export interface UpdateExactOnlineConfigInput {
230
+ region?: string;
231
+ enabled?: boolean;
232
+ /** Trimmed; blank clears it. */
233
+ shippingItemCode?: string;
234
+ /** Trimmed; blank clears it, folding promotions back into the line prices. */
235
+ discountItemCode?: string;
236
+ /** Trimmed; blank or `null` clears it; over 60 characters is refused `USER_INPUT_ERROR`. */
237
+ externalLineItemCode?: string | null;
238
+ /** `null` restores the default, off. */
239
+ pushSurcharges?: boolean | null;
240
+ /** Trimmed; blank or `null` clears it; over 60 characters is refused `USER_INPUT_ERROR`. */
241
+ surchargeItemCode?: string | null;
242
+ /** Trimmed; blank or `null` clears it; over 60 characters is refused `USER_INPUT_ERROR`. */
243
+ negativeSurchargeItemCode?: string | null;
244
+ autoPush?: ExactAutoPushConfig | null;
245
+ customerSync?: ExactCustomerSyncConfig | null;
246
+ paymentTerms?: ExactPaymentTermsConfigInput;
247
+ deliveryTerms?: ExactDeliveryTermsConfigInput;
248
+ syncSchedule?: ExactSyncScheduleInput | null;
249
+ catalogueImportPolicy?: ExactCatalogueImportPolicyInput | null;
250
+ }
251
+ /** The store's own Exact app, entered before connecting. */
252
+ export interface SetExactOnlineCredentialsInput {
253
+ clientId: string;
254
+ /** Write-only. Left out, or blank, the stored secret stays. */
255
+ clientSecret?: string | null;
256
+ /** Write-only. Left out, or blank, the stored secret stays. */
257
+ webhookSecret?: string | null;
258
+ }
259
+ /** One CRM Account of the connected division, read live. */
260
+ export interface ExactOnlineAccountPreview {
261
+ id: string;
262
+ code: string | null;
263
+ name: string | null;
264
+ city: string | null;
265
+ country: string | null;
266
+ email: string | null;
267
+ status: string | null;
268
+ }
269
+ /** One logistics Item of the connected division, read live. */
270
+ export interface ExactOnlineItemPreview {
271
+ id: string;
272
+ code: string | null;
273
+ description: string | null;
274
+ isSalesItem: boolean | null;
275
+ isStockItem: boolean | null;
276
+ }
277
+ export interface ExactItemGroupStat {
278
+ code: string | null;
279
+ description: string | null;
280
+ itemCount: number;
281
+ }
282
+ export interface ExactClassFieldStat {
283
+ field: string;
284
+ nonEmptyCount: number;
285
+ distinctCount: number;
286
+ }
287
+ export interface ExactCatalogueRow {
288
+ code: string | null;
289
+ description: string | null;
290
+ itemGroup: string | null;
291
+ }
292
+ /** How the division's items group, for designing the item → product grouping rule. */
293
+ export interface ExactCatalogueStructure {
294
+ sampledCount: number;
295
+ distinctItemGroupCount: number;
296
+ topItemGroups: ExactItemGroupStat[];
297
+ classFields: ExactClassFieldStat[];
298
+ rows: ExactCatalogueRow[];
299
+ }
300
+ export interface ExactClassificationValueStat {
301
+ id: string;
302
+ code: string | null;
303
+ description: string | null;
304
+ accountCount: number;
305
+ }
306
+ export interface ExactClassificationDimension {
307
+ sequence: number;
308
+ name: string;
309
+ slotField: string;
310
+ populatedCount: number;
311
+ distinctCount: number;
312
+ values: ExactClassificationValueStat[];
313
+ }
314
+ export interface ExactPriceListStat {
315
+ id: string;
316
+ code: string | null;
317
+ description: string | null;
318
+ accountCount: number;
319
+ }
320
+ export interface ExactAccountRow {
321
+ code: string | null;
322
+ name: string | null;
323
+ email: string | null;
324
+ city: string | null;
325
+ country: string | null;
326
+ isReseller: boolean;
327
+ classifications: string[];
328
+ priceList: string | null;
329
+ }
330
+ /** How the division's Accounts group, for designing the Account → customer group mapping. */
331
+ export interface ExactAccountStructure {
332
+ sampledCount: number;
333
+ withEmail: number;
334
+ withoutEmail: number;
335
+ withAddress: number;
336
+ resellerCount: number;
337
+ dimensions: ExactClassificationDimension[];
338
+ priceLists: ExactPriceListStat[];
339
+ rows: ExactAccountRow[];
340
+ }
341
+ export interface ExactPriceListInfo {
342
+ id: string;
343
+ code: string | null;
344
+ description: string | null;
345
+ currency: string | null;
346
+ }
347
+ export interface ExactPriceListItemSample {
348
+ itemCode: string | null;
349
+ itemDescription: string | null;
350
+ quantity: number | null;
351
+ newPrice: number | null;
352
+ discount: number | null;
353
+ entryMethod: number | null;
354
+ /** `set`: the list defines its own base price for the item; `standard`: the item's own. */
355
+ basePrice: 'set' | 'standard';
356
+ }
357
+ export interface ExactCustomerPriceSample {
358
+ itemCode: string | null;
359
+ accountName: string | null;
360
+ price: number | null;
361
+ quantity: number | null;
362
+ currency: string | null;
363
+ }
364
+ /** Named price lists against per-customer item prices in the division. */
365
+ export interface ExactPricingStructure {
366
+ priceLists: ExactPriceListInfo[];
367
+ priceListItemPriceCount: number;
368
+ priceListItemSamples: ExactPriceListItemSample[];
369
+ accountsWithDefaultPriceList: number;
370
+ customerPriceCount: number;
371
+ customerPriceDistinctAccounts: number;
372
+ customerPriceDistinctItems: number;
373
+ customerPriceSamples: ExactCustomerPriceSample[];
374
+ sampled: boolean;
375
+ }
376
+ /** One Exact webhook subscription live for the store. */
377
+ export interface ExactWebhookSubscription {
378
+ topic: string;
379
+ subscriptionId: string | null;
380
+ callbackUrl: string | null;
381
+ }
382
+ /** The store's Exact webhook subscriptions, read live. */
383
+ export interface ExactWebhookStatus {
384
+ /** A webhook secret is stored: real-time webhooks are possible. */
385
+ supported: boolean;
386
+ /** At least one of the platform's subscriptions is live in Exact. */
387
+ registered: boolean;
388
+ subscriptions: ExactWebhookSubscription[];
389
+ /** When this live read ran. */
390
+ checkedAt: string;
391
+ /** Set when the live read itself failed; the rest is then a best-effort answer. */
392
+ error: string | null;
393
+ }
394
+ /** One sweep's share of {@link ExactSyncEstimate}. */
395
+ export interface ExactSyncSweepEstimate {
396
+ enabled: boolean;
397
+ /** The interval the estimate used: the one asked for, rounded and clamped (what a save stores). */
398
+ intervalMinutes: number;
399
+ minIntervalMinutes: number;
400
+ maxIntervalMinutes: number;
401
+ /** Representative Exact calls one run makes; a lower bound for the sweeps that page. */
402
+ callsPerRun: number;
403
+ /** Whole runs a day at `intervalMinutes`. */
404
+ runsPerDay: number;
405
+ /** `runsPerDay × callsPerRun`; 0 when the sweep is off. */
406
+ callsPerDay: number;
407
+ }
408
+ /** The Exact API calls a day a sync schedule makes. Advice: nothing is ever capped by it. */
409
+ export interface ExactSyncEstimate {
410
+ delta: ExactSyncSweepEstimate;
411
+ full: ExactSyncSweepEstimate;
412
+ order: ExactSyncSweepEstimate;
413
+ purchaseOrders: ExactSyncSweepEstimate;
414
+ purchaseOrdersReconcile: ExactSyncSweepEstimate;
415
+ customers: ExactSyncSweepEstimate;
416
+ priceLists: ExactSyncSweepEstimate;
417
+ /** Every sweep's `callsPerDay`, summed. */
418
+ total: number;
419
+ /** The budget as a save stores it; 0 means none is set. */
420
+ dailyCallBudget: number;
421
+ /** A budget is set (above 0) and `total` exceeds it. */
422
+ overBudget: boolean;
423
+ }
424
+ /** Per-reason count of the items one catalogue run kept out of the storefront. */
425
+ export interface ExactCatalogueExclusionCounts {
426
+ /**
427
+ * Items outside their Exact active window (end date passed, or start date still ahead). Always
428
+ * applied, not a policy control; null on rows recorded before the rule existed.
429
+ */
430
+ inactive: number | null;
431
+ /** Items whose Exact webshop flag is off (counted only while `requireWebshopFlag` is on). */
432
+ notWebshop: number;
433
+ /** Non-stock items the `nonStockItems` policy kept out. */
434
+ nonStock: number;
435
+ /** Items with no usable default-currency sales price the `unpricedItems` policy kept out. */
436
+ unpriced: number;
437
+ /** Every excluded item: the reasons above are exclusive and sum to it. `absent` is not in it. */
438
+ total: number;
439
+ /**
440
+ * Items the store holds that the run's Exact read did not return at all (deleted in Exact, or
441
+ * no longer a sales item), which the run disabled. Null when the reverse pass did not run (the
442
+ * read could not be proven complete, or the row predates the pass): NOT the same as 0.
443
+ */
444
+ absent: number | null;
445
+ }
446
+ /** One run of an inbound (Exact → platform) sync, as the sync log recorded it. */
447
+ export interface ExactOnlineSyncLogEntry {
448
+ id: string;
449
+ /** What the run read or wrote: `items`, `prices`, `stock`, `pictures`, `customers`, `orders`, … */
450
+ entity: string;
451
+ /** How it started: `seed`, `delta`, `manual`, `scheduled` or `webhook`. */
452
+ mode: string;
453
+ /** `success`, `partial` or `failed`; any other value is a warning. */
454
+ status: string;
455
+ createdCount: number;
456
+ updatedCount: number;
457
+ skippedCount: number;
458
+ failedCount: number;
459
+ /** Pictures withdrawn from products by this run; only ever above 0 on `pictures` rows. */
460
+ detachedCount: number;
461
+ /** The run's failure in the engine's words (secrets scrubbed); null for a clean run. */
462
+ error: string | null;
463
+ durationMs: number | null;
464
+ /** ISO-8601 UTC. */
465
+ createdAt: string;
466
+ /** The catalogue import policy's exclusions; only ever set on `items` rows. */
467
+ catalogueExclusions: ExactCatalogueExclusionCounts | null;
468
+ }
469
+ /** How the newest real run of one inbound area ended. */
470
+ export interface ExactOnlineSyncRunSummary {
471
+ /** When that run was logged; for the catalogue, when its sweep started. ISO-8601 UTC. */
472
+ lastRunAt: string;
473
+ /** `success`, `partial`, `failed` or `warning`. */
474
+ status: string;
475
+ error: string | null;
476
+ /** When the area last ran clean; null when no clean run is known. */
477
+ lastSuccessAt: string | null;
478
+ }
479
+ /**
480
+ * How the newest real run of each inbound area ended, read from the sync log. The schedule's
481
+ * `*LastEnqueuedAt` times say only that a run was QUEUED, whether or not it then failed. An area
482
+ * that never ran (or a store that is not connected) is null.
483
+ */
484
+ export interface ExactOnlineSyncHealth {
485
+ /** The newest customer synchronization that was not a webhook read of one Account. */
486
+ customers: ExactOnlineSyncRunSummary | null;
487
+ /** The newest catalogue sweep (warehouses, items, stock): the worst of its steps. */
488
+ catalogue: ExactOnlineSyncRunSummary | null;
489
+ /** The newest inbound order synchronization. */
490
+ orders: ExactOnlineSyncRunSummary | null;
491
+ }
492
+ /** What {@link ExactOnlineSyncModule.logs} reads. */
493
+ export interface ExactOnlineSyncLogOptions {
494
+ /** One entity's runs only (`items`, `pictures`, `price-lists`, …); every entity's otherwise. */
495
+ entity?: string;
496
+ /** How many of the newest runs: a whole number from 1 to 100; 20 when left out. */
497
+ limit?: number;
498
+ }
499
+ /** One Exact Sync API cursor (watermark) of the store, by entity stream. */
500
+ export interface ExactSyncCursor {
501
+ /** The entity stream: `items`, `stock`, `salesOrders`, `accounts`, … */
502
+ entity: string;
503
+ /** Opaque; null when the stream never advanced. */
504
+ cursor: string | null;
505
+ }
506
+ /** A stock location of the store and the Exact warehouse it mirrors (read-only). */
507
+ export interface ExactWarehouseLink {
508
+ stockLocationId: string;
509
+ stockLocationName: string;
510
+ /** The Exact warehouse GUID; null while the location is not linked. */
511
+ exactWarehouseId: string | null;
512
+ }
513
+ /** A platform shipping method's Exact mapping, live against the store's Exact catalogue. */
514
+ export type ExactShippingMethodStatus = 'mapped' | 'unmapped' | 'exact-missing';
515
+ /** One platform shipping method of the store, joined to its Exact mapping. */
516
+ export interface ExactShippingMethodMapping {
517
+ vendureShippingMethodId: string;
518
+ vendureCode: string;
519
+ vendureName: string;
520
+ /** The Exact shipping method (GUID) it maps to; null when unmapped. */
521
+ exactShippingMethodId: string | null;
522
+ /** Exact created it (Activated) and owns its name and rate; only these convert or retire. */
523
+ exactManaged: boolean;
524
+ /** `exact-missing`: the mapped Exact method is no longer active or current in Exact. */
525
+ status: ExactShippingMethodStatus;
526
+ }
527
+ /** One shipping method of the store's synchronized Exact catalogue. */
528
+ export interface ExactShippingMethodPreview {
529
+ /** The Exact GUID. */
530
+ id: string;
531
+ code: string | null;
532
+ description: string | null;
533
+ /** Active in Exact and current in the synchronized catalogue: only these can be activated. */
534
+ active: boolean;
535
+ /** Exact's flat rate in major units; null when Exact defines none (never free shipping). */
536
+ amount: number | null;
537
+ /** A platform method of the store already maps to it. */
538
+ linked: boolean;
539
+ }
540
+ /** The store's shipping methods joined to Exact, and its synchronized Exact catalogue. */
541
+ export interface ExactShippingMethodsView {
542
+ mappings: ExactShippingMethodMapping[];
543
+ exact: ExactShippingMethodPreview[];
544
+ }
545
+ export interface SetExactShippingMethodMappingInput {
546
+ /** A shipping method of the store. */
547
+ vendureShippingMethodId: string;
548
+ /** The Exact method to map it to; null clears the mapping. */
549
+ exactShippingMethodId: string | null;
550
+ }
551
+ export interface ConvertExactShippingMethodInput {
552
+ /** The Activated Exact method whose imported platform method is retired. */
553
+ exactShippingMethodId: string;
554
+ /** The store's own platform method (not Exact-managed) the mapping moves to. */
555
+ vendureShippingMethodId: string;
556
+ }
557
+ /** Which Exact connection log: the API calls, or the sync and lifecycle events. */
558
+ export type ExactOnlineConnectionLogKind = 'calls' | 'events';
559
+ /**
560
+ * The dates of an Exact connection-log filter: inclusive ISO-8601. Pass an explicit offset
561
+ * (`2026-10-14T00:00:00+02:00`): the service pins only a bare `dateTo` (`2026-10-14` reads as
562
+ * the end of that UTC day); any other value without an offset, a bare `dateFrom` included, is
563
+ * read in the audit database's session time zone.
564
+ */
565
+ export interface ExactOnlineConnectionLogDates {
566
+ dateFrom?: string;
567
+ dateTo?: string;
568
+ }
569
+ /** Filters for {@link ExactOnlineConnectionLogsModule.calls}. */
570
+ export interface ExactOnlineConnectionLogCallFilter extends ExactOnlineConnectionLogDates {
571
+ /** `succeeded`, `failed` or `timeout`. */
572
+ outcome?: string;
573
+ /** The real HTTP status Exact answered. */
574
+ statusCode?: number;
575
+ /** Free text over the operation, the error and the remote reference. */
576
+ q?: string;
577
+ }
578
+ /** Filters for {@link ExactOnlineConnectionLogsModule.events}. */
579
+ export interface ExactOnlineConnectionLogEventFilter extends ExactOnlineConnectionLogDates {
580
+ /** `admin_action`, `integration`, `job`, `webhook`, `system`, … */
581
+ category?: string;
582
+ /** `succeeded`, `failed`, `partial`, `skipped` or `rejected`. */
583
+ outcome?: string;
584
+ /** Free text over the action, the target label, the error detail and the actor label. */
585
+ q?: string;
586
+ }
587
+ /** An export's filter: one log's filters, over a bounded range of at most 366 days. */
588
+ export type ExactOnlineConnectionLogExportFilter = (ExactOnlineConnectionLogCallFilter | ExactOnlineConnectionLogEventFilter) & {
589
+ dateFrom: string;
590
+ dateTo: string;
591
+ };
592
+ /** How a mirrored payment condition is due. */
593
+ export type ExactPaymentConditionClassification = 'single_due_date' | 'complex' | 'unresolved' | 'unassigned';
594
+ /** A payment condition mirrored from the connected Exact division. */
595
+ export interface ExactPaymentCondition {
596
+ exactId: string;
597
+ code: string;
598
+ description: string | null;
599
+ /** The condition in a sentence. */
600
+ summary: string;
601
+ classification: ExactPaymentConditionClassification;
602
+ paymentDays: number | null;
603
+ paymentEndOfMonths: number | null;
604
+ paymentMethod: string | null;
605
+ percentage: number | null;
606
+ discountPaymentDays: number | null;
607
+ discountPercentage: number | null;
608
+ paymentDiscountType: string | null;
609
+ active: boolean;
610
+ /** ISO-8601, UTC. */
611
+ syncedAt: string;
612
+ }
613
+ /** How many customers hold one payment condition. */
614
+ export interface ExactPaymentConditionDistribution {
615
+ code: string;
616
+ description: string | null;
617
+ customerCount: number;
618
+ }
619
+ /** A condition code customers hold that the mirrored catalog does not know. */
620
+ export interface ExactUnresolvedPaymentCondition {
621
+ code: string;
622
+ customerCount: number;
623
+ }
624
+ /** How the newest payment-terms reconcile went. */
625
+ export interface ExactPaymentTermsSyncSummary {
626
+ mode: string;
627
+ status: string;
628
+ createdCount: number;
629
+ updatedCount: number;
630
+ deactivatedCount: number;
631
+ failedCount: number;
632
+ /** ISO-8601, UTC. */
633
+ at: string;
634
+ error: string | null;
635
+ }
636
+ /** Coverage and freshness of the Exact Account → payment-condition mirror. */
637
+ export interface ExactPaymentTermsDiagnostics {
638
+ totalCustomers: number;
639
+ assignedCount: number;
640
+ unassignedCount: number;
641
+ unresolvedCount: number;
642
+ staleCount: number;
643
+ lastSyncedAt: string | null;
644
+ error: string | null;
645
+ permissionWarning: boolean;
646
+ distribution: ExactPaymentConditionDistribution[];
647
+ unresolvedCodes: ExactUnresolvedPaymentCondition[];
648
+ lastReconciliation: ExactPaymentTermsSyncSummary | null;
649
+ }
650
+ /** One Exact read a dry run made, and whether it worked. */
651
+ export interface ExactTermsDryRunResource {
652
+ resource: string;
653
+ ok: boolean;
654
+ permissionWarning: boolean;
655
+ error: string | null;
656
+ }
657
+ /** A condition code the dry run found duplicated, or not representable as one due date. */
658
+ export interface ExactPaymentTermsDryRunCondition {
659
+ code: string;
660
+ description: string | null;
661
+ summary: string;
662
+ classification: 'single_due_date' | 'complex';
663
+ scheduleCount: number;
664
+ }
665
+ /** An Exact Account whose payment condition the platform could not take over. */
666
+ export interface ExactPaymentTermsDryRunAssignmentIssue {
667
+ accountId: string;
668
+ accountCode: string | null;
669
+ conditionCode: string | null;
670
+ conditionDescription: string | null;
671
+ status: 'unassigned' | 'unresolved' | 'unchecked';
672
+ }
673
+ /** A live, read-only reconciliation of the division's payment conditions. */
674
+ export interface ExactPaymentTermsDryRun {
675
+ division: string;
676
+ /** ISO-8601, UTC. */
677
+ generatedAt: string;
678
+ /** False when a read stopped early: the counts are then a lower bound. */
679
+ complete: boolean;
680
+ permissionWarning: boolean;
681
+ catalogRowCount: number;
682
+ catalogCodeCount: number;
683
+ accountCount: number;
684
+ assignedCount: number;
685
+ unassignedCount: number;
686
+ unresolvedCount: number;
687
+ uncheckedCount: number;
688
+ distribution: ExactPaymentConditionDistribution[];
689
+ duplicateConditions: ExactPaymentTermsDryRunCondition[];
690
+ complexConditions: ExactPaymentTermsDryRunCondition[];
691
+ unresolvedCodes: ExactUnresolvedPaymentCondition[];
692
+ assignmentIssues: ExactPaymentTermsDryRunAssignmentIssue[];
693
+ resources: ExactTermsDryRunResource[];
694
+ }
695
+ /** An Incoterm of the division's mirrored catalog. */
696
+ export interface ExactIncoterm {
697
+ exactId: number;
698
+ code: string;
699
+ version: number;
700
+ description: string | null;
701
+ catalogAvailable: boolean;
702
+ stale: boolean;
703
+ lastSyncedAt: string | null;
704
+ error: string | null;
705
+ }
706
+ /**
707
+ * Whether a customer synchronization has ever mirrored Account delivery assignments on this
708
+ * division. `never`: the operational switch cannot be saved yet (readiness needs one success).
709
+ */
710
+ export type ExactDeliveryTermsAccountSyncStatus = 'never' | 'succeeded' | 'failed';
711
+ /** How many customers hold one Exact shipping method. */
712
+ export interface ExactDeliveryTermsShippingDistribution {
713
+ exactId: string;
714
+ code: string | null;
715
+ description: string | null;
716
+ customerCount: number;
717
+ }
718
+ /** How many customers hold one Incoterm. */
719
+ export interface ExactDeliveryTermsIncotermDistribution {
720
+ code: string;
721
+ version: number | null;
722
+ description: string | null;
723
+ customerCount: number;
724
+ }
725
+ /** Coverage and freshness of the Exact Account delivery assignments, and the method mapping. */
726
+ export interface ExactDeliveryTermsDiagnostics {
727
+ reconciliationRequired: boolean;
728
+ accountSyncStatus: ExactDeliveryTermsAccountSyncStatus;
729
+ totalCustomers: number;
730
+ assignedCount: number;
731
+ unassignedCount: number;
732
+ unresolvedCount: number;
733
+ staleCount: number;
734
+ mappedMethodCount: number;
735
+ /** Mappings that also pass the operational readiness check (it rejects stale definitions). */
736
+ usableShippingMappingCount: number;
737
+ unmappedMethodCount: number;
738
+ inactiveMethodCount: number;
739
+ unavailableMethodCount: number;
740
+ nullAmountCount: number;
741
+ invalidIncotermCount: number;
742
+ lastSyncedAt: string | null;
743
+ error: string | null;
744
+ permissionWarning: boolean;
745
+ shippingMethodDistribution: ExactDeliveryTermsShippingDistribution[];
746
+ incotermDistribution: ExactDeliveryTermsIncotermDistribution[];
747
+ warnings: string[];
748
+ }
749
+ /** An Exact Account whose delivery assignment the platform could not take over. */
750
+ export interface ExactDeliveryTermsDryRunIssue {
751
+ accountId: string;
752
+ accountCode: string | null;
753
+ shippingMethodId: string | null;
754
+ incotermCode: string | null;
755
+ incotermVersion: number | null;
756
+ status: 'unassigned_shipping' | 'unresolved_shipping' | 'unmapped_shipping' | 'unresolved_incoterm' | 'invalid_policy' | 'unchecked';
757
+ message: string;
758
+ }
759
+ /** A live, read-only reconciliation of the division's delivery assignments. */
760
+ export interface ExactDeliveryTermsDryRun {
761
+ division: string;
762
+ /** ISO-8601, UTC. */
763
+ generatedAt: string;
764
+ /** False when a read stopped early: the counts are then a lower bound. */
765
+ complete: boolean;
766
+ permissionWarning: boolean;
767
+ shippingMethodCount: number;
768
+ activeShippingMethodCount: number;
769
+ mappingCount: number;
770
+ unmappedCatalogMethodCount: number;
771
+ nullAmountCount: number;
772
+ zeroAmountCount: number;
773
+ incotermCount: number;
774
+ accountCount: number;
775
+ assignedShippingMethodCount: number;
776
+ mappedAssignedShippingMethodCount: number;
777
+ unmappedAssignedShippingMethodCount: number;
778
+ unassignedShippingMethodCount: number;
779
+ unresolvedShippingMethodCount: number;
780
+ assignedIncotermCount: number;
781
+ unassignedIncotermCount: number;
782
+ unresolvedIncotermCount: number;
783
+ invalidPolicyCount: number;
784
+ shippingMethodDistribution: Array<{
785
+ exactId: string;
786
+ customerCount: number;
787
+ }>;
788
+ incotermDistribution: Array<{
789
+ code: string;
790
+ version: number | null;
791
+ customerCount: number;
792
+ }>;
793
+ assignmentIssues: ExactDeliveryTermsDryRunIssue[];
794
+ resources: ExactTermsDryRunResource[];
795
+ }
796
+ /**
797
+ * One customer's Exact payment terms as the engine answers them. `status` and `classification`
798
+ * are the engine's own spelling (lowercase: `assigned`, `single_due_date`, …), not the
799
+ * uppercase enums of the provider-neutral `customers.credit.paymentTerms`.
800
+ */
801
+ export interface ExactCustomerPaymentTerms {
802
+ customerId: string;
803
+ /** `exact-online`. */
804
+ source: string;
805
+ /** Exact governs the customer's terms; false while the mirror is only staged. */
806
+ managedExternally: boolean;
807
+ /** The customer is linked to an Exact Account. */
808
+ linkedExternally: boolean;
809
+ status: string;
810
+ stale: boolean;
811
+ exactAccountId: string | null;
812
+ exactAccountCode: string | null;
813
+ conditionCode: string | null;
814
+ conditionDescription: string | null;
815
+ /** The terms in a sentence. */
816
+ summary: string;
817
+ classification: string;
818
+ paymentDays: number | null;
819
+ paymentEndOfMonths: number | null;
820
+ paymentMethod: string | null;
821
+ percentage: number | null;
822
+ discountPaymentDays: number | null;
823
+ discountPercentage: number | null;
824
+ paymentDiscountType: string | null;
825
+ /** When Exact last changed the Account's condition. */
826
+ syncedAt: string | null;
827
+ /**
828
+ * When a sync last confirmed these terms against Exact. `syncedAt` only moves when the Account
829
+ * changes there, so it ages on a healthy customer.
830
+ */
831
+ lastCheckedAt: string | null;
832
+ error: string | null;
833
+ }
834
+ /**
835
+ * One customer's Exact delivery assignment as the engine answers it, staged ones included. The
836
+ * statuses and `deliveryAdvice` are the engine's own spelling (lowercase: `assigned`,
837
+ * `partial_allowed`, …).
838
+ */
839
+ export interface ExactCustomerDeliveryTerms {
840
+ customerId: string;
841
+ source: string;
842
+ managedExternally: boolean;
843
+ linkedExternally: boolean;
844
+ status: string;
845
+ shippingMethodStatus: string;
846
+ policyStatus: string;
847
+ summary: string;
848
+ exactAccountId: string | null;
849
+ exactAccountCode: string | null;
850
+ preferredShippingMethodId: string | null;
851
+ preferredShippingMethodCode: string | null;
852
+ preferredShippingMethodName: string | null;
853
+ preferredShippingMethodAvailable: boolean;
854
+ eligibleShippingMethodIds: string[];
855
+ incotermStatus: string;
856
+ incotermCode: string | null;
857
+ incotermVersion: number | null;
858
+ incotermAddress: string | null;
859
+ incotermDescription: string | null;
860
+ shippingLeadDays: number | null;
861
+ deliveryAdvice: string;
862
+ stale: boolean;
863
+ syncedAt: string | null;
864
+ /** As {@link ExactCustomerPaymentTerms.lastCheckedAt}. */
865
+ lastCheckedAt: string | null;
866
+ error: string | null;
867
+ }
868
+ /**
869
+ * Where one customer stands in the Exact → platform price-list reconcile:
870
+ * - `assigned`: in the Exact price-list group, and that group has a price list;
871
+ * - `pending`: Exact says the Account has a price list, not reconciled yet;
872
+ * - `none`: linked to Exact, and the Account has no price list;
873
+ * - `unlinked`: the customer has no Exact Account link.
874
+ */
875
+ export type ExactCustomerPriceListStatus = 'assigned' | 'pending' | 'none' | 'unlinked';
876
+ /** One customer's Exact price-list link: what Exact says against what the store has. */
877
+ export interface ExactCustomerPriceList {
878
+ customerId: string;
879
+ exactAccountId: string | null;
880
+ exactAccountCode: string | null;
881
+ exactPriceListId: string | null;
882
+ /** The customer group mirroring the Exact price list, once reconciled. */
883
+ groupId: string | null;
884
+ groupName: string | null;
885
+ /** The price list attached to that group, once reconciled. */
886
+ priceListId: string | null;
887
+ priceListName: string | null;
888
+ status: ExactCustomerPriceListStatus;
889
+ /** The newest price-list reconcile of the store, whatever it touched. */
890
+ lastReconciledAt: string | null;
891
+ /** That run's error; null when it succeeded or none ran. */
892
+ lastError: string | null;
893
+ }
894
+ /** An order's place in Exact, and what blocks a push. */
895
+ export interface ExactOrderState {
896
+ /** Pushed from this store into the connected division. */
897
+ pushed: boolean;
898
+ /** `pushed` (sent from here), `imported` (came from Exact), or null (not in Exact). */
899
+ origin: 'pushed' | 'imported' | null;
900
+ salesOrderId: string | null;
901
+ salesOrderNumber: string | null;
902
+ pushedAt: string | null;
903
+ /** False for a guest order, which cannot be pushed. */
904
+ hasCustomer: boolean;
905
+ /** The customer is linked to an Exact Account of the connected division. */
906
+ customerLinked: boolean;
907
+ /** Lines whose variant is not linked to an Exact item; a push refuses them. */
908
+ unmappedSkus: string[];
909
+ /** How Exact's sales order differs from this order, in plain words; empty when it matches. */
910
+ warnings: string[];
911
+ }
912
+ /** An imported order's inbound (Exact → platform) sync state. */
913
+ export interface ExactOrderSyncState {
914
+ exactSalesOrderId: string;
915
+ exactOrderNumber: string | null;
916
+ /** How many times the import wrote the order. */
917
+ revision: number;
918
+ lastSyncedAt: string | null;
919
+ /** Exact's order changed in a way the import could not apply. */
920
+ driftDetected: boolean;
921
+ /** When Exact deleted the sales order; null while it exists. */
922
+ exactDeletedAt: string | null;
923
+ unmappedSkus: string[];
924
+ }
925
+ /** What a push answered. A refusal is `success: false` with the reason, not a throw. */
926
+ export interface ExactOrderPushResult {
927
+ success: boolean;
928
+ /** The order was already in Exact: nothing was written. */
929
+ alreadyPushed: boolean;
930
+ salesOrderId: string | null;
931
+ salesOrderNumber: string | null;
932
+ error: string | null;
933
+ errorCode: string | null;
934
+ /** How the sales order the push created differs from the order; null or empty when it matches. */
935
+ warnings: string[] | null;
936
+ }
937
+ /** What repricing one imported order answered. A refusal is `success: false`, not a throw. */
938
+ export interface ExactOrderRepriceResult {
939
+ success: boolean;
940
+ /** Any line's tax split changed. */
941
+ changed: boolean;
942
+ linesRepriced: number;
943
+ error: string | null;
944
+ }
945
+ /** What repricing every imported order of the store answered. */
946
+ export interface ExactOrderRepriceAllResult {
947
+ /** The imported orders of the connected division. */
948
+ total: number;
949
+ repriced: number;
950
+ /** Already right, or no longer linked to an order. */
951
+ skipped: number;
952
+ failed: number;
953
+ }
954
+ /** A product's Exact ownership (what the product editor's "Managed by Exact" banner reads). */
955
+ export interface ExactProductStatus {
956
+ /** Exact owns the product's catalogue data; null on a product the sync never touched. */
957
+ exactManaged: boolean | null;
958
+ exactItemId: string | null;
959
+ exactItemGroupId: string | null;
960
+ /**
961
+ * The catalogue sync's signature on a disable: set, the sync switched the product off and
962
+ * owns switching it back on; null, a human did (or it is enabled). Never write it back.
963
+ */
964
+ exactDisabledReason: string | null;
965
+ }