@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
@@ -20,7 +20,11 @@ export interface StoredValueAccount {
20
20
  expiresAt: string | null;
21
21
  /** The last day (`YYYY-MM-DD`, store zone) the value is valid through; refund lots never expire. */
22
22
  expiresOn: string | null;
23
- status: 'active' | 'blocked';
23
+ /**
24
+ * `voided`: a gift card a void blocked for good (`giftCards.void`); it is never blocked or
25
+ * unblocked again. Treat any other value this version does not know as not spendable.
26
+ */
27
+ status: 'active' | 'blocked' | 'voided';
24
28
  balance: number;
25
29
  /** What can be spent now: the balance less expired value the daily job has not booked yet. */
26
30
  spendable: number;
@@ -29,7 +33,12 @@ export interface StoredValueEntry {
29
33
  id: string;
30
34
  createdAt: string;
31
35
  occurredAt: string;
32
- entryType: 'issue' | 'redeem' | 'reversal' | 'adjustment' | 'expiry' | 'forfeit';
36
+ /**
37
+ * `payout`: store credit moved from an order, paid back to the payment it came from
38
+ * (`payOut`); a payout whose refund did not happen comes back as a `reversal` with
39
+ * `sourceType: 'payout_refund'`. Treat a value you do not know as a movement you do not report.
40
+ */
41
+ entryType: 'issue' | 'redeem' | 'reversal' | 'adjustment' | 'expiry' | 'forfeit' | 'payout';
33
42
  /** Signed: credits positive, debits negative. */
34
43
  amount: number;
35
44
  balanceAfter: number;
@@ -44,6 +53,31 @@ export interface StoredValueEntry {
44
53
  onBehalfOfRef: string | null;
45
54
  deviceRef: string | null;
46
55
  reason: string | null;
56
+ /**
57
+ * Store credit moved from an order (`sourceType: 'order_credit'`): the decision that moved it,
58
+ * `return`, `correction`, `order_edit`, `surcharge`, `fulfillment_cancel`, `cancel`,
59
+ * `overpayment` or `till_return` (a value you do not know is another decision). Null otherwise,
60
+ * and on an engine before incentives sprint 8.
61
+ */
62
+ origin: string | null;
63
+ /**
64
+ * The record of that decision, when it has one: the return's id (`return`), the credit note's
65
+ * (`correction`), the surcharge's, the fulfillment's, or the till return's. Null otherwise.
66
+ */
67
+ originRef: string | null;
68
+ /**
69
+ * The lot (an `order_credit` entry's id) a `payout` pays back, or its `payout_refund` restore
70
+ * gives back to. Null otherwise, and on an engine before payouts.
71
+ */
72
+ lotId: string | null;
73
+ /**
74
+ * Store credit moved from an order: whether the customer expressly agreed to store credit
75
+ * instead of a refund to their payment (EU consumer law), as the staff member who chose it
76
+ * recorded, a till return's included (`pos.returns.create`'s `customerAgreed`). Null when nobody
77
+ * said (the door was not told, a till that did not ask, a move recorded before the field), on
78
+ * every other entry, and on an engine before it. A record, never a condition.
79
+ */
80
+ customerAgreed: boolean | null;
47
81
  }
48
82
  export interface StoredValueStatement {
49
83
  account: StoredValueAccount;
@@ -52,17 +86,34 @@ export interface StoredValueStatement {
52
86
  entries: StoredValueEntry[];
53
87
  totalItems: number;
54
88
  }
55
- /** `outstanding = issued − redeemed + reversed + adjusted − expired − forfeited`. */
89
+ /**
90
+ * `outstanding = issued − redeemed + reversed + adjusted − expired − forfeited − paidOut`, where
91
+ * `paidOut` is store credit paid back to money (`payOut`), net of the payouts whose refund did not
92
+ * happen. On an engine before incentives sprint 8 the split of `issued` and `paidOut` are null
93
+ * (it serves neither; nothing was paid out there).
94
+ */
56
95
  export interface StoredValueLiability {
57
96
  unit: string;
58
97
  kind: string;
59
98
  accounts: number;
60
99
  issued: number;
100
+ /** Of `issued`: created by staff without payment (goodwill, a staff gift card). */
101
+ issuedGoodwill: number | null;
102
+ /** Of `issued`: an order's money moved to store credit instead of a refund. */
103
+ issuedFromOrders: number | null;
104
+ /** Of `issued`: store credit for goods a till took back that no order payment paid for. */
105
+ issuedFromReturns: number | null;
61
106
  redeemed: number;
107
+ /**
108
+ * Value given back by refunds and cancelled payments. A payout's restore (a `reversal` with
109
+ * `sourceType: 'payout_refund'`) is NOT here: the engine nets it in `paidOut`.
110
+ */
62
111
  reversed: number;
63
112
  adjusted: number;
64
113
  expired: number;
65
114
  forfeited: number;
115
+ /** Paid back to money (`payOut`), net of the payouts whose refund did not happen. */
116
+ paidOut: number | null;
66
117
  outstanding: number;
67
118
  }
68
119
  export interface IssueStoredValueInput {
@@ -75,6 +126,37 @@ export interface IssueStoredValueInput {
75
126
  reason: string;
76
127
  /** Sets the account's expiry: valid through this day (`YYYY-MM-DD`) in the store's time zone. */
77
128
  expiresOn?: string;
129
+ /**
130
+ * Goodwill FOR this order of the store: linked on the statement; it moves none of the order's
131
+ * money. Another store's order is not found; an account takes goodwill only for its owner's
132
+ * order (`STORED_VALUE_OWNER_MISMATCH`). Needs an engine that knows the field (incentives
133
+ * sprint 8): an older one refuses the whole call.
134
+ */
135
+ orderId?: string;
136
+ }
137
+ /**
138
+ * Whether the store may put an order's money in its customers' store-credit wallets instead of
139
+ * refunding it (incentives sprint 8).
140
+ */
141
+ export interface StoreCreditSettings {
142
+ /** The store's switch. Off until the store turns it on. */
143
+ refundToCredit: boolean;
144
+ /**
145
+ * Where the store keeps what it owes its customers now: `AR` (its own accounts receivable, which
146
+ * then holds every customer credit), `STORE_CREDIT` (a wallet each: the Stored Value grant, the
147
+ * switch on, a stored-value method enabled) or `NONE` (neither). Treat any other value as no
148
+ * store credit.
149
+ */
150
+ book: 'AR' | 'STORE_CREDIT' | 'NONE' | (string & {});
151
+ /** Usable now: the book is `STORE_CREDIT`. */
152
+ available: boolean;
153
+ /**
154
+ * Why the book is not `STORE_CREDIT` (null exactly when it is):
155
+ * `STORE_CREDIT_STORE_KEEPS_ACCOUNTS`, `STORE_CREDIT_NOT_GRANTED`, `STORE_CREDIT_NOT_ENABLED` or
156
+ * `STORE_CREDIT_METHOD_REQUIRED`.
157
+ */
158
+ code: string | null;
159
+ message: string | null;
78
160
  }
79
161
  export interface RedeemStoredValueInput {
80
162
  orderId: string;
@@ -84,6 +166,25 @@ export interface RedeemStoredValueInput {
84
166
  /** The code of the store's payment method on the `stored-value` handler. */
85
167
  method: string;
86
168
  }
169
+ export interface PayOutStoreCreditInput {
170
+ /** The lot: an `order_credit` entry of the customer's store credit (`StoredValueEntry.id`). */
171
+ entryId: string;
172
+ /** Minor units of the store credit's currency. Omitted: everything the lot can pay back. */
173
+ amount?: number;
174
+ /** Free text, on the Refund and the order note. */
175
+ reason?: string;
176
+ }
177
+ /** The refund a payout made, of the payment the store credit came from. */
178
+ export interface StoreCreditPayoutRefund {
179
+ id: string;
180
+ /** Minor units. */
181
+ total: number;
182
+ /** `Settled`, or `Pending` while the payment provider has not confirmed it. */
183
+ state: string;
184
+ method: string;
185
+ transactionId: string | null;
186
+ reason: string | null;
187
+ }
87
188
  export interface StoredValueModule {
88
189
  accounts(filter?: {
89
190
  customerId?: string;
@@ -108,9 +209,17 @@ export interface StoredValueModule {
108
209
  kind?: string;
109
210
  locationId?: string;
110
211
  }, options?: Call): Promise<StoredValueLiability[]>;
111
- /** Requires ManageStoredValue. Send an `idempotencyKey`: a repeat returns the first result. */
212
+ /**
213
+ * Requires ManageStoredValue. Send an `idempotencyKey`: a repeat returns the first result. A
214
+ * gift card sold on an order is never credited (`STORED_VALUE_GIFT_CARD_CREDIT_NOT_ALLOWED`),
215
+ * nor is a voided one (`STORED_VALUE_GIFT_CARD_VOIDED`).
216
+ */
112
217
  issue(input: IssueStoredValueInput, options?: Call): Promise<StoredValueAccount>;
113
- /** Requires ManageStoredValue. Signed; a debit may not take the balance below zero. */
218
+ /**
219
+ * Requires ManageStoredValue. Signed; a debit may not take the balance below zero. A voided gift
220
+ * card takes no credit and no `expiresOn` (`STORED_VALUE_GIFT_CARD_VOIDED`); a plain debit of it
221
+ * is allowed.
222
+ */
114
223
  adjust(input: {
115
224
  accountId: string;
116
225
  amount: number;
@@ -120,18 +229,194 @@ export interface StoredValueModule {
120
229
  /**
121
230
  * Requires ManageStoredValue. The account's value is valid through `expiresOn` (`YYYY-MM-DD`,
122
231
  * store zone); `null` clears it. A day already over is refused (`STORED_VALUE_EXPIRY_INVALID`);
123
- * value the job already booked as expired stays booked.
232
+ * value the job already booked as expired stays booked. A voided gift card's expiry never changes
233
+ * (`STORED_VALUE_GIFT_CARD_VOIDED`).
124
234
  */
125
235
  setExpiry(id: string, expiresOn: string | null, reason: string, options?: Call): Promise<StoredValueAccount>;
236
+ /** A voided gift card is refused (`STORED_VALUE_GIFT_CARD_VOIDED`): it is blocked for good. */
126
237
  block(id: string, reason: string, options?: Call): Promise<StoredValueAccount>;
238
+ /** A voided gift card is refused (`STORED_VALUE_GIFT_CARD_VOIDED`): it is blocked for good. */
127
239
  unblock(id: string, reason: string, options?: Call): Promise<StoredValueAccount>;
128
240
  /**
129
241
  * Pay part (or all) of an order from an account (`redeemStoredValue`), through the platform's
130
- * payment position: the order lock, the outstanding bound and the store's deposit policy apply,
131
- * and the ledger is debited in the payment's own transaction. Requires UpdateOrder. Answers the
132
- * payment the SERVER recorded for this call; a repeat under the same key answers the same one.
242
+ * payment position: the order lock and the outstanding bound apply, and the ledger is debited in
243
+ * the payment's own transaction. Requires UpdateOrder. Answers the payment the SERVER recorded
244
+ * for this call; a repeat under the same key answers the same one.
245
+ *
246
+ * Stored value may pay PART of an order still arranging payment whatever the store's deposit
247
+ * policy (split tender, not a deposit): the order is placed only once its money covers it, so the
248
+ * rest is paid by another method, and cancelling the payment gives the part back to the account.
249
+ * On a parked or placed order a part is a deposit, refused `DEPOSITS_NOT_ENABLED` on a store
250
+ * without deposits.
133
251
  */
134
252
  redeem(input: RedeemStoredValueInput, options?: Call): Promise<StoredValueRedemption>;
253
+ /**
254
+ * Requires UpdateOrder AND ManageStoredValue (no Stored Value grant: it pays the customer's own
255
+ * money back; a blocked wallet may be paid out). Pay store credit moved from an order back to the
256
+ * payment it came from (`payOutStoreCredit`): a refund of that payment, the last step. Only an
257
+ * `order_credit` lot (`STORE_CREDIT_PAYOUT_NOT_PAYABLE`); at most what it still holds and what
258
+ * the customer can spend (`STORE_CREDIT_PAYOUT_EXCEEDED`; the thrown error's
259
+ * `extensions.storeCredit.payable` says how much may go); and
260
+ * the refund's own refusals (`REFUND_REFUSED`, …), after which the store credit is given back to
261
+ * its lot (a `reversal` of `sourceType: 'payout_refund'`). Send an
262
+ * `idempotencyKey`: a provider answer that is unknown answers `IDEMPOTENCY_OUTCOME_UNKNOWN`, the
263
+ * store credit stays paid out until `reconcileRefundOutcome`, and a repeat of the key replays the
264
+ * refund (MADE) or runs again (NOT_MADE). Needs an engine that serves it (incentives sprint 8).
265
+ */
266
+ payOut(input: PayOutStoreCreditInput, options?: Call): Promise<StoreCreditPayoutRefund>;
267
+ /**
268
+ * Requires ReadStoredValue. The store's refund-to-credit switch and whether it is usable now.
269
+ * Needs an engine that serves `storeCreditSettings` (incentives sprint 8).
270
+ */
271
+ storeCreditSettings(options?: Call): Promise<StoreCreditSettings>;
272
+ /**
273
+ * Requires ManageStoredValue. Switch refund to store credit on or off: whether "credit the
274
+ * customer" may put an order's money in the customer's store-credit wallet instead of refunding
275
+ * it. Turning it on is refused `STORE_CREDIT_STORE_KEEPS_ACCOUNTS` (the store keeps its
276
+ * customers' balances on their accounts), `STORE_CREDIT_NOT_GRANTED` (no Stored Value grant)
277
+ * and `STORE_CREDIT_METHOD_REQUIRED` (no enabled stored-value payment method); turning it off
278
+ * always works. A setting written whole: no key.
279
+ */
280
+ updateStoreCreditSettings(input: {
281
+ refundToCredit: boolean;
282
+ }, options?: Call): Promise<StoreCreditSettings>;
283
+ /** Gift cards: sold on orders, one per paid unit, or issued by staff; each its own account. */
284
+ giftCards: GiftCardModule;
285
+ }
286
+ /**
287
+ * A gift card. Its code is never readable: the card is found by id, by order, or by the code
288
+ * itself (`byCode`, which answers it masked).
289
+ */
290
+ export interface GiftCard {
291
+ /** The card's account id. */
292
+ id: string;
293
+ createdAt: string;
294
+ account: StoredValueAccount;
295
+ /**
296
+ * `sale`: sold on an order, one card per paid unit. `staff`: issued by staff with no sale
297
+ * (`giftCards.issue`), on no order.
298
+ */
299
+ origin: 'sale' | 'staff';
300
+ orderId: string | null;
301
+ orderLineId: string | null;
302
+ /** The 0-based unit of the order line this card was issued for. */
303
+ unitIndex: number | null;
304
+ productVariantId: string | null;
305
+ /** What the unit was paid, or what staff issued, minor units of the account's unit. */
306
+ faceValue: number;
307
+ /** The code's last four characters behind a mask. */
308
+ maskedCode: string;
309
+ /** A void blocked the card for good (its account `status` is `voided`); see `void`. */
310
+ voided: boolean;
311
+ }
312
+ /**
313
+ * A gift card and the code it was just given. `code` (`XXXX-XXXX-XXXX-XXXX`) is shown ONCE: it is
314
+ * null when the code went to the buyer by email, and on a repeat under the same `idempotencyKey`
315
+ * (the server keeps the card's id, never the code).
316
+ */
317
+ export interface IssuedGiftCard {
318
+ giftCard: GiftCard;
319
+ code: string | null;
320
+ }
321
+ /** A gift card staff issue with no sale (`giftCards.issue`). */
322
+ export interface IssueGiftCardInput {
323
+ /** Minor units, greater than zero. */
324
+ amount: number;
325
+ /** An ISO 4217 currency the store sells. */
326
+ currencyCode: string;
327
+ reason: string;
328
+ /** Valid through this day (`YYYY-MM-DD`) in the store's time zone; omitted or null: never expires. */
329
+ expiresOn?: string | null;
330
+ }
331
+ /** A variant this store sells as a gift card. */
332
+ export interface GiftCardVariant {
333
+ productVariantId: string;
334
+ /** A sold card is valid this many calendar months from its issue day; null: never expires. */
335
+ validityMonths: number | null;
336
+ createdAt: string;
337
+ }
338
+ export interface GiftCardModule {
339
+ /** Requires ReadStoredValue. Newest first; `orderId` lists the cards an order sold. */
340
+ list(filter?: {
341
+ orderId?: string;
342
+ origin?: 'sale' | 'staff';
343
+ take?: number;
344
+ skip?: number;
345
+ }, options?: Call): Promise<{
346
+ items: GiftCard[];
347
+ totalItems: number;
348
+ }>;
349
+ get(id: string, options?: Call): Promise<GiftCard | null>;
350
+ /**
351
+ * Requires ReadStoredValue. This store's card for a code, masked, or null: an unknown,
352
+ * malformed or other store's code answers the same null. Sent as a POST (a code never goes in a
353
+ * URL), one lookup per request, and budgeted per token: past the budget it is refused
354
+ * `RATE_LIMITED` with a wait.
355
+ */
356
+ byCode(code: string, options?: Call): Promise<GiftCard | null>;
357
+ /** Requires ReadStoredValue. Which of these variants the store sells as gift cards. */
358
+ variants(productVariantIds: string[], options?: Call): Promise<GiftCardVariant[]>;
359
+ /**
360
+ * Requires ReadStoredValue. How many of this store's orders would issue a gift card of the
361
+ * variant once paid in full, and so issue none once it is switched off: what the "stop selling"
362
+ * confirmation names. The engine's issuing rule: an order of this store alone, not cancelled and
363
+ * not imported, with a unit of the variant priced above zero that has no card yet, and not paid
364
+ * in full (no settled payment yet, or its settled money below what it bills). Carts, drafts and
365
+ * placed orders not yet paid in full count alike. `null` when the store does not sell the
366
+ * variant as a gift card. Read now, without a lock.
367
+ *
368
+ * Its own document rather than a field of {@link variants}, so the tab's read pays for no count
369
+ * and a release of this SDK reading an older engine fails only this call. Needs an engine that
370
+ * serves `GiftCardVariant.unpaidOrders`.
371
+ */
372
+ variantUnpaidOrders(productVariantId: string, options?: Call): Promise<number | null>;
373
+ /**
374
+ * Requires ManageStoredValue. Sell a variant as a gift card (or stop: `enabled: false` answers
375
+ * null). Turning it on is refused once the variant has sold as an ordinary product.
376
+ * `validityMonths` omitted keeps the validity already set; `null` means no expiry.
377
+ */
378
+ setVariant(productVariantId: string, enabled: boolean, validityMonths?: number | null, options?: Call): Promise<GiftCardVariant | null>;
379
+ /**
380
+ * Requires ManageStoredValue, or no Stored Value grant at all for a card the store sold. The
381
+ * step before refunding a gift card's sale: blocks the card for good (status `voided`) and
382
+ * withdraws what it can still spend, which releases that much of its order's money for a refund (never what the card spent,
383
+ * never value past its expiry). A second void takes only what became spendable since (a refund
384
+ * credited back to the card). Send an `idempotencyKey`: a
385
+ * repeat answers the card as it is then and voids nothing again. A card of another store is not
386
+ * found; a voided card is never unblocked (`STORED_VALUE_GIFT_CARD_VOIDED`).
387
+ */
388
+ void(id: string, reason: string, options?: Call): Promise<GiftCard>;
389
+ /**
390
+ * Requires ManageStoredValue (an app installation is refused). A new code for a live gift card:
391
+ * the old code stops working at once; the balance, expiry, statement and status stay. The code
392
+ * goes to ONE place:
393
+ * - `notify: true` emails it to the buyer of a card sold on an order, and `code` is null. A card
394
+ * no email can reach (issued with no sale, no email delivery, a buyer whose address cannot
395
+ * receive it) is refused `STORED_VALUE_GIFT_CARD_NOT_MAILABLE`, nothing changed;
396
+ * - `notify: false` answers it in `code`, once, for staff to hand over.
397
+ *
398
+ * Send an `idempotencyKey`: a repeat answers the card with `code: null` and changes nothing
399
+ * again. The first answer is the only copy of a code it shows: a lost one is replaced by another
400
+ * reissue under a NEW key. A voided card is refused (`STORED_VALUE_GIFT_CARD_VOIDED`); a card of
401
+ * another store is not found.
402
+ */
403
+ reissueCode(id: string, input: {
404
+ reason: string;
405
+ notify: boolean;
406
+ }, options?: Call): Promise<IssuedGiftCard>;
407
+ /**
408
+ * Requires ManageStoredValue (an app installation is refused). A bearer gift card with no sale
409
+ * (goodwill): value created without payment, booked as liability with `origin: 'staff'`. No email
410
+ * is sent: `code` is in the answer ONCE, for staff to hand over.
411
+ *
412
+ * Send an `idempotencyKey`: a repeat answers the card with `code: null` and issues nothing again.
413
+ * The first answer is the only copy of the code: a lost one is replaced by `reissueCode` on the
414
+ * card (`notify: false`). Refusals: `STORED_VALUE_ROOT_CHANNEL_NOT_ALLOWED`,
415
+ * `STORED_VALUE_REASON_REQUIRED`, `STORED_VALUE_AMOUNT_INVALID`, `STORED_VALUE_UNIT_INVALID` (a
416
+ * currency the store does not sell), `STORED_VALUE_GIFT_CARD_NOT_CONFIGURED`,
417
+ * `STORED_VALUE_EXPIRY_INVALID` (not a day, or a day already over), `STORED_VALUE_POSTING_CONFLICT`.
418
+ */
419
+ issue(input: IssueGiftCardInput, options?: Call): Promise<IssuedGiftCard>;
135
420
  }
136
421
  /** What a redemption recorded: the order, the payment this call created, the account and amount. */
137
422
  export interface StoredValueRedemption {
@@ -143,12 +428,28 @@ export interface StoredValueRedemption {
143
428
  }
144
429
  export declare const STORED_VALUE_ACCOUNTS_QUERY = "\n query StoredValueAccounts($customerId: ID, $kind: String, $take: Int, $skip: Int) {\n storedValueAccounts(customerId: $customerId, kind: $kind, take: $take, skip: $skip) {\n items { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n totalItems\n }\n }\n";
145
430
  export declare const STORED_VALUE_ACCOUNT_QUERY = "\n query StoredValueAccount($id: ID!) {\n storedValueAccount(id: $id) { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n }\n";
146
- export declare const STORED_VALUE_STATEMENT_QUERY = "\n query StoredValueStatement($accountId: ID!, $from: DateTime, $to: DateTime, $take: Int, $skip: Int) {\n storedValueStatement(accountId: $accountId, from: $from, to: $to, take: $take, skip: $skip) {\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n openingBalance\n closingBalance\n totalItems\n entries {\n id createdAt occurredAt entryType amount balanceAfter unit sourceType sourceId paymentId\n orderId locationId actorType actorId onBehalfOfRef deviceRef reason\n }\n }\n }\n";
147
- export declare const STORED_VALUE_LIABILITY_QUERY = "\n query StoredValueLiability($at: DateTime, $kind: String, $locationId: ID) {\n storedValueLiability(at: $at, kind: $kind, locationId: $locationId) {\n unit kind accounts issued redeemed reversed adjusted expired forfeited outstanding\n }\n }\n";
431
+ export declare const STORED_VALUE_STATEMENT_QUERY = "\n query StoredValueStatement($accountId: ID!, $from: DateTime, $to: DateTime, $take: Int, $skip: Int) {\n storedValueStatement(accountId: $accountId, from: $from, to: $to, take: $take, skip: $skip) {\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n openingBalance\n closingBalance\n totalItems\n entries {\n id createdAt occurredAt entryType amount balanceAfter unit sourceType sourceId paymentId\n orderId locationId actorType actorId onBehalfOfRef deviceRef reason origin originRef lotId\n customerAgreed\n }\n }\n }\n";
432
+ export declare const STORED_VALUE_LIABILITY_QUERY = "\n query StoredValueLiability($at: DateTime, $kind: String, $locationId: ID) {\n storedValueLiability(at: $at, kind: $kind, locationId: $locationId) {\n unit kind accounts issued issuedGoodwill issuedFromOrders issuedFromReturns redeemed\n reversed adjusted expired forfeited paidOut outstanding\n }\n }\n";
433
+ /** `document` without the fields above: what an engine before them accepts. */
434
+ export declare function withoutWalletFields(document: string): string;
435
+ /** `document` without the consent field: what an engine of sprint 8 before PR 6a accepts. */
436
+ export declare function withoutConsentField(document: string): string;
148
437
  export declare const ISSUE_STORED_VALUE_MUTATION = "\n mutation IssueStoredValue($input: IssueStoredValueInput!, $idempotencyKey: String) {\n issueStoredValue(input: $input, idempotencyKey: $idempotencyKey) { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n }\n";
149
438
  export declare const ADJUST_STORED_VALUE_MUTATION = "\n mutation AdjustStoredValue($input: AdjustStoredValueInput!, $idempotencyKey: String) {\n adjustStoredValue(input: $input, idempotencyKey: $idempotencyKey) { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n }\n";
150
439
  export declare const BLOCK_STORED_VALUE_MUTATION = "\n mutation BlockStoredValueAccount($id: ID!, $reason: String!) {\n blockStoredValueAccount(id: $id, reason: $reason) { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n }\n";
151
440
  export declare const UNBLOCK_STORED_VALUE_MUTATION = "\n mutation UnblockStoredValueAccount($id: ID!, $reason: String!) {\n unblockStoredValueAccount(id: $id, reason: $reason) { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n }\n";
152
441
  export declare const SET_STORED_VALUE_EXPIRY_MUTATION = "\n mutation SetStoredValueAccountExpiry(\n $id: ID!\n $expiresOn: String\n $reason: String!\n $idempotencyKey: String\n ) {\n setStoredValueAccountExpiry(\n id: $id\n expiresOn: $expiresOn\n reason: $reason\n idempotencyKey: $idempotencyKey\n ) { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n }\n";
442
+ export declare const PAY_OUT_STORE_CREDIT_MUTATION = "\n mutation PayOutStoreCredit($input: PayOutStoreCreditInput!, $idempotencyKey: String) {\n payOutStoreCredit(input: $input, idempotencyKey: $idempotencyKey) {\n id\n total\n state\n method\n transactionId\n reason\n }\n }\n";
153
443
  export declare const REDEEM_STORED_VALUE_MUTATION = "\n mutation RedeemStoredValue($input: RedeemStoredValueInput!, $idempotencyKey: String) {\n redeemStoredValue(input: $input, idempotencyKey: $idempotencyKey) {\n orderId\n paymentId\n accountId\n amount\n }\n }\n";
444
+ export declare const STORE_CREDIT_SETTINGS_QUERY = "\n query StoreCreditSettings {\n storeCreditSettings { \n refundToCredit\n book\n available\n code\n message\n }\n }\n";
445
+ export declare const UPDATE_STORE_CREDIT_SETTINGS_MUTATION = "\n mutation UpdateStoreCreditSettings($input: UpdateStoreCreditSettingsInput!) {\n updateStoreCreditSettings(input: $input) { \n refundToCredit\n book\n available\n code\n message\n }\n }\n";
446
+ export declare const GIFT_CARDS_QUERY = "\n query GiftCards($orderId: ID, $origin: String, $take: Int, $skip: Int) {\n giftCards(orderId: $orderId, origin: $origin, take: $take, skip: $skip) {\n items { \n id\n createdAt\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n origin\n orderId\n orderLineId\n unitIndex\n productVariantId\n faceValue\n maskedCode\n voided\n }\n totalItems\n }\n }\n";
447
+ export declare const GIFT_CARD_QUERY = "\n query GiftCard($id: ID!) {\n giftCard(id: $id) { \n id\n createdAt\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n origin\n orderId\n orderLineId\n unitIndex\n productVariantId\n faceValue\n maskedCode\n voided\n }\n }\n";
448
+ export declare const GIFT_CARD_BY_CODE_QUERY = "\n query GiftCardByCode($code: String!) {\n giftCardByCode(code: $code) { \n id\n createdAt\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n origin\n orderId\n orderLineId\n unitIndex\n productVariantId\n faceValue\n maskedCode\n voided\n }\n }\n";
449
+ export declare const GIFT_CARD_VARIANTS_QUERY = "\n query GiftCardVariants($productVariantIds: [ID!]!) {\n giftCardVariants(productVariantIds: $productVariantIds) {\n productVariantId\n validityMonths\n createdAt\n }\n }\n";
450
+ export declare const GIFT_CARD_VARIANT_UNPAID_ORDERS_QUERY = "\n query GiftCardVariantUnpaidOrders($productVariantIds: [ID!]!) {\n giftCardVariants(productVariantIds: $productVariantIds) {\n productVariantId\n unpaidOrders\n }\n }\n";
451
+ export declare const SET_GIFT_CARD_VARIANT_MUTATION = "\n mutation SetGiftCardVariant($productVariantId: ID!, $enabled: Boolean!, $validityMonths: Int) {\n setGiftCardVariant(\n productVariantId: $productVariantId\n enabled: $enabled\n validityMonths: $validityMonths\n ) {\n productVariantId\n validityMonths\n createdAt\n }\n }\n";
452
+ export declare const VOID_GIFT_CARD_MUTATION = "\n mutation VoidGiftCard($id: ID!, $reason: String!, $idempotencyKey: String) {\n voidGiftCard(id: $id, reason: $reason, idempotencyKey: $idempotencyKey) { \n id\n createdAt\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n origin\n orderId\n orderLineId\n unitIndex\n productVariantId\n faceValue\n maskedCode\n voided\n }\n }\n";
453
+ export declare const REISSUE_GIFT_CARD_CODE_MUTATION = "\n mutation ReissueGiftCardCode(\n $id: ID!\n $reason: String!\n $notify: Boolean!\n $idempotencyKey: String\n ) {\n reissueGiftCardCode(\n id: $id\n reason: $reason\n notify: $notify\n idempotencyKey: $idempotencyKey\n ) {\n giftCard { \n id\n createdAt\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n origin\n orderId\n orderLineId\n unitIndex\n productVariantId\n faceValue\n maskedCode\n voided\n }\n code\n }\n }\n";
454
+ export declare const ISSUE_GIFT_CARD_MUTATION = "\n mutation IssueGiftCard($input: IssueGiftCardInput!, $idempotencyKey: String) {\n issueGiftCard(input: $input, idempotencyKey: $idempotencyKey) {\n giftCard { \n id\n createdAt\n account { \n id\n createdAt\n updatedAt\n kind\n unit\n customerId\n codeLast4\n expiresAt\n expiresOn\n status\n balance\n spendable\n }\n origin\n orderId\n orderLineId\n unitIndex\n productVariantId\n faceValue\n maskedCode\n voided\n }\n code\n }\n }\n";
154
455
  export declare function createStoredValueModule(transport: Transport): StoredValueModule;