@acmekit/js-sdk 2.13.2 → 2.13.3

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 (297) hide show
  1. package/dist/admin/index.d.ts +2 -177
  2. package/dist/admin/index.d.ts.map +1 -1
  3. package/dist/admin/index.js +3 -76
  4. package/dist/admin/index.js.map +1 -1
  5. package/dist/esm/admin/index.d.ts +2 -177
  6. package/dist/esm/admin/index.d.ts.map +1 -1
  7. package/dist/esm/admin/index.js +3 -73
  8. package/dist/esm/admin/index.js.map +1 -1
  9. package/dist/esm/store/index.d.ts +5 -1193
  10. package/dist/esm/store/index.d.ts.map +1 -1
  11. package/dist/esm/store/index.js +6 -1418
  12. package/dist/esm/store/index.js.map +1 -1
  13. package/dist/store/index.d.ts +5 -1193
  14. package/dist/store/index.d.ts.map +1 -1
  15. package/dist/store/index.js +6 -1408
  16. package/dist/store/index.js.map +1 -1
  17. package/package.json +2 -2
  18. package/dist/admin/campaign.d.ts +0 -164
  19. package/dist/admin/campaign.d.ts.map +0 -1
  20. package/dist/admin/campaign.js +0 -196
  21. package/dist/admin/campaign.js.map +0 -1
  22. package/dist/admin/claim.d.ts +0 -558
  23. package/dist/admin/claim.d.ts.map +0 -1
  24. package/dist/admin/claim.js +0 -693
  25. package/dist/admin/claim.js.map +0 -1
  26. package/dist/admin/currency.d.ts +0 -95
  27. package/dist/admin/currency.d.ts.map +0 -1
  28. package/dist/admin/currency.js +0 -104
  29. package/dist/admin/currency.js.map +0 -1
  30. package/dist/admin/draft-order.d.ts +0 -430
  31. package/dist/admin/draft-order.d.ts.map +0 -1
  32. package/dist/admin/draft-order.js +0 -547
  33. package/dist/admin/draft-order.js.map +0 -1
  34. package/dist/admin/exchange.d.ts +0 -487
  35. package/dist/admin/exchange.d.ts.map +0 -1
  36. package/dist/admin/exchange.js +0 -602
  37. package/dist/admin/exchange.js.map +0 -1
  38. package/dist/admin/fulfillment-provider.d.ts +0 -78
  39. package/dist/admin/fulfillment-provider.d.ts.map +0 -1
  40. package/dist/admin/fulfillment-provider.js +0 -88
  41. package/dist/admin/fulfillment-provider.js.map +0 -1
  42. package/dist/admin/fulfillment-set.d.ts +0 -141
  43. package/dist/admin/fulfillment-set.d.ts.map +0 -1
  44. package/dist/admin/fulfillment-set.js +0 -170
  45. package/dist/admin/fulfillment-set.js.map +0 -1
  46. package/dist/admin/fulfillment.d.ts +0 -91
  47. package/dist/admin/fulfillment.d.ts.map +0 -1
  48. package/dist/admin/fulfillment.js +0 -111
  49. package/dist/admin/fulfillment.js.map +0 -1
  50. package/dist/admin/inventory-item.d.ts +0 -320
  51. package/dist/admin/inventory-item.d.ts.map +0 -1
  52. package/dist/admin/inventory-item.js +0 -384
  53. package/dist/admin/inventory-item.js.map +0 -1
  54. package/dist/admin/order-edit.d.ts +0 -189
  55. package/dist/admin/order-edit.d.ts.map +0 -1
  56. package/dist/admin/order-edit.js +0 -240
  57. package/dist/admin/order-edit.js.map +0 -1
  58. package/dist/admin/order.d.ts +0 -452
  59. package/dist/admin/order.d.ts.map +0 -1
  60. package/dist/admin/order.js +0 -560
  61. package/dist/admin/order.js.map +0 -1
  62. package/dist/admin/payment-collection.d.ts +0 -72
  63. package/dist/admin/payment-collection.d.ts.map +0 -1
  64. package/dist/admin/payment-collection.js +0 -90
  65. package/dist/admin/payment-collection.js.map +0 -1
  66. package/dist/admin/payment.d.ts +0 -180
  67. package/dist/admin/payment.d.ts.map +0 -1
  68. package/dist/admin/payment.js +0 -208
  69. package/dist/admin/payment.js.map +0 -1
  70. package/dist/admin/price-list.d.ts +0 -234
  71. package/dist/admin/price-list.d.ts.map +0 -1
  72. package/dist/admin/price-list.js +0 -284
  73. package/dist/admin/price-list.js.map +0 -1
  74. package/dist/admin/price-preference.d.ts +0 -152
  75. package/dist/admin/price-preference.d.ts.map +0 -1
  76. package/dist/admin/price-preference.js +0 -182
  77. package/dist/admin/price-preference.js.map +0 -1
  78. package/dist/admin/product-category.d.ts +0 -170
  79. package/dist/admin/product-category.d.ts.map +0 -1
  80. package/dist/admin/product-category.js +0 -205
  81. package/dist/admin/product-category.js.map +0 -1
  82. package/dist/admin/product-collection.d.ts +0 -169
  83. package/dist/admin/product-collection.d.ts.map +0 -1
  84. package/dist/admin/product-collection.js +0 -203
  85. package/dist/admin/product-collection.js.map +0 -1
  86. package/dist/admin/product-tag.d.ts +0 -149
  87. package/dist/admin/product-tag.d.ts.map +0 -1
  88. package/dist/admin/product-tag.js +0 -177
  89. package/dist/admin/product-tag.js.map +0 -1
  90. package/dist/admin/product-type.d.ts +0 -150
  91. package/dist/admin/product-type.d.ts.map +0 -1
  92. package/dist/admin/product-type.js +0 -178
  93. package/dist/admin/product-type.js.map +0 -1
  94. package/dist/admin/product-variant.d.ts +0 -62
  95. package/dist/admin/product-variant.d.ts.map +0 -1
  96. package/dist/admin/product-variant.js +0 -66
  97. package/dist/admin/product-variant.js.map +0 -1
  98. package/dist/admin/product.d.ts +0 -740
  99. package/dist/admin/product.d.ts.map +0 -1
  100. package/dist/admin/product.js +0 -948
  101. package/dist/admin/product.js.map +0 -1
  102. package/dist/admin/promotion.d.ts +0 -310
  103. package/dist/admin/promotion.d.ts.map +0 -1
  104. package/dist/admin/promotion.js +0 -374
  105. package/dist/admin/promotion.js.map +0 -1
  106. package/dist/admin/refund-reasons.d.ts +0 -163
  107. package/dist/admin/refund-reasons.d.ts.map +0 -1
  108. package/dist/admin/refund-reasons.js +0 -192
  109. package/dist/admin/refund-reasons.js.map +0 -1
  110. package/dist/admin/region.d.ts +0 -152
  111. package/dist/admin/region.d.ts.map +0 -1
  112. package/dist/admin/region.js +0 -180
  113. package/dist/admin/region.js.map +0 -1
  114. package/dist/admin/reservation.d.ts +0 -154
  115. package/dist/admin/reservation.d.ts.map +0 -1
  116. package/dist/admin/reservation.js +0 -182
  117. package/dist/admin/reservation.js.map +0 -1
  118. package/dist/admin/return-reason.d.ts +0 -154
  119. package/dist/admin/return-reason.d.ts.map +0 -1
  120. package/dist/admin/return-reason.js +0 -183
  121. package/dist/admin/return-reason.js.map +0 -1
  122. package/dist/admin/return.d.ts +0 -558
  123. package/dist/admin/return.d.ts.map +0 -1
  124. package/dist/admin/return.js +0 -700
  125. package/dist/admin/return.js.map +0 -1
  126. package/dist/admin/sales-channel.d.ts +0 -196
  127. package/dist/admin/sales-channel.d.ts.map +0 -1
  128. package/dist/admin/sales-channel.js +0 -238
  129. package/dist/admin/sales-channel.js.map +0 -1
  130. package/dist/admin/shipping-option-type.d.ts +0 -152
  131. package/dist/admin/shipping-option-type.d.ts.map +0 -1
  132. package/dist/admin/shipping-option-type.js +0 -180
  133. package/dist/admin/shipping-option-type.js.map +0 -1
  134. package/dist/admin/shipping-option.d.ts +0 -171
  135. package/dist/admin/shipping-option.d.ts.map +0 -1
  136. package/dist/admin/shipping-option.js +0 -207
  137. package/dist/admin/shipping-option.js.map +0 -1
  138. package/dist/admin/shipping-profile.d.ts +0 -151
  139. package/dist/admin/shipping-profile.d.ts.map +0 -1
  140. package/dist/admin/shipping-profile.js +0 -181
  141. package/dist/admin/shipping-profile.js.map +0 -1
  142. package/dist/admin/stock-location.d.ts +0 -212
  143. package/dist/admin/stock-location.d.ts.map +0 -1
  144. package/dist/admin/stock-location.js +0 -260
  145. package/dist/admin/stock-location.js.map +0 -1
  146. package/dist/admin/tax-provider.d.ts +0 -64
  147. package/dist/admin/tax-provider.d.ts.map +0 -1
  148. package/dist/admin/tax-provider.js +0 -70
  149. package/dist/admin/tax-provider.js.map +0 -1
  150. package/dist/admin/tax-rate.d.ts +0 -155
  151. package/dist/admin/tax-rate.d.ts.map +0 -1
  152. package/dist/admin/tax-rate.js +0 -186
  153. package/dist/admin/tax-rate.js.map +0 -1
  154. package/dist/admin/tax-region.d.ts +0 -165
  155. package/dist/admin/tax-region.d.ts.map +0 -1
  156. package/dist/admin/tax-region.js +0 -196
  157. package/dist/admin/tax-region.js.map +0 -1
  158. package/dist/esm/admin/campaign.d.ts +0 -164
  159. package/dist/esm/admin/campaign.d.ts.map +0 -1
  160. package/dist/esm/admin/campaign.js +0 -213
  161. package/dist/esm/admin/campaign.js.map +0 -1
  162. package/dist/esm/admin/claim.d.ts +0 -558
  163. package/dist/esm/admin/claim.d.ts.map +0 -1
  164. package/dist/esm/admin/claim.js +0 -740
  165. package/dist/esm/admin/claim.js.map +0 -1
  166. package/dist/esm/admin/currency.d.ts +0 -95
  167. package/dist/esm/admin/currency.d.ts.map +0 -1
  168. package/dist/esm/admin/currency.js +0 -113
  169. package/dist/esm/admin/currency.js.map +0 -1
  170. package/dist/esm/admin/draft-order.d.ts +0 -430
  171. package/dist/esm/admin/draft-order.d.ts.map +0 -1
  172. package/dist/esm/admin/draft-order.js +0 -594
  173. package/dist/esm/admin/draft-order.js.map +0 -1
  174. package/dist/esm/admin/exchange.d.ts +0 -487
  175. package/dist/esm/admin/exchange.d.ts.map +0 -1
  176. package/dist/esm/admin/exchange.js +0 -643
  177. package/dist/esm/admin/exchange.js.map +0 -1
  178. package/dist/esm/admin/fulfillment-provider.d.ts +0 -78
  179. package/dist/esm/admin/fulfillment-provider.d.ts.map +0 -1
  180. package/dist/esm/admin/fulfillment-provider.js +0 -97
  181. package/dist/esm/admin/fulfillment-provider.js.map +0 -1
  182. package/dist/esm/admin/fulfillment-set.d.ts +0 -141
  183. package/dist/esm/admin/fulfillment-set.d.ts.map +0 -1
  184. package/dist/esm/admin/fulfillment-set.js +0 -185
  185. package/dist/esm/admin/fulfillment-set.js.map +0 -1
  186. package/dist/esm/admin/fulfillment.d.ts +0 -91
  187. package/dist/esm/admin/fulfillment.d.ts.map +0 -1
  188. package/dist/esm/admin/fulfillment.js +0 -122
  189. package/dist/esm/admin/fulfillment.js.map +0 -1
  190. package/dist/esm/admin/inventory-item.d.ts +0 -320
  191. package/dist/esm/admin/inventory-item.d.ts.map +0 -1
  192. package/dist/esm/admin/inventory-item.js +0 -411
  193. package/dist/esm/admin/inventory-item.js.map +0 -1
  194. package/dist/esm/admin/order-edit.d.ts +0 -189
  195. package/dist/esm/admin/order-edit.d.ts.map +0 -1
  196. package/dist/esm/admin/order-edit.js +0 -261
  197. package/dist/esm/admin/order-edit.js.map +0 -1
  198. package/dist/esm/admin/order.d.ts +0 -452
  199. package/dist/esm/admin/order.d.ts.map +0 -1
  200. package/dist/esm/admin/order.js +0 -603
  201. package/dist/esm/admin/order.js.map +0 -1
  202. package/dist/esm/admin/payment-collection.d.ts +0 -72
  203. package/dist/esm/admin/payment-collection.d.ts.map +0 -1
  204. package/dist/esm/admin/payment-collection.js +0 -101
  205. package/dist/esm/admin/payment-collection.js.map +0 -1
  206. package/dist/esm/admin/payment.d.ts +0 -180
  207. package/dist/esm/admin/payment.d.ts.map +0 -1
  208. package/dist/esm/admin/payment.js +0 -223
  209. package/dist/esm/admin/payment.js.map +0 -1
  210. package/dist/esm/admin/price-list.d.ts +0 -234
  211. package/dist/esm/admin/price-list.d.ts.map +0 -1
  212. package/dist/esm/admin/price-list.js +0 -305
  213. package/dist/esm/admin/price-list.js.map +0 -1
  214. package/dist/esm/admin/price-preference.d.ts +0 -152
  215. package/dist/esm/admin/price-preference.d.ts.map +0 -1
  216. package/dist/esm/admin/price-preference.js +0 -197
  217. package/dist/esm/admin/price-preference.js.map +0 -1
  218. package/dist/esm/admin/product-category.d.ts +0 -170
  219. package/dist/esm/admin/product-category.d.ts.map +0 -1
  220. package/dist/esm/admin/product-category.js +0 -222
  221. package/dist/esm/admin/product-category.js.map +0 -1
  222. package/dist/esm/admin/product-collection.d.ts +0 -169
  223. package/dist/esm/admin/product-collection.d.ts.map +0 -1
  224. package/dist/esm/admin/product-collection.js +0 -220
  225. package/dist/esm/admin/product-collection.js.map +0 -1
  226. package/dist/esm/admin/product-tag.d.ts +0 -149
  227. package/dist/esm/admin/product-tag.d.ts.map +0 -1
  228. package/dist/esm/admin/product-tag.js +0 -192
  229. package/dist/esm/admin/product-tag.js.map +0 -1
  230. package/dist/esm/admin/product-type.d.ts +0 -150
  231. package/dist/esm/admin/product-type.d.ts.map +0 -1
  232. package/dist/esm/admin/product-type.js +0 -193
  233. package/dist/esm/admin/product-type.js.map +0 -1
  234. package/dist/esm/admin/product-variant.d.ts +0 -62
  235. package/dist/esm/admin/product-variant.d.ts.map +0 -1
  236. package/dist/esm/admin/product-variant.js +0 -73
  237. package/dist/esm/admin/product-variant.js.map +0 -1
  238. package/dist/esm/admin/product.d.ts +0 -740
  239. package/dist/esm/admin/product.d.ts.map +0 -1
  240. package/dist/esm/admin/product.js +0 -995
  241. package/dist/esm/admin/product.js.map +0 -1
  242. package/dist/esm/admin/promotion.d.ts +0 -310
  243. package/dist/esm/admin/promotion.d.ts.map +0 -1
  244. package/dist/esm/admin/promotion.js +0 -401
  245. package/dist/esm/admin/promotion.js.map +0 -1
  246. package/dist/esm/admin/refund-reasons.d.ts +0 -163
  247. package/dist/esm/admin/refund-reasons.d.ts.map +0 -1
  248. package/dist/esm/admin/refund-reasons.js +0 -207
  249. package/dist/esm/admin/refund-reasons.js.map +0 -1
  250. package/dist/esm/admin/region.d.ts +0 -152
  251. package/dist/esm/admin/region.d.ts.map +0 -1
  252. package/dist/esm/admin/region.js +0 -195
  253. package/dist/esm/admin/region.js.map +0 -1
  254. package/dist/esm/admin/reservation.d.ts +0 -154
  255. package/dist/esm/admin/reservation.d.ts.map +0 -1
  256. package/dist/esm/admin/reservation.js +0 -199
  257. package/dist/esm/admin/reservation.js.map +0 -1
  258. package/dist/esm/admin/return-reason.d.ts +0 -154
  259. package/dist/esm/admin/return-reason.d.ts.map +0 -1
  260. package/dist/esm/admin/return-reason.js +0 -198
  261. package/dist/esm/admin/return-reason.js.map +0 -1
  262. package/dist/esm/admin/return.d.ts +0 -558
  263. package/dist/esm/admin/return.d.ts.map +0 -1
  264. package/dist/esm/admin/return.js +0 -749
  265. package/dist/esm/admin/return.js.map +0 -1
  266. package/dist/esm/admin/sales-channel.d.ts +0 -196
  267. package/dist/esm/admin/sales-channel.d.ts.map +0 -1
  268. package/dist/esm/admin/sales-channel.js +0 -257
  269. package/dist/esm/admin/sales-channel.js.map +0 -1
  270. package/dist/esm/admin/shipping-option-type.d.ts +0 -152
  271. package/dist/esm/admin/shipping-option-type.d.ts.map +0 -1
  272. package/dist/esm/admin/shipping-option-type.js +0 -195
  273. package/dist/esm/admin/shipping-option-type.js.map +0 -1
  274. package/dist/esm/admin/shipping-option.d.ts +0 -171
  275. package/dist/esm/admin/shipping-option.d.ts.map +0 -1
  276. package/dist/esm/admin/shipping-option.js +0 -224
  277. package/dist/esm/admin/shipping-option.js.map +0 -1
  278. package/dist/esm/admin/shipping-profile.d.ts +0 -151
  279. package/dist/esm/admin/shipping-profile.d.ts.map +0 -1
  280. package/dist/esm/admin/shipping-profile.js +0 -196
  281. package/dist/esm/admin/shipping-profile.js.map +0 -1
  282. package/dist/esm/admin/stock-location.d.ts +0 -212
  283. package/dist/esm/admin/stock-location.d.ts.map +0 -1
  284. package/dist/esm/admin/stock-location.js +0 -281
  285. package/dist/esm/admin/stock-location.js.map +0 -1
  286. package/dist/esm/admin/tax-provider.d.ts +0 -64
  287. package/dist/esm/admin/tax-provider.d.ts.map +0 -1
  288. package/dist/esm/admin/tax-provider.js +0 -77
  289. package/dist/esm/admin/tax-provider.js.map +0 -1
  290. package/dist/esm/admin/tax-rate.d.ts +0 -155
  291. package/dist/esm/admin/tax-rate.d.ts.map +0 -1
  292. package/dist/esm/admin/tax-rate.js +0 -201
  293. package/dist/esm/admin/tax-rate.js.map +0 -1
  294. package/dist/esm/admin/tax-region.d.ts +0 -165
  295. package/dist/esm/admin/tax-region.d.ts.map +0 -1
  296. package/dist/esm/admin/tax-region.js +0 -211
  297. package/dist/esm/admin/tax-region.js.map +0 -1
