@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,9 +1,41 @@
1
1
  import { type Page, type Transport } from '@sixtyninecommerce/core';
2
2
  import { type MyparcelUnretractedShipment } from '../fulfillments/index.js';
3
+ import type { StockLocationAddress } from '../locations/index.js';
3
4
  import type { Call, ListOptions } from '../types.js';
4
5
  export type StockTransferState = 'draft' | 'in_transit' | 'received' | 'cancelled';
5
6
  /** A `transfer` moves stock between two locations; a `consumption` uses it up at one. */
6
7
  export type StockTransferKind = 'transfer' | 'consumption';
8
+ /**
9
+ * Why the engine would refuse a cancel or a return of a transfer now.
10
+ *
11
+ * - `STATE`: the state has no way to it (a cancel of a received transfer or a posted consumption).
12
+ * - `CANCELLED`: the transfer is cancelled.
13
+ * - `PARTIALLY_RECEIVED`: a cancel once any unit was received; `close` it instead.
14
+ * - `DRAFT_NOT_SHIPPED`: a return of a draft: nothing has moved yet.
15
+ * - `NOT_YET_RECEIVED`: a return of a transfer in transit that has received nothing yet.
16
+ * - `NOTHING_RECEIVED`: a return of a received transfer that received nothing.
17
+ * - `ALL_ON_RETURNS`: every received unit is already on a return; cancelling one frees its units.
18
+ * - `CONSUMPTION`, `IS_RETURN`, `NO_DESTINATION`: a return of a consumption, of a return, or
19
+ * of a transfer with no destination.
20
+ *
21
+ * Codes may be added; treat an unknown one as a refusal.
22
+ */
23
+ export type StockTransferActionRefusalCode = 'STATE' | 'CANCELLED' | 'PARTIALLY_RECEIVED' | 'DRAFT_NOT_SHIPPED' | 'NOT_YET_RECEIVED' | 'NOTHING_RECEIVED' | 'ALL_ON_RETURNS' | 'CONSUMPTION' | 'IS_RETURN' | 'NO_DESTINATION';
24
+ /**
25
+ * Whether an action on a transfer is available now, as the engine judges it, and why not.
26
+ * Advice only: the write judges again (with the caller's permission and locations), so a
27
+ * transfer that changed meanwhile is still refused.
28
+ */
29
+ export interface StockTransferActionAvailability {
30
+ available: boolean;
31
+ /** Null exactly when `available`. */
32
+ reasonCode: StockTransferActionRefusalCode | null;
33
+ }
34
+ /**
35
+ * What `search` matches in `list`: the transfer code only (`code`, the engine's default), or the
36
+ * code or the label (`all`).
37
+ */
38
+ export type StockTransferSearchMode = 'code' | 'all';
7
39
  export interface StockTransferAddress {
8
40
  contactName: string | null;
9
41
  company: string | null;
@@ -31,6 +63,7 @@ export interface StockTransferLine {
31
63
  id: string;
32
64
  variantId: string;
33
65
  sku: string;
66
+ variantName: string;
34
67
  quantity: number;
35
68
  receivedQuantity: number;
36
69
  lostQuantity: number;
@@ -59,6 +92,10 @@ export interface StockTransfer {
59
92
  note: string | null;
60
93
  carrier: string | null;
61
94
  trackingCode: string | null;
95
+ /**
96
+ * A calendar DAY, though it is stored as an instant: the dashboard records the day picked as
97
+ * that day's 00:00 UTC, so read it as the UTC day (`slice(0, 10)`), never in a local zone.
98
+ */
62
99
  estimatedArrivalAt: string | null;
63
100
  shippedAt: string | null;
64
101
  receivedAt: string | null;
@@ -67,11 +104,89 @@ export interface StockTransfer {
67
104
  deliveryAddress: StockTransferAddress | null;
68
105
  createdAt: string;
69
106
  updatedAt: string;
107
+ /**
108
+ * Who created it. Null when the engine recorded nobody, or that administrator has since been
109
+ * deleted. An app or API key is not null here: it acts as its own administrator (see
110
+ * `StockTransferStaffRef`).
111
+ */
112
+ initiatedBy: StockTransferStaffRef | null;
70
113
  items: StockTransferLine[];
114
+ /** How many lines it has (`items.length`). */
115
+ totalLines: number;
71
116
  totalQuantity: number;
72
117
  totalReceivedQuantity: number;
73
118
  totalLostQuantity: number;
74
119
  }
120
+ /** A line as `get` and every write answer it: with its cost snapshot. */
121
+ export interface StockTransferDetailLine extends StockTransferLine {
122
+ /**
123
+ * The variant's standard cost per unit, in minor units of the store's currency, as posting a
124
+ * consumption snapshotted it. Null on a transfer's lines, and on a consumption line whose
125
+ * variant had no cost on file.
126
+ */
127
+ unitCost: number | null;
128
+ }
129
+ /**
130
+ * One transfer as `get` and every write answer it: the list's fields, plus who shipped and
131
+ * received it, its consumption value, its transfer note and how it was shipped.
132
+ */
133
+ export interface StockTransferDetail extends Omit<StockTransfer, 'destinationLocation' | 'items'> {
134
+ /**
135
+ * Null for a consumption. `address` is the location's own postal address as stored (every
136
+ * field optional, as `locations` reads it), null when it has none: a shipment goes there
137
+ * unless `deliveryAddress` names another place.
138
+ */
139
+ destinationLocation: {
140
+ id: string;
141
+ name: string;
142
+ address: StockLocationAddress | null;
143
+ } | null;
144
+ items: StockTransferDetailLine[];
145
+ /**
146
+ * Who shipped it, or posted the consumption. Null as `initiatedBy` is, and while it is not
147
+ * shipped (removing the shipment clears it).
148
+ */
149
+ shippedBy: StockTransferStaffRef | null;
150
+ /**
151
+ * Who completed it: the receipt that took it to `received`, a close, or the consumption's
152
+ * post. Null as `initiatedBy` is, and until then: a partial receipt records nobody.
153
+ */
154
+ receivedBy: StockTransferStaffRef | null;
155
+ /**
156
+ * A consumption's total standard-cost value, in minor units of the store's currency: the sum
157
+ * of its lines' `unitCost × quantity`, over the lines that have one. Null for a transfer. A
158
+ * draft consumption has no cost snapshot yet, so it reads 0 with `consumptionHasUnpricedLines`.
159
+ */
160
+ consumptionTotalValue: number | null;
161
+ /**
162
+ * True when a line has no cost (a draft, or a variant with no cost on file when it was
163
+ * posted), so `consumptionTotalValue` understates it. Null for a transfer.
164
+ */
165
+ consumptionHasUnpricedLines: boolean | null;
166
+ /** Where the transfer note PDF is stored; null until one was generated. */
167
+ pdfStorageKey: string | null;
168
+ /**
169
+ * The engine's fulfilment handler it shipped with (`manual-fulfillment`, `myparcel`,
170
+ * `hendriks-3pl`). Null while it is a draft. A cancelled transfer keeps it.
171
+ */
172
+ fulfillmentHandlerCode: string | null;
173
+ /**
174
+ * The handler arguments the ship was given, as the handler stores them: a key/value object, or
175
+ * the `{ name, value }` list the fulfilment forms send. The handler owns their meaning.
176
+ */
177
+ handlerArgs: Record<string, unknown> | StockTransferHandlerArg[] | null;
178
+ /** The first MyParcel parcel's shipment id; every parcel is on `parcels(id)`. */
179
+ myparcelShipmentId: number | null;
180
+ /** The first MyParcel parcel's barcode once it has one; every barcode is on `parcels(id)`. */
181
+ myparcelBarcode: string | null;
182
+ /** Where the Hendriks (3PL) export was uploaded; null until the export completed. */
183
+ hendriksRemotePath: string | null;
184
+ }
185
+ /** One handler argument in the list form the fulfilment forms send. */
186
+ export interface StockTransferHandlerArg {
187
+ name: string;
188
+ value: string;
189
+ }
75
190
  export interface StockTransferLineInput {
76
191
  variantId: string;
77
192
  quantity: number;
@@ -86,27 +201,32 @@ export interface CreateStockTransferInput {
86
201
  note?: string;
87
202
  lines: StockTransferLineInput[];
88
203
  }
89
- /** A draft's fields; an omitted field is left as it is. */
204
+ /** A draft's fields; an omitted field is left as it is, and `null` clears one. */
90
205
  export interface UpdateStockTransferInput {
91
206
  sourceLocationId?: string;
92
207
  destinationLocationId?: string;
93
- label?: string;
94
- note?: string;
208
+ label?: string | null;
209
+ note?: string | null;
95
210
  /** Replaces every line. */
96
211
  lines?: StockTransferLineInput[];
97
- carrier?: string;
98
- trackingCode?: string;
99
- /** ISO 8601 with an explicit offset. */
100
- estimatedArrivalAt?: string;
212
+ carrier?: string | null;
213
+ trackingCode?: string | null;
214
+ /** ISO 8601 with an explicit offset. A day is sent as its 00:00 UTC (see `estimatedArrivalAt`). */
215
+ estimatedArrivalAt?: string | null;
101
216
  }
217
+ /**
218
+ * `carrier`, `trackingCode` and `estimatedArrivalAt`: an omitted field keeps what the draft
219
+ * holds, and `null` clears it.
220
+ */
102
221
  export interface ShipStockTransferInput {
103
- carrier?: string;
104
- trackingCode?: string;
105
- /** ISO 8601 with an explicit offset. */
106
- estimatedArrivalAt?: string;
107
- /** The engine's fulfilment handler code; defaults to manual shipping. */
108
- fulfillmentHandlerCode?: string;
109
- handlerArgs?: Record<string, unknown>;
222
+ carrier?: string | null;
223
+ trackingCode?: string | null;
224
+ /** ISO 8601 with an explicit offset. A day is sent as its 00:00 UTC (see `estimatedArrivalAt`). */
225
+ estimatedArrivalAt?: string | null;
226
+ /** The engine's fulfilment handler code; omitted or null ships it by hand (manual). */
227
+ fulfillmentHandlerCode?: string | null;
228
+ /** The handler's arguments: a key/value object or the `{ name, value }` list; none when omitted. */
229
+ handlerArgs?: Record<string, unknown> | StockTransferHandlerArg[] | null;
110
230
  /** Ship somewhere other than the destination's own address; null re-addresses it there. */
111
231
  deliveryAddress?: StockTransferAddressInput | null;
112
232
  }
@@ -170,6 +290,8 @@ export interface StockTransferFilter extends ListOptions {
170
290
  /** ISO 8601 with an explicit offset. */
171
291
  dateTo?: string;
172
292
  search?: string;
293
+ /** What `search` matches; the engine's default (`code`) when omitted. */
294
+ searchMode?: StockTransferSearchMode;
173
295
  /** Only the returns of this transfer. Needs an engine with returns. */
174
296
  returnOfTransferId?: string;
175
297
  /**
@@ -234,8 +356,18 @@ export interface StockTransferReturns {
234
356
  * return, or a transfer with nothing received.
235
357
  */
236
358
  returnableLines: StockTransferReturnableLine[];
359
+ /**
360
+ * Whether `createReturn` can make a return of it now, and why not (the engine's own rule).
361
+ * Null from an engine before the field: it says nothing either way, and `createReturn` still
362
+ * judges.
363
+ */
364
+ returnAvailability: StockTransferActionAvailability | null;
237
365
  }
238
- /** A member of staff who acted on a transfer. */
366
+ /**
367
+ * The administrator who acted on a transfer. Usually a member of staff; an app installation or
368
+ * an API key acts as its own administrator, so it appears here too, with `firstName` "App" or
369
+ * "API Token" and its own name as `lastName`.
370
+ */
239
371
  export interface StockTransferStaffRef {
240
372
  /** The administrator's id. */
241
373
  id: string;
@@ -268,6 +400,11 @@ export interface StockTransferCancellation {
268
400
  hendriksExport: {
269
401
  bluJayOrderNumber: string | null;
270
402
  } | null;
403
+ /**
404
+ * Whether `cancel` would accept it now, and why not (the engine's own rule). Null from an
405
+ * engine before the field: it says nothing either way, and `cancel` still judges.
406
+ */
407
+ cancelAvailability: StockTransferActionAvailability | null;
271
408
  }
272
409
  /** One MyParcel parcel of a stock transfer: its own shipment, label and barcode. */
273
410
  export interface StockTransferParcel {
@@ -330,6 +467,62 @@ export interface StockTransferLabel {
330
467
  filename: string;
331
468
  bytes: Uint8Array;
332
469
  }
470
+ /**
471
+ * The format of a store's transfer codes: `{prefix}{year}-{number}{suffix}`, e.g. `ST-2026-0001`
472
+ * (the defaults, until the store first sets its own).
473
+ */
474
+ export interface StockTransferNumberingConfig {
475
+ prefix: string;
476
+ suffix: string;
477
+ /** How many digits the number is padded to, 3 to 8. */
478
+ digits: number;
479
+ /**
480
+ * `none`, `short` (`26`) or `full` (`2026`). A row written before the engine checked it may
481
+ * hold another value, which prints like `none`.
482
+ */
483
+ yearFormat: string;
484
+ /**
485
+ * Stored for the shared numbering contract only: the counter restarts each UTC year whenever
486
+ * the code shows the year, and never when it does not, whatever this says.
487
+ */
488
+ yearReset: boolean;
489
+ }
490
+ /** A patch: a field left out keeps its value. */
491
+ export interface UpdateStockTransferNumberingConfigInput {
492
+ prefix?: string;
493
+ suffix?: string;
494
+ /** Clamped to 3..8. */
495
+ digits?: number;
496
+ /**
497
+ * `none`, `short` or `full`. Any other CHANGE is refused `NUMBERING_YEAR_FORMAT_INVALID`
498
+ * (→ `ValidationError`) and saves nothing; sending the stored value back always passes.
499
+ */
500
+ yearFormat?: string;
501
+ yearReset?: boolean;
502
+ }
503
+ /** `admin.stock.transfers.numbering`: the format the store's transfer codes take. */
504
+ export interface StockTransferNumberingModule {
505
+ /**
506
+ * The format the store's NEXT transfer code takes. A store in an organization that shares its
507
+ * numbering formats (`settings.numbering_formats`) reads the organization's format; the counter
508
+ * is always the store's own. Needs `ReadStockLocation`.
509
+ *
510
+ * @effect read
511
+ * @permission ReadStockLocation
512
+ */
513
+ get(options?: Call): Promise<StockTransferNumberingConfig>;
514
+ /**
515
+ * Change the format of the store's OWN row; codes already issued keep theirs, and the counter
516
+ * never changes. Answers that row, which is not what `get` reads while the store inherits the
517
+ * organization's format: read `get` again for the format in use. A store that inherits it is
518
+ * refused `ORGANIZATION_SETTINGS_INHERITED` until it overrides the group, and one whose
519
+ * organization locks the group `MANAGED_BY_ORGANIZATION`. Needs `UpdateStockLocation`.
520
+ *
521
+ * @effect write
522
+ * @permission UpdateStockLocation
523
+ */
524
+ set(input: UpdateStockTransferNumberingConfigInput, options?: Call): Promise<StockTransferNumberingConfig>;
525
+ }
333
526
  /**
334
527
  * Stock transfers (the engine's stock-transfer module, wrapped): a draft is
335
528
  * created, shipped (debiting the source), received line by line (crediting the
@@ -341,7 +534,9 @@ export interface StockTransferLabel {
341
534
  * `stock.movements()`. Reads need `ReadStockLocation`; every write needs `AdjustStock`
342
535
  * (or, for credentials minted before it existed, `UpdateStockLocation` — a transition a
343
536
  * later release ends).
344
- * None of these writes takes an idempotency key yet.
537
+ * None of these writes takes an idempotency key yet, and the client never repeats one: a write
538
+ * whose answer was lost is read back with `get` before it is sent again (each method says what
539
+ * a repeat does).
345
540
  *
346
541
  * Every location and variant a transfer names must be the store's own:
347
542
  * another store's location (or an id that does not exist) is refused
@@ -377,51 +572,128 @@ export interface StockTransferLabel {
377
572
  * never by `get`: a caller ahead of the engine sees only those calls refused.
378
573
  */
379
574
  export interface StockTransfersModule {
575
+ /**
576
+ * The store's transfers and consumptions, newest first, a page at a time (`limit`, default
577
+ * 25; `after` from a previous page). `search` matches the code, or the code or the label with
578
+ * `searchMode: 'all'`. A list row carries no detail fields: `get` one for those.
579
+ *
580
+ * @effect read
581
+ * @permission ReadStockLocation
582
+ */
380
583
  list(filter?: StockTransferFilter): Promise<Page<StockTransfer>>;
381
- get(id: string, options?: Call): Promise<StockTransfer | null>;
382
- create(input: CreateStockTransferInput, options?: Call): Promise<StockTransfer>;
383
- /** Only a draft can be edited. */
384
- update(id: string, input: UpdateStockTransferInput, options?: Call): Promise<StockTransfer>;
584
+ /**
585
+ * One transfer with its detail fields, or `null` when this store has no such transfer.
586
+ *
587
+ * @effect read
588
+ * @permission ReadStockLocation
589
+ */
590
+ get(id: string, options?: Call): Promise<StockTransferDetail | null>;
591
+ /**
592
+ * A draft transfer or consumption. Moves no stock.
593
+ *
594
+ * @effect write
595
+ * @permission AdjustStock
596
+ */
597
+ create(input: CreateStockTransferInput, options?: Call): Promise<StockTransferDetail>;
598
+ /**
599
+ * Only a draft can be edited. Moves no stock.
600
+ *
601
+ * @effect write
602
+ * @permission AdjustStock
603
+ */
604
+ update(id: string, input: UpdateStockTransferInput, options?: Call): Promise<StockTransferDetail>;
385
605
  /**
386
606
  * Draft → in transit: the source is debited. A MyParcel ship books every
387
- * parcel at MyParcel before it answers, so it is allowed up to 120s; a
388
- * `REQUEST_TIMEOUT` does not mean it failed — `get` it before shipping again.
607
+ * parcel at MyParcel before it answers and buys their labels, so it is
608
+ * allowed up to 120s; a `REQUEST_TIMEOUT` does not mean it failed — `get` it
609
+ * before shipping again. Shipping a transfer already in transit answers it
610
+ * unchanged: nothing is debited or booked twice. A Hendriks (3PL) ship
611
+ * uploads its export, which a later cancel does not withdraw.
612
+ *
613
+ * Refused `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key
614
+ * owns the store's Stock. A member store's Stock owner never locks the hub's
615
+ * warehouse (ruling U8).
616
+ *
617
+ * @effect money
618
+ * @permission AdjustStock
619
+ */
620
+ ship(id: string, input?: ShipStockTransferInput, options?: Call): Promise<StockTransferDetail>;
621
+ /**
622
+ * Post a consumption: debit its location, snapshot each line's cost and
623
+ * complete the draft. Only a draft is posted, so a repeat is refused
624
+ * (`USER_INPUT_ERROR`, `ValidationError`) and debits nothing.
625
+ *
626
+ * Refused `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key
627
+ * owns the store's Stock. A member store's Stock owner never locks the hub's
628
+ * warehouse (ruling U8).
629
+ *
630
+ * @effect write
631
+ * @permission AdjustStock
632
+ */
633
+ postConsumption(id: string, options?: Call): Promise<StockTransferDetail>;
634
+ /**
635
+ * Credit the destination with what arrived, and write off what was lost, per line. The
636
+ * quantities are each line's running TOTALS, never increments: a repeat of the same call
637
+ * credits nothing again, and a total lower than the line's is refused.
638
+ *
639
+ * Refused `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key
640
+ * owns the store's Stock. A member store's Stock owner never locks the hub's
641
+ * warehouse (ruling U8).
642
+ *
643
+ * @effect write
644
+ * @permission AdjustStock
389
645
  */
390
- ship(id: string, input?: ShipStockTransferInput, options?: Call): Promise<StockTransfer>;
391
- /** Post a consumption: debit its location and complete the draft. */
392
- postConsumption(id: string, options?: Call): Promise<StockTransfer>;
393
- /** Credit the destination with what arrived, and write off what was lost, per line. */
394
- receive(id: string, lines: ReceiveStockTransferLineInput[], options?: Call): Promise<StockTransfer>;
646
+ receive(id: string, lines: ReceiveStockTransferLineInput[], options?: Call): Promise<StockTransferDetail>;
395
647
  /**
396
648
  * Close an in-transit transfer as received. Each line still short is settled
397
649
  * as `shortfall` names it — `LOST`, or `RETURN_TO_SOURCE` (credited back to
398
650
  * the source) — and a line it does not name is written off as lost only with
399
651
  * `acceptShortfallAsLost`; otherwise the close is refused. Refused too: a
400
652
  * line named twice, a line of another transfer, a line with nothing
401
- * outstanding. Each refusal is a `ValidationError` and changes nothing.
653
+ * outstanding. Each refusal is a `ValidationError` and changes nothing. A
654
+ * close that sends a line back to the source is refused `FIELD_GROUP_LOCKED`
655
+ * (`BusinessRuleError`) while an app or API key owns the store's Stock.
656
+ *
657
+ * @effect write
658
+ * @permission AdjustStock
402
659
  */
403
- close(id: string, options?: CloseStockTransferOptions): Promise<StockTransfer>;
660
+ close(id: string, options?: CloseStockTransferOptions): Promise<StockTransferDetail>;
404
661
  /**
405
662
  * Cancel a draft, or an in-transit transfer (unreceived stock returns to the
406
663
  * source). An in-transit MyParcel shipment's parcels are voided at MyParcel
407
- * inside the call, so it is allowed up to 120s.
664
+ * inside the call, so it is allowed up to 120s. A cancelled transfer is
665
+ * final: cancelling it again is refused (`ValidationError`) and restores
666
+ * nothing twice. Whether it would be accepted now, and why not, is
667
+ * `cancellation(id).cancelAvailability`. An in-transit cancel is refused `FIELD_GROUP_LOCKED`
668
+ * (`BusinessRuleError`) while an app or API key owns the store's Stock.
669
+ *
670
+ * @effect destructive
671
+ * @permission AdjustStock
408
672
  */
409
673
  cancel(id: string, options?: Call & {
410
674
  reason?: string;
411
- }): Promise<StockTransfer>;
675
+ }): Promise<StockTransferDetail>;
412
676
  /**
413
677
  * Create a draft RETURN of transfer `id` (the original): its source is the
414
678
  * original's destination, its lines capped per variant at what the original
415
679
  * received minus its other returns that are not cancelled. Answers the
416
680
  * return; ship and receive it like any transfer. A restricted credential
417
681
  * must hold the return's source (the original's destination).
682
+ *
683
+ * @effect write
684
+ * @permission AdjustStock
418
685
  */
419
- createReturn(id: string, input: CreateStockTransferReturnInput, options?: Call): Promise<StockTransfer>;
686
+ createReturn(id: string, input: CreateStockTransferReturnInput, options?: Call): Promise<StockTransferDetail>;
420
687
  /**
421
688
  * How transfer `id` is linked to returns — the transfer it returns from, its
422
- * own returns, and what a new return may still take per variant — or null
423
- * when this store has no such transfer. Its own request, never part of
424
- * `get`. Needs `ReadStockLocation`.
689
+ * own returns, what a new return may still take per variant, and whether
690
+ * `createReturn` can make one now (`returnAvailability`, the engine's own
691
+ * rule: `createReturn` judges again, per line) — or null when this store has
692
+ * no such transfer. Its own request, never part of `get`. Needs
693
+ * `ReadStockLocation`.
694
+ *
695
+ * @effect read
696
+ * @permission ReadStockLocation
425
697
  */
426
698
  returns(id: string, options?: Call): Promise<StockTransferReturns | null>;
427
699
  /**
@@ -434,10 +706,14 @@ export interface StockTransfersModule {
434
706
  /**
435
707
  * Who cancelled transfer `id`, why, and the Hendriks export a cancel leaves
436
708
  * to be retracted by hand — or null when this store has no such transfer.
437
- * Read it before `cancel` to warn about the export, and after to show who
438
- * did it. Its own request, never part of `get`: a caller deployed ahead of
439
- * an engine that does not record the canceller sees only this call refused.
440
- * Needs `ReadStockLocation`.
709
+ * Read it before `cancel` to warn about the export and to know whether the
710
+ * cancel is offered (`cancelAvailability`, the engine's own rule: `cancel`
711
+ * judges again, with the caller's permission and locations), and after to
712
+ * show who did it. Its own request, never part of `get`: a caller deployed
713
+ * ahead of the engine sees only this call refused. Needs `ReadStockLocation`.
714
+ *
715
+ * @effect read
716
+ * @permission ReadStockLocation
441
717
  */
442
718
  cancellation(id: string, options?: Call): Promise<StockTransferCancellation | null>;
443
719
  /**
@@ -487,24 +763,82 @@ export interface StockTransfersModule {
487
763
  * default timeout does not cover.
488
764
  */
489
765
  myparcelLabel(id: string, format: StockTransferLabelFormat, options?: Call): Promise<StockTransferLabel>;
766
+ /**
767
+ * Void an in-transit shipment back to an editable draft, to correct a wrong handler or carrier
768
+ * and ship again. It undoes `ship`: the units go back to the source, every MyParcel parcel is
769
+ * voided at MyParcel inside the call, and the handler, its arguments, the carrier, tracking
770
+ * code, ETA, parcels and transfer note are cleared (the delivery address stays, for the
771
+ * re-ship). Answers the draft.
772
+ *
773
+ * MyParcel deletes only a concept: a parcel it keeps (a registered label) is named on
774
+ * `parcels(id).lastError`, recorded in `unretractedShipments` and never adopted by a re-ship.
775
+ * A Hendriks export, or any other handler's shipment, is NOT withdrawn: it is voided here only,
776
+ * and must be retracted at the 3PL by hand.
777
+ *
778
+ * Refused (`ValidationError`) for a transfer not in transit, so a repeat restores nothing
779
+ * twice, and once any unit was received or lost (close or cancel it instead). Refused
780
+ * `FIELD_GROUP_LOCKED` (`BusinessRuleError`) while an app or API key owns the store's Stock. A
781
+ * restricted credential must hold the source. The MyParcel calls make it allowed up to 120s;
782
+ * a `REQUEST_TIMEOUT` does not mean it failed, so `get` the transfer before trying again.
783
+ *
784
+ * @effect destructive
785
+ * @permission AdjustStock
786
+ */
787
+ removeShipment(id: string, options?: Call): Promise<StockTransferDetail>;
788
+ /**
789
+ * Upload the Hendriks (BluJay) export again for an in-transit transfer shipped with Hendriks
790
+ * whose export did not land at ship time (`hendriksRemotePath` still null). It reuses the
791
+ * transfer's BluJay order number and moves no stock. Answers the transfer with its
792
+ * `hendriksRemotePath`; an upload that fails is thrown, in the engine's words.
793
+ *
794
+ * Refused (`ValidationError`) for a transfer not shipped with Hendriks, not in transit, or
795
+ * already exported: a second retry waits for the first under the transfer's lock and is then
796
+ * refused, so one transfer never sends Hendriks two orders. A store without the Hendriks plugin
797
+ * is refused (`ValidationError`) too; one whose Hendriks set-up is missing or switched off is
798
+ * refused with no code yet, so that arrives as a `GRAPHQL_ERROR` (status 500) in the engine's
799
+ * words, and nothing is uploaded. A restricted credential must hold the source. The
800
+ * upload makes it allowed up to 120s; a `REQUEST_TIMEOUT` does not mean it failed, so `get` the
801
+ * transfer and look at `hendriksRemotePath` before trying again.
802
+ *
803
+ * @effect irreversible
804
+ * @permission AdjustStock
805
+ */
806
+ retryHendriksExport(id: string, options?: Call): Promise<StockTransferDetail>;
807
+ /**
808
+ * Generate the transfer's note (a consumption's: its consumption note) again and store it;
809
+ * answers the transfer with the new `pdfStorageKey`. Refused (`ValidationError`) for a draft.
810
+ * A store without document storage set up answers the transfer unchanged. A restricted
811
+ * credential must hold either end.
812
+ *
813
+ * @effect write
814
+ * @permission AdjustStock
815
+ */
816
+ regeneratePdf(id: string, options?: Call): Promise<StockTransferDetail>;
817
+ /** The format of the store's transfer codes. */
818
+ numbering: StockTransferNumberingModule;
490
819
  }
491
- export declare const STOCK_TRANSFERS_QUERY = "\n query StockTransfers($options: StockTransferListOptions) {\n stockTransfers(options: $options) { items { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } totalItems }\n }\n";
492
- export declare const STOCK_TRANSFER_QUERY = "\n query StockTransfer($id: ID!) { stockTransfer(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } }\n";
493
- export declare const CREATE_STOCK_TRANSFER_MUTATION = "\n mutation CreateStockTransfer($input: CreateStockTransferInput!) {\n createStockTransfer(input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
494
- export declare const UPDATE_STOCK_TRANSFER_MUTATION = "\n mutation UpdateStockTransfer($id: ID!, $input: UpdateStockTransferInput!) {\n updateStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
495
- export declare const SHIP_STOCK_TRANSFER_MUTATION = "\n mutation ShipStockTransfer($id: ID!, $input: ShipStockTransferInput) {\n shipStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
496
- export declare const POST_STOCK_TRANSFER_CONSUMPTION_MUTATION = "\n mutation PostStockTransferConsumption($id: ID!) {\n postStockTransferConsumption(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
497
- export declare const RECEIVE_STOCK_TRANSFER_LINES_MUTATION = "\n mutation ReceiveStockTransferLines($id: ID!, $lines: [ReceiveStockTransferLineInput!]!) {\n receiveStockTransferLines(id: $id, lines: $lines) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
498
- export declare const CLOSE_STOCK_TRANSFER_MUTATION = "\n mutation CloseStockTransfer($id: ID!, $acceptShortfallAsLost: Boolean) {\n closeStockTransfer(id: $id, acceptShortfallAsLost: $acceptShortfallAsLost) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
820
+ export declare const STOCK_TRANSFERS_QUERY = "\n query StockTransfers($options: StockTransferListOptions) {\n stockTransfers(options: $options) { items { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } totalItems }\n }\n";
821
+ export declare const STOCK_TRANSFER_QUERY = "\n query StockTransfer($id: ID!) { stockTransfer(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n } }\n";
822
+ export declare const CREATE_STOCK_TRANSFER_MUTATION = "\n mutation CreateStockTransfer($input: CreateStockTransferInput!) {\n createStockTransfer(input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
823
+ export declare const UPDATE_STOCK_TRANSFER_MUTATION = "\n mutation UpdateStockTransfer($id: ID!, $input: UpdateStockTransferInput!) {\n updateStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
824
+ export declare const SHIP_STOCK_TRANSFER_MUTATION = "\n mutation ShipStockTransfer($id: ID!, $input: ShipStockTransferInput) {\n shipStockTransfer(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
825
+ export declare const POST_STOCK_TRANSFER_CONSUMPTION_MUTATION = "\n mutation PostStockTransferConsumption($id: ID!) {\n postStockTransferConsumption(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
826
+ export declare const RECEIVE_STOCK_TRANSFER_LINES_MUTATION = "\n mutation ReceiveStockTransferLines($id: ID!, $lines: [ReceiveStockTransferLineInput!]!) {\n receiveStockTransferLines(id: $id, lines: $lines) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
827
+ export declare const CLOSE_STOCK_TRANSFER_MUTATION = "\n mutation CloseStockTransfer($id: ID!, $acceptShortfallAsLost: Boolean) {\n closeStockTransfer(id: $id, acceptShortfallAsLost: $acceptShortfallAsLost) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
499
828
  /**
500
829
  * Its own document: it declares `$shortfall`, which an engine without per-line
501
830
  * dispositions refuses as a whole. A close without dispositions keeps sending
502
831
  * the document above.
503
832
  */
504
- export declare const CLOSE_STOCK_TRANSFER_WITH_SHORTFALL_MUTATION = "\n mutation CloseStockTransferWithShortfall(\n $id: ID!\n $acceptShortfallAsLost: Boolean\n $shortfall: [StockTransferShortfallLineInput!]!\n ) {\n closeStockTransfer(\n id: $id\n acceptShortfallAsLost: $acceptShortfallAsLost\n shortfall: $shortfall\n ) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
505
- export declare const CANCEL_STOCK_TRANSFER_MUTATION = "\n mutation CancelStockTransfer($id: ID!, $reason: String) {\n cancelStockTransfer(id: $id, reason: $reason) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
506
- export declare const CREATE_STOCK_TRANSFER_RETURN_MUTATION = "\n mutation CreateStockTransferReturn($id: ID!, $input: CreateStockTransferReturnInput!) {\n createStockTransferReturn(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n }\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
507
- export declare const STOCK_TRANSFER_RETURNS_QUERY = "\n query StockTransferReturns($id: ID!) {\n stockTransfer(id: $id) {\n returnOfTransferId\n returnOf { \n id\n code\n state\n label\n sourceLocation { id name }\n destinationLocation { id name }\n createdAt\n totalQuantity\n }\n returns { \n id\n code\n state\n label\n sourceLocation { id name }\n destinationLocation { id name }\n createdAt\n totalQuantity\n }\n returnableLines {\n productVariantId\n productVariant { name sku }\n receivedQuantity\n returnedQuantity\n returnableQuantity\n }\n }\n }\n";
833
+ export declare const CLOSE_STOCK_TRANSFER_WITH_SHORTFALL_MUTATION = "\n mutation CloseStockTransferWithShortfall(\n $id: ID!\n $acceptShortfallAsLost: Boolean\n $shortfall: [StockTransferShortfallLineInput!]!\n ) {\n closeStockTransfer(\n id: $id\n acceptShortfallAsLost: $acceptShortfallAsLost\n shortfall: $shortfall\n ) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
834
+ export declare const CANCEL_STOCK_TRANSFER_MUTATION = "\n mutation CancelStockTransfer($id: ID!, $reason: String) {\n cancelStockTransfer(id: $id, reason: $reason) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
835
+ export declare const CREATE_STOCK_TRANSFER_RETURN_MUTATION = "\n mutation CreateStockTransferReturn($id: ID!, $input: CreateStockTransferReturnInput!) {\n createStockTransferReturn(id: $id, input: $input) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
836
+ export declare const REMOVE_STOCK_TRANSFER_SHIPMENT_MUTATION = "\n mutation RemoveStockTransferShipment($id: ID!) {\n removeStockTransferShipment(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
837
+ export declare const RETRY_STOCK_TRANSFER_HENDRIKS_EXPORT_MUTATION = "\n mutation RetryStockTransferHendriksExport($id: ID!) {\n retryStockTransferHendriksExport(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
838
+ export declare const REGENERATE_STOCK_TRANSFER_PDF_MUTATION = "\n mutation RegenerateStockTransferPdf($id: ID!) {\n regenerateStockTransferPdf(id: $id) { \n id\n code\n kind\n state\n sourceLocation { id name }\n destinationLocation { id name customFields { address } }\n label\n note\n carrier\n trackingCode\n estimatedArrivalAt\n shippedAt\n receivedAt\n cancelledAt\n cancelReason\n deliveryAddress {\n contactName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n countryCode\n phoneNumber\n }\n createdAt\n updatedAt\n initiatedBy { id firstName lastName }\n shippedBy { id firstName lastName }\n receivedBy { id firstName lastName }\n consumptionTotalValue\n consumptionHasUnpricedLines\n pdfStorageKey\n fulfillmentHandlerCode\n handlerArgs\n myparcelShipmentId\n myparcelBarcode\n hendriksRemotePath\n items {\n id\n productVariant { id name sku }\n quantity\n receivedQuantity\n lostQuantity\n outstandingQuantity\n unitCost\n }\n totalLines\n totalQuantity\n totalReceivedQuantity\n totalLostQuantity\n }\n }\n";
839
+ export declare const STOCK_TRANSFER_NUMBERING_QUERY = "\n query StockTransferNumberingConfig {\n stockTransferNumberingConfig { \n prefix\n suffix\n digits\n yearFormat\n yearReset\n }\n }\n";
840
+ export declare const UPDATE_STOCK_TRANSFER_NUMBERING_MUTATION = "\n mutation UpdateStockTransferNumberingConfig($input: UpdateStockTransferNumberingConfigInput!) {\n updateStockTransferNumberingConfig(input: $input) { \n prefix\n suffix\n digits\n yearFormat\n yearReset\n }\n }\n";
841
+ export declare const STOCK_TRANSFER_RETURNS_QUERY = "\n query StockTransferReturns($id: ID!) {\n stockTransfer(id: $id) {\n returnOfTransferId\n returnOf { \n id\n code\n state\n label\n sourceLocation { id name }\n destinationLocation { id name }\n createdAt\n totalQuantity\n }\n returns { \n id\n code\n state\n label\n sourceLocation { id name }\n destinationLocation { id name }\n createdAt\n totalQuantity\n }\n returnableLines {\n productVariantId\n productVariant { name sku }\n receivedQuantity\n returnedQuantity\n returnableQuantity\n }\n returnAvailability { available reasonCode }\n }\n }\n";
508
842
  /** The per-line settlement fields, in a document of their own like the return fields. */
509
843
  export declare const STOCK_TRANSFER_SHORTFALL_QUERY = "\n query StockTransferShortfall($id: ID!) {\n stockTransfer(id: $id) {\n id\n state\n items {\n id\n productVariant { id sku }\n quantity\n receivedQuantity\n lostQuantity\n returnedToSourceQuantity\n outstandingQuantity\n }\n totalLostQuantity\n totalReturnedToSourceQuantity\n }\n }\n";
510
844
  /**
@@ -512,7 +846,7 @@ export declare const STOCK_TRANSFER_SHORTFALL_QUERY = "\n query StockTransferSh
512
846
  * parcel fields: `cancelledBy` is newer than the transfer module, and
513
847
  * `get`/`list`/`cancel` keep working against an engine without it.
514
848
  */
515
- export declare const STOCK_TRANSFER_CANCELLATION_QUERY = "\n query StockTransferCancellation($id: ID!) {\n stockTransfer(id: $id) {\n id\n state\n cancelledAt\n cancelReason\n cancelledBy { id firstName lastName }\n fulfillmentHandlerCode\n hendriksRemotePath\n hendriksBluJayOrderNumber\n }\n }\n";
849
+ export declare const STOCK_TRANSFER_CANCELLATION_QUERY = "\n query StockTransferCancellation($id: ID!) {\n stockTransfer(id: $id) {\n id\n state\n cancelledAt\n cancelReason\n cancelledBy { id firstName lastName }\n fulfillmentHandlerCode\n hendriksRemotePath\n hendriksBluJayOrderNumber\n cancelAvailability { available reasonCode }\n }\n }\n";
516
850
  export declare const STOCK_TRANSFER_PARCELS_QUERY = "\n query StockTransferParcels($id: ID!) { stockTransfer(id: $id) { \n id\n state\n fulfillmentHandlerCode\n parcelCount\n myparcelParcels { ordinal shipmentId barcode labelReady lastError }\n trackingCodes\n myparcelBarcode\n myparcelLastError\n myparcelUnretractedShipments { \n shipmentId\n reference\n verdict\n status\n statusName\n billable\n hidden\n reason\n cause\n firstRecordedAt\n lastCheckedAt\n resolvedAt\n }\n } }\n";
517
851
  export declare const RETRY_STOCK_TRANSFER_MYPARCEL_SHIPMENTS_MUTATION = "\n mutation RetryStockTransferMyparcelShipments($id: ID!) {\n retryStockTransferMyparcelShipments(id: $id) { \n id\n state\n fulfillmentHandlerCode\n parcelCount\n myparcelParcels { ordinal shipmentId barcode labelReady lastError }\n trackingCodes\n myparcelBarcode\n myparcelLastError\n myparcelUnretractedShipments { \n shipmentId\n reference\n verdict\n status\n statusName\n billable\n hidden\n reason\n cause\n firstRecordedAt\n lastCheckedAt\n resolvedAt\n }\n }\n }\n";
518
852
  export declare const LABEL_STOCK_TRANSFER_MYPARCEL_PARCELS_MUTATION = "\n mutation LabelStockTransferMyparcelParcels($id: ID!) {\n labelStockTransferMyparcelParcels(id: $id) { \n id\n state\n fulfillmentHandlerCode\n parcelCount\n myparcelParcels { ordinal shipmentId barcode labelReady lastError }\n trackingCodes\n myparcelBarcode\n myparcelLastError\n myparcelUnretractedShipments { \n shipmentId\n reference\n verdict\n status\n statusName\n billable\n hidden\n reason\n cause\n firstRecordedAt\n lastCheckedAt\n resolvedAt\n }\n }\n }\n";