@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
@@ -1,10 +1,20 @@
1
1
  import { type Page, type Transport } from '@sixtyninecommerce/core';
2
2
  import type { Call, ListOptions } from '../types.js';
3
+ import { type ArDocumentsModule } from './ar.js';
4
+ import { type DocumentEmailsModule } from './emails.js';
5
+ import { decodePdf } from './pdf.js';
6
+ export { decodePdf };
3
7
  /**
4
8
  * Which document a call is about. The platform issues three, and every method
5
9
  * here that takes a type takes one of these.
6
10
  */
7
11
  export type DocumentType = 'invoice' | 'credit-note' | 'packing-slip';
12
+ /**
13
+ * What an extension block may be registered for: the three order documents, and a merchant's
14
+ * purchase order to a supplier (purchase-orders spec §8.4.2, D80), whose PDF is read through
15
+ * `admin.purchasing.purchaseOrders.document`, never `data` or `downloadUrl`.
16
+ */
17
+ export type ExtensionDocumentType = DocumentType | 'purchase-order';
8
18
  /** An issued invoice. Money is in MINOR UNITS, as everywhere in this SDK. */
9
19
  export interface Invoice {
10
20
  id: string;
@@ -37,6 +47,16 @@ export interface Invoice {
37
47
  lines: DocumentLine[] | null;
38
48
  /** Who numbered it: `platform`, or an ERP's code (`afas`). */
39
49
  numberingProvider: string;
50
+ /**
51
+ * What had been paid towards it when it was issued, in minor units: money collected (taken,
52
+ * or held by a payment provider to capture), less refunds and money moved to the customer's
53
+ * account; a promise to pay (bank transfer, invoice, on account) is not paid. Frozen at issue,
54
+ * as the PDF printed it. Null on an invoice issued before this was recorded, and on a
55
+ * supplementary invoice.
56
+ */
57
+ amountPaid: number | null;
58
+ /** What remained due when it was issued: `totalWithTax` less `amountPaid`, never below zero. Null when `amountPaid` is. */
59
+ amountDue: number | null;
40
60
  createdAt: string;
41
61
  }
42
62
  /** An issued credit note. `totalWithTax` is the POSITIVE value of the credit. */
@@ -183,7 +203,7 @@ export interface DocumentExtensionSchema {
183
203
  export interface RegisterDocumentExtensionInput {
184
204
  /** Lower-case kebab handle, at most 64 characters. */
185
205
  key: string;
186
- documentTypes: DocumentType[];
206
+ documentTypes: ExtensionDocumentType[];
187
207
  /** See {@link DocumentExtensionSchema} for the fifteen keywords this platform accepts. */
188
208
  jsonSchema: unknown;
189
209
  /** See {@link DocumentExtensionSchema} for the allow-listed fragment nodes. */
@@ -383,6 +403,57 @@ export interface InvoiceCorrectionInput {
383
403
  refundPaymentId?: string;
384
404
  /** RETAIL only: move the credited amount to the customer's account instead (`accountCredit`). */
385
405
  creditToAccount?: boolean;
406
+ /**
407
+ * `commitCorrection` with `creditToAccount` in a store whose book is store credit (the plan's
408
+ * `accountCredit.book` `STORE_CREDIT`): whether the customer expressly agreed to store credit
409
+ * instead of a refund to their payment (EU consumer law, CRD art. 13(1)), as staff recorded it.
410
+ * The move records it on its ledger entries (`StoredValueEntry.customerAgreed`); never a
411
+ * condition, nothing is refused for it. The plan ignores it and its `planHash` never sees it, so
412
+ * leave it out of `planCorrection` (an engine before the field, incentives sprint 8 PR 6a,
413
+ * refuses any call that gives it) and add it to the commit's input.
414
+ */
415
+ customerAgreed?: boolean;
416
+ /**
417
+ * Details wrong only: the order's payment term in days. The corrected invoice is reissued
418
+ * under it and the order keeps it (its `paymentTermsDays`; its payment condition is cleared).
419
+ * For a customer whose terms the store keeps (`paymentTerms.accepts` `DAYS`). 0 to 365. Left
420
+ * out together with `paymentConditionCode`, the terms are not changed. The due date is the
421
+ * corrected invoice's date (today in the store's numbering zone) plus the days.
422
+ */
423
+ paymentTermsDays?: number;
424
+ /**
425
+ * Details wrong only: the ERP payment condition the corrected invoice is reissued under and the
426
+ * order keeps (its `paymentConditionCode`; its days are cleared). For a customer whose terms an
427
+ * ERP governs (`paymentTerms.accepts` `CONDITION_CODE`). At most 64 characters. Never together
428
+ * with `paymentTermsDays`.
429
+ */
430
+ paymentConditionCode?: string;
431
+ }
432
+ /** Payment terms as a document prints them, with the due date it states. */
433
+ export interface InvoiceCorrectionTermsView {
434
+ summary: string;
435
+ paymentDays: number | null;
436
+ conditionCode: string | null;
437
+ /** `YYYY-MM-DD`: the document's date plus the terms; null when it states none. */
438
+ dueOn: string | null;
439
+ }
440
+ /** An invoice's payment terms and its corrected invoice's ({@link InvoiceCorrectionPlan.paymentTerms}). */
441
+ export interface InvoiceCorrectionPaymentTerms {
442
+ /** What the invoice printed, with its due date; null when it printed none. */
443
+ invoiced: InvoiceCorrectionTermsView | null;
444
+ /**
445
+ * What the corrected invoice of a details correction would print (the stated terms, when the
446
+ * input states them), with the due date it would state; null for another outcome, none, or
447
+ * terms that cannot be read (a blocker says why).
448
+ */
449
+ replacement: InvoiceCorrectionTermsView | null;
450
+ /**
451
+ * Which input member states the order's terms: `DAYS` (`paymentTermsDays`), `CONDITION_CODE`
452
+ * (`paymentConditionCode`), or null where none can (`unavailableMessage` says why). The other
453
+ * member is a blocker, `INVOICE_CORRECTION_PAYMENT_TERMS_NOT_ACCEPTED`.
454
+ */
455
+ accepts: 'DAYS' | 'CONDITION_CODE' | null;
456
+ unavailableMessage: string | null;
386
457
  }
387
458
  /** One line a correction states, every key present. */
388
459
  export interface InvoiceCorrectionLine {
@@ -515,6 +586,12 @@ export interface InvoiceCorrectionPlan {
515
586
  available: boolean;
516
587
  unavailableCode: string | null;
517
588
  message: string | null;
589
+ /**
590
+ * Where the money would land, the store's ONE book (incentives sprint 8): `AR` (the customer's
591
+ * account), `STORE_CREDIT` (the customer's store credit: the credit note is issued first and
592
+ * the wallet takes exactly what it credits) or `NONE`. Absent from an engine before it.
593
+ */
594
+ book?: 'AR' | 'STORE_CREDIT' | 'NONE' | (string & {}) | null;
518
595
  } | null;
519
596
  settlement: 'NONE' | 'REFUND' | 'ACCOUNT_CREDIT';
520
597
  /** Everything that stops this correction. Empty: it can be committed. */
@@ -523,6 +600,98 @@ export interface InvoiceCorrectionPlan {
523
600
  message: string;
524
601
  path: string | null;
525
602
  }>;
603
+ /**
604
+ * What returns whose money moved (settled, or a refund in flight) already gave back of the
605
+ * invoice's orders, which a partial credit never credits again; null when none did. Answers
606
+ * returns only: read {@link givenBack} for what earlier corrections credited too. An engine
607
+ * older than this field fails the document's validation.
608
+ */
609
+ returnedGoods: InvoiceCorrectionReturnedGoods | null;
610
+ /**
611
+ * What returns whose money moved AND earlier live correction credit notes already gave back of
612
+ * the invoice's orders, per order line and for shipping, naming the RMAs and the credit notes;
613
+ * null when nothing was. A partial credit never credits it again. An engine older than this
614
+ * field fails the document's validation.
615
+ */
616
+ givenBack: InvoiceCorrectionGivenBack | null;
617
+ /**
618
+ * The invoice's payment terms and its corrected invoice's (a details correction may state new
619
+ * ones); null for an invoice with no single order (an AR statement or supplement). An engine
620
+ * older than this field fails the document's validation.
621
+ */
622
+ paymentTerms: InvoiceCorrectionPaymentTerms | null;
623
+ }
624
+ /**
625
+ * What returns and earlier corrections already gave back of an invoice's orders
626
+ * ({@link InvoiceCorrectionPlan.givenBack}). Above it the plan blocks
627
+ * `INVOICE_CORRECTION_QUANTITY_ALREADY_RETURNED` / `_AMOUNT_ALREADY_RETURNED` /
628
+ * `_SHIPPING_ALREADY_REFUNDED` where a return gave some back, else
629
+ * `INVOICE_CORRECTION_QUANTITY_ALREADY_CREDITED` / `_AMOUNT_ALREADY_CREDITED` /
630
+ * `_SHIPPING_ALREADY_CREDITED` (path `lines/<i>/<field>`).
631
+ */
632
+ export interface InvoiceCorrectionGivenBack {
633
+ /** The order lines a return touched or an earlier live correction names. */
634
+ lines: Array<{
635
+ orderLineId: string;
636
+ /** The line's product name. */
637
+ description: string;
638
+ /** Units the line bills. */
639
+ quantity: number;
640
+ /** Units returns refunded. */
641
+ returnedQuantity: number;
642
+ /** Units earlier corrections credited whole. */
643
+ creditedQuantity: number;
644
+ /** What earlier corrections credited on the line below its price (gross, minor units). */
645
+ priceCredited: number;
646
+ /** Units a correction may still name. */
647
+ creditableQuantity: number;
648
+ /** What a correction may still credit on the line (minor units). */
649
+ creditableAmount: number;
650
+ /** The returns, by RMA code. */
651
+ returnCodes: string[];
652
+ /** The earlier live correction credit notes that name the line, by number. */
653
+ creditNoteNumbers: string[];
654
+ }>;
655
+ /** Null unless a return refunded, or an earlier correction credited, some of the shipping. */
656
+ shipping: {
657
+ charged: number;
658
+ refunded: number;
659
+ credited: number;
660
+ /** What a correction may still credit of it. */
661
+ creditable: number;
662
+ returnCodes: string[];
663
+ creditNoteNumbers: string[];
664
+ } | null;
665
+ }
666
+ /** What returns already gave back of an invoice's orders ({@link InvoiceCorrectionPlan}). */
667
+ export interface InvoiceCorrectionReturnedGoods {
668
+ /** The order lines a return touched. */
669
+ lines: Array<{
670
+ orderLineId: string;
671
+ /** The line's product name. */
672
+ description: string;
673
+ /** Units the line bills. */
674
+ quantity: number;
675
+ /** Units returns refunded. */
676
+ returnedQuantity: number;
677
+ /** Units earlier corrections credited whole. */
678
+ creditedQuantity: number;
679
+ /** Units a correction may still name; above it the plan blocks `INVOICE_CORRECTION_QUANTITY_ALREADY_RETURNED`. */
680
+ creditableQuantity: number;
681
+ /** What a correction may still credit on the line; above it `INVOICE_CORRECTION_AMOUNT_ALREADY_RETURNED`. */
682
+ creditableAmount: number;
683
+ /** The returns, by RMA code. */
684
+ returnCodes: string[];
685
+ }>;
686
+ /** Null unless a return refunded shipping. */
687
+ shipping: {
688
+ charged: number;
689
+ refunded: number;
690
+ credited: number;
691
+ /** What a correction may still credit of it; above it `INVOICE_CORRECTION_SHIPPING_ALREADY_REFUNDED`. */
692
+ creditable: number;
693
+ returnCodes: string[];
694
+ } | null;
526
695
  }
527
696
  /** A document {@link DocumentsModule.commitCorrection} issued, on either ledger. */
528
697
  export interface InvoiceCorrectionCommittedDocument {
@@ -566,6 +735,14 @@ export interface InvoiceCorrectionCommit {
566
735
  currencyCode: string;
567
736
  /** The receipts on the customer's account, one per payment the money came from. */
568
737
  unappliedCashIds: string[];
738
+ /** The store's book it landed in (`AR` or `STORE_CREDIT`). Absent from an engine before it. */
739
+ book?: 'AR' | 'STORE_CREDIT' | (string & {}) | null;
740
+ /**
741
+ * The customer's store-credit entries, one per payment the money came from, on the
742
+ * `STORE_CREDIT` book (empty on `AR`): read them with `storedValue.statement`. Absent from an
743
+ * engine before it.
744
+ */
745
+ storeCreditEntryIds?: string[];
569
746
  } | null;
570
747
  }
571
748
  export interface CommitInvoiceCorrectionCall extends Call {
@@ -605,7 +782,13 @@ export interface IssuePartialCreditNoteInput {
605
782
  lines: DocumentLineInput[];
606
783
  /** The invoice to credit; defaults to the order's newest live one. */
607
784
  invoiceId?: string;
608
- /** Also refund the credited amount against this payment. Omit for a document-only credit. */
785
+ /**
786
+ * Also refund the credited amount against this payment. Omit for a document-only credit.
787
+ *
788
+ * @deprecated Refund through {@link DocumentsModule.commitCorrection} instead: it plans the
789
+ * correction, refuses a plan that moved since the merchant saw it, and keys the refund. This
790
+ * form stays for existing callers; send it with an `idempotencyKey` (one per attempt).
791
+ */
609
792
  refundPaymentId?: string;
610
793
  /** Blocks for the credit note. An invalid one refuses the issue BEFORE the refund moves. */
611
794
  extensions?: DocumentExtensionInput[];
@@ -681,20 +864,353 @@ export interface DocumentExtensionsModule {
681
864
  * document issued against it froze its own copy and still redraws — but
682
865
  * nothing new can be written against it, so offering it as a choice would
683
866
  * only invite a `DOCUMENT_EXTENSION_VERSION_MISMATCH`.
867
+ *
868
+ * @effect read
684
869
  */
685
870
  list(options?: Call): Promise<Page<DocumentExtensionSchema>>;
686
871
  /**
687
872
  * Register a block, or a NEW VERSION of one. A key is never edited in place,
688
873
  * so documents already issued keep the schema and fragment they carry.
874
+ *
875
+ * @effect write
689
876
  */
690
877
  register(input: RegisterDocumentExtensionInput, options?: Call): Promise<DocumentExtensionSchema>;
691
878
  /**
692
879
  * Stop a key being usable on new documents. True when something was removed,
693
880
  * false when there was nothing — so a repeated delete is not an error.
694
881
  * Documents already issued with it are untouched.
882
+ *
883
+ * @effect destructive
695
884
  */
696
885
  delete(key: string, options?: Call): Promise<boolean>;
697
886
  }
887
+ /**
888
+ * The store's invoice and credit-note settings: numbering format, the document's columns and
889
+ * footer. `nextNumber` and `creditNoteNextNumber` are the series' next values, read only here.
890
+ */
891
+ export interface InvoiceConfig {
892
+ id: string;
893
+ enabled: boolean;
894
+ prefix: string;
895
+ suffix: string;
896
+ nextNumber: number;
897
+ digits: number;
898
+ /** `none`, `short` or `full`; a String on the wire, never an enum. */
899
+ yearFormat: string;
900
+ yearReset: boolean;
901
+ creditNoteNextNumber: number;
902
+ creditNotePrefix: string;
903
+ creditNoteSuffix: string;
904
+ creditNoteDigits: number;
905
+ creditNoteYearFormat: string;
906
+ creditNoteYearReset: boolean;
907
+ columnProduct: boolean;
908
+ columnSku: boolean;
909
+ columnQuantity: boolean;
910
+ columnUnitPriceExcl: boolean;
911
+ columnUnitPriceDiscount: boolean;
912
+ columnUnitPriceIncl: boolean;
913
+ /**
914
+ * The unit price after a manual override and the price list, in the document's tax basis.
915
+ * Absent on an engine released before 2026-10-10, which does not know the column: the read
916
+ * then retries once without it (and keeps doing so for this client). Send it in an update only
917
+ * when the read carried it, or that engine refuses the update.
918
+ */
919
+ columnUnitPriceAfterDiscount?: boolean;
920
+ columnLineTotal: boolean;
921
+ columnLineDiscount: boolean;
922
+ columnTaxRate: boolean;
923
+ columnTaxAmount: boolean;
924
+ columnTotal: boolean;
925
+ showLogo: boolean;
926
+ /** Print the legal entity's legal name, registration and VAT numbers under the supplier. */
927
+ legalIdentityBlock: boolean;
928
+ footerText: string | null;
929
+ defaultLanguage: string | null;
930
+ /** Deprecated: ignored once an external provider numbers the store. Clear it with `null`. */
931
+ externalNumberOrderField: string | null;
932
+ /** Who numbers this store's invoices and credit notes: `platform`, or an ERP's code. */
933
+ invoicingProvider: string;
934
+ }
935
+ /** What {@link DocumentsModule.invoiceConfig}`.update` changes; a field left out keeps its value. */
936
+ export interface UpdateInvoiceConfigInput {
937
+ enabled?: boolean;
938
+ prefix?: string;
939
+ suffix?: string;
940
+ digits?: number;
941
+ yearFormat?: string;
942
+ yearReset?: boolean;
943
+ creditNotePrefix?: string;
944
+ creditNoteSuffix?: string;
945
+ creditNoteDigits?: number;
946
+ creditNoteYearFormat?: string;
947
+ creditNoteYearReset?: boolean;
948
+ columnProduct?: boolean;
949
+ columnSku?: boolean;
950
+ columnQuantity?: boolean;
951
+ columnUnitPriceExcl?: boolean;
952
+ columnUnitPriceDiscount?: boolean;
953
+ columnUnitPriceIncl?: boolean;
954
+ columnUnitPriceAfterDiscount?: boolean;
955
+ columnLineTotal?: boolean;
956
+ columnLineDiscount?: boolean;
957
+ columnTaxRate?: boolean;
958
+ columnTaxAmount?: boolean;
959
+ columnTotal?: boolean;
960
+ showLogo?: boolean;
961
+ legalIdentityBlock?: boolean;
962
+ footerText?: string | null;
963
+ defaultLanguage?: string | null;
964
+ /** Deprecated adoption field: only `null` (clear it) is meaningful now. */
965
+ externalNumberOrderField?: null;
966
+ }
967
+ /** An invoicing provider installed on this platform, and whether this store could switch to it. */
968
+ export interface InvoicingProvider {
969
+ code: string;
970
+ label: string;
971
+ /** Books documents in a system outside the platform (an ERP). */
972
+ external: boolean;
973
+ /** The documents it numbers, as `<ledger>:<type>` (`retail:invoice`, `ar:credit_note`). */
974
+ documents: string[];
975
+ ready: boolean;
976
+ /** Why not, when it is not ready: what to set up first. */
977
+ notReadyReason: string | null;
978
+ }
979
+ /**
980
+ * One attempt to book a financial document in an external invoicing provider. `status`:
981
+ * `reserved` (the call's outcome is unknown), `booked` (`externalNumber` null while the number is
982
+ * pending), `failed` (refused, nothing booked), `abandoned` (an unknown outcome an admin closed),
983
+ * `resolved` (a booking the store never recorded, handled in the ERP by an admin).
984
+ */
985
+ export interface FinancialDocumentIssue {
986
+ id: string;
987
+ provider: string;
988
+ operationKey: string;
989
+ /** `invoice` or `credit_note`. */
990
+ documentType: string;
991
+ /** `retail` or `ar`. */
992
+ ledger: string;
993
+ orderId: string | null;
994
+ status: string;
995
+ externalRef: string | null;
996
+ externalNumber: string | null;
997
+ documentDate: string | null;
998
+ attempts: number;
999
+ lastError: string | null;
1000
+ reservedAt: string;
1001
+ bookedAt: string | null;
1002
+ /** When the local document carrying the number committed; null while it has not. */
1003
+ recordedAt: string | null;
1004
+ abandonReason: string | null;
1005
+ }
1006
+ /** What {@link DocumentsModule.issues}`.list` is asked. */
1007
+ export interface FinancialDocumentIssueListOptions extends ListOptions {
1008
+ /** Only the attempts that still need someone: reserved, or booked and never recorded. */
1009
+ unresolvedOnly?: boolean;
1010
+ }
1011
+ /** What {@link DocumentsModule.sendProforma} sends. */
1012
+ export interface SendProformaInput {
1013
+ /** `YYYY-MM-DD`: the date the proforma states. Within 30 days either side of today. */
1014
+ invoicedOn: string;
1015
+ /** At least one, at most 10; each one an address the email door takes. */
1016
+ recipients: string[];
1017
+ /** The email's cover text, also printed on the PDF. At most 500 characters. */
1018
+ message?: string;
1019
+ languageCode?: string;
1020
+ }
1021
+ /** One proforma send, as recorded once the email went out. */
1022
+ export interface ProformaSend {
1023
+ id: string;
1024
+ orderId: string;
1025
+ /** The addresses it reached. */
1026
+ recipients: string[];
1027
+ message: string | null;
1028
+ /** `YYYY-MM-DD`. */
1029
+ invoicedOn: string;
1030
+ createdAt: string;
1031
+ }
1032
+ /** One "Email the invoice" send, as recorded once the email went out. */
1033
+ export interface InvoiceEmailSend {
1034
+ id: string;
1035
+ orderId: string;
1036
+ recipientsTo: string[];
1037
+ recipientsCc: string[];
1038
+ createdAt: string;
1039
+ }
1040
+ /** The store's packing-slip settings: numbering format, columns, the fulfillment fields shown. */
1041
+ export interface PackingSlipConfig {
1042
+ id: string;
1043
+ enabled: boolean;
1044
+ prefix: string;
1045
+ suffix: string;
1046
+ nextNumber: number;
1047
+ digits: number;
1048
+ yearFormat: string;
1049
+ yearReset: boolean;
1050
+ columnRowNumber: boolean;
1051
+ columnProduct: boolean;
1052
+ columnSku: boolean;
1053
+ columnQuantity: boolean;
1054
+ showLogo: boolean;
1055
+ showInvoiceNumber: boolean;
1056
+ /** JSON-encoded `{ [handlerCode]: { [fieldKey]: boolean } }`. */
1057
+ fulfillmentFieldVisibility: string | null;
1058
+ footerText: string | null;
1059
+ defaultLanguage: string | null;
1060
+ }
1061
+ /** What {@link DocumentsModule.packingSlipConfig}`.update` changes; a field left out keeps its value. */
1062
+ export interface UpdatePackingSlipConfigInput {
1063
+ enabled?: boolean;
1064
+ prefix?: string;
1065
+ suffix?: string;
1066
+ digits?: number;
1067
+ yearFormat?: string;
1068
+ yearReset?: boolean;
1069
+ columnRowNumber?: boolean;
1070
+ columnSku?: boolean;
1071
+ showLogo?: boolean;
1072
+ showInvoiceNumber?: boolean;
1073
+ /** JSON-encoded `{ [handlerCode]: { [fieldKey]: boolean } }`. */
1074
+ fulfillmentFieldVisibility?: string;
1075
+ footerText?: string | null;
1076
+ defaultLanguage?: string | null;
1077
+ }
1078
+ /** A fulfillment field a packing slip can show. */
1079
+ export interface PackingSlipField {
1080
+ /** `core:*`, `arg:<name>` or `cf:<name>`. */
1081
+ key: string;
1082
+ label: string;
1083
+ /** `string`, `number`, `boolean` or `datetime`. */
1084
+ type: string;
1085
+ defaultVisible: boolean;
1086
+ }
1087
+ /** The fields one fulfillment handler offers a packing slip. */
1088
+ export interface PackingSlipHandlerFields {
1089
+ handlerCode: string;
1090
+ handlerName: string;
1091
+ fields: PackingSlipField[];
1092
+ }
1093
+ /**
1094
+ * Which document email {@link DocumentsModule.emailRecipients} answers for. `proforma` is
1095
+ * addressed like the invoice email.
1096
+ */
1097
+ export type DocumentEmailEvent = 'invoice_generated' | 'credit_note_issued' | 'proforma';
1098
+ /** Every {@link DocumentEmailEvent}, in the order the server's enum declares them. */
1099
+ export declare const DOCUMENT_EMAIL_EVENTS: readonly DocumentEmailEvent[];
1100
+ /** Who a document email goes to. */
1101
+ export interface DocumentEmailRecipients {
1102
+ to: string[];
1103
+ cc: string[];
1104
+ }
1105
+ /** The store's invoice settings, `admin.documents.invoiceConfig`. */
1106
+ export interface InvoiceConfigModule {
1107
+ /**
1108
+ * The store's invoice and credit-note settings (created with the defaults on first read).
1109
+ * Needs `ReadSettings`.
1110
+ *
1111
+ * @effect read
1112
+ * @permission ReadSettings
1113
+ */
1114
+ get(options?: Call): Promise<InvoiceConfig>;
1115
+ /**
1116
+ * Change the store's invoice settings. A store that is its legal entity's only numbering
1117
+ * store writes its numbering format (prefix, suffix, digits, year format and restart, for
1118
+ * invoices and credit notes) through to the legal entity's series (`legal_entity_numbering`);
1119
+ * one of several stores of a legal entity cannot change a format they share
1120
+ * (`LEGAL_ENTITY_NUMBERING_SHARED`, change it on the legal entity). The counters are never
1121
+ * set here. Needs `UpdateSettings`.
1122
+ *
1123
+ * Refusals: `NUMBERING_YEAR_FORMAT_INVALID`, `NUMBERING_AFFIX_INVALID`,
1124
+ * `NUMBERING_DIGITS_INVALID` (→ `ValidationError`), `NUMBER_PREFIX_RESERVED`,
1125
+ * `NUMBERING_RESTART_WOULD_REPEAT` and `LEGAL_ENTITY_NUMBERING_SHARED`
1126
+ * (→ `BusinessRuleError`). Against an engine without `columnUnitPriceAfterDiscount` the call
1127
+ * retries once without it in the answer; an input naming it is then refused.
1128
+ *
1129
+ * @effect write
1130
+ * @permission UpdateSettings
1131
+ */
1132
+ update(input: UpdateInvoiceConfigInput, options?: Call): Promise<InvoiceConfig>;
1133
+ }
1134
+ /** The invoicing providers, `admin.documents.invoicingProviders`. */
1135
+ export interface InvoicingProvidersModule {
1136
+ /**
1137
+ * Every invoicing provider installed, with whether this store could switch to it. A complete
1138
+ * list. Needs `ReadSettings`.
1139
+ *
1140
+ * @effect read
1141
+ * @permission ReadSettings
1142
+ */
1143
+ list(options?: Call): Promise<Page<InvoicingProvider>>;
1144
+ /**
1145
+ * Hand the numbering of this store's invoices and credit notes to another provider (`platform`,
1146
+ * or an ERP's code): from then on its documents are numbered and booked there. Written through
1147
+ * to the legal entity's series. Answers the store's invoice settings. Needs `UpdateSettings`.
1148
+ *
1149
+ * Refusals: `INVOICING_PROVIDER_NOT_READY`, `INVOICING_PROVIDER_SWITCH_BLOCKED` and
1150
+ * `LEGAL_ENTITY_NUMBERING_SHARED` (→ `BusinessRuleError`); a code no installed plugin
1151
+ * registered is `INVOICING_PROVIDER_UNAVAILABLE`.
1152
+ *
1153
+ * @effect money
1154
+ * @permission UpdateSettings
1155
+ */
1156
+ set(provider: string, options?: Call): Promise<InvoiceConfig>;
1157
+ }
1158
+ /** The store's external booking attempts, `admin.documents.issues`. */
1159
+ export interface FinancialDocumentIssuesModule {
1160
+ /**
1161
+ * This store's attempts to book documents in an external invoicing provider, newest first.
1162
+ * Paged: `limit` 1 to 200 (default 50), `after` the previous page's cursor. Needs `ReadSettings`.
1163
+ *
1164
+ * @effect read
1165
+ * @permission ReadSettings
1166
+ */
1167
+ list(options?: FinancialDocumentIssueListOptions): Promise<Page<FinancialDocumentIssue>>;
1168
+ /**
1169
+ * Close an attempt whose outcome could not be established, after checking the ERP by hand:
1170
+ * the ERP does not have the document. Issuing it again books it afresh. `reason` is required.
1171
+ * Needs `UpdateSettings`.
1172
+ *
1173
+ * Refusals: `INVOICING_ISSUE_NOT_FOUND` (→ `NotFoundError`; another store's too),
1174
+ * `INVOICING_ISSUE_CONFLICT` (→ `ConflictError`: no reason, or the attempt is not one an admin
1175
+ * may close) and `INVOICING_ISSUE_IN_PROGRESS` (another call is still talking to the provider).
1176
+ *
1177
+ * @effect destructive
1178
+ * @permission UpdateSettings
1179
+ */
1180
+ abandon(id: string, reason: string, options?: Call): Promise<FinancialDocumentIssue>;
1181
+ /**
1182
+ * Close a document the ERP booked but this store never recorded, after an admin handled it in
1183
+ * the ERP (reversed it, or found it deleted). Nothing is booked again. `reason` is required.
1184
+ * Needs `UpdateSettings`. Refusals as {@link abandon}.
1185
+ *
1186
+ * @effect write
1187
+ * @permission UpdateSettings
1188
+ */
1189
+ resolve(id: string, reason: string, options?: Call): Promise<FinancialDocumentIssue>;
1190
+ }
1191
+ /** The store's packing-slip settings, `admin.documents.packingSlipConfig`. */
1192
+ export interface PackingSlipConfigModule {
1193
+ /**
1194
+ * The store's packing-slip settings as it applies them: its own row (created with the
1195
+ * defaults on first read), with the numbering format of the organization when the store
1196
+ * inherits it. Needs `ReadSettings`.
1197
+ *
1198
+ * @effect read
1199
+ * @permission ReadSettings
1200
+ */
1201
+ get(options?: Call): Promise<PackingSlipConfig>;
1202
+ /**
1203
+ * Change the store's packing-slip settings. A store inheriting its organization's numbering
1204
+ * format (`settings.numbering_formats`) cannot change it here: a changed format field is refused
1205
+ * `ORGANIZATION_SETTINGS_INHERITED`, while one equal to the inherited value is an echo and is
1206
+ * dropped. Refusals: `NUMBERING_YEAR_FORMAT_INVALID` (→ `ValidationError`). Needs
1207
+ * `UpdateSettings`.
1208
+ *
1209
+ * @effect write
1210
+ * @permission UpdateSettings
1211
+ */
1212
+ update(input: UpdatePackingSlipConfigInput, options?: Call): Promise<PackingSlipConfig>;
1213
+ }
698
1214
  /**
699
1215
  * The store's documents: issuing them, reading the facts they were built from,
700
1216
  * and the tenant-registered blocks that extend them (headless spec §8.5).
@@ -713,10 +1229,12 @@ export interface DocumentExtensionsModule {
713
1229
  * `code` the schema keyword that refused — so a form marks each offending field
714
1230
  * rather than showing one joined sentence.
715
1231
  *
716
- * `idempotencyKey` on these calls is recorded on the wire and acts on nothing:
717
- * the Admin API is GraphQL and has no header for it (see {@link Call}). A
718
- * repeated `generate` is a second attempt, which for an invoice the platform
719
- * refuses on its own — an order carries at most one live standard invoice.
1232
+ * `idempotencyKey` acts on `issuePartialCreditNote` and `commitCorrection`, which
1233
+ * send it as an argument. On the other calls it is recorded on the wire and acts
1234
+ * on nothing: the Admin API is GraphQL and has no header for it (see
1235
+ * {@link Call}). A repeated `generate` is a second attempt, which for an invoice
1236
+ * the platform refuses on its own — an order carries at most one live standard
1237
+ * invoice.
720
1238
  */
721
1239
  export interface DocumentsModule {
722
1240
  /**
@@ -731,12 +1249,36 @@ export interface DocumentsModule {
731
1249
  * the money books into, and the caller's clock is not the store's. The
732
1250
  * overloads put that in the type system, and refuse an invoice-only option on
733
1251
  * a packing slip the same way.
1252
+ *
1253
+ * Both draw a number from the store's series. Issuing an invoice also documents each refund
1254
+ * made before it with a credit note, in the same run (ruling U13), and locks the order.
1255
+ *
1256
+ * **Coded refusals** (nothing is numbered): an invoice for an order that already has a live
1257
+ * standard invoice is `INVOICE_ISSUE_CONFLICT` (→ `ConflictError`); for an order in a state no
1258
+ * invoice is issued in, `INVOICE_ORDER_STATE_BLOCKS_ISSUE`; in a store with invoicing switched
1259
+ * off, `INVOICE_GENERATION_DISABLED`; for an order a live accounts-receivable invoice bills,
1260
+ * `INVOICE_LEDGER_CONFLICT` (→ `ConflictError`: an order is billed by one ledger; `details`
1261
+ * names the AR invoice; an engine before this refusal ISSUED the store invoice, billing the
1262
+ * order twice). A packing slip for a cancelled fulfillment is
1263
+ * `PACKING_SLIP_FULFILLMENT_CANCELLED`; in a store with packing slips off,
1264
+ * `PACKING_SLIP_GENERATION_DISABLED` (all → `BusinessRuleError`). An engine before these codes
1265
+ * answered them uncoded, with the same sentence. A packing slip that already exists is answered
1266
+ * as it is (see {@link regeneratePackingSlip}). A credential restricted to stock locations (an
1267
+ * API token or app installation with `locationIds`) is refused a packing slip first, with
1268
+ * `LOCATION_OUT_OF_SCOPE` (→ `BusinessRuleError`), for a fulfillment that does not ship from one
1269
+ * of them, another store's and a missing one included.
1270
+ *
1271
+ * @effect money
734
1272
  */
735
1273
  generate(subjectId: string, type: 'invoice', options: GenerateDocumentOptions & {
736
1274
  invoicedOn: string;
737
1275
  }): Promise<Invoice>;
738
1276
  generate(subjectId: string, type: 'packing-slip', options?: Omit<GenerateDocumentOptions, 'invoicedOn' | 'note'>): Promise<PackingSlip>;
739
- /** The numbered facts a document was built from. Needs `ReadOrder`. */
1277
+ /**
1278
+ * The numbered facts a document was built from. Needs `ReadOrder`.
1279
+ *
1280
+ * @effect read
1281
+ */
740
1282
  data(documentId: string, type: DocumentType, options?: Call): Promise<DocumentData>;
741
1283
  /**
742
1284
  * A five-minute download link for one of this store's documents. Needs
@@ -751,11 +1293,21 @@ export interface DocumentsModule {
751
1293
  * `ENTITY_NOT_FOUND` (→ `NotFoundError`) for a document outside this store
752
1294
  * or of another type; `DOCUMENT_PDF_NOT_AVAILABLE` when no PDF is stored for
753
1295
  * it (a credit note whose render has not landed).
1296
+ *
1297
+ * @effect read
754
1298
  */
755
1299
  downloadUrl(documentId: string, type: DocumentType, options?: Call): Promise<DocumentDownloadUrl>;
756
- /** Every invoice of an order, including voided ones. */
1300
+ /**
1301
+ * Every invoice of an order, including voided ones.
1302
+ *
1303
+ * @effect read
1304
+ */
757
1305
  invoices(orderId: string, options?: Call): Promise<Page<Invoice>>;
758
- /** Every credit note of an order. */
1306
+ /**
1307
+ * Every credit note of an order.
1308
+ *
1309
+ * @effect read
1310
+ */
759
1311
  creditNotes(orderId: string, options?: Call): Promise<Page<CreditNote>>;
760
1312
  /**
761
1313
  * The retail invoices and credit notes of a customer's orders in THIS store, newest first (the
@@ -767,18 +1319,29 @@ export interface DocumentsModule {
767
1319
  * the `total`. `ENTITY_NOT_FOUND` (→ `NotFoundError`) for a customer this store does not hold;
768
1320
  * a `limit` outside 1 to 100 is refused `USER_INPUT_ERROR` (→ `ValidationError`). An engine
769
1321
  * older than this method fails the document's validation.
1322
+ *
1323
+ * @effect read
770
1324
  */
771
1325
  forCustomer(customerId: string, options?: ListOptions): Promise<Page<CustomerDocument>>;
772
1326
  /**
773
1327
  * Render what an invoice WOULD look like, without numbering or storing one.
774
- * Returns the PDF bytes (the wire carries base64; this decodes it).
1328
+ * Returns the PDF bytes (the wire carries base64; this decodes it). Needs `UpdateOrder`.
1329
+ * Refused like {@link generate}'s invoice: `INVOICE_ORDER_STATE_BLOCKS_ISSUE` (an order whose
1330
+ * payment is still being arranged included; {@link sendProforma} still sends its proforma),
1331
+ * `INVOICE_GENERATION_DISABLED`.
1332
+ *
1333
+ * @effect read
775
1334
  */
776
1335
  previewInvoice(orderId: string, options: {
777
1336
  invoicedOn: string;
778
1337
  languageCode?: string;
779
1338
  note?: string;
780
1339
  } & Call): Promise<Uint8Array>;
781
- /** Email an order's invoice. True when the dispatch was accepted. */
1340
+ /**
1341
+ * Email an order's invoice. True when the dispatch was accepted.
1342
+ *
1343
+ * @effect write
1344
+ */
782
1345
  sendInvoiceEmail(input: SendInvoiceEmailInput, options?: Call): Promise<boolean>;
783
1346
  /**
784
1347
  * Email one of this store's credit notes: the same email and PDF the
@@ -791,9 +1354,15 @@ export interface DocumentsModule {
791
1354
  * `CREDIT_NOTE_PDF_NOT_AVAILABLE` (its PDF could not be rendered, nothing was
792
1355
  * sent), `CREDIT_NOTE_EMAIL_UNAVAILABLE` and `CREDIT_NOTE_EMAIL_SEND_FAILED`
793
1356
  * (the email provider's code when it gave one; its reason is in the email deliveries log) (→ `BusinessRuleError`).
1357
+ *
1358
+ * @effect write
794
1359
  */
795
1360
  sendCreditNoteEmail(input: SendCreditNoteEmailInput, options?: Call): Promise<boolean>;
796
- /** Every "Email the credit note" send of an order, newest first. Needs `ReadOrder`. */
1361
+ /**
1362
+ * Every "Email the credit note" send of an order, newest first. Needs `ReadOrder`.
1363
+ *
1364
+ * @effect read
1365
+ */
797
1366
  creditNoteEmailSends(orderId: string, options?: Call): Promise<Page<CreditNoteEmailSend>>;
798
1367
  /**
799
1368
  * Credit PART of a still-valid invoice; the invoice keeps standing.
@@ -822,8 +1391,32 @@ export interface DocumentsModule {
822
1391
  * An engine before these codes answered each one as `USER_INPUT_ERROR`
823
1392
  * (`ValidationError`) with the same sentence. Field-shape refusals (an empty
824
1393
  * reason, an invalid line) stay `USER_INPUT_ERROR`.
1394
+ *
1395
+ * **`options.idempotencyKey`: one per attempt.** A retry of that attempt (a
1396
+ * timeout, a dropped connection, a double click) re-sends it and gets the
1397
+ * first answer back: the same credit note, or the same refusal, with nothing
1398
+ * issued or refunded twice. Left out, one is made up and returned as
1399
+ * `idempotencyKey` on the result and on a thrown error. The SAME key with a
1400
+ * different input is `IDEMPOTENCY_CONFLICT` (`ConflictError`, 409); a repeat
1401
+ * while the first call still runs is `IDEMPOTENCY_IN_PROGRESS`. A new attempt
1402
+ * (after a refusal, or after the provider declined the refund) takes a new
1403
+ * key. A repeat answers `IDEMPOTENCY_OUTCOME_UNKNOWN` in two cases. Either the
1404
+ * refund's answer never came: record the provider's answer
1405
+ * (`admin.payments.reconcileRefund`), which frees the key. Or the refund was
1406
+ * made and the credit note could not follow: the key stays spent (there is
1407
+ * nothing to reconcile), so issue the credit note without `refundPaymentId`
1408
+ * under a new key. An engine before the key refuses the call (GraphQL
1409
+ * validation): deploy the engine first.
1410
+ *
1411
+ * **The refund form (`refundPaymentId`) is deprecated** in favour of
1412
+ * {@link commitCorrection}, which plans the correction first and refuses one
1413
+ * that moved since the merchant saw it. A document-only credit stays.
1414
+ *
1415
+ * @effect money
825
1416
  */
826
- issuePartialCreditNote(input: IssuePartialCreditNoteInput, options?: Call): Promise<CreditNote>;
1417
+ issuePartialCreditNote(input: IssuePartialCreditNoteInput, options?: Call): Promise<CreditNote & {
1418
+ idempotencyKey: string;
1419
+ }>;
827
1420
  /**
828
1421
  * What a correction of an issued invoice would issue, give back and refuse, before anything
829
1422
  * is written. Without an `outcome` it answers which outcomes the invoice can take and the
@@ -842,12 +1435,29 @@ export interface DocumentsModule {
842
1435
  *
843
1436
  * What would stop the correction is a `blocker`, not an error: `INVOICE_CORRECTION_*`, the
844
1437
  * issuing door's own codes (`INVOICE_HAS_PARTIAL_CREDITS`, `REFUND_EXCEEDS_PAYMENT`, …) and
845
- * the numbering provider's (`INVOICING_PROVIDER_NOT_READY`, …). Refusals of the call:
1438
+ * the numbering provider's (`INVOICING_PROVIDER_NOT_READY`, …). A partial credit never
1439
+ * credits what a return whose money moved already refunded, nor what an earlier live
1440
+ * correction already credited: `givenBack` says what that is, and lines above it block
1441
+ * `INVOICE_CORRECTION_QUANTITY_ALREADY_RETURNED`, `INVOICE_CORRECTION_AMOUNT_ALREADY_RETURNED`
1442
+ * or `INVOICE_CORRECTION_SHIPPING_ALREADY_REFUNDED` where a return gave some back, else
1443
+ * `INVOICE_CORRECTION_QUANTITY_ALREADY_CREDITED`, `INVOICE_CORRECTION_AMOUNT_ALREADY_CREDITED`
1444
+ * or `INVOICE_CORRECTION_SHIPPING_ALREADY_CREDITED` naming the credit notes (path
1445
+ * `lines/<i>/<field>`). Refusals of the call:
846
1446
  * `INVOICE_CORRECTION_INVOICE_NOT_FOUND` (→ `NotFoundError`; another store's invoice too),
847
1447
  * `INVALID_INVOICE_CORRECTION_INPUT` (→ `ValidationError`, `details[].field` names the field)
848
1448
  * and `INVOICE_CORRECTION_LEDGER_NOT_ALLOWED` (→ `PermissionDeniedError`: AR on a store
849
1449
  * without the AR ledger). Needs `UpdateOrder`. An engine older than this method fails the
850
1450
  * document's validation.
1451
+ *
1452
+ * Wrong payment terms are a details correction (`DETAILS_WRONG`): state `paymentTermsDays` or
1453
+ * `paymentConditionCode`, whichever `paymentTerms.accepts` names, and `paymentTerms.replacement`
1454
+ * answers what the corrected invoice prints and its due date. Blockers of those:
1455
+ * `INVOICE_CORRECTION_PAYMENT_TERMS_NOT_ACCEPTED` (the other member, or terms where none can be
1456
+ * stated), `PAYMENT_CONDITION_UNKNOWN`, `PAYMENT_CONDITION_UNUSABLE`,
1457
+ * `PAYMENT_TERMS_UNREADABLE`, `INVOICE_PAYMENT_TERMS_UNREPRESENTABLE` (no single due date), and
1458
+ * `INVOICE_CORRECTION_NOTHING_CHANGED` for the terms the invoice already states.
1459
+ *
1460
+ * @effect read
851
1461
  */
852
1462
  planCorrection(input: InvoiceCorrectionInput, options?: Call): Promise<InvoiceCorrectionPlan>;
853
1463
  /**
@@ -887,6 +1497,13 @@ export interface DocumentsModule {
887
1497
  *
888
1498
  * On an ERP-numbered store (`documents[].numberingProvider`), the documents are booked in the
889
1499
  * ERP and cannot be undone from the platform.
1500
+ *
1501
+ * A details correction that states payment terms also writes them to the order, in the same
1502
+ * transaction: the order's `paymentTermsDays` / `paymentConditionCode` (the other one cleared)
1503
+ * and its terms snapshot (`Order.paymentTerms`). It is the one way to change an invoiced
1504
+ * order's terms; the order's own doors refuse them (`ORDER_INVOICE_LOCKED`). No amount changes.
1505
+ *
1506
+ * @effect money
890
1507
  */
891
1508
  commitCorrection(input: InvoiceCorrectionInput, options: CommitInvoiceCorrectionCall): Promise<InvoiceCorrectionCommit & {
892
1509
  idempotencyKey: string;
@@ -900,30 +1517,136 @@ export interface DocumentsModule {
900
1517
  * `INVOICE_GENERATION_DISABLED` (→ `BusinessRuleError`). An engine before these codes answered
901
1518
  * the first four as `USER_INPUT_ERROR` (`ValidationError`) with the same sentence, and the last
902
1519
  * two as an uncoded error. Field-shape refusals (an invalid line) stay `USER_INPUT_ERROR`.
1520
+ *
1521
+ * @effect money
903
1522
  */
904
1523
  issueSupplementaryInvoice(input: IssueSupplementaryInvoiceInput, options?: Call): Promise<Invoice>;
1524
+ /**
1525
+ * Email the order's proforma: the invoice it WOULD issue on `invoicedOn`, marked proforma, to
1526
+ * each recipient. Nothing is numbered, stored or locked; each send is recorded (see
1527
+ * {@link proformaSends}) with the addresses it reached. True once it went out to at least one.
1528
+ * Needs `UpdateOrder`.
1529
+ *
1530
+ * Refusals, nothing sent: `INVOICE_ORDER_STATE_BLOCKS_ISSUE` (a cart, `Draft`, a cancelled
1531
+ * order or a state the store keeps uninvoiced; an order whose payment is still being arranged,
1532
+ * `ArrangingPayment`, IS sent its proforma though no invoice is issued there) and
1533
+ * `INVOICE_GENERATION_DISABLED`; `PROFORMA_SEND_REFUSED` (this server has no email delivery);
1534
+ * `PROFORMA_SEND_FAILED` (the email provider failed the send to every recipient); an empty,
1535
+ * over-long (more than 10) or unmailable recipient list, or a message over 500 characters, is
1536
+ * `USER_INPUT_ERROR` (→ `ValidationError`). Recipients come from the caller; the platform's
1537
+ * proposal is {@link emailRecipients} with `proforma`.
1538
+ *
1539
+ * @effect write
1540
+ * @permission UpdateOrder
1541
+ */
1542
+ sendProforma(orderId: string, input: SendProformaInput, options?: Call): Promise<boolean>;
1543
+ /**
1544
+ * Every proforma send of an order, newest first. A complete list. Needs `ReadOrder`.
1545
+ *
1546
+ * @effect read
1547
+ * @permission ReadOrder
1548
+ */
1549
+ proformaSends(orderId: string, options?: Call): Promise<Page<ProformaSend>>;
1550
+ /**
1551
+ * Every "Email the invoice" send of an order ({@link sendInvoiceEmail}), newest first. A
1552
+ * complete list. Needs `ReadOrder`.
1553
+ *
1554
+ * @effect read
1555
+ * @permission ReadOrder
1556
+ */
1557
+ invoiceEmailSends(orderId: string, options?: Call): Promise<Page<InvoiceEmailSend>>;
1558
+ /**
1559
+ * Who the order's document email goes to unless the caller names its own list: the customer
1560
+ * in `to`, unless one of their notification recipients subscribed to the email is set to
1561
+ * receive it instead (then those, in the order they were added); their other subscribed
1562
+ * recipients in `cc`. De-duplicated without regard to case, and an address the send doors
1563
+ * would refuse is left out. `proforma` is addressed like the invoice email. The dialogs that
1564
+ * send {@link sendInvoiceEmail}, {@link sendProforma} and {@link sendCreditNoteEmail} pre-fill
1565
+ * from it. Needs `ReadOrder`.
1566
+ *
1567
+ * `ENTITY_NOT_FOUND` (→ `NotFoundError`) for an order outside this store. An engine older than
1568
+ * this method fails the document's validation.
1569
+ *
1570
+ * @effect read
1571
+ * @permission ReadOrder
1572
+ */
1573
+ emailRecipients(orderId: string, event: DocumentEmailEvent, options?: Call): Promise<DocumentEmailRecipients>;
1574
+ /**
1575
+ * Redraw a fulfillment's packing slip under its OWN number, from the extension blocks it was
1576
+ * issued with (it takes no new ones), and store the new PDF in place of the old. Every refusal
1577
+ * comes before the slip is touched, so a refused redraw leaves the slip as it was:
1578
+ * `PACKING_SLIP_FULFILLMENT_CANCELLED` and `PACKING_SLIP_GENERATION_DISABLED`
1579
+ * (→ `BusinessRuleError`). A fulfillment with no slip yet gets a new one, which draws a
1580
+ * number: the method takes that, its strongest effect. Needs `UpdateOrder`. A credential
1581
+ * restricted to stock locations is refused first, `LOCATION_OUT_OF_SCOPE`, for a fulfillment
1582
+ * that does not ship from one of them, as {@link generate} is.
1583
+ *
1584
+ * @effect money
1585
+ * @permission UpdateOrder
1586
+ */
1587
+ regeneratePackingSlip(fulfillmentId: string, options?: {
1588
+ languageCode?: string;
1589
+ } & Call): Promise<PackingSlip>;
1590
+ /**
1591
+ * The fulfillment fields each fulfillment handler offers a packing slip. A complete list.
1592
+ * Needs `ReadSettings`.
1593
+ *
1594
+ * @effect read
1595
+ * @permission ReadSettings
1596
+ */
1597
+ packingSlipFields(options?: Call): Promise<Page<PackingSlipHandlerFields>>;
1598
+ invoiceConfig: InvoiceConfigModule;
1599
+ invoicingProviders: InvoicingProvidersModule;
1600
+ issues: FinancialDocumentIssuesModule;
1601
+ packingSlipConfig: PackingSlipConfigModule;
905
1602
  extensions: DocumentExtensionsModule;
1603
+ /** The accounts-receivable ledger's documents: AR invoices, statements and credit notes. */
1604
+ ar: ArDocumentsModule;
1605
+ /** The store's email delivery log (counts, a retry) and a template's test send. */
1606
+ emails: DocumentEmailsModule;
906
1607
  }
907
- export declare const GENERATE_INVOICE_MUTATION = "\n mutation GenerateInvoice(\n $orderId: ID!\n $invoicedOn: String!\n $languageCode: String\n $note: String\n $extensions: [DocumentExtensionInput!]\n ) {\n generateInvoice(\n orderId: $orderId\n invoicedOn: $invoicedOn\n languageCode: $languageCode\n note: $note\n extensions: $extensions\n ) { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n createdAt\n }\n }\n";
1608
+ export declare const GENERATE_INVOICE_MUTATION = "\n mutation GenerateInvoice(\n $orderId: ID!\n $invoicedOn: String!\n $languageCode: String\n $note: String\n $extensions: [DocumentExtensionInput!]\n ) {\n generateInvoice(\n orderId: $orderId\n invoicedOn: $invoicedOn\n languageCode: $languageCode\n note: $note\n extensions: $extensions\n ) { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n amountPaid\n amountDue\n createdAt\n }\n }\n";
908
1609
  export declare const GENERATE_PACKING_SLIP_MUTATION = "\n mutation GeneratePackingSlip(\n $fulfillmentId: ID!\n $languageCode: String\n $extensions: [DocumentExtensionInput!]\n ) {\n generatePackingSlip(\n fulfillmentId: $fulfillmentId\n languageCode: $languageCode\n extensions: $extensions\n ) { \n id\n packingSlipNumber\n fulfillmentId\n languageCode\n storageKey\n createdAt\n }\n }\n";
909
1610
  export declare const DOCUMENT_DATA_QUERY = "\n query DocumentData($documentId: ID!, $type: DocumentType!) {\n documentData(documentId: $documentId, type: $type)\n }\n";
910
1611
  export declare const CREATE_DOCUMENT_DOWNLOAD_URL_MUTATION = "\n mutation CreateDocumentDownloadUrl($documentId: ID!, $type: DocumentType!) {\n createDocumentDownloadUrl(documentId: $documentId, type: $type) {\n url\n expiresAt\n filename\n }\n }\n";
911
- export declare const ORDER_INVOICES_QUERY = "\n query OrderInvoices($orderId: ID!) {\n orderInvoices(orderId: $orderId) { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n createdAt\n }\n }\n";
1612
+ export declare const ORDER_INVOICES_QUERY = "\n query OrderInvoices($orderId: ID!) {\n orderInvoices(orderId: $orderId) { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n amountPaid\n amountDue\n createdAt\n }\n }\n";
912
1613
  export declare const ORDER_CREDIT_NOTES_QUERY = "\n query OrderCreditNotes($orderId: ID!) {\n orderCreditNotes(orderId: $orderId) { \n id\n creditNoteNumber\n issuedOn\n totalWithTax\n currencyCode\n reason\n invoiceId\n kind\n reversalOfInvoiceId\n returnId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n refundId\n numberingProvider\n storageKey\n createdAt\n }\n }\n";
913
- export declare const CUSTOMER_DOCUMENTS_QUERY = "\n query CustomerDocuments($customerId: ID!, $options: CustomerDocumentListOptions) {\n customerDocuments(customerId: $customerId, options: $options) {\n totalItems\n items {\n type\n orderId\n orderCode\n invoice { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n createdAt\n }\n creditNote { \n id\n creditNoteNumber\n issuedOn\n totalWithTax\n currencyCode\n reason\n invoiceId\n kind\n reversalOfInvoiceId\n returnId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n refundId\n numberingProvider\n storageKey\n createdAt\n }\n }\n }\n }\n";
1614
+ export declare const CUSTOMER_DOCUMENTS_QUERY = "\n query CustomerDocuments($customerId: ID!, $options: CustomerDocumentListOptions) {\n customerDocuments(customerId: $customerId, options: $options) {\n totalItems\n items {\n type\n orderId\n orderCode\n invoice { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n amountPaid\n amountDue\n createdAt\n }\n creditNote { \n id\n creditNoteNumber\n issuedOn\n totalWithTax\n currencyCode\n reason\n invoiceId\n kind\n reversalOfInvoiceId\n returnId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n refundId\n numberingProvider\n storageKey\n createdAt\n }\n }\n }\n }\n";
914
1615
  export declare const PREVIEW_INVOICE_MUTATION = "\n mutation PreviewInvoice($orderId: ID!, $invoicedOn: String!, $languageCode: String, $note: String) {\n previewInvoice(orderId: $orderId, invoicedOn: $invoicedOn, languageCode: $languageCode, note: $note)\n }\n";
915
1616
  export declare const SEND_INVOICE_EMAIL_MUTATION = "\n mutation SendInvoiceEmail($input: SendInvoiceEmailInput!) {\n sendInvoiceEmail(input: $input)\n }\n";
916
1617
  export declare const SEND_CREDIT_NOTE_EMAIL_MUTATION = "\n mutation SendCreditNoteEmail($input: SendCreditNoteEmailInput!) {\n sendCreditNoteEmail(input: $input)\n }\n";
917
1618
  export declare const ORDER_CREDIT_NOTE_EMAIL_SENDS_QUERY = "\n query OrderCreditNoteEmailSends($orderId: ID!) {\n orderCreditNoteEmailSends(orderId: $orderId) {\n id\n orderId\n creditNoteId\n recipientsTo\n recipientsCc\n createdAt\n }\n }\n";
918
- export declare const ISSUE_PARTIAL_CREDIT_NOTE_MUTATION = "\n mutation IssuePartialCreditNote($input: IssuePartialCreditNoteInput!) {\n issuePartialCreditNote(input: $input) { \n id\n creditNoteNumber\n issuedOn\n totalWithTax\n currencyCode\n reason\n invoiceId\n kind\n reversalOfInvoiceId\n returnId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n refundId\n numberingProvider\n storageKey\n createdAt\n }\n }\n";
919
- export declare const ISSUE_SUPPLEMENTARY_INVOICE_MUTATION = "\n mutation IssueSupplementaryInvoice($input: IssueSupplementaryInvoiceInput!) {\n issueSupplementaryInvoice(input: $input) { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n createdAt\n }\n }\n";
920
- export declare const PLAN_INVOICE_CORRECTION_QUERY = "\n query PlanInvoiceCorrection($input: InvoiceCorrectionInput!) {\n planInvoiceCorrection(input: $input) { \n planHash\n ledger\n invoice { id invoiceNumber kind totalWithTax creditable currencyCode orderIds voidedOn }\n outcomes {\n outcome\n available\n unavailableCode\n unavailableMessage\n document\n needsLines\n prefillsLines\n needsAddresses\n allowsRefund\n allowsNote\n }\n prefill {\n source\n basis\n lines { description sku orderLineId quantity unitPrice unitPriceBasis taxRate }\n seededGross\n billedGross\n differs\n }\n outcome\n operation\n lineTotals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n documents {\n type\n kind\n documentDate\n currencyCode\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n totals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n issuer\n numbering { provider providerLabel external ready legalEntityId testStore }\n }\n refund {\n amount\n available\n unavailableCode\n unavailableMessage\n options { paymentId method amount refundable }\n recommendedPaymentId\n }\n accountCredit { available unavailableCode message }\n settlement\n blockers { code message path }\n }\n }\n";
1619
+ export declare const ISSUE_PARTIAL_CREDIT_NOTE_MUTATION = "\n mutation IssuePartialCreditNote($input: IssuePartialCreditNoteInput!, $idempotencyKey: String) {\n issuePartialCreditNote(input: $input, idempotencyKey: $idempotencyKey) { \n id\n creditNoteNumber\n issuedOn\n totalWithTax\n currencyCode\n reason\n invoiceId\n kind\n reversalOfInvoiceId\n returnId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n refundId\n numberingProvider\n storageKey\n createdAt\n }\n }\n";
1620
+ export declare const ISSUE_SUPPLEMENTARY_INVOICE_MUTATION = "\n mutation IssueSupplementaryInvoice($input: IssueSupplementaryInvoiceInput!) {\n issueSupplementaryInvoice(input: $input) { \n id\n invoiceNumber\n invoicedOn\n orderId\n languageCode\n storageKey\n totalWithTax\n currencyCode\n note\n voidedOn\n reversedByCreditNoteId\n supersededByInvoiceId\n reissueOfInvoiceId\n kind\n supplementsInvoiceId\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n numberingProvider\n amountPaid\n amountDue\n createdAt\n }\n }\n";
1621
+ export declare const PLAN_INVOICE_CORRECTION_QUERY = "\n query PlanInvoiceCorrection($input: InvoiceCorrectionInput!) {\n planInvoiceCorrection(input: $input) { \n planHash\n ledger\n invoice { id invoiceNumber kind totalWithTax creditable currencyCode orderIds voidedOn }\n outcomes {\n outcome\n available\n unavailableCode\n unavailableMessage\n document\n needsLines\n prefillsLines\n needsAddresses\n allowsRefund\n allowsNote\n }\n prefill {\n source\n basis\n lines { description sku orderLineId quantity unitPrice unitPriceBasis taxRate }\n seededGross\n billedGross\n differs\n }\n outcome\n operation\n lineTotals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n documents {\n type\n kind\n documentDate\n currencyCode\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n totals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n issuer\n numbering { provider providerLabel external ready legalEntityId testStore }\n }\n refund {\n amount\n available\n unavailableCode\n unavailableMessage\n options { paymentId method amount refundable }\n recommendedPaymentId\n }\n accountCredit { available unavailableCode message book }\n settlement\n blockers { code message path }\n returnedGoods {\n lines {\n orderLineId\n description\n quantity\n returnedQuantity\n creditedQuantity\n creditableQuantity\n creditableAmount\n returnCodes\n }\n shipping { charged refunded credited creditable returnCodes }\n }\n givenBack {\n lines {\n orderLineId\n description\n quantity\n returnedQuantity\n creditedQuantity\n priceCredited\n creditableQuantity\n creditableAmount\n returnCodes\n creditNoteNumbers\n }\n shipping { charged refunded credited creditable returnCodes creditNoteNumbers }\n }\n paymentTerms {\n invoiced { summary paymentDays conditionCode dueOn }\n replacement { summary paymentDays conditionCode dueOn }\n accepts\n unavailableMessage\n }\n }\n }\n";
921
1622
  /**
922
1623
  * Its own document on purpose: `commitInvoiceCorrection` exists only on an engine with the
923
1624
  * correction commit, so on an older one this call alone fails validation.
924
1625
  */
925
- export declare const COMMIT_INVOICE_CORRECTION_MUTATION = "\n mutation CommitInvoiceCorrection(\n $input: InvoiceCorrectionInput!\n $expectedPlanHash: String!\n $idempotencyKey: String!\n ) {\n commitInvoiceCorrection(\n input: $input\n expectedPlanHash: $expectedPlanHash\n idempotencyKey: $idempotencyKey\n ) {\n plan { \n planHash\n ledger\n invoice { id invoiceNumber kind totalWithTax creditable currencyCode orderIds voidedOn }\n outcomes {\n outcome\n available\n unavailableCode\n unavailableMessage\n document\n needsLines\n prefillsLines\n needsAddresses\n allowsRefund\n allowsNote\n }\n prefill {\n source\n basis\n lines { description sku orderLineId quantity unitPrice unitPriceBasis taxRate }\n seededGross\n billedGross\n differs\n }\n outcome\n operation\n lineTotals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n documents {\n type\n kind\n documentDate\n currencyCode\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n totals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n issuer\n numbering { provider providerLabel external ready legalEntityId testStore }\n }\n refund {\n amount\n available\n unavailableCode\n unavailableMessage\n options { paymentId method amount refundable }\n recommendedPaymentId\n }\n accountCredit { available unavailableCode message }\n settlement\n blockers { code message path }\n }\n documents {\n ledger\n type\n id\n number\n kind\n totalWithTax\n currencyCode\n issuedOn\n numberingProvider\n }\n refund { id state total paymentId }\n accountCredit { amount currencyCode unappliedCashIds }\n }\n }\n";
1626
+ export declare const COMMIT_INVOICE_CORRECTION_MUTATION = "\n mutation CommitInvoiceCorrection(\n $input: InvoiceCorrectionInput!\n $expectedPlanHash: String!\n $idempotencyKey: String!\n ) {\n commitInvoiceCorrection(\n input: $input\n expectedPlanHash: $expectedPlanHash\n idempotencyKey: $idempotencyKey\n ) {\n plan { \n planHash\n ledger\n invoice { id invoiceNumber kind totalWithTax creditable currencyCode orderIds voidedOn }\n outcomes {\n outcome\n available\n unavailableCode\n unavailableMessage\n document\n needsLines\n prefillsLines\n needsAddresses\n allowsRefund\n allowsNote\n }\n prefill {\n source\n basis\n lines { description sku orderLineId quantity unitPrice unitPriceBasis taxRate }\n seededGross\n billedGross\n differs\n }\n outcome\n operation\n lineTotals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n documents {\n type\n kind\n documentDate\n currencyCode\n lines { \n description\n sku\n orderLineId\n quantity\n unitPriceNet\n unitPriceWithTax\n taxRate\n lineTotalNet\n lineTotalWithTax\n unitPriceBasis\n }\n totals { \n net\n tax\n gross\n taxSummary { taxRate net tax gross }\n }\n issuer\n numbering { provider providerLabel external ready legalEntityId testStore }\n }\n refund {\n amount\n available\n unavailableCode\n unavailableMessage\n options { paymentId method amount refundable }\n recommendedPaymentId\n }\n accountCredit { available unavailableCode message book }\n settlement\n blockers { code message path }\n returnedGoods {\n lines {\n orderLineId\n description\n quantity\n returnedQuantity\n creditedQuantity\n creditableQuantity\n creditableAmount\n returnCodes\n }\n shipping { charged refunded credited creditable returnCodes }\n }\n givenBack {\n lines {\n orderLineId\n description\n quantity\n returnedQuantity\n creditedQuantity\n priceCredited\n creditableQuantity\n creditableAmount\n returnCodes\n creditNoteNumbers\n }\n shipping { charged refunded credited creditable returnCodes creditNoteNumbers }\n }\n paymentTerms {\n invoiced { summary paymentDays conditionCode dueOn }\n replacement { summary paymentDays conditionCode dueOn }\n accepts\n unavailableMessage\n }\n }\n documents {\n ledger\n type\n id\n number\n kind\n totalWithTax\n currencyCode\n issuedOn\n numberingProvider\n }\n refund { id state total paymentId }\n accountCredit { amount currencyCode unappliedCashIds book storeCreditEntryIds }\n }\n }\n";
926
1627
  export declare const DOCUMENT_EXTENSIONS_QUERY = "\n query DocumentExtensions {\n documentExtensions { \n key\n documentTypes\n schemaVersion\n jsonSchema\n templateFragment\n createdAt\n updatedAt\n }\n }\n";
927
1628
  export declare const REGISTER_DOCUMENT_EXTENSION_MUTATION = "\n mutation RegisterDocumentExtension($input: RegisterDocumentExtensionInput!) {\n registerDocumentExtension(input: $input) { \n key\n documentTypes\n schemaVersion\n jsonSchema\n templateFragment\n createdAt\n updatedAt\n }\n }\n";
928
1629
  export declare const DELETE_DOCUMENT_EXTENSION_MUTATION = "\n mutation DeleteDocumentExtension($key: String!) {\n deleteDocumentExtension(key: $key)\n }\n";
1630
+ export declare const INVOICE_CONFIG_QUERY = "\n query InvoiceConfig {\n invoiceConfig { \n \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n creditNoteNextNumber\n creditNotePrefix\n creditNoteSuffix\n creditNoteDigits\n creditNoteYearFormat\n creditNoteYearReset\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n legalIdentityBlock\n footerText\n defaultLanguage\n externalNumberOrderField\n invoicingProvider\n\n columnUnitPriceAfterDiscount\n }\n }\n";
1631
+ export declare const UPDATE_INVOICE_CONFIG_MUTATION = "\n mutation UpdateInvoiceConfig($input: UpdateInvoiceConfigInput!) {\n updateInvoiceConfig(input: $input) { \n \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n creditNoteNextNumber\n creditNotePrefix\n creditNoteSuffix\n creditNoteDigits\n creditNoteYearFormat\n creditNoteYearReset\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n legalIdentityBlock\n footerText\n defaultLanguage\n externalNumberOrderField\n invoicingProvider\n\n columnUnitPriceAfterDiscount\n }\n }\n";
1632
+ /** {@link INVOICE_CONFIG_QUERY} for an engine without `columnUnitPriceAfterDiscount`. */
1633
+ export declare const INVOICE_CONFIG_QUERY_LEGACY = "\n query InvoiceConfig {\n invoiceConfig { \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n creditNoteNextNumber\n creditNotePrefix\n creditNoteSuffix\n creditNoteDigits\n creditNoteYearFormat\n creditNoteYearReset\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n legalIdentityBlock\n footerText\n defaultLanguage\n externalNumberOrderField\n invoicingProvider\n }\n }\n";
1634
+ /** {@link UPDATE_INVOICE_CONFIG_MUTATION} for an engine without `columnUnitPriceAfterDiscount`. */
1635
+ export declare const UPDATE_INVOICE_CONFIG_MUTATION_LEGACY = "\n mutation UpdateInvoiceConfig($input: UpdateInvoiceConfigInput!) {\n updateInvoiceConfig(input: $input) { \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n creditNoteNextNumber\n creditNotePrefix\n creditNoteSuffix\n creditNoteDigits\n creditNoteYearFormat\n creditNoteYearReset\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n legalIdentityBlock\n footerText\n defaultLanguage\n externalNumberOrderField\n invoicingProvider\n }\n }\n";
1636
+ /** {@link SET_INVOICING_PROVIDER_MUTATION} for an engine without `columnUnitPriceAfterDiscount`. */
1637
+ export declare const SET_INVOICING_PROVIDER_MUTATION_LEGACY = "\n mutation SetInvoicingProvider($code: String!) {\n setInvoicingProvider(code: $code) { \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n creditNoteNextNumber\n creditNotePrefix\n creditNoteSuffix\n creditNoteDigits\n creditNoteYearFormat\n creditNoteYearReset\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n legalIdentityBlock\n footerText\n defaultLanguage\n externalNumberOrderField\n invoicingProvider\n }\n }\n";
1638
+ export declare const INVOICING_PROVIDERS_QUERY = "\n query InvoicingProviders {\n invoicingProviders {\n code\n label\n external\n documents\n ready\n notReadyReason\n }\n }\n";
1639
+ export declare const SET_INVOICING_PROVIDER_MUTATION = "\n mutation SetInvoicingProvider($code: String!) {\n setInvoicingProvider(code: $code) { \n \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n creditNoteNextNumber\n creditNotePrefix\n creditNoteSuffix\n creditNoteDigits\n creditNoteYearFormat\n creditNoteYearReset\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n legalIdentityBlock\n footerText\n defaultLanguage\n externalNumberOrderField\n invoicingProvider\n\n columnUnitPriceAfterDiscount\n }\n }\n";
1640
+ export declare const FINANCIAL_DOCUMENT_ISSUES_QUERY = "\n query FinancialDocumentIssues($unresolvedOnly: Boolean, $take: Int, $skip: Int) {\n financialDocumentIssues(unresolvedOnly: $unresolvedOnly, take: $take, skip: $skip) {\n totalItems\n items { \n id\n provider\n operationKey\n documentType\n ledger\n orderId\n status\n externalRef\n externalNumber\n documentDate\n attempts\n lastError\n reservedAt\n bookedAt\n recordedAt\n abandonReason\n }\n }\n }\n";
1641
+ export declare const ABANDON_FINANCIAL_DOCUMENT_ISSUE_MUTATION = "\n mutation AbandonFinancialDocumentIssue($id: ID!, $reason: String!) {\n abandonFinancialDocumentIssue(id: $id, reason: $reason) { \n id\n provider\n operationKey\n documentType\n ledger\n orderId\n status\n externalRef\n externalNumber\n documentDate\n attempts\n lastError\n reservedAt\n bookedAt\n recordedAt\n abandonReason\n }\n }\n";
1642
+ export declare const RESOLVE_FINANCIAL_DOCUMENT_ISSUE_MUTATION = "\n mutation ResolveFinancialDocumentIssue($id: ID!, $reason: String!) {\n resolveFinancialDocumentIssue(id: $id, reason: $reason) { \n id\n provider\n operationKey\n documentType\n ledger\n orderId\n status\n externalRef\n externalNumber\n documentDate\n attempts\n lastError\n reservedAt\n bookedAt\n recordedAt\n abandonReason\n }\n }\n";
1643
+ export declare const SEND_PROFORMA_INVOICE_MUTATION = "\n mutation SendProformaInvoice($input: SendProformaInvoiceInput!) {\n sendProformaInvoice(input: $input)\n }\n";
1644
+ export declare const ORDER_PROFORMA_SENDS_QUERY = "\n query OrderProformaSends($orderId: ID!) {\n orderProformaSends(orderId: $orderId) {\n id\n orderId\n recipients\n message\n invoicedOn\n createdAt\n }\n }\n";
1645
+ export declare const ORDER_INVOICE_EMAIL_SENDS_QUERY = "\n query OrderInvoiceEmailSends($orderId: ID!) {\n orderInvoiceEmailSends(orderId: $orderId) {\n id\n orderId\n recipientsTo\n recipientsCc\n createdAt\n }\n }\n";
1646
+ /** Its own document: `documentEmailRecipients` is new, so on an older engine this call alone fails. */
1647
+ export declare const DOCUMENT_EMAIL_RECIPIENTS_QUERY = "\n query DocumentEmailRecipients($orderId: ID!, $event: DocumentEmailEvent!) {\n documentEmailRecipients(orderId: $orderId, event: $event) {\n to\n cc\n }\n }\n";
1648
+ export declare const REGENERATE_PACKING_SLIP_MUTATION = "\n mutation RegeneratePackingSlip($fulfillmentId: ID!, $languageCode: String) {\n regeneratePackingSlip(fulfillmentId: $fulfillmentId, languageCode: $languageCode) {\n \n id\n packingSlipNumber\n fulfillmentId\n languageCode\n storageKey\n createdAt\n\n }\n }\n";
1649
+ export declare const PACKING_SLIP_FIELDS_QUERY = "\n query PackingSlipFulfillmentFields {\n packingSlipFulfillmentFields {\n handlerCode\n handlerName\n fields {\n key\n label\n type\n defaultVisible\n }\n }\n }\n";
1650
+ export declare const PACKING_SLIP_CONFIG_QUERY = "\n query PackingSlipConfig {\n packingSlipConfig { \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n columnRowNumber\n columnProduct\n columnSku\n columnQuantity\n showLogo\n showInvoiceNumber\n fulfillmentFieldVisibility\n footerText\n defaultLanguage\n }\n }\n";
1651
+ export declare const UPDATE_PACKING_SLIP_CONFIG_MUTATION = "\n mutation UpdatePackingSlipConfig($input: UpdatePackingSlipConfigInput!) {\n updatePackingSlipConfig(input: $input) { \n id\n enabled\n prefix\n suffix\n nextNumber\n digits\n yearFormat\n yearReset\n columnRowNumber\n columnProduct\n columnSku\n columnQuantity\n showLogo\n showInvoiceNumber\n fulfillmentFieldVisibility\n footerText\n defaultLanguage\n }\n }\n";
929
1652
  export declare function createDocumentsModule(transport: Transport): DocumentsModule;