@@ -1,487 +0,0 @@
1
- import { HttpTypes, SelectParams } from "@acmekit/types";
2
- import { Client } from "../client";
3
- import { ClientHeaders } from "../types";
4
- export declare class Exchange {
5
- /**
6
- * @ignore
7
- */
8
- private client;
9
- /**
10
- * @ignore
11
- */
12
- constructor(client: Client);
13
- /**
14
- * This method retrieves a paginated list of exchanges. It sends a request to the
15
- * [List Exchanges](https://docs.acmekit.com/api/admin#exchanges_getexchanges)
16
- * API route.
17
- *
18
- * @param query - Filters and pagination configurations.
19
- * @param headers - Headers to pass in the request.
20
- * @returns The paginated list of exchanges.
21
- *
22
- * @example
23
- * To retrieve the list of exchanges:
24
- *
25
- * ```ts
26
- * sdk.admin.exchange.list()
27
- * .then(({ exchanges, count, limit, offset }) => {
28
- * console.log(exchanges)
29
- * })
30
- * ```
31
- *
32
- * To configure the pagination, pass the `limit` and `offset` query parameters.
33
- *
34
- * For example, to retrieve only 10 items and skip 10 items:
35
- *
36
- * ```ts
37
- * sdk.admin.exchange.list({
38
- * limit: 10,
39
- * offset: 10
40
- * })
41
- * .then(({ exchanges, count, limit, offset }) => {
42
- * console.log(exchanges)
43
- * })
44
- * ```
45
- *
46
- * Using the `fields` query parameter, you can specify the fields and relations to retrieve
47
- * in each exchange:
48
- *
49
- * ```ts
50
- * sdk.admin.exchange.list({
51
- * fields: "id,*order"
52
- * })
53
- * .then(({ exchanges, count, limit, offset }) => {
54
- * console.log(exchanges)
55
- * })
56
- * ```
57
- *
58
- * Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/store#select-fields-and-relations).
59
- */
60
- list(query?: HttpTypes.AdminExchangeListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeListResponse>;
61
- /**
62
- * This method retrieves an exchange by its ID. It sends a request to the
63
- * [Get Exchange](https://docs.acmekit.com/api/admin#exchanges_getexchangesid)
64
- * API route.
65
- *
66
- * @param id - The exchange's ID.
67
- * @param query - Configure the fields to retrieve in the exchange.
68
- * @param headers - Headers to pass in the request.
69
- * @returns The exchange's details.
70
- *
71
- * @example
72
- * To retrieve an exchange by its ID:
73
- *
74
- * ```ts
75
- * sdk.admin.exchange.retrieve("exchange_123")
76
- * .then(({ exchange }) => {
77
- * console.log(exchange)
78
- * })
79
- * ```
80
- *
81
- * To specify the fields and relations to retrieve:
82
- *
83
- * ```ts
84
- * sdk.admin.exchange.retrieve("exchange_123", {
85
- * fields: "id,*order"
86
- * })
87
- * .then(({ exchange }) => {
88
- * console.log(exchange)
89
- * })
90
- * ```
91
- *
92
- * Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/store#select-fields-and-relations).
93
- */
94
- retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeResponse>;
95
- /**
96
- * This method creates an admin exchange. It sends a request to the
97
- * [Create Exchange](https://docs.acmekit.com/api/admin#exchanges_postexchanges) API route.
98
- *
99
- * @param body - The exchange's details.
100
- * @param query - Configure the fields to retrieve in the exchange.
101
- * @param headers - Headers to pass in the request.
102
- * @returns The exchange's details.
103
- *
104
- * @example
105
- * sdk.admin.exchange.create({
106
- * order_id: "order_123"
107
- * })
108
- * .then(({ exchange }) => {
109
- * console.log(exchange)
110
- * })
111
- */
112
- create(body: HttpTypes.AdminCreateExchange, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeResponse>;
113
- /**
114
- * This method cancels an exchange. It sends a request to the
115
- * [Cancel Exchange](https://docs.acmekit.com/api/admin#exchanges_postexchangesidcancel) API route.
116
- *
117
- * @param id - The exchange's ID.
118
- * @param query - Configure the fields to retrieve in the exchange.
119
- * @param headers - Headers to pass in the request.
120
- * @returns The exchange's details.
121
- *
122
- * @example
123
- * sdk.admin.exchange.cancel("exchange_123")
124
- * .then(({ exchange }) => {
125
- * console.log(exchange)
126
- * })
127
- */
128
- cancel(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeResponse>;
129
- /**
130
- * This method adds inbound (or return) items to an exchange. These inbound items will
131
- * have the action `RETURN_ITEM`.
132
- *
133
- * This method sends a request to the [Add Inbound Items](https://docs.acmekit.com/api/admin#exchanges_postexchangesidinbounditems)
134
- * API route.
135
- *
136
- * @param id - The exchange's ID.
137
- * @param body - The items to add.
138
- * @param query - Configure the fields to retrieve in the return.
139
- * @param headers - Headers to pass in the request.
140
- * @returns The details of the return associated with the exchange, with a preview of the order when the exchange is applied.
141
- *
142
- * @example
143
- * sdk.admin.exchange.addInboundItems("exchange_123", {
144
- * items: [{
145
- * id: "orli_123",
146
- * quantity: 1
147
- * }]
148
- * })
149
- * .then(({ return: returnData }) => {
150
- * console.log(returnData)
151
- * })
152
- */
153
- addInboundItems(id: string, body: HttpTypes.AdminAddExchangeInboundItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeReturnResponse>;
154
- /**
155
- * This method updates an inbound (or return) item from an exchange using the ID of
156
- * the item's `RETURN_ITEM` action.
157
- *
158
- * Every item has an `actions` property, whose value is an array of actions. You can
159
- * check the action's name using its `action` property, and use the value of the `id` property.
160
- *
161
- * This method sends a request to the [Update Inbound Item](https://docs.acmekit.com/api/admin#exchanges_postexchangesidinbounditemsaction_id)
162
- * API route.
163
- *
164
- * @param id - The exchange's ID.
165
- * @param actionId - The id of the return item's `RETURN_ITEM` action.
166
- * @param body - The details to update.
167
- * @param query - Configure the fields to retrieve in the return.
168
- * @param headers - Headers to pass in the request.
169
- * @returns The details of the return associated with the exchange, with a preview of the order when the exchange is applied.
170
- *
171
- * @example
172
- * sdk.admin.exchange.updateInboundItem(
173
- * "exchange_123",
174
- * "ordchact_123",
175
- * {
176
- * quantity: 1
177
- * }
178
- * )
179
- * .then(({ return: returnData }) => {
180
- * console.log(returnData)
181
- * })
182
- */
183
- updateInboundItem(id: string, actionId: string, body: HttpTypes.AdminUpdateExchangeInboundItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeReturnResponse>;
184
- /**
185
- * This method removes an inbound (or return) item from an exchange using the ID of the
186
- * item's `RETURN_ITEM` action.
187
- *
188
- * Every item has an `actions` property, whose value is an array of actions.
189
- * You can check the action's name using its `action` property, and use the value of the `id` property.
190
- *
191
- * This method sends a request to the [Remove Inbound Item](https://docs.acmekit.com/api/admin#exchanges_deleteexchangesidinbounditemsaction_id)
192
- * API route.
193
- *
194
- * @param id - The exchange's ID.
195
- * @param actionId - The id of the return item's `RETURN_ITEM` action.
196
- * @param query - Configure the fields to retrieve in the return.
197
- * @param headers - Headers to pass in the request.
198
- * @returns The details of the return associated with the exchange, with a preview of the order when the exchange is applied.
199
- *
200
- * @example
201
- * sdk.admin.exchange.removeInboundItem(
202
- * "exchange_123",
203
- * "ordchact_123",
204
- * )
205
- * .then(({ return: returnData }) => {
206
- * console.log(returnData)
207
- * })
208
- */
209
- removeInboundItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeReturnResponse>;
210
- /**
211
- * This method adds an inbound (or return) shipping method to an exchange.
212
- * The inbound shipping method will have a `SHIPPING_ADD` action.
213
- *
214
- * This method sends a request to the [Add Inbound Shipping](https://docs.acmekit.com/api/admin#exchanges_postexchangesidinboundshippingmethod)
215
- * API route.
216
- *
217
- * This method sends a request to the [Add Inbound Shipping](https://docs.acmekit.com/api/admin#exchanges_postexchangesidinboundshippingmethod)
218
- * API route.
219
- *
220
- * @param id - The exchange's ID.
221
- * @param body - The shipping method's details.
222
- * @param query - Configure the fields to retrieve in the return.
223
- * @param headers - Headers to pass in the request.
224
- * @returns The details of the return associated with the exchange, with a preview of the order when the exchange is applied.
225
- *
226
- * @example
227
- * sdk.admin.exchange.addInboundShipping("exchange_123", {
228
- * shipping_option_id: "so_123"
229
- * })
230
- * .then(({ return: returnData }) => {
231
- * console.log(returnData)
232
- * })
233
- */
234
- addInboundShipping(id: string, body: HttpTypes.AdminExchangeAddInboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeReturnResponse>;
235
- /**
236
- * This method updates the shipping method for returning items in the exchange using the ID
237
- * of the method's `SHIPPING_ADD` action.
238
- *
239
- * Every shipping method has an `actions` property, whose value is an array of actions.
240
- * You can check the action's name using its `action` property, and use the value of the `id` property.
241
- *
242
- * This method sends a request to the [Update Inbound Shipping](https://docs.acmekit.com/api/admin#exchanges_postexchangesidinboundshippingmethodaction_id)
243
- * API route.
244
- *
245
- * @param id - The exchange's ID.
246
- * @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
247
- * @param body - The details to update.
248
- * @param query - Configure the fields to retrieve in the return.
249
- * @param headers - Headers to pass in the request.
250
- * @returns The details of the return associated with the exchange, with a preview of the order when the exchange is applied.
251
- *
252
- * @example
253
- * sdk.admin.exchange.updateInboundShipping(
254
- * "exchange_123",
255
- * "ordchact_123",
256
- * {
257
- * custom_amount: 10
258
- * }
259
- * )
260
- * .then(({ return: returnData }) => {
261
- * console.log(returnData)
262
- * })
263
- */
264
- updateInboundShipping(id: string, actionId: string, body: HttpTypes.AdminExchangeUpdateInboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeReturnResponse>;
265
- /**
266
- * This method removes the shipping method for returning items in the exchange using the ID
267
- * of the method's `SHIPPING_ADD` action.
268
- *
269
- * Every shipping method has an `actions` property, whose value is an array of actions.
270
- * You can check the action's name using its `action` property, and use the value of the `id` property.
271
- *
272
- * This method sends a request to the [Remove Inbound Shipping](https://docs.acmekit.com/api/admin#exchanges_deleteexchangesidinboundshippingmethodaction_id)
273
- * API route.
274
- *
275
- * @param id - The exchange's ID.
276
- * @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
277
- * @param query - Configure the fields to retrieve in the return.
278
- * @param headers - Headers to pass in the request.
279
- * @returns The details of the return associated with the exchange, with a preview of the order when the exchange is applied.
280
- *
281
- * @example
282
- * sdk.admin.exchange.deleteInboundShipping(
283
- * "exchange_123",
284
- * "ordchact_123",
285
- * )
286
- * .then(({ return: returnData }) => {
287
- * console.log(returnData)
288
- * })
289
- */
290
- deleteInboundShipping(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeReturnResponse>;
291
- /**
292
- * This method adds outbound (or new) items to an exchange.
293
- * These outbound items will have the action `ITEM_ADD`.
294
- *
295
- * This method sends a request to the [Add Outbound Items](https://docs.acmekit.com/api/admin#exchanges_postexchangesidoutbounditems)
296
- * API route.
297
- *
298
- * @param id - The exchange's ID.
299
- * @param body - The items to add.
300
- * @param query - Configure the fields to retrieve in the exchange.
301
- * @param headers - Headers to pass in the request
302
- * @returns The exchange's details with a preview of the order when the exchange is applied.
303
- *
304
- * @example
305
- * sdk.admin.exchange.addOutboundItems("exchange_123", {
306
- * items: [{
307
- * id: "variant_123",
308
- * quantity: 1
309
- * }]
310
- * })
311
- * .then(({ exchange }) => {
312
- * console.log(exchange)
313
- * })
314
- */
315
- addOutboundItems(id: string, body: HttpTypes.AdminAddExchangeOutboundItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangePreviewResponse>;
316
- /**
317
- * This method updates an outbound (or new) item from an exchange using the ID
318
- * of the item's `ITEM_ADD` action.
319
- *
320
- * Every item has an `actions` property, whose value is an array of actions.
321
- * You can check the action's name using its `action` property, and use the value of the `id` property.
322
- *
323
- * This method sends a request to the [Update Inbound Item](https://docs.acmekit.com/api/admin#exchanges_postexchangesidoutbounditemsaction_id)
324
- * API route.
325
- *
326
- * @param id - The exchange's ID.
327
- * @param actionId - The id of the new exchange item's `ITEM_ADD` action.
328
- * @param body - The item's details to update.
329
- * @param query - Configure the fields to retrieve in the exchange.
330
- * @param headers - Headers to pass in the request
331
- * @returns The exchange's details with a preview of the order when the exchange is applied.
332
- *
333
- * @example
334
- * sdk.admin.exchange.updateOutboundItem(
335
- * "exchange_123",
336
- * "ordchact_123",
337
- * {
338
- * quantity: 1
339
- * }
340
- * )
341
- * .then(({ exchange }) => {
342
- * console.log(exchange)
343
- * })
344
- */
345
- updateOutboundItem(id: string, actionId: string, body: HttpTypes.AdminUpdateExchangeOutboundItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangePreviewResponse>;
346
- /**
347
- * This method removes an outbound (or new) item from an exchange using the ID
348
- * of the item's `ITEM_ADD` action.
349
- *
350
- * Every item has an `actions` property, whose value is an array of actions.
351
- * You can check the action's name using its `action` property, and use the value of the `id` property.
352
- *
353
- * This method sends a request to the [Update Outbound Item](https://docs.acmekit.com/api/admin#exchanges_deleteexchangesidoutbounditemsaction_id)
354
- * API route.
355
- *
356
- * @param id - The exchange's ID.
357
- * @param actionId - The id of the new exchange item's `ITEM_ADD` action.
358
- * @param query - Configure the fields to retrieve in the exchange.
359
- * @param headers - Headers to pass in the request
360
- * @returns The exchange's details with a preview of the order when the exchange is applied.
361
- *
362
- * @example
363
- * sdk.admin.exchange.removeOutboundItem(
364
- * "exchange_123",
365
- * "ordchact_123",
366
- * )
367
- * .then(({ exchange }) => {
368
- * console.log(exchange)
369
- * })
370
- */
371
- removeOutboundItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangePreviewResponse>;
372
- /**
373
- * This method adds an outbound shipping method to an exchange. The outbound shipping method
374
- * will have a `SHIPPING_ADD` action.
375
- *
376
- * This method sends a request to the [Add Outbound Shipping](https://docs.acmekit.com/api/admin#exchanges_postexchangesidoutboundshippingmethod)
377
- * API route.
378
- *
379
- * @param id - The exchange's ID.
380
- * @param body - The shipping method's details.
381
- * @param query - Configure the fields to retrieve in the exchange.
382
- * @param headers - Headers to pass in the request
383
- * @returns The exchange's details with a preview of the order when the exchange is applied.
384
- *
385
- * @example
386
- * sdk.admin.exchange.addOutboundShipping("exchange_123", {
387
- * shipping_option_id: "so_123"
388
- * })
389
- * .then(({ exchange }) => {
390
- * console.log(exchange)
391
- * })
392
- */
393
- addOutboundShipping(id: string, body: HttpTypes.AdminExchangeAddOutboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangePreviewResponse>;
394
- /**
395
- * This method updates the shipping method for delivering outbound items in the exchange using
396
- * the ID of the method's `SHIPPING_ADD` action.
397
- *
398
- * Every shipping method has an `actions` property, whose value is an array of actions.
399
- * You can check the action's name using its `action` property, and use the value of the `id` property.
400
- *
401
- * This method sends a request to the [Update Outbound Shipping](https://docs.acmekit.com/api/admin#exchanges_postexchangesidoutboundshippingmethodaction_id)
402
- * API route.
403
- *
404
- * @param id - The exchange's ID.
405
- * @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
406
- * @param body - The details to update.
407
- * @param query - Configure the fields to retrieve in the exchange.
408
- * @param headers - Headers to pass in the request
409
- * @returns The exchange's details with a preview of the order when the exchange is applied.
410
- *
411
- * @example
412
- * sdk.admin.exchange.updateOutboundShipping(
413
- * "exchange_123",
414
- * "ordchact_123",
415
- * {
416
- * custom_amount: 10
417
- * }
418
- * )
419
- * .then(({ exchange }) => {
420
- * console.log(exchange)
421
- * })
422
- */
423
- updateOutboundShipping(id: string, actionId: string, body: HttpTypes.AdminExchangeUpdateOutboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangePreviewResponse>;
424
- /**
425
- * This method removes the shipping method for delivering outbound items in the exchange using
426
- * the ID of the method's `SHIPPING_ADD` action.
427
- *
428
- * Every shipping method has an `actions` property, whose value is an array of actions.
429
- * You can check the action's name using its `action` property, and use the value of the `id` property.
430
- *
431
- * This method sends a request to the [Remove Outbound Shipping](https://docs.acmekit.com/api/admin#exchanges_deleteexchangesidoutboundshippingmethodaction_id)
432
- * API route.
433
- *
434
- * @param id - The exchange's ID.
435
- * @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
436
- * @param query - Configure the fields to retrieve in the exchange.
437
- * @param headers - Headers to pass in the request
438
- * @returns The exchange's details with a preview of the order when the exchange is applied.
439
- *
440
- * @example
441
- * sdk.admin.exchange.deleteOutboundShipping(
442
- * "exchange_123",
443
- * "ordchact_123",
444
- * )
445
- * .then(({ exchange }) => {
446
- * console.log(exchange)
447
- * })
448
- */
449
- deleteOutboundShipping(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangePreviewResponse>;
450
- /**
451
- * This method confirms an exchange request, applying its changes on the associated order.
452
- *
453
- * This method sends a request to the [Confirm Exchange](https://docs.acmekit.com/api/admin#exchanges_postexchangesidrequest)
454
- * API route.
455
- *
456
- * @param id - The exchange's ID.
457
- * @param body - The confirmation's details.
458
- * @param query - Configure the fields to retrieve in the exchange.
459
- * @param headers - Headers to pass in the request
460
- * @returns The exchange and associated return's details with a preview of the order when the exchange is applied.
461
- *
462
- * @example
463
- * sdk.admin.exchange.request("exchange_123", {})
464
- * .then(({ exchange }) => {
465
- * console.log(exchange)
466
- * })
467
- */
468
- request(id: string, body: HttpTypes.AdminRequestExchange, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeRequestResponse>;
469
- /**
470
- * This method cancels an exchange request. It sends a request to the
471
- * [Cancel Exchange Request](https://docs.acmekit.com/api/admin#exchanges_deleteexchangesidrequest)
472
- * API route.
473
- *
474
- * @param id - The exchange's ID.
475
- * @param query - Configure the fields to retrieve in the exchange.
476
- * @param headers - Headers to pass in the request
477
- * @returns The cancelation's details.
478
- *
479
- * @example
480
- * sdk.admin.exchange.cancel("exchange_123")
481
- * .then(({ deleted }) => {
482
- * console.log(deleted)
483
- * })
484
- */
485
- cancelRequest(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExchangeDeleteResponse>;
486
- }
487
- //# sourceMappingURL=exchange.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../../src/admin/exchange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,QAAQ;IACnB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAI1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