@commercelayer/sdk 7.0.0-beta.9 → 7.0.0-rc.1

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 (894) hide show
  1. package/README.md +48 -35
  2. package/lib/api-DDgIE2i8.d.ts +17175 -0
  3. package/lib/api-DmIZO_Np.d.cts +17175 -0
  4. package/lib/api.cjs +796 -0
  5. package/lib/api.cjs.map +1 -0
  6. package/lib/api.d.cts +4 -0
  7. package/lib/api.d.ts +4 -0
  8. package/lib/api.js +133 -0
  9. package/lib/api.js.map +1 -0
  10. package/lib/client.cjs +160 -0
  11. package/lib/client.cjs.map +1 -0
  12. package/lib/client.d.cts +36 -0
  13. package/lib/client.d.ts +36 -0
  14. package/lib/client.js +151 -0
  15. package/lib/client.js.map +1 -0
  16. package/lib/commercelayer.cjs +114 -0
  17. package/lib/commercelayer.cjs.map +1 -0
  18. package/lib/commercelayer.d.cts +36 -0
  19. package/lib/commercelayer.d.ts +36 -0
  20. package/lib/commercelayer.js +104 -0
  21. package/lib/commercelayer.js.map +1 -0
  22. package/lib/config.cjs +23 -0
  23. package/lib/config.cjs.map +1 -0
  24. package/lib/config.d.cts +19 -0
  25. package/lib/config.d.ts +19 -0
  26. package/lib/config.js +19 -0
  27. package/lib/config.js.map +1 -0
  28. package/lib/debug.cjs +21 -0
  29. package/lib/debug.cjs.map +1 -0
  30. package/lib/debug.d.cts +4 -0
  31. package/lib/debug.d.ts +4 -0
  32. package/lib/debug.js +17 -0
  33. package/lib/debug.js.map +1 -0
  34. package/lib/enum.cjs +659 -0
  35. package/lib/enum.cjs.map +1 -0
  36. package/lib/enum.d.cts +4 -0
  37. package/lib/enum.d.ts +4 -0
  38. package/lib/enum.js +643 -0
  39. package/lib/enum.js.map +1 -0
  40. package/lib/error.cjs +101 -0
  41. package/lib/error.cjs.map +1 -0
  42. package/lib/error.d.cts +38 -0
  43. package/lib/error.d.ts +38 -0
  44. package/lib/error.js +93 -0
  45. package/lib/error.js.map +1 -0
  46. package/lib/fetch.cjs +69 -0
  47. package/lib/fetch.cjs.map +1 -0
  48. package/lib/fetch.d.cts +1 -0
  49. package/lib/fetch.d.ts +1 -0
  50. package/lib/fetch.js +62 -0
  51. package/lib/fetch.js.map +1 -0
  52. package/lib/index.cjs +34 -2
  53. package/lib/index.cjs.map +1 -0
  54. package/lib/index.d.cts +7 -17201
  55. package/lib/index.d.ts +7 -17201
  56. package/lib/index.js +5 -2
  57. package/lib/index.js.map +1 -0
  58. package/lib/interceptor-5MISI1yn.d.cts +54 -0
  59. package/lib/interceptor-5MISI1yn.d.ts +54 -0
  60. package/lib/interceptor.cjs +4 -0
  61. package/lib/interceptor.cjs.map +1 -0
  62. package/lib/interceptor.d.cts +1 -0
  63. package/lib/interceptor.d.ts +1 -0
  64. package/lib/interceptor.js +3 -0
  65. package/lib/interceptor.js.map +1 -0
  66. package/lib/jsonapi.cjs +81 -0
  67. package/lib/jsonapi.cjs.map +1 -0
  68. package/lib/jsonapi.d.cts +11 -0
  69. package/lib/jsonapi.d.ts +11 -0
  70. package/lib/jsonapi.js +73 -0
  71. package/lib/jsonapi.js.map +1 -0
  72. package/lib/model.cjs +4 -0
  73. package/lib/model.cjs.map +1 -0
  74. package/lib/model.d.cts +4 -0
  75. package/lib/model.d.ts +4 -0
  76. package/lib/model.js +3 -0
  77. package/lib/model.js.map +1 -0
  78. package/lib/query.cjs +66 -0
  79. package/lib/query.cjs.map +1 -0
  80. package/lib/query.d.cts +4 -0
  81. package/lib/query.d.ts +4 -0
  82. package/lib/query.js +58 -0
  83. package/lib/query.js.map +1 -0
  84. package/lib/resource.cjs +218 -0
  85. package/lib/resource.cjs.map +1 -0
  86. package/lib/resource.d.cts +4 -0
  87. package/lib/resource.d.ts +4 -0
  88. package/lib/resource.js +206 -0
  89. package/lib/resource.js.map +1 -0
  90. package/lib/resources/addresses.cjs +58 -0
  91. package/lib/resources/addresses.cjs.map +1 -0
  92. package/lib/resources/addresses.d.cts +4 -0
  93. package/lib/resources/addresses.d.ts +4 -0
  94. package/lib/resources/addresses.js +54 -0
  95. package/lib/resources/addresses.js.map +1 -0
  96. package/lib/resources/adjustments.cjs +40 -0
  97. package/lib/resources/adjustments.cjs.map +1 -0
  98. package/lib/resources/adjustments.d.cts +4 -0
  99. package/lib/resources/adjustments.d.ts +4 -0
  100. package/lib/resources/adjustments.js +36 -0
  101. package/lib/resources/adjustments.js.map +1 -0
  102. package/lib/resources/adyen_gateways.cjs +48 -0
  103. package/lib/resources/adyen_gateways.cjs.map +1 -0
  104. package/lib/resources/adyen_gateways.d.cts +4 -0
  105. package/lib/resources/adyen_gateways.d.ts +4 -0
  106. package/lib/resources/adyen_gateways.js +44 -0
  107. package/lib/resources/adyen_gateways.js.map +1 -0
  108. package/lib/resources/adyen_payments.cjs +54 -0
  109. package/lib/resources/adyen_payments.cjs.map +1 -0
  110. package/lib/resources/adyen_payments.d.cts +4 -0
  111. package/lib/resources/adyen_payments.d.ts +4 -0
  112. package/lib/resources/adyen_payments.js +50 -0
  113. package/lib/resources/adyen_payments.js.map +1 -0
  114. package/lib/resources/applications.cjs +30 -0
  115. package/lib/resources/applications.cjs.map +1 -0
  116. package/lib/resources/applications.d.cts +4 -0
  117. package/lib/resources/applications.d.ts +4 -0
  118. package/lib/resources/applications.js +26 -0
  119. package/lib/resources/applications.js.map +1 -0
  120. package/lib/resources/attachments.cjs +36 -0
  121. package/lib/resources/attachments.cjs.map +1 -0
  122. package/lib/resources/attachments.d.cts +4 -0
  123. package/lib/resources/attachments.d.ts +4 -0
  124. package/lib/resources/attachments.js +32 -0
  125. package/lib/resources/attachments.js.map +1 -0
  126. package/lib/resources/authorizations.cjs +69 -0
  127. package/lib/resources/authorizations.cjs.map +1 -0
  128. package/lib/resources/authorizations.d.cts +4 -0
  129. package/lib/resources/authorizations.d.ts +4 -0
  130. package/lib/resources/authorizations.js +65 -0
  131. package/lib/resources/authorizations.js.map +1 -0
  132. package/lib/resources/avalara_accounts.cjs +56 -0
  133. package/lib/resources/avalara_accounts.cjs.map +1 -0
  134. package/lib/resources/avalara_accounts.d.cts +4 -0
  135. package/lib/resources/avalara_accounts.d.ts +4 -0
  136. package/lib/resources/avalara_accounts.js +52 -0
  137. package/lib/resources/avalara_accounts.js.map +1 -0
  138. package/lib/resources/axerve_gateways.cjs +48 -0
  139. package/lib/resources/axerve_gateways.cjs.map +1 -0
  140. package/lib/resources/axerve_gateways.d.cts +4 -0
  141. package/lib/resources/axerve_gateways.d.ts +4 -0
  142. package/lib/resources/axerve_gateways.js +44 -0
  143. package/lib/resources/axerve_gateways.js.map +1 -0
  144. package/lib/resources/axerve_payments.cjs +51 -0
  145. package/lib/resources/axerve_payments.cjs.map +1 -0
  146. package/lib/resources/axerve_payments.d.cts +4 -0
  147. package/lib/resources/axerve_payments.d.ts +4 -0
  148. package/lib/resources/axerve_payments.js +47 -0
  149. package/lib/resources/axerve_payments.js.map +1 -0
  150. package/lib/resources/bing_geocoders.cjs +48 -0
  151. package/lib/resources/bing_geocoders.cjs.map +1 -0
  152. package/lib/resources/bing_geocoders.d.cts +4 -0
  153. package/lib/resources/bing_geocoders.d.ts +4 -0
  154. package/lib/resources/bing_geocoders.js +44 -0
  155. package/lib/resources/bing_geocoders.js.map +1 -0
  156. package/lib/resources/braintree_gateways.cjs +48 -0
  157. package/lib/resources/braintree_gateways.cjs.map +1 -0
  158. package/lib/resources/braintree_gateways.d.cts +4 -0
  159. package/lib/resources/braintree_gateways.d.ts +4 -0
  160. package/lib/resources/braintree_gateways.js +44 -0
  161. package/lib/resources/braintree_gateways.js.map +1 -0
  162. package/lib/resources/braintree_payments.cjs +48 -0
  163. package/lib/resources/braintree_payments.cjs.map +1 -0
  164. package/lib/resources/braintree_payments.d.cts +4 -0
  165. package/lib/resources/braintree_payments.d.ts +4 -0
  166. package/lib/resources/braintree_payments.js +44 -0
  167. package/lib/resources/braintree_payments.js.map +1 -0
  168. package/lib/resources/bundles.cjs +76 -0
  169. package/lib/resources/bundles.cjs.map +1 -0
  170. package/lib/resources/bundles.d.cts +4 -0
  171. package/lib/resources/bundles.d.ts +4 -0
  172. package/lib/resources/bundles.js +72 -0
  173. package/lib/resources/bundles.js.map +1 -0
  174. package/lib/resources/buy_x_pay_y_promotions.cjs +96 -0
  175. package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -0
  176. package/lib/resources/buy_x_pay_y_promotions.d.cts +4 -0
  177. package/lib/resources/buy_x_pay_y_promotions.d.ts +4 -0
  178. package/lib/resources/buy_x_pay_y_promotions.js +92 -0
  179. package/lib/resources/buy_x_pay_y_promotions.js.map +1 -0
  180. package/lib/resources/captures.cjs +70 -0
  181. package/lib/resources/captures.cjs.map +1 -0
  182. package/lib/resources/captures.d.cts +4 -0
  183. package/lib/resources/captures.d.ts +4 -0
  184. package/lib/resources/captures.js +66 -0
  185. package/lib/resources/captures.js.map +1 -0
  186. package/lib/resources/carrier_accounts.cjs +48 -0
  187. package/lib/resources/carrier_accounts.cjs.map +1 -0
  188. package/lib/resources/carrier_accounts.d.cts +4 -0
  189. package/lib/resources/carrier_accounts.d.ts +4 -0
  190. package/lib/resources/carrier_accounts.js +44 -0
  191. package/lib/resources/carrier_accounts.js.map +1 -0
  192. package/lib/resources/checkout_com_gateways.cjs +48 -0
  193. package/lib/resources/checkout_com_gateways.cjs.map +1 -0
  194. package/lib/resources/checkout_com_gateways.d.cts +4 -0
  195. package/lib/resources/checkout_com_gateways.d.ts +4 -0
  196. package/lib/resources/checkout_com_gateways.js +44 -0
  197. package/lib/resources/checkout_com_gateways.js.map +1 -0
  198. package/lib/resources/checkout_com_payments.cjs +54 -0
  199. package/lib/resources/checkout_com_payments.cjs.map +1 -0
  200. package/lib/resources/checkout_com_payments.d.cts +4 -0
  201. package/lib/resources/checkout_com_payments.d.ts +4 -0
  202. package/lib/resources/checkout_com_payments.js +50 -0
  203. package/lib/resources/checkout_com_payments.js.map +1 -0
  204. package/lib/resources/cleanups.cjs +47 -0
  205. package/lib/resources/cleanups.cjs.map +1 -0
  206. package/lib/resources/cleanups.d.cts +4 -0
  207. package/lib/resources/cleanups.d.ts +4 -0
  208. package/lib/resources/cleanups.js +43 -0
  209. package/lib/resources/cleanups.js.map +1 -0
  210. package/lib/resources/coupon_codes_promotion_rules.cjs +44 -0
  211. package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -0
  212. package/lib/resources/coupon_codes_promotion_rules.d.cts +4 -0
  213. package/lib/resources/coupon_codes_promotion_rules.d.ts +4 -0
  214. package/lib/resources/coupon_codes_promotion_rules.js +40 -0
  215. package/lib/resources/coupon_codes_promotion_rules.js.map +1 -0
  216. package/lib/resources/coupon_recipients.cjs +48 -0
  217. package/lib/resources/coupon_recipients.cjs.map +1 -0
  218. package/lib/resources/coupon_recipients.d.cts +4 -0
  219. package/lib/resources/coupon_recipients.d.ts +4 -0
  220. package/lib/resources/coupon_recipients.js +44 -0
  221. package/lib/resources/coupon_recipients.js.map +1 -0
  222. package/lib/resources/coupons.cjs +62 -0
  223. package/lib/resources/coupons.cjs.map +1 -0
  224. package/lib/resources/coupons.d.cts +4 -0
  225. package/lib/resources/coupons.d.ts +4 -0
  226. package/lib/resources/coupons.js +58 -0
  227. package/lib/resources/coupons.js.map +1 -0
  228. package/lib/resources/custom_promotion_rules.cjs +40 -0
  229. package/lib/resources/custom_promotion_rules.cjs.map +1 -0
  230. package/lib/resources/custom_promotion_rules.d.cts +4 -0
  231. package/lib/resources/custom_promotion_rules.d.ts +4 -0
  232. package/lib/resources/custom_promotion_rules.js +36 -0
  233. package/lib/resources/custom_promotion_rules.js.map +1 -0
  234. package/lib/resources/customer_addresses.cjs +52 -0
  235. package/lib/resources/customer_addresses.cjs.map +1 -0
  236. package/lib/resources/customer_addresses.d.cts +4 -0
  237. package/lib/resources/customer_addresses.d.ts +4 -0
  238. package/lib/resources/customer_addresses.js +48 -0
  239. package/lib/resources/customer_addresses.js.map +1 -0
  240. package/lib/resources/customer_groups.cjs +52 -0
  241. package/lib/resources/customer_groups.cjs.map +1 -0
  242. package/lib/resources/customer_groups.d.cts +4 -0
  243. package/lib/resources/customer_groups.d.ts +4 -0
  244. package/lib/resources/customer_groups.js +48 -0
  245. package/lib/resources/customer_groups.js.map +1 -0
  246. package/lib/resources/customer_password_resets.cjs +47 -0
  247. package/lib/resources/customer_password_resets.cjs.map +1 -0
  248. package/lib/resources/customer_password_resets.d.cts +4 -0
  249. package/lib/resources/customer_password_resets.d.ts +4 -0
  250. package/lib/resources/customer_password_resets.js +43 -0
  251. package/lib/resources/customer_password_resets.js.map +1 -0
  252. package/lib/resources/customer_payment_sources.cjs +48 -0
  253. package/lib/resources/customer_payment_sources.cjs.map +1 -0
  254. package/lib/resources/customer_payment_sources.d.cts +4 -0
  255. package/lib/resources/customer_payment_sources.d.ts +4 -0
  256. package/lib/resources/customer_payment_sources.js +44 -0
  257. package/lib/resources/customer_payment_sources.js.map +1 -0
  258. package/lib/resources/customer_subscriptions.cjs +48 -0
  259. package/lib/resources/customer_subscriptions.cjs.map +1 -0
  260. package/lib/resources/customer_subscriptions.d.cts +4 -0
  261. package/lib/resources/customer_subscriptions.d.ts +4 -0
  262. package/lib/resources/customer_subscriptions.js +44 -0
  263. package/lib/resources/customer_subscriptions.js.map +1 -0
  264. package/lib/resources/customers.cjs +86 -0
  265. package/lib/resources/customers.cjs.map +1 -0
  266. package/lib/resources/customers.d.cts +4 -0
  267. package/lib/resources/customers.d.ts +4 -0
  268. package/lib/resources/customers.js +82 -0
  269. package/lib/resources/customers.js.map +1 -0
  270. package/lib/resources/delivery_lead_times.cjs +52 -0
  271. package/lib/resources/delivery_lead_times.cjs.map +1 -0
  272. package/lib/resources/delivery_lead_times.d.cts +4 -0
  273. package/lib/resources/delivery_lead_times.d.ts +4 -0
  274. package/lib/resources/delivery_lead_times.js +48 -0
  275. package/lib/resources/delivery_lead_times.js.map +1 -0
  276. package/lib/resources/discount_engine_items.cjs +35 -0
  277. package/lib/resources/discount_engine_items.cjs.map +1 -0
  278. package/lib/resources/discount_engine_items.d.cts +4 -0
  279. package/lib/resources/discount_engine_items.d.ts +4 -0
  280. package/lib/resources/discount_engine_items.js +31 -0
  281. package/lib/resources/discount_engine_items.js.map +1 -0
  282. package/lib/resources/discount_engines.cjs +43 -0
  283. package/lib/resources/discount_engines.cjs.map +1 -0
  284. package/lib/resources/discount_engines.d.cts +4 -0
  285. package/lib/resources/discount_engines.d.ts +4 -0
  286. package/lib/resources/discount_engines.js +39 -0
  287. package/lib/resources/discount_engines.js.map +1 -0
  288. package/lib/resources/easypost_pickups.cjs +51 -0
  289. package/lib/resources/easypost_pickups.cjs.map +1 -0
  290. package/lib/resources/easypost_pickups.d.cts +4 -0
  291. package/lib/resources/easypost_pickups.d.ts +4 -0
  292. package/lib/resources/easypost_pickups.js +47 -0
  293. package/lib/resources/easypost_pickups.js.map +1 -0
  294. package/lib/resources/event_callbacks.cjs +31 -0
  295. package/lib/resources/event_callbacks.cjs.map +1 -0
  296. package/lib/resources/event_callbacks.d.cts +4 -0
  297. package/lib/resources/event_callbacks.d.ts +4 -0
  298. package/lib/resources/event_callbacks.js +27 -0
  299. package/lib/resources/event_callbacks.js.map +1 -0
  300. package/lib/resources/events.cjs +41 -0
  301. package/lib/resources/events.cjs.map +1 -0
  302. package/lib/resources/events.d.cts +4 -0
  303. package/lib/resources/events.d.ts +4 -0
  304. package/lib/resources/events.js +37 -0
  305. package/lib/resources/events.js.map +1 -0
  306. package/lib/resources/exports.cjs +47 -0
  307. package/lib/resources/exports.cjs.map +1 -0
  308. package/lib/resources/exports.d.cts +4 -0
  309. package/lib/resources/exports.d.ts +4 -0
  310. package/lib/resources/exports.js +43 -0
  311. package/lib/resources/exports.js.map +1 -0
  312. package/lib/resources/external_gateways.cjs +51 -0
  313. package/lib/resources/external_gateways.cjs.map +1 -0
  314. package/lib/resources/external_gateways.d.cts +4 -0
  315. package/lib/resources/external_gateways.d.ts +4 -0
  316. package/lib/resources/external_gateways.js +47 -0
  317. package/lib/resources/external_gateways.js.map +1 -0
  318. package/lib/resources/external_payments.cjs +52 -0
  319. package/lib/resources/external_payments.cjs.map +1 -0
  320. package/lib/resources/external_payments.d.cts +4 -0
  321. package/lib/resources/external_payments.d.ts +4 -0
  322. package/lib/resources/external_payments.js +48 -0
  323. package/lib/resources/external_payments.js.map +1 -0
  324. package/lib/resources/external_promotions.cjs +99 -0
  325. package/lib/resources/external_promotions.cjs.map +1 -0
  326. package/lib/resources/external_promotions.d.cts +4 -0
  327. package/lib/resources/external_promotions.d.ts +4 -0
  328. package/lib/resources/external_promotions.js +95 -0
  329. package/lib/resources/external_promotions.js.map +1 -0
  330. package/lib/resources/external_tax_calculators.cjs +55 -0
  331. package/lib/resources/external_tax_calculators.cjs.map +1 -0
  332. package/lib/resources/external_tax_calculators.d.cts +4 -0
  333. package/lib/resources/external_tax_calculators.d.ts +4 -0
  334. package/lib/resources/external_tax_calculators.js +51 -0
  335. package/lib/resources/external_tax_calculators.js.map +1 -0
  336. package/lib/resources/fixed_amount_promotions.cjs +96 -0
  337. package/lib/resources/fixed_amount_promotions.cjs.map +1 -0
  338. package/lib/resources/fixed_amount_promotions.d.cts +4 -0
  339. package/lib/resources/fixed_amount_promotions.d.ts +4 -0
  340. package/lib/resources/fixed_amount_promotions.js +92 -0
  341. package/lib/resources/fixed_amount_promotions.js.map +1 -0
  342. package/lib/resources/fixed_price_promotions.cjs +96 -0
  343. package/lib/resources/fixed_price_promotions.cjs.map +1 -0
  344. package/lib/resources/fixed_price_promotions.d.cts +4 -0
  345. package/lib/resources/fixed_price_promotions.d.ts +4 -0
  346. package/lib/resources/fixed_price_promotions.js +92 -0
  347. package/lib/resources/fixed_price_promotions.js.map +1 -0
  348. package/lib/resources/flex_promotions.cjs +72 -0
  349. package/lib/resources/flex_promotions.cjs.map +1 -0
  350. package/lib/resources/flex_promotions.d.cts +4 -0
  351. package/lib/resources/flex_promotions.d.ts +4 -0
  352. package/lib/resources/flex_promotions.js +68 -0
  353. package/lib/resources/flex_promotions.js.map +1 -0
  354. package/lib/resources/free_gift_promotions.cjs +96 -0
  355. package/lib/resources/free_gift_promotions.cjs.map +1 -0
  356. package/lib/resources/free_gift_promotions.d.cts +4 -0
  357. package/lib/resources/free_gift_promotions.d.ts +4 -0
  358. package/lib/resources/free_gift_promotions.js +92 -0
  359. package/lib/resources/free_gift_promotions.js.map +1 -0
  360. package/lib/resources/free_shipping_promotions.cjs +92 -0
  361. package/lib/resources/free_shipping_promotions.cjs.map +1 -0
  362. package/lib/resources/free_shipping_promotions.d.cts +4 -0
  363. package/lib/resources/free_shipping_promotions.d.ts +4 -0
  364. package/lib/resources/free_shipping_promotions.js +88 -0
  365. package/lib/resources/free_shipping_promotions.js.map +1 -0
  366. package/lib/resources/geocoders.cjs +39 -0
  367. package/lib/resources/geocoders.cjs.map +1 -0
  368. package/lib/resources/geocoders.d.cts +4 -0
  369. package/lib/resources/geocoders.d.ts +4 -0
  370. package/lib/resources/geocoders.js +35 -0
  371. package/lib/resources/geocoders.js.map +1 -0
  372. package/lib/resources/gift_card_recipients.cjs +48 -0
  373. package/lib/resources/gift_card_recipients.cjs.map +1 -0
  374. package/lib/resources/gift_card_recipients.d.cts +4 -0
  375. package/lib/resources/gift_card_recipients.d.ts +4 -0
  376. package/lib/resources/gift_card_recipients.js +44 -0
  377. package/lib/resources/gift_card_recipients.js.map +1 -0
  378. package/lib/resources/gift_cards.cjs +78 -0
  379. package/lib/resources/gift_cards.cjs.map +1 -0
  380. package/lib/resources/gift_cards.d.cts +4 -0
  381. package/lib/resources/gift_cards.d.ts +4 -0
  382. package/lib/resources/gift_cards.js +74 -0
  383. package/lib/resources/gift_cards.js.map +1 -0
  384. package/lib/resources/google_geocoders.cjs +48 -0
  385. package/lib/resources/google_geocoders.cjs.map +1 -0
  386. package/lib/resources/google_geocoders.d.cts +4 -0
  387. package/lib/resources/google_geocoders.d.ts +4 -0
  388. package/lib/resources/google_geocoders.js +44 -0
  389. package/lib/resources/google_geocoders.js.map +1 -0
  390. package/lib/resources/imports.cjs +43 -0
  391. package/lib/resources/imports.cjs.map +1 -0
  392. package/lib/resources/imports.d.cts +4 -0
  393. package/lib/resources/imports.d.ts +4 -0
  394. package/lib/resources/imports.js +39 -0
  395. package/lib/resources/imports.js.map +1 -0
  396. package/lib/resources/in_stock_subscriptions.cjs +62 -0
  397. package/lib/resources/in_stock_subscriptions.cjs.map +1 -0
  398. package/lib/resources/in_stock_subscriptions.d.cts +4 -0
  399. package/lib/resources/in_stock_subscriptions.d.ts +4 -0
  400. package/lib/resources/in_stock_subscriptions.js +58 -0
  401. package/lib/resources/in_stock_subscriptions.js.map +1 -0
  402. package/lib/resources/inventory_models.cjs +52 -0
  403. package/lib/resources/inventory_models.cjs.map +1 -0
  404. package/lib/resources/inventory_models.d.cts +4 -0
  405. package/lib/resources/inventory_models.d.ts +4 -0
  406. package/lib/resources/inventory_models.js +48 -0
  407. package/lib/resources/inventory_models.js.map +1 -0
  408. package/lib/resources/inventory_return_locations.cjs +48 -0
  409. package/lib/resources/inventory_return_locations.cjs.map +1 -0
  410. package/lib/resources/inventory_return_locations.d.cts +4 -0
  411. package/lib/resources/inventory_return_locations.d.ts +4 -0
  412. package/lib/resources/inventory_return_locations.js +44 -0
  413. package/lib/resources/inventory_return_locations.js.map +1 -0
  414. package/lib/resources/inventory_stock_locations.cjs +48 -0
  415. package/lib/resources/inventory_stock_locations.cjs.map +1 -0
  416. package/lib/resources/inventory_stock_locations.d.cts +4 -0
  417. package/lib/resources/inventory_stock_locations.d.ts +4 -0
  418. package/lib/resources/inventory_stock_locations.js +44 -0
  419. package/lib/resources/inventory_stock_locations.js.map +1 -0
  420. package/lib/resources/klarna_gateways.cjs +48 -0
  421. package/lib/resources/klarna_gateways.cjs.map +1 -0
  422. package/lib/resources/klarna_gateways.d.cts +4 -0
  423. package/lib/resources/klarna_gateways.d.ts +4 -0
  424. package/lib/resources/klarna_gateways.js +44 -0
  425. package/lib/resources/klarna_gateways.js.map +1 -0
  426. package/lib/resources/klarna_payments.cjs +51 -0
  427. package/lib/resources/klarna_payments.cjs.map +1 -0
  428. package/lib/resources/klarna_payments.d.cts +4 -0
  429. package/lib/resources/klarna_payments.d.ts +4 -0
  430. package/lib/resources/klarna_payments.js +47 -0
  431. package/lib/resources/klarna_payments.js.map +1 -0
  432. package/lib/resources/line_item_options.cjs +58 -0
  433. package/lib/resources/line_item_options.cjs.map +1 -0
  434. package/lib/resources/line_item_options.d.cts +4 -0
  435. package/lib/resources/line_item_options.d.ts +4 -0
  436. package/lib/resources/line_item_options.js +54 -0
  437. package/lib/resources/line_item_options.js.map +1 -0
  438. package/lib/resources/line_items.cjs +87 -0
  439. package/lib/resources/line_items.cjs.map +1 -0
  440. package/lib/resources/line_items.d.cts +4 -0
  441. package/lib/resources/line_items.d.ts +4 -0
  442. package/lib/resources/line_items.js +83 -0
  443. package/lib/resources/line_items.js.map +1 -0
  444. package/lib/resources/links.cjs +46 -0
  445. package/lib/resources/links.cjs.map +1 -0
  446. package/lib/resources/links.d.cts +4 -0
  447. package/lib/resources/links.d.ts +4 -0
  448. package/lib/resources/links.js +42 -0
  449. package/lib/resources/links.js.map +1 -0
  450. package/lib/resources/manual_gateways.cjs +44 -0
  451. package/lib/resources/manual_gateways.cjs.map +1 -0
  452. package/lib/resources/manual_gateways.d.cts +4 -0
  453. package/lib/resources/manual_gateways.d.ts +4 -0
  454. package/lib/resources/manual_gateways.js +40 -0
  455. package/lib/resources/manual_gateways.js.map +1 -0
  456. package/lib/resources/manual_tax_calculators.cjs +56 -0
  457. package/lib/resources/manual_tax_calculators.cjs.map +1 -0
  458. package/lib/resources/manual_tax_calculators.d.cts +4 -0
  459. package/lib/resources/manual_tax_calculators.d.ts +4 -0
  460. package/lib/resources/manual_tax_calculators.js +52 -0
  461. package/lib/resources/manual_tax_calculators.js.map +1 -0
  462. package/lib/resources/markets.cjs +98 -0
  463. package/lib/resources/markets.cjs.map +1 -0
  464. package/lib/resources/markets.d.cts +4 -0
  465. package/lib/resources/markets.d.ts +4 -0
  466. package/lib/resources/markets.js +94 -0
  467. package/lib/resources/markets.js.map +1 -0
  468. package/lib/resources/merchants.cjs +48 -0
  469. package/lib/resources/merchants.cjs.map +1 -0
  470. package/lib/resources/merchants.d.cts +4 -0
  471. package/lib/resources/merchants.d.ts +4 -0
  472. package/lib/resources/merchants.js +44 -0
  473. package/lib/resources/merchants.js.map +1 -0
  474. package/lib/resources/notifications.cjs +36 -0
  475. package/lib/resources/notifications.cjs.map +1 -0
  476. package/lib/resources/notifications.d.cts +4 -0
  477. package/lib/resources/notifications.d.ts +4 -0
  478. package/lib/resources/notifications.js +32 -0
  479. package/lib/resources/notifications.js.map +1 -0
  480. package/lib/resources/order_amount_promotion_rules.cjs +40 -0
  481. package/lib/resources/order_amount_promotion_rules.cjs.map +1 -0
  482. package/lib/resources/order_amount_promotion_rules.d.cts +4 -0
  483. package/lib/resources/order_amount_promotion_rules.d.ts +4 -0
  484. package/lib/resources/order_amount_promotion_rules.js +36 -0
  485. package/lib/resources/order_amount_promotion_rules.js.map +1 -0
  486. package/lib/resources/order_copies.cjs +52 -0
  487. package/lib/resources/order_copies.cjs.map +1 -0
  488. package/lib/resources/order_copies.d.cts +4 -0
  489. package/lib/resources/order_copies.d.ts +4 -0
  490. package/lib/resources/order_copies.js +48 -0
  491. package/lib/resources/order_copies.js.map +1 -0
  492. package/lib/resources/order_factories.cjs +39 -0
  493. package/lib/resources/order_factories.cjs.map +1 -0
  494. package/lib/resources/order_factories.d.cts +4 -0
  495. package/lib/resources/order_factories.d.ts +4 -0
  496. package/lib/resources/order_factories.js +35 -0
  497. package/lib/resources/order_factories.js.map +1 -0
  498. package/lib/resources/order_subscription_items.cjs +44 -0
  499. package/lib/resources/order_subscription_items.cjs.map +1 -0
  500. package/lib/resources/order_subscription_items.d.cts +4 -0
  501. package/lib/resources/order_subscription_items.d.ts +4 -0
  502. package/lib/resources/order_subscription_items.js +40 -0
  503. package/lib/resources/order_subscription_items.js.map +1 -0
  504. package/lib/resources/order_subscriptions.cjs +102 -0
  505. package/lib/resources/order_subscriptions.cjs.map +1 -0
  506. package/lib/resources/order_subscriptions.d.cts +4 -0
  507. package/lib/resources/order_subscriptions.d.ts +4 -0
  508. package/lib/resources/order_subscriptions.js +98 -0
  509. package/lib/resources/order_subscriptions.js.map +1 -0
  510. package/lib/resources/orders.cjs +279 -0
  511. package/lib/resources/orders.cjs.map +1 -0
  512. package/lib/resources/orders.d.cts +4 -0
  513. package/lib/resources/orders.d.ts +4 -0
  514. package/lib/resources/orders.js +275 -0
  515. package/lib/resources/orders.js.map +1 -0
  516. package/lib/resources/organizations.cjs +30 -0
  517. package/lib/resources/organizations.cjs.map +1 -0
  518. package/lib/resources/organizations.d.cts +4 -0
  519. package/lib/resources/organizations.d.ts +4 -0
  520. package/lib/resources/organizations.js +26 -0
  521. package/lib/resources/organizations.js.map +1 -0
  522. package/lib/resources/packages.cjs +52 -0
  523. package/lib/resources/packages.cjs.map +1 -0
  524. package/lib/resources/packages.d.cts +4 -0
  525. package/lib/resources/packages.d.ts +4 -0
  526. package/lib/resources/packages.js +48 -0
  527. package/lib/resources/packages.js.map +1 -0
  528. package/lib/resources/parcel_line_items.cjs +48 -0
  529. package/lib/resources/parcel_line_items.cjs.map +1 -0
  530. package/lib/resources/parcel_line_items.d.cts +4 -0
  531. package/lib/resources/parcel_line_items.d.ts +4 -0
  532. package/lib/resources/parcel_line_items.js +44 -0
  533. package/lib/resources/parcel_line_items.js.map +1 -0
  534. package/lib/resources/parcels.cjs +60 -0
  535. package/lib/resources/parcels.cjs.map +1 -0
  536. package/lib/resources/parcels.d.cts +4 -0
  537. package/lib/resources/parcels.d.ts +4 -0
  538. package/lib/resources/parcels.js +56 -0
  539. package/lib/resources/parcels.js.map +1 -0
  540. package/lib/resources/payment_gateways.cjs +35 -0
  541. package/lib/resources/payment_gateways.cjs.map +1 -0
  542. package/lib/resources/payment_gateways.d.cts +4 -0
  543. package/lib/resources/payment_gateways.d.ts +4 -0
  544. package/lib/resources/payment_gateways.js +31 -0
  545. package/lib/resources/payment_gateways.js.map +1 -0
  546. package/lib/resources/payment_methods.cjs +66 -0
  547. package/lib/resources/payment_methods.cjs.map +1 -0
  548. package/lib/resources/payment_methods.d.cts +4 -0
  549. package/lib/resources/payment_methods.d.ts +4 -0
  550. package/lib/resources/payment_methods.js +62 -0
  551. package/lib/resources/payment_methods.js.map +1 -0
  552. package/lib/resources/payment_options.cjs +44 -0
  553. package/lib/resources/payment_options.cjs.map +1 -0
  554. package/lib/resources/payment_options.d.cts +4 -0
  555. package/lib/resources/payment_options.d.ts +4 -0
  556. package/lib/resources/payment_options.js +40 -0
  557. package/lib/resources/payment_options.js.map +1 -0
  558. package/lib/resources/paypal_gateways.cjs +48 -0
  559. package/lib/resources/paypal_gateways.cjs.map +1 -0
  560. package/lib/resources/paypal_gateways.d.cts +4 -0
  561. package/lib/resources/paypal_gateways.d.ts +4 -0
  562. package/lib/resources/paypal_gateways.js +44 -0
  563. package/lib/resources/paypal_gateways.js.map +1 -0
  564. package/lib/resources/paypal_payments.cjs +48 -0
  565. package/lib/resources/paypal_payments.cjs.map +1 -0
  566. package/lib/resources/paypal_payments.d.cts +4 -0
  567. package/lib/resources/paypal_payments.d.ts +4 -0
  568. package/lib/resources/paypal_payments.js +44 -0
  569. package/lib/resources/paypal_payments.js.map +1 -0
  570. package/lib/resources/percentage_discount_promotions.cjs +96 -0
  571. package/lib/resources/percentage_discount_promotions.cjs.map +1 -0
  572. package/lib/resources/percentage_discount_promotions.d.cts +4 -0
  573. package/lib/resources/percentage_discount_promotions.d.ts +4 -0
  574. package/lib/resources/percentage_discount_promotions.js +92 -0
  575. package/lib/resources/percentage_discount_promotions.js.map +1 -0
  576. package/lib/resources/pickups.cjs +39 -0
  577. package/lib/resources/pickups.cjs.map +1 -0
  578. package/lib/resources/pickups.d.cts +4 -0
  579. package/lib/resources/pickups.d.ts +4 -0
  580. package/lib/resources/pickups.js +35 -0
  581. package/lib/resources/pickups.js.map +1 -0
  582. package/lib/resources/price_frequency_tiers.cjs +52 -0
  583. package/lib/resources/price_frequency_tiers.cjs.map +1 -0
  584. package/lib/resources/price_frequency_tiers.d.cts +4 -0
  585. package/lib/resources/price_frequency_tiers.d.ts +4 -0
  586. package/lib/resources/price_frequency_tiers.js +48 -0
  587. package/lib/resources/price_frequency_tiers.js.map +1 -0
  588. package/lib/resources/price_list_schedulers.cjs +58 -0
  589. package/lib/resources/price_list_schedulers.cjs.map +1 -0
  590. package/lib/resources/price_list_schedulers.d.cts +4 -0
  591. package/lib/resources/price_list_schedulers.d.ts +4 -0
  592. package/lib/resources/price_list_schedulers.js +54 -0
  593. package/lib/resources/price_list_schedulers.js.map +1 -0
  594. package/lib/resources/price_lists.cjs +52 -0
  595. package/lib/resources/price_lists.cjs.map +1 -0
  596. package/lib/resources/price_lists.d.cts +4 -0
  597. package/lib/resources/price_lists.d.ts +4 -0
  598. package/lib/resources/price_lists.js +48 -0
  599. package/lib/resources/price_lists.js.map +1 -0
  600. package/lib/resources/price_tiers.cjs +39 -0
  601. package/lib/resources/price_tiers.cjs.map +1 -0
  602. package/lib/resources/price_tiers.d.cts +4 -0
  603. package/lib/resources/price_tiers.d.ts +4 -0
  604. package/lib/resources/price_tiers.js +35 -0
  605. package/lib/resources/price_tiers.js.map +1 -0
  606. package/lib/resources/price_volume_tiers.cjs +52 -0
  607. package/lib/resources/price_volume_tiers.cjs.map +1 -0
  608. package/lib/resources/price_volume_tiers.d.cts +4 -0
  609. package/lib/resources/price_volume_tiers.d.ts +4 -0
  610. package/lib/resources/price_volume_tiers.js +48 -0
  611. package/lib/resources/price_volume_tiers.js.map +1 -0
  612. package/lib/resources/prices.cjs +76 -0
  613. package/lib/resources/prices.cjs.map +1 -0
  614. package/lib/resources/prices.d.cts +4 -0
  615. package/lib/resources/prices.d.ts +4 -0
  616. package/lib/resources/prices.js +72 -0
  617. package/lib/resources/prices.js.map +1 -0
  618. package/lib/resources/promotion_rules.cjs +31 -0
  619. package/lib/resources/promotion_rules.cjs.map +1 -0
  620. package/lib/resources/promotion_rules.d.cts +4 -0
  621. package/lib/resources/promotion_rules.d.ts +4 -0
  622. package/lib/resources/promotion_rules.js +27 -0
  623. package/lib/resources/promotion_rules.js.map +1 -0
  624. package/lib/resources/promotions.cjs +71 -0
  625. package/lib/resources/promotions.cjs.map +1 -0
  626. package/lib/resources/promotions.d.cts +4 -0
  627. package/lib/resources/promotions.d.ts +4 -0
  628. package/lib/resources/promotions.js +67 -0
  629. package/lib/resources/promotions.js.map +1 -0
  630. package/lib/resources/recurring_order_copies.cjs +52 -0
  631. package/lib/resources/recurring_order_copies.cjs.map +1 -0
  632. package/lib/resources/recurring_order_copies.d.cts +4 -0
  633. package/lib/resources/recurring_order_copies.d.ts +4 -0
  634. package/lib/resources/recurring_order_copies.js +48 -0
  635. package/lib/resources/recurring_order_copies.js.map +1 -0
  636. package/lib/resources/refunds.cjs +57 -0
  637. package/lib/resources/refunds.cjs.map +1 -0
  638. package/lib/resources/refunds.d.cts +4 -0
  639. package/lib/resources/refunds.d.ts +4 -0
  640. package/lib/resources/refunds.js +53 -0
  641. package/lib/resources/refunds.js.map +1 -0
  642. package/lib/resources/reserved_stocks.cjs +43 -0
  643. package/lib/resources/reserved_stocks.cjs.map +1 -0
  644. package/lib/resources/reserved_stocks.d.cts +4 -0
  645. package/lib/resources/reserved_stocks.d.ts +4 -0
  646. package/lib/resources/reserved_stocks.js +39 -0
  647. package/lib/resources/reserved_stocks.js.map +1 -0
  648. package/lib/resources/resource_errors.cjs +27 -0
  649. package/lib/resources/resource_errors.cjs.map +1 -0
  650. package/lib/resources/resource_errors.d.cts +4 -0
  651. package/lib/resources/resource_errors.d.ts +4 -0
  652. package/lib/resources/resource_errors.js +23 -0
  653. package/lib/resources/resource_errors.js.map +1 -0
  654. package/lib/resources/return_line_items.cjs +47 -0
  655. package/lib/resources/return_line_items.cjs.map +1 -0
  656. package/lib/resources/return_line_items.d.cts +4 -0
  657. package/lib/resources/return_line_items.d.ts +4 -0
  658. package/lib/resources/return_line_items.js +43 -0
  659. package/lib/resources/return_line_items.js.map +1 -0
  660. package/lib/resources/returns.cjs +127 -0
  661. package/lib/resources/returns.cjs.map +1 -0
  662. package/lib/resources/returns.d.cts +4 -0
  663. package/lib/resources/returns.d.ts +4 -0
  664. package/lib/resources/returns.js +123 -0
  665. package/lib/resources/returns.js.map +1 -0
  666. package/lib/resources/satispay_gateways.cjs +48 -0
  667. package/lib/resources/satispay_gateways.cjs.map +1 -0
  668. package/lib/resources/satispay_gateways.d.cts +4 -0
  669. package/lib/resources/satispay_gateways.d.ts +4 -0
  670. package/lib/resources/satispay_gateways.js +44 -0
  671. package/lib/resources/satispay_gateways.js.map +1 -0
  672. package/lib/resources/satispay_payments.cjs +51 -0
  673. package/lib/resources/satispay_payments.cjs.map +1 -0
  674. package/lib/resources/satispay_payments.d.cts +4 -0
  675. package/lib/resources/satispay_payments.d.ts +4 -0
  676. package/lib/resources/satispay_payments.js +47 -0
  677. package/lib/resources/satispay_payments.js.map +1 -0
  678. package/lib/resources/shipments.cjs +157 -0
  679. package/lib/resources/shipments.cjs.map +1 -0
  680. package/lib/resources/shipments.d.cts +4 -0
  681. package/lib/resources/shipments.d.ts +4 -0
  682. package/lib/resources/shipments.js +153 -0
  683. package/lib/resources/shipments.js.map +1 -0
  684. package/lib/resources/shipping_categories.cjs +48 -0
  685. package/lib/resources/shipping_categories.cjs.map +1 -0
  686. package/lib/resources/shipping_categories.d.cts +4 -0
  687. package/lib/resources/shipping_categories.d.ts +4 -0
  688. package/lib/resources/shipping_categories.js +44 -0
  689. package/lib/resources/shipping_categories.js.map +1 -0
  690. package/lib/resources/shipping_method_tiers.cjs +39 -0
  691. package/lib/resources/shipping_method_tiers.cjs.map +1 -0
  692. package/lib/resources/shipping_method_tiers.d.cts +4 -0
  693. package/lib/resources/shipping_method_tiers.d.ts +4 -0
  694. package/lib/resources/shipping_method_tiers.js +35 -0
  695. package/lib/resources/shipping_method_tiers.js.map +1 -0
  696. package/lib/resources/shipping_methods.cjs +85 -0
  697. package/lib/resources/shipping_methods.cjs.map +1 -0
  698. package/lib/resources/shipping_methods.d.cts +4 -0
  699. package/lib/resources/shipping_methods.d.ts +4 -0
  700. package/lib/resources/shipping_methods.js +81 -0
  701. package/lib/resources/shipping_methods.js.map +1 -0
  702. package/lib/resources/shipping_weight_tiers.cjs +48 -0
  703. package/lib/resources/shipping_weight_tiers.cjs.map +1 -0
  704. package/lib/resources/shipping_weight_tiers.d.cts +4 -0
  705. package/lib/resources/shipping_weight_tiers.d.ts +4 -0
  706. package/lib/resources/shipping_weight_tiers.js +44 -0
  707. package/lib/resources/shipping_weight_tiers.js.map +1 -0
  708. package/lib/resources/shipping_zones.cjs +44 -0
  709. package/lib/resources/shipping_zones.cjs.map +1 -0
  710. package/lib/resources/shipping_zones.d.cts +4 -0
  711. package/lib/resources/shipping_zones.d.ts +4 -0
  712. package/lib/resources/shipping_zones.js +40 -0
  713. package/lib/resources/shipping_zones.js.map +1 -0
  714. package/lib/resources/sku_list_items.cjs +48 -0
  715. package/lib/resources/sku_list_items.cjs.map +1 -0
  716. package/lib/resources/sku_list_items.d.cts +4 -0
  717. package/lib/resources/sku_list_items.d.ts +4 -0
  718. package/lib/resources/sku_list_items.js +44 -0
  719. package/lib/resources/sku_list_items.js.map +1 -0
  720. package/lib/resources/sku_list_promotion_rules.cjs +48 -0
  721. package/lib/resources/sku_list_promotion_rules.cjs.map +1 -0
  722. package/lib/resources/sku_list_promotion_rules.d.cts +4 -0
  723. package/lib/resources/sku_list_promotion_rules.d.ts +4 -0
  724. package/lib/resources/sku_list_promotion_rules.js +44 -0
  725. package/lib/resources/sku_list_promotion_rules.js.map +1 -0
  726. package/lib/resources/sku_lists.cjs +64 -0
  727. package/lib/resources/sku_lists.cjs.map +1 -0
  728. package/lib/resources/sku_lists.d.cts +4 -0
  729. package/lib/resources/sku_lists.d.ts +4 -0
  730. package/lib/resources/sku_lists.js +60 -0
  731. package/lib/resources/sku_lists.js.map +1 -0
  732. package/lib/resources/sku_options.cjs +62 -0
  733. package/lib/resources/sku_options.cjs.map +1 -0
  734. package/lib/resources/sku_options.d.cts +4 -0
  735. package/lib/resources/sku_options.d.ts +4 -0
  736. package/lib/resources/sku_options.js +58 -0
  737. package/lib/resources/sku_options.js.map +1 -0
  738. package/lib/resources/skus.cjs +106 -0
  739. package/lib/resources/skus.cjs.map +1 -0
  740. package/lib/resources/skus.d.cts +4 -0
  741. package/lib/resources/skus.d.ts +4 -0
  742. package/lib/resources/skus.js +102 -0
  743. package/lib/resources/skus.js.map +1 -0
  744. package/lib/resources/stock_items.cjs +63 -0
  745. package/lib/resources/stock_items.cjs.map +1 -0
  746. package/lib/resources/stock_items.d.cts +4 -0
  747. package/lib/resources/stock_items.d.ts +4 -0
  748. package/lib/resources/stock_items.js +59 -0
  749. package/lib/resources/stock_items.js.map +1 -0
  750. package/lib/resources/stock_line_items.cjs +69 -0
  751. package/lib/resources/stock_line_items.cjs.map +1 -0
  752. package/lib/resources/stock_line_items.d.cts +4 -0
  753. package/lib/resources/stock_line_items.d.ts +4 -0
  754. package/lib/resources/stock_line_items.js +65 -0
  755. package/lib/resources/stock_line_items.js.map +1 -0
  756. package/lib/resources/stock_locations.cjs +68 -0
  757. package/lib/resources/stock_locations.cjs.map +1 -0
  758. package/lib/resources/stock_locations.d.cts +4 -0
  759. package/lib/resources/stock_locations.d.ts +4 -0
  760. package/lib/resources/stock_locations.js +64 -0
  761. package/lib/resources/stock_locations.js.map +1 -0
  762. package/lib/resources/stock_reservations.cjs +67 -0
  763. package/lib/resources/stock_reservations.cjs.map +1 -0
  764. package/lib/resources/stock_reservations.d.cts +4 -0
  765. package/lib/resources/stock_reservations.d.ts +4 -0
  766. package/lib/resources/stock_reservations.js +63 -0
  767. package/lib/resources/stock_reservations.js.map +1 -0
  768. package/lib/resources/stock_transfers.cjs +90 -0
  769. package/lib/resources/stock_transfers.cjs.map +1 -0
  770. package/lib/resources/stock_transfers.d.cts +4 -0
  771. package/lib/resources/stock_transfers.d.ts +4 -0
  772. package/lib/resources/stock_transfers.js +86 -0
  773. package/lib/resources/stock_transfers.js.map +1 -0
  774. package/lib/resources/stores.cjs +64 -0
  775. package/lib/resources/stores.cjs.map +1 -0
  776. package/lib/resources/stores.d.cts +4 -0
  777. package/lib/resources/stores.d.ts +4 -0
  778. package/lib/resources/stores.js +60 -0
  779. package/lib/resources/stores.js.map +1 -0
  780. package/lib/resources/stripe_gateways.cjs +48 -0
  781. package/lib/resources/stripe_gateways.cjs.map +1 -0
  782. package/lib/resources/stripe_gateways.d.cts +4 -0
  783. package/lib/resources/stripe_gateways.d.ts +4 -0
  784. package/lib/resources/stripe_gateways.js +44 -0
  785. package/lib/resources/stripe_gateways.js.map +1 -0
  786. package/lib/resources/stripe_payments.cjs +54 -0
  787. package/lib/resources/stripe_payments.cjs.map +1 -0
  788. package/lib/resources/stripe_payments.d.cts +4 -0
  789. package/lib/resources/stripe_payments.d.ts +4 -0
  790. package/lib/resources/stripe_payments.js +50 -0
  791. package/lib/resources/stripe_payments.js.map +1 -0
  792. package/lib/resources/stripe_tax_accounts.cjs +56 -0
  793. package/lib/resources/stripe_tax_accounts.cjs.map +1 -0
  794. package/lib/resources/stripe_tax_accounts.d.cts +4 -0
  795. package/lib/resources/stripe_tax_accounts.d.ts +4 -0
  796. package/lib/resources/stripe_tax_accounts.js +52 -0
  797. package/lib/resources/stripe_tax_accounts.js.map +1 -0
  798. package/lib/resources/subscription_models.cjs +48 -0
  799. package/lib/resources/subscription_models.cjs.map +1 -0
  800. package/lib/resources/subscription_models.d.cts +4 -0
  801. package/lib/resources/subscription_models.d.ts +4 -0
  802. package/lib/resources/subscription_models.js +44 -0
  803. package/lib/resources/subscription_models.js.map +1 -0
  804. package/lib/resources/tags.cjs +36 -0
  805. package/lib/resources/tags.cjs.map +1 -0
  806. package/lib/resources/tags.d.cts +4 -0
  807. package/lib/resources/tags.d.ts +4 -0
  808. package/lib/resources/tags.js +32 -0
  809. package/lib/resources/tags.js.map +1 -0
  810. package/lib/resources/talon_one_accounts.cjs +52 -0
  811. package/lib/resources/talon_one_accounts.cjs.map +1 -0
  812. package/lib/resources/talon_one_accounts.d.cts +4 -0
  813. package/lib/resources/talon_one_accounts.d.ts +4 -0
  814. package/lib/resources/talon_one_accounts.js +48 -0
  815. package/lib/resources/talon_one_accounts.js.map +1 -0
  816. package/lib/resources/tax_calculators.cjs +43 -0
  817. package/lib/resources/tax_calculators.cjs.map +1 -0
  818. package/lib/resources/tax_calculators.d.cts +4 -0
  819. package/lib/resources/tax_calculators.d.ts +4 -0
  820. package/lib/resources/tax_calculators.js +39 -0
  821. package/lib/resources/tax_calculators.js.map +1 -0
  822. package/lib/resources/tax_categories.cjs +48 -0
  823. package/lib/resources/tax_categories.cjs.map +1 -0
  824. package/lib/resources/tax_categories.d.cts +4 -0
  825. package/lib/resources/tax_categories.d.ts +4 -0
  826. package/lib/resources/tax_categories.js +44 -0
  827. package/lib/resources/tax_categories.js.map +1 -0
  828. package/lib/resources/tax_rules.cjs +44 -0
  829. package/lib/resources/tax_rules.cjs.map +1 -0
  830. package/lib/resources/tax_rules.d.cts +4 -0
  831. package/lib/resources/tax_rules.d.ts +4 -0
  832. package/lib/resources/tax_rules.js +40 -0
  833. package/lib/resources/tax_rules.js.map +1 -0
  834. package/lib/resources/taxjar_accounts.cjs +56 -0
  835. package/lib/resources/taxjar_accounts.cjs.map +1 -0
  836. package/lib/resources/taxjar_accounts.d.cts +4 -0
  837. package/lib/resources/taxjar_accounts.d.ts +4 -0
  838. package/lib/resources/taxjar_accounts.js +52 -0
  839. package/lib/resources/taxjar_accounts.js.map +1 -0
  840. package/lib/resources/transactions.cjs +43 -0
  841. package/lib/resources/transactions.cjs.map +1 -0
  842. package/lib/resources/transactions.d.cts +4 -0
  843. package/lib/resources/transactions.d.ts +4 -0
  844. package/lib/resources/transactions.js +39 -0
  845. package/lib/resources/transactions.js.map +1 -0
  846. package/lib/resources/versions.cjs +27 -0
  847. package/lib/resources/versions.cjs.map +1 -0
  848. package/lib/resources/versions.d.cts +4 -0
  849. package/lib/resources/versions.d.ts +4 -0
  850. package/lib/resources/versions.js +23 -0
  851. package/lib/resources/versions.js.map +1 -0
  852. package/lib/resources/vertex_accounts.cjs +55 -0
  853. package/lib/resources/vertex_accounts.cjs.map +1 -0
  854. package/lib/resources/vertex_accounts.d.cts +4 -0
  855. package/lib/resources/vertex_accounts.d.ts +4 -0
  856. package/lib/resources/vertex_accounts.js +51 -0
  857. package/lib/resources/vertex_accounts.js.map +1 -0
  858. package/lib/resources/voids.cjs +53 -0
  859. package/lib/resources/voids.cjs.map +1 -0
  860. package/lib/resources/voids.d.cts +4 -0
  861. package/lib/resources/voids.d.ts +4 -0
  862. package/lib/resources/voids.js +49 -0
  863. package/lib/resources/voids.js.map +1 -0
  864. package/lib/resources/webhooks.cjs +53 -0
  865. package/lib/resources/webhooks.cjs.map +1 -0
  866. package/lib/resources/webhooks.d.cts +4 -0
  867. package/lib/resources/webhooks.d.ts +4 -0
  868. package/lib/resources/webhooks.js +49 -0
  869. package/lib/resources/webhooks.js.map +1 -0
  870. package/lib/resources/wire_transfers.cjs +44 -0
  871. package/lib/resources/wire_transfers.cjs.map +1 -0
  872. package/lib/resources/wire_transfers.d.cts +4 -0
  873. package/lib/resources/wire_transfers.d.ts +4 -0
  874. package/lib/resources/wire_transfers.js +40 -0
  875. package/lib/resources/wire_transfers.js.map +1 -0
  876. package/lib/static.cjs +49 -0
  877. package/lib/static.cjs.map +1 -0
  878. package/lib/static.d.cts +22 -0
  879. package/lib/static.d.ts +22 -0
  880. package/lib/static.js +47 -0
  881. package/lib/static.js.map +1 -0
  882. package/lib/types.cjs +4 -0
  883. package/lib/types.cjs.map +1 -0
  884. package/lib/types.d.cts +7 -0
  885. package/lib/types.d.ts +7 -0
  886. package/lib/types.js +3 -0
  887. package/lib/types.js.map +1 -0
  888. package/lib/util.cjs +39 -0
  889. package/lib/util.cjs.map +1 -0
  890. package/lib/util.d.cts +13 -0
  891. package/lib/util.d.ts +13 -0
  892. package/lib/util.js +34 -0
  893. package/lib/util.js.map +1 -0
  894. package/package.json +8 -10
@@ -0,0 +1,68 @@
1
+ 'use strict';
2
+
3
+ var resource = require('../resource');
4
+
5
+ class StockLocations extends resource.ApiResource {
6
+ static TYPE = "stock_locations";
7
+ async create(resource, params, options) {
8
+ return this.resources.create({ ...resource, type: StockLocations.TYPE }, params, options);
9
+ }
10
+ async update(resource, params, options) {
11
+ return this.resources.update({ ...resource, type: StockLocations.TYPE }, params, options);
12
+ }
13
+ async delete(id, options) {
14
+ await this.resources.delete(typeof id === "string" ? { id, type: StockLocations.TYPE } : id, options);
15
+ }
16
+ async address(stockLocationId, params, options) {
17
+ const _stockLocationId = stockLocationId.id || stockLocationId;
18
+ return this.resources.fetch({ type: "addresses" }, `stock_locations/${_stockLocationId}/address`, params, options);
19
+ }
20
+ async inventory_stock_locations(stockLocationId, params, options) {
21
+ const _stockLocationId = stockLocationId.id || stockLocationId;
22
+ return this.resources.fetch({ type: "inventory_stock_locations" }, `stock_locations/${_stockLocationId}/inventory_stock_locations`, params, options);
23
+ }
24
+ async inventory_return_locations(stockLocationId, params, options) {
25
+ const _stockLocationId = stockLocationId.id || stockLocationId;
26
+ return this.resources.fetch({ type: "inventory_return_locations" }, `stock_locations/${_stockLocationId}/inventory_return_locations`, params, options);
27
+ }
28
+ async stock_items(stockLocationId, params, options) {
29
+ const _stockLocationId = stockLocationId.id || stockLocationId;
30
+ return this.resources.fetch({ type: "stock_items" }, `stock_locations/${_stockLocationId}/stock_items`, params, options);
31
+ }
32
+ async stock_transfers(stockLocationId, params, options) {
33
+ const _stockLocationId = stockLocationId.id || stockLocationId;
34
+ return this.resources.fetch({ type: "stock_transfers" }, `stock_locations/${_stockLocationId}/stock_transfers`, params, options);
35
+ }
36
+ async stores(stockLocationId, params, options) {
37
+ const _stockLocationId = stockLocationId.id || stockLocationId;
38
+ return this.resources.fetch({ type: "stores" }, `stock_locations/${_stockLocationId}/stores`, params, options);
39
+ }
40
+ async attachments(stockLocationId, params, options) {
41
+ const _stockLocationId = stockLocationId.id || stockLocationId;
42
+ return this.resources.fetch({ type: "attachments" }, `stock_locations/${_stockLocationId}/attachments`, params, options);
43
+ }
44
+ async versions(stockLocationId, params, options) {
45
+ const _stockLocationId = stockLocationId.id || stockLocationId;
46
+ return this.resources.fetch({ type: "versions" }, `stock_locations/${_stockLocationId}/versions`, params, options);
47
+ }
48
+ isStockLocation(resource) {
49
+ return resource.type && resource.type === StockLocations.TYPE;
50
+ }
51
+ relationship(id) {
52
+ return super.relationshipOneToOne(id);
53
+ }
54
+ relationshipToMany(...ids) {
55
+ return super.relationshipOneToMany(...ids);
56
+ }
57
+ type() {
58
+ return StockLocations.TYPE;
59
+ }
60
+ }
61
+ const instance = new StockLocations();
62
+ var stock_locations_default = instance;
63
+
64
+ module.exports = stock_locations_default;
65
+ //# sourceMappingURL=stock_locations.cjs.map
66
+
67
+ module.exports = exports.default;
68
+ //# sourceMappingURL=stock_locations.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/stock_locations.ts"],"names":["ApiResource"],"mappings":";;;;AAsHA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA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C,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"stock_locations.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Address, AddressType } from './addresses'\nimport type { InventoryStockLocation } from './inventory_stock_locations'\nimport type { InventoryReturnLocation } from './inventory_return_locations'\nimport type { StockItem } from './stock_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { Store } from './stores'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockLocationType = 'stock_locations'\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type StockLocationSort = Pick<StockLocation, 'id' | 'name' | 'code' | 'label_format' | 'suppress_etd'> & ResourceSort\n// export type StockLocationFilter = Pick<StockLocation, 'id' | 'name' | 'code' | 'label_format' | 'suppress_etd'> & ResourceFilter\n\n\ninterface StockLocation extends Resource {\n\t\n\treadonly type: StockLocationType\n\n\t/** \n\t * Unique identifier for the stock location (numeric).\n\t * @example ```1234```\n\t */\n\tnumber?: number | null\n\t/** \n\t * The stock location's internal name.\n\t * @example ```\"Primary warehouse\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the stock location (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The shipping label format for this stock location. Can be one of 'PDF', 'ZPL', 'EPL2', or 'PNG'.\n\t * @example ```\"PDF\"```\n\t */\n\tlabel_format?: string | null\n\t/** \n\t * Flag it if you want to skip the electronic invoice creation when generating the customs info for this stock location shipments.\n\t */\n\tsuppress_etd?: boolean | null\n\n\taddress?: Address | null\n\tinventory_stock_locations?: InventoryStockLocation[] | null\n\tinventory_return_locations?: InventoryReturnLocation[] | null\n\tstock_items?: StockItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tstores?: Store[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockLocationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The stock location's internal name.\n\t * @example ```\"Primary warehouse\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the stock location (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The shipping label format for this stock location. Can be one of 'PDF', 'ZPL', 'EPL2', or 'PNG'.\n\t * @example ```\"PDF\"```\n\t */\n\tlabel_format?: string | null\n\t/** \n\t * Flag it if you want to skip the electronic invoice creation when generating the customs info for this stock location shipments.\n\t */\n\tsuppress_etd?: boolean | null\n\n\taddress: AddressRel\n\n}\n\n\ninterface StockLocationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The stock location's internal name.\n\t * @example ```\"Primary warehouse\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the stock location (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The shipping label format for this stock location. Can be one of 'PDF', 'ZPL', 'EPL2', or 'PNG'.\n\t * @example ```\"PDF\"```\n\t */\n\tlabel_format?: string | null\n\t/** \n\t * Flag it if you want to skip the electronic invoice creation when generating the customs info for this stock location shipments.\n\t */\n\tsuppress_etd?: boolean | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass StockLocations extends ApiResource<StockLocation> {\n\n\tstatic readonly TYPE: StockLocationType = 'stock_locations' as const\n\n\tasync create(resource: StockLocationCreate, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\treturn this.resources.create<StockLocationCreate, StockLocation>({ ...resource, type: StockLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockLocationUpdate, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\treturn this.resources.update<StockLocationUpdate, StockLocation>({ ...resource, type: StockLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockLocations.TYPE } : id, options)\n\t}\n\n\tasync address(stockLocationId: string | StockLocation, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `stock_locations/${_stockLocationId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync inventory_stock_locations(stockLocationId: string | StockLocation, params?: QueryParamsList<InventoryStockLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `stock_locations/${_stockLocationId}/inventory_stock_locations`, params, options) as unknown as ListResponse<InventoryStockLocation>\n\t}\n\n\tasync inventory_return_locations(stockLocationId: string | StockLocation, params?: QueryParamsList<InventoryReturnLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<InventoryReturnLocation>({ type: 'inventory_return_locations' }, `stock_locations/${_stockLocationId}/inventory_return_locations`, params, options) as unknown as ListResponse<InventoryReturnLocation>\n\t}\n\n\tasync stock_items(stockLocationId: string | StockLocation, params?: QueryParamsList<StockItem>, options?: ResourcesConfig): Promise<ListResponse<StockItem>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_locations/${_stockLocationId}/stock_items`, params, options) as unknown as ListResponse<StockItem>\n\t}\n\n\tasync stock_transfers(stockLocationId: string | StockLocation, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `stock_locations/${_stockLocationId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync stores(stockLocationId: string | StockLocation, params?: QueryParamsList<Store>, options?: ResourcesConfig): Promise<ListResponse<Store>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Store>({ type: 'stores' }, `stock_locations/${_stockLocationId}/stores`, params, options) as unknown as ListResponse<Store>\n\t}\n\n\tasync attachments(stockLocationId: string | StockLocation, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_locations/${_stockLocationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockLocationId: string | StockLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_locations/${_stockLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisStockLocation(resource: any): resource is StockLocation {\n\t\treturn resource.type && (resource.type === StockLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockLocationRel {\n\t\treturn super.relationshipOneToOne<StockLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockLocationRel[] {\n\t\treturn super.relationshipOneToMany<StockLocationRel>(...ids)\n\t}\n\n\n\ttype(): StockLocationType {\n\t\treturn StockLocations.TYPE\n\t}\n\n}\n\n\nconst instance = new StockLocations()\nexport default instance\n\nexport type { StockLocation, StockLocationCreate, StockLocationUpdate, StockLocationType }\n"]}
@@ -0,0 +1,4 @@
1
+ export { id as StockLocation, ie as StockLocationCreate, ih as StockLocationSort, kJ as StockLocationType, ig as StockLocationUpdate, bu as default } from '../api-DmIZO_Np.cjs';
2
+ import '../client.cjs';
3
+ import '../interceptor-5MISI1yn.cjs';
4
+ import '../types.cjs';
@@ -0,0 +1,4 @@
1
+ export { id as StockLocation, ie as StockLocationCreate, ih as StockLocationSort, kJ as StockLocationType, ig as StockLocationUpdate, bu as default } from '../api-DDgIE2i8.js';
2
+ import '../client.js';
3
+ import '../interceptor-5MISI1yn.js';
4
+ import '../types.js';
@@ -0,0 +1,64 @@
1
+ import { ApiResource } from '../resource';
2
+
3
+ class StockLocations extends ApiResource {
4
+ static TYPE = "stock_locations";
5
+ async create(resource, params, options) {
6
+ return this.resources.create({ ...resource, type: StockLocations.TYPE }, params, options);
7
+ }
8
+ async update(resource, params, options) {
9
+ return this.resources.update({ ...resource, type: StockLocations.TYPE }, params, options);
10
+ }
11
+ async delete(id, options) {
12
+ await this.resources.delete(typeof id === "string" ? { id, type: StockLocations.TYPE } : id, options);
13
+ }
14
+ async address(stockLocationId, params, options) {
15
+ const _stockLocationId = stockLocationId.id || stockLocationId;
16
+ return this.resources.fetch({ type: "addresses" }, `stock_locations/${_stockLocationId}/address`, params, options);
17
+ }
18
+ async inventory_stock_locations(stockLocationId, params, options) {
19
+ const _stockLocationId = stockLocationId.id || stockLocationId;
20
+ return this.resources.fetch({ type: "inventory_stock_locations" }, `stock_locations/${_stockLocationId}/inventory_stock_locations`, params, options);
21
+ }
22
+ async inventory_return_locations(stockLocationId, params, options) {
23
+ const _stockLocationId = stockLocationId.id || stockLocationId;
24
+ return this.resources.fetch({ type: "inventory_return_locations" }, `stock_locations/${_stockLocationId}/inventory_return_locations`, params, options);
25
+ }
26
+ async stock_items(stockLocationId, params, options) {
27
+ const _stockLocationId = stockLocationId.id || stockLocationId;
28
+ return this.resources.fetch({ type: "stock_items" }, `stock_locations/${_stockLocationId}/stock_items`, params, options);
29
+ }
30
+ async stock_transfers(stockLocationId, params, options) {
31
+ const _stockLocationId = stockLocationId.id || stockLocationId;
32
+ return this.resources.fetch({ type: "stock_transfers" }, `stock_locations/${_stockLocationId}/stock_transfers`, params, options);
33
+ }
34
+ async stores(stockLocationId, params, options) {
35
+ const _stockLocationId = stockLocationId.id || stockLocationId;
36
+ return this.resources.fetch({ type: "stores" }, `stock_locations/${_stockLocationId}/stores`, params, options);
37
+ }
38
+ async attachments(stockLocationId, params, options) {
39
+ const _stockLocationId = stockLocationId.id || stockLocationId;
40
+ return this.resources.fetch({ type: "attachments" }, `stock_locations/${_stockLocationId}/attachments`, params, options);
41
+ }
42
+ async versions(stockLocationId, params, options) {
43
+ const _stockLocationId = stockLocationId.id || stockLocationId;
44
+ return this.resources.fetch({ type: "versions" }, `stock_locations/${_stockLocationId}/versions`, params, options);
45
+ }
46
+ isStockLocation(resource) {
47
+ return resource.type && resource.type === StockLocations.TYPE;
48
+ }
49
+ relationship(id) {
50
+ return super.relationshipOneToOne(id);
51
+ }
52
+ relationshipToMany(...ids) {
53
+ return super.relationshipOneToMany(...ids);
54
+ }
55
+ type() {
56
+ return StockLocations.TYPE;
57
+ }
58
+ }
59
+ const instance = new StockLocations();
60
+ var stock_locations_default = instance;
61
+
62
+ export { stock_locations_default as default };
63
+ //# sourceMappingURL=stock_locations.js.map
64
+ //# sourceMappingURL=stock_locations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/stock_locations.ts"],"names":[],"mappings":";;AAsHA,MAAM,uBAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,cAAA,CAAe,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACtG,EAEA,MAAM,OAAA,CAAQ,eAAyC,EAAA,MAAA,EAAuC,OAA6C,EAAA;AAC1I,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SA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9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"stock_locations.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Address, AddressType } from './addresses'\nimport type { InventoryStockLocation } from './inventory_stock_locations'\nimport type { InventoryReturnLocation } from './inventory_return_locations'\nimport type { StockItem } from './stock_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { Store } from './stores'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockLocationType = 'stock_locations'\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type StockLocationSort = Pick<StockLocation, 'id' | 'name' | 'code' | 'label_format' | 'suppress_etd'> & ResourceSort\n// export type StockLocationFilter = Pick<StockLocation, 'id' | 'name' | 'code' | 'label_format' | 'suppress_etd'> & ResourceFilter\n\n\ninterface StockLocation extends Resource {\n\t\n\treadonly type: StockLocationType\n\n\t/** \n\t * Unique identifier for the stock location (numeric).\n\t * @example ```1234```\n\t */\n\tnumber?: number | null\n\t/** \n\t * The stock location's internal name.\n\t * @example ```\"Primary warehouse\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the stock location (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The shipping label format for this stock location. Can be one of 'PDF', 'ZPL', 'EPL2', or 'PNG'.\n\t * @example ```\"PDF\"```\n\t */\n\tlabel_format?: string | null\n\t/** \n\t * Flag it if you want to skip the electronic invoice creation when generating the customs info for this stock location shipments.\n\t */\n\tsuppress_etd?: boolean | null\n\n\taddress?: Address | null\n\tinventory_stock_locations?: InventoryStockLocation[] | null\n\tinventory_return_locations?: InventoryReturnLocation[] | null\n\tstock_items?: StockItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tstores?: Store[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockLocationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The stock location's internal name.\n\t * @example ```\"Primary warehouse\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the stock location (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The shipping label format for this stock location. Can be one of 'PDF', 'ZPL', 'EPL2', or 'PNG'.\n\t * @example ```\"PDF\"```\n\t */\n\tlabel_format?: string | null\n\t/** \n\t * Flag it if you want to skip the electronic invoice creation when generating the customs info for this stock location shipments.\n\t */\n\tsuppress_etd?: boolean | null\n\n\taddress: AddressRel\n\n}\n\n\ninterface StockLocationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The stock location's internal name.\n\t * @example ```\"Primary warehouse\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the stock location (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The shipping label format for this stock location. Can be one of 'PDF', 'ZPL', 'EPL2', or 'PNG'.\n\t * @example ```\"PDF\"```\n\t */\n\tlabel_format?: string | null\n\t/** \n\t * Flag it if you want to skip the electronic invoice creation when generating the customs info for this stock location shipments.\n\t */\n\tsuppress_etd?: boolean | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass StockLocations extends ApiResource<StockLocation> {\n\n\tstatic readonly TYPE: StockLocationType = 'stock_locations' as const\n\n\tasync create(resource: StockLocationCreate, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\treturn this.resources.create<StockLocationCreate, StockLocation>({ ...resource, type: StockLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockLocationUpdate, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\treturn this.resources.update<StockLocationUpdate, StockLocation>({ ...resource, type: StockLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockLocations.TYPE } : id, options)\n\t}\n\n\tasync address(stockLocationId: string | StockLocation, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `stock_locations/${_stockLocationId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync inventory_stock_locations(stockLocationId: string | StockLocation, params?: QueryParamsList<InventoryStockLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `stock_locations/${_stockLocationId}/inventory_stock_locations`, params, options) as unknown as ListResponse<InventoryStockLocation>\n\t}\n\n\tasync inventory_return_locations(stockLocationId: string | StockLocation, params?: QueryParamsList<InventoryReturnLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<InventoryReturnLocation>({ type: 'inventory_return_locations' }, `stock_locations/${_stockLocationId}/inventory_return_locations`, params, options) as unknown as ListResponse<InventoryReturnLocation>\n\t}\n\n\tasync stock_items(stockLocationId: string | StockLocation, params?: QueryParamsList<StockItem>, options?: ResourcesConfig): Promise<ListResponse<StockItem>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_locations/${_stockLocationId}/stock_items`, params, options) as unknown as ListResponse<StockItem>\n\t}\n\n\tasync stock_transfers(stockLocationId: string | StockLocation, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `stock_locations/${_stockLocationId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync stores(stockLocationId: string | StockLocation, params?: QueryParamsList<Store>, options?: ResourcesConfig): Promise<ListResponse<Store>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Store>({ type: 'stores' }, `stock_locations/${_stockLocationId}/stores`, params, options) as unknown as ListResponse<Store>\n\t}\n\n\tasync attachments(stockLocationId: string | StockLocation, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_locations/${_stockLocationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockLocationId: string | StockLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_locations/${_stockLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisStockLocation(resource: any): resource is StockLocation {\n\t\treturn resource.type && (resource.type === StockLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockLocationRel {\n\t\treturn super.relationshipOneToOne<StockLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockLocationRel[] {\n\t\treturn super.relationshipOneToMany<StockLocationRel>(...ids)\n\t}\n\n\n\ttype(): StockLocationType {\n\t\treturn StockLocations.TYPE\n\t}\n\n}\n\n\nconst instance = new StockLocations()\nexport default instance\n\nexport type { StockLocation, StockLocationCreate, StockLocationUpdate, StockLocationType }\n"]}
@@ -0,0 +1,67 @@
1
+ 'use strict';
2
+
3
+ var resource = require('../resource');
4
+
5
+ class StockReservations extends resource.ApiResource {
6
+ static TYPE = "stock_reservations";
7
+ async create(resource, params, options) {
8
+ return this.resources.create({ ...resource, type: StockReservations.TYPE }, params, options);
9
+ }
10
+ async update(resource, params, options) {
11
+ return this.resources.update({ ...resource, type: StockReservations.TYPE }, params, options);
12
+ }
13
+ async delete(id, options) {
14
+ await this.resources.delete(typeof id === "string" ? { id, type: StockReservations.TYPE } : id, options);
15
+ }
16
+ async line_item(stockReservationId, params, options) {
17
+ const _stockReservationId = stockReservationId.id || stockReservationId;
18
+ return this.resources.fetch({ type: "line_items" }, `stock_reservations/${_stockReservationId}/line_item`, params, options);
19
+ }
20
+ async order(stockReservationId, params, options) {
21
+ const _stockReservationId = stockReservationId.id || stockReservationId;
22
+ return this.resources.fetch({ type: "orders" }, `stock_reservations/${_stockReservationId}/order`, params, options);
23
+ }
24
+ async stock_line_item(stockReservationId, params, options) {
25
+ const _stockReservationId = stockReservationId.id || stockReservationId;
26
+ return this.resources.fetch({ type: "stock_line_items" }, `stock_reservations/${_stockReservationId}/stock_line_item`, params, options);
27
+ }
28
+ async stock_transfer(stockReservationId, params, options) {
29
+ const _stockReservationId = stockReservationId.id || stockReservationId;
30
+ return this.resources.fetch({ type: "stock_transfers" }, `stock_reservations/${_stockReservationId}/stock_transfer`, params, options);
31
+ }
32
+ async stock_item(stockReservationId, params, options) {
33
+ const _stockReservationId = stockReservationId.id || stockReservationId;
34
+ return this.resources.fetch({ type: "stock_items" }, `stock_reservations/${_stockReservationId}/stock_item`, params, options);
35
+ }
36
+ async reserved_stock(stockReservationId, params, options) {
37
+ const _stockReservationId = stockReservationId.id || stockReservationId;
38
+ return this.resources.fetch({ type: "reserved_stocks" }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options);
39
+ }
40
+ async sku(stockReservationId, params, options) {
41
+ const _stockReservationId = stockReservationId.id || stockReservationId;
42
+ return this.resources.fetch({ type: "skus" }, `stock_reservations/${_stockReservationId}/sku`, params, options);
43
+ }
44
+ async _pending(id, params, options) {
45
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockReservations.TYPE, _pending: true }, params, options);
46
+ }
47
+ isStockReservation(resource) {
48
+ return resource.type && resource.type === StockReservations.TYPE;
49
+ }
50
+ relationship(id) {
51
+ return super.relationshipOneToOne(id);
52
+ }
53
+ relationshipToMany(...ids) {
54
+ return super.relationshipOneToMany(...ids);
55
+ }
56
+ type() {
57
+ return StockReservations.TYPE;
58
+ }
59
+ }
60
+ const instance = new StockReservations();
61
+ var stock_reservations_default = instance;
62
+
63
+ module.exports = stock_reservations_default;
64
+ //# sourceMappingURL=stock_reservations.cjs.map
65
+
66
+ module.exports = exports.default;
67
+ //# sourceMappingURL=stock_reservations.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/stock_reservations.ts"],"names":["ApiResource"],"mappings":";;;;AAkFA,MAAM,0BAA0BA,oBAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAA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AG,CAAsB,mBAAA,EAAA,mBAAmB,CAAQ,IAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpH,EAEA,MAAM,QAAA,CAAS,EAA+B,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACnJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,iBAAkB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAClL,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"stock_reservations.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { LineItem } from './line_items'\nimport type { Order } from './orders'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { Sku } from './skus'\n\n\ntype StockReservationType = 'stock_reservations'\ntype StockReservationRel = ResourceRel & { type: StockReservationType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\n\n\nexport type StockReservationSort = Pick<StockReservation, 'id' | 'status' | 'quantity' | 'expires_at'> & ResourceSort\n// export type StockReservationFilter = Pick<StockReservation, 'id' | 'status' | 'quantity' | 'expires_at'> & ResourceFilter\n\n\ninterface StockReservation extends Resource {\n\t\n\treadonly type: StockReservationType\n\n\t/** \n\t * The stock reservation status. One of 'draft' (default), or 'pending'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'pending'\n\t/** \n\t * The stock reservation quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\t/** \n\t * The expiration date/time of this stock reservation.\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\n\tline_item?: LineItem | null\n\torder?: Order | null\n\tstock_line_item?: StockLineItem | null\n\tstock_transfer?: StockTransfer | null\n\tstock_item?: StockItem | null\n\treserved_stock?: ReservedStock | null\n\tsku?: Sku | null\n\n}\n\n\ninterface StockReservationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The stock reservation quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\n\tstock_item: StockItemRel\n\n}\n\n\ninterface StockReservationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The stock reservation quantity.\n\t * @example ```4```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to mark this stock reservation as pending.\n\t * @example ```true```\n\t */\n\t_pending?: boolean | null\n\t\n}\n\n\nclass StockReservations extends ApiResource<StockReservation> {\n\n\tstatic readonly TYPE: StockReservationType = 'stock_reservations' as const\n\n\tasync create(resource: StockReservationCreate, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.create<StockReservationCreate, StockReservation>({ ...resource, type: StockReservations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockReservationUpdate, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.update<StockReservationUpdate, StockReservation>({ ...resource, type: StockReservations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockReservations.TYPE } : id, options)\n\t}\n\n\tasync line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `stock_reservations/${_stockReservationId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync order(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stock_reservations/${_stockReservationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync stock_line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `stock_reservations/${_stockReservationId}/stock_line_item`, params, options) as unknown as StockLineItem\n\t}\n\n\tasync stock_transfer(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `stock_reservations/${_stockReservationId}/stock_transfer`, params, options) as unknown as StockTransfer\n\t}\n\n\tasync stock_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_reservations/${_stockReservationId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync reserved_stock(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync sku(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_reservations/${_stockReservationId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync _pending(id: string | StockReservation, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.update<StockReservationUpdate, StockReservation>({ id: (typeof id === 'string')? id: id.id, type: StockReservations.TYPE, _pending: true }, params, options)\n\t}\n\n\n\tisStockReservation(resource: any): resource is StockReservation {\n\t\treturn resource.type && (resource.type === StockReservations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockReservationRel {\n\t\treturn super.relationshipOneToOne<StockReservationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockReservationRel[] {\n\t\treturn super.relationshipOneToMany<StockReservationRel>(...ids)\n\t}\n\n\n\ttype(): StockReservationType {\n\t\treturn StockReservations.TYPE\n\t}\n\n}\n\n\nconst instance = new StockReservations()\nexport default instance\n\nexport type { StockReservation, StockReservationCreate, StockReservationUpdate, StockReservationType }\n"]}
@@ -0,0 +1,4 @@
1
+ export { ii as StockReservation, ij as StockReservationCreate, il as StockReservationSort, j_ as StockReservationType, ik as StockReservationUpdate, bv as default } from '../api-DmIZO_Np.cjs';
2
+ import '../client.cjs';
3
+ import '../interceptor-5MISI1yn.cjs';
4
+ import '../types.cjs';
@@ -0,0 +1,4 @@
1
+ export { ii as StockReservation, ij as StockReservationCreate, il as StockReservationSort, j_ as StockReservationType, ik as StockReservationUpdate, bv as default } from '../api-DDgIE2i8.js';
2
+ import '../client.js';
3
+ import '../interceptor-5MISI1yn.js';
4
+ import '../types.js';
@@ -0,0 +1,63 @@
1
+ import { ApiResource } from '../resource';
2
+
3
+ class StockReservations extends ApiResource {
4
+ static TYPE = "stock_reservations";
5
+ async create(resource, params, options) {
6
+ return this.resources.create({ ...resource, type: StockReservations.TYPE }, params, options);
7
+ }
8
+ async update(resource, params, options) {
9
+ return this.resources.update({ ...resource, type: StockReservations.TYPE }, params, options);
10
+ }
11
+ async delete(id, options) {
12
+ await this.resources.delete(typeof id === "string" ? { id, type: StockReservations.TYPE } : id, options);
13
+ }
14
+ async line_item(stockReservationId, params, options) {
15
+ const _stockReservationId = stockReservationId.id || stockReservationId;
16
+ return this.resources.fetch({ type: "line_items" }, `stock_reservations/${_stockReservationId}/line_item`, params, options);
17
+ }
18
+ async order(stockReservationId, params, options) {
19
+ const _stockReservationId = stockReservationId.id || stockReservationId;
20
+ return this.resources.fetch({ type: "orders" }, `stock_reservations/${_stockReservationId}/order`, params, options);
21
+ }
22
+ async stock_line_item(stockReservationId, params, options) {
23
+ const _stockReservationId = stockReservationId.id || stockReservationId;
24
+ return this.resources.fetch({ type: "stock_line_items" }, `stock_reservations/${_stockReservationId}/stock_line_item`, params, options);
25
+ }
26
+ async stock_transfer(stockReservationId, params, options) {
27
+ const _stockReservationId = stockReservationId.id || stockReservationId;
28
+ return this.resources.fetch({ type: "stock_transfers" }, `stock_reservations/${_stockReservationId}/stock_transfer`, params, options);
29
+ }
30
+ async stock_item(stockReservationId, params, options) {
31
+ const _stockReservationId = stockReservationId.id || stockReservationId;
32
+ return this.resources.fetch({ type: "stock_items" }, `stock_reservations/${_stockReservationId}/stock_item`, params, options);
33
+ }
34
+ async reserved_stock(stockReservationId, params, options) {
35
+ const _stockReservationId = stockReservationId.id || stockReservationId;
36
+ return this.resources.fetch({ type: "reserved_stocks" }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options);
37
+ }
38
+ async sku(stockReservationId, params, options) {
39
+ const _stockReservationId = stockReservationId.id || stockReservationId;
40
+ return this.resources.fetch({ type: "skus" }, `stock_reservations/${_stockReservationId}/sku`, params, options);
41
+ }
42
+ async _pending(id, params, options) {
43
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockReservations.TYPE, _pending: true }, params, options);
44
+ }
45
+ isStockReservation(resource) {
46
+ return resource.type && resource.type === StockReservations.TYPE;
47
+ }
48
+ relationship(id) {
49
+ return super.relationshipOneToOne(id);
50
+ }
51
+ relationshipToMany(...ids) {
52
+ return super.relationshipOneToMany(...ids);
53
+ }
54
+ type() {
55
+ return StockReservations.TYPE;
56
+ }
57
+ }
58
+ const instance = new StockReservations();
59
+ var stock_reservations_default = instance;
60
+
61
+ export { stock_reservations_default as default };
62
+ //# sourceMappingURL=stock_reservations.js.map
63
+ //# sourceMappingURL=stock_reservations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/stock_reservations.ts"],"names":[],"mappings":";;AAkFA,MAAM,0BAA0B,WAA8B,CAAA;AAAA,EAE7D,OAAgB,IAA6B,GAAA,oBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAkB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,MAAA,CAAO,QAAkC,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACpJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAk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;AACpH,EAEA,MAAM,QAAA,CAAS,EAA+B,EAAA,MAAA,EAAgD,OAAsD,EAAA;AACnJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAiD,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,iBAAkB,CAAA,IAAA,EAAM,UAAU,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAClL,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAkB,CAAA,IAAA;AAAA;AAC9D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,iBAAkB,CAAA,IAAA;AAAA;AAG3B;AAGA,MAAM,QAAA,GAAW,IAAI,iBAAkB,EAAA;AACvC,IAAO,0BAAQ,GAAA","file":"stock_reservations.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { LineItem } from './line_items'\nimport type { Order } from './orders'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { Sku } from './skus'\n\n\ntype StockReservationType = 'stock_reservations'\ntype StockReservationRel = ResourceRel & { type: StockReservationType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\n\n\nexport type StockReservationSort = Pick<StockReservation, 'id' | 'status' | 'quantity' | 'expires_at'> & ResourceSort\n// export type StockReservationFilter = Pick<StockReservation, 'id' | 'status' | 'quantity' | 'expires_at'> & ResourceFilter\n\n\ninterface StockReservation extends Resource {\n\t\n\treadonly type: StockReservationType\n\n\t/** \n\t * The stock reservation status. One of 'draft' (default), or 'pending'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'pending'\n\t/** \n\t * The stock reservation quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\t/** \n\t * The expiration date/time of this stock reservation.\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\n\tline_item?: LineItem | null\n\torder?: Order | null\n\tstock_line_item?: StockLineItem | null\n\tstock_transfer?: StockTransfer | null\n\tstock_item?: StockItem | null\n\treserved_stock?: ReservedStock | null\n\tsku?: Sku | null\n\n}\n\n\ninterface StockReservationCreate extends ResourceCreate {\n\t\n\t/** \n\t * The stock reservation quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\n\tstock_item: StockItemRel\n\n}\n\n\ninterface StockReservationUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The stock reservation quantity.\n\t * @example ```4```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to mark this stock reservation as pending.\n\t * @example ```true```\n\t */\n\t_pending?: boolean | null\n\t\n}\n\n\nclass StockReservations extends ApiResource<StockReservation> {\n\n\tstatic readonly TYPE: StockReservationType = 'stock_reservations' as const\n\n\tasync create(resource: StockReservationCreate, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.create<StockReservationCreate, StockReservation>({ ...resource, type: StockReservations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockReservationUpdate, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.update<StockReservationUpdate, StockReservation>({ ...resource, type: StockReservations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockReservations.TYPE } : id, options)\n\t}\n\n\tasync line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `stock_reservations/${_stockReservationId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync order(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stock_reservations/${_stockReservationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync stock_line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `stock_reservations/${_stockReservationId}/stock_line_item`, params, options) as unknown as StockLineItem\n\t}\n\n\tasync stock_transfer(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `stock_reservations/${_stockReservationId}/stock_transfer`, params, options) as unknown as StockTransfer\n\t}\n\n\tasync stock_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_reservations/${_stockReservationId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync reserved_stock(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync sku(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_reservations/${_stockReservationId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync _pending(id: string | StockReservation, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.update<StockReservationUpdate, StockReservation>({ id: (typeof id === 'string')? id: id.id, type: StockReservations.TYPE, _pending: true }, params, options)\n\t}\n\n\n\tisStockReservation(resource: any): resource is StockReservation {\n\t\treturn resource.type && (resource.type === StockReservations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockReservationRel {\n\t\treturn super.relationshipOneToOne<StockReservationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockReservationRel[] {\n\t\treturn super.relationshipOneToMany<StockReservationRel>(...ids)\n\t}\n\n\n\ttype(): StockReservationType {\n\t\treturn StockReservations.TYPE\n\t}\n\n}\n\n\nconst instance = new StockReservations()\nexport default instance\n\nexport type { StockReservation, StockReservationCreate, StockReservationUpdate, StockReservationType }\n"]}
@@ -0,0 +1,90 @@
1
+ 'use strict';
2
+
3
+ var resource = require('../resource');
4
+
5
+ class StockTransfers extends resource.ApiResource {
6
+ static TYPE = "stock_transfers";
7
+ async create(resource, params, options) {
8
+ return this.resources.create({ ...resource, type: StockTransfers.TYPE }, params, options);
9
+ }
10
+ async update(resource, params, options) {
11
+ return this.resources.update({ ...resource, type: StockTransfers.TYPE }, params, options);
12
+ }
13
+ async delete(id, options) {
14
+ await this.resources.delete(typeof id === "string" ? { id, type: StockTransfers.TYPE } : id, options);
15
+ }
16
+ async sku(stockTransferId, params, options) {
17
+ const _stockTransferId = stockTransferId.id || stockTransferId;
18
+ return this.resources.fetch({ type: "skus" }, `stock_transfers/${_stockTransferId}/sku`, params, options);
19
+ }
20
+ async origin_stock_location(stockTransferId, params, options) {
21
+ const _stockTransferId = stockTransferId.id || stockTransferId;
22
+ return this.resources.fetch({ type: "stock_locations" }, `stock_transfers/${_stockTransferId}/origin_stock_location`, params, options);
23
+ }
24
+ async destination_stock_location(stockTransferId, params, options) {
25
+ const _stockTransferId = stockTransferId.id || stockTransferId;
26
+ return this.resources.fetch({ type: "stock_locations" }, `stock_transfers/${_stockTransferId}/destination_stock_location`, params, options);
27
+ }
28
+ async shipment(stockTransferId, params, options) {
29
+ const _stockTransferId = stockTransferId.id || stockTransferId;
30
+ return this.resources.fetch({ type: "shipments" }, `stock_transfers/${_stockTransferId}/shipment`, params, options);
31
+ }
32
+ async line_item(stockTransferId, params, options) {
33
+ const _stockTransferId = stockTransferId.id || stockTransferId;
34
+ return this.resources.fetch({ type: "line_items" }, `stock_transfers/${_stockTransferId}/line_item`, params, options);
35
+ }
36
+ async stock_reservation(stockTransferId, params, options) {
37
+ const _stockTransferId = stockTransferId.id || stockTransferId;
38
+ return this.resources.fetch({ type: "stock_reservations" }, `stock_transfers/${_stockTransferId}/stock_reservation`, params, options);
39
+ }
40
+ async attachments(stockTransferId, params, options) {
41
+ const _stockTransferId = stockTransferId.id || stockTransferId;
42
+ return this.resources.fetch({ type: "attachments" }, `stock_transfers/${_stockTransferId}/attachments`, params, options);
43
+ }
44
+ async events(stockTransferId, params, options) {
45
+ const _stockTransferId = stockTransferId.id || stockTransferId;
46
+ return this.resources.fetch({ type: "events" }, `stock_transfers/${_stockTransferId}/events`, params, options);
47
+ }
48
+ async versions(stockTransferId, params, options) {
49
+ const _stockTransferId = stockTransferId.id || stockTransferId;
50
+ return this.resources.fetch({ type: "versions" }, `stock_transfers/${_stockTransferId}/versions`, params, options);
51
+ }
52
+ async _upcoming(id, params, options) {
53
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _upcoming: true }, params, options);
54
+ }
55
+ async _on_hold(id, params, options) {
56
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _on_hold: true }, params, options);
57
+ }
58
+ async _picking(id, params, options) {
59
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _picking: true }, params, options);
60
+ }
61
+ async _in_transit(id, params, options) {
62
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _in_transit: true }, params, options);
63
+ }
64
+ async _complete(id, params, options) {
65
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _complete: true }, params, options);
66
+ }
67
+ async _cancel(id, params, options) {
68
+ return this.resources.update({ id: typeof id === "string" ? id : id.id, type: StockTransfers.TYPE, _cancel: true }, params, options);
69
+ }
70
+ isStockTransfer(resource) {
71
+ return resource.type && resource.type === StockTransfers.TYPE;
72
+ }
73
+ relationship(id) {
74
+ return super.relationshipOneToOne(id);
75
+ }
76
+ relationshipToMany(...ids) {
77
+ return super.relationshipOneToMany(...ids);
78
+ }
79
+ type() {
80
+ return StockTransfers.TYPE;
81
+ }
82
+ }
83
+ const instance = new StockTransfers();
84
+ var stock_transfers_default = instance;
85
+
86
+ module.exports = stock_transfers_default;
87
+ //# sourceMappingURL=stock_transfers.cjs.map
88
+
89
+ module.exports = exports.default;
90
+ //# sourceMappingURL=stock_transfers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/stock_transfers.ts"],"names":["ApiResource"],"mappings":";;;;AA6KA,MAAM,uBAAuBA,oBAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA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AAA,MAAA,CAA2C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,cAAe,CAAA,IAAA,EAAM,SAAS,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxK,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"stock_transfers.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku, SkuType } from './skus'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { StockReservation } from './stock_reservations'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype StockTransferType = 'stock_transfers'\ntype StockTransferRel = ResourceRel & { type: StockTransferType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\n\n\nexport type StockTransferSort = Pick<StockTransfer, 'id' | 'number' | 'status' | 'quantity' | 'on_hold_at' | 'picking_at' | 'in_transit_at' | 'completed_at' | 'cancelled_at'> & ResourceSort\n// export type StockTransferFilter = Pick<StockTransfer, 'id' | 'number' | 'status' | 'quantity' | 'on_hold_at' | 'picking_at' | 'in_transit_at' | 'completed_at' | 'cancelled_at'> & ResourceFilter\n\n\ninterface StockTransfer extends Resource {\n\t\n\treadonly type: StockTransferType\n\n\t/** \n\t * Unique identifier for the stock transfer (numeric).\n\t * @example ```\"1234\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock transfer status. One of 'draft' (default), 'upcoming', 'on_hold', 'picking', 'in_transit', 'completed', or 'cancelled'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'upcoming' | 'on_hold' | 'picking' | 'in_transit' | 'completed' | 'cancelled'\n\t/** \n\t * The stock quantity to be transferred from the origin stock location to destination one. Updatable unless stock transfer is completed or cancelled and depending on origin stock availability.\n\t * @example ```2```\n\t */\n\tquantity: number\n\t/** \n\t * Time at which the stock transfer was put on hold.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\ton_hold_at?: string | null\n\t/** \n\t * Time at which the stock transfer was picking.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpicking_at?: string | null\n\t/** \n\t * Time at which the stock transfer was in transit.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tin_transit_at?: string | null\n\t/** \n\t * Time at which the stock transfer was completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcompleted_at?: string | null\n\t/** \n\t * Time at which the stock transfer was cancelled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tcancelled_at?: string | null\n\n\tsku?: Sku | null\n\torigin_stock_location?: StockLocation | null\n\tdestination_stock_location?: StockLocation | null\n\tshipment?: Shipment | null\n\tline_item?: LineItem | null\n\tstock_reservation?: StockReservation | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockTransferCreate extends ResourceCreate {\n\t\n\t/** \n\t * Unique identifier for the stock transfer (numeric).\n\t * @example ```\"1234\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock quantity to be transferred from the origin stock location to destination one. Updatable unless stock transfer is completed or cancelled and depending on origin stock availability.\n\t * @example ```2```\n\t */\n\tquantity: number\n\n\tsku: SkuRel\n\torigin_stock_location: StockLocationRel\n\tdestination_stock_location: StockLocationRel\n\tshipment?: ShipmentRel | null\n\tline_item?: LineItemRel | null\n\n}\n\n\ninterface StockTransferUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Unique identifier for the stock transfer (numeric).\n\t * @example ```\"1234\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock quantity to be transferred from the origin stock location to destination one. Updatable unless stock transfer is completed or cancelled and depending on origin stock availability.\n\t * @example ```2```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to mark this stock transfer as upcoming.\n\t * @example ```true```\n\t */\n\t_upcoming?: boolean | null\n\t/** \n\t * Send this attribute if you want to put this stock transfer on hold.\n\t * @example ```true```\n\t */\n\t_on_hold?: boolean | null\n\t/** \n\t * Send this attribute if you want to start picking this stock transfer.\n\t * @example ```true```\n\t */\n\t_picking?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this stock transfer as in transit.\n\t * @example ```true```\n\t */\n\t_in_transit?: boolean | null\n\t/** \n\t * Send this attribute if you want to complete this stock transfer.\n\t * @example ```true```\n\t */\n\t_complete?: boolean | null\n\t/** \n\t * Send this attribute if you want to cancel this stock transfer.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\n\tsku?: SkuRel | null\n\torigin_stock_location?: StockLocationRel | null\n\tdestination_stock_location?: StockLocationRel | null\n\tshipment?: ShipmentRel | null\n\tline_item?: LineItemRel | null\n\n}\n\n\nclass StockTransfers extends ApiResource<StockTransfer> {\n\n\tstatic readonly TYPE: StockTransferType = 'stock_transfers' as const\n\n\tasync create(resource: StockTransferCreate, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.create<StockTransferCreate, StockTransfer>({ ...resource, type: StockTransfers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockTransferUpdate, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ ...resource, type: StockTransfers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockTransfers.TYPE } : id, options)\n\t}\n\n\tasync sku(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_transfers/${_stockTransferId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync origin_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/origin_stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync destination_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/destination_stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync shipment(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `stock_transfers/${_stockTransferId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync line_item(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `stock_transfers/${_stockTransferId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync stock_reservation(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `stock_transfers/${_stockTransferId}/stock_reservation`, params, options) as unknown as StockReservation\n\t}\n\n\tasync attachments(stockTransferId: string | StockTransfer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_transfers/${_stockTransferId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(stockTransferId: string | StockTransfer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stock_transfers/${_stockTransferId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(stockTransferId: string | StockTransfer, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_transfers/${_stockTransferId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _in_transit(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _in_transit: true }, params, options)\n\t}\n\n\tasync _complete(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _complete: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisStockTransfer(resource: any): resource is StockTransfer {\n\t\treturn resource.type && (resource.type === StockTransfers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockTransferRel {\n\t\treturn super.relationshipOneToOne<StockTransferRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockTransferRel[] {\n\t\treturn super.relationshipOneToMany<StockTransferRel>(...ids)\n\t}\n\n\n\ttype(): StockTransferType {\n\t\treturn StockTransfers.TYPE\n\t}\n\n}\n\n\nconst instance = new StockTransfers()\nexport default instance\n\nexport type { StockTransfer, StockTransferCreate, StockTransferUpdate, StockTransferType }\n"]}
@@ -0,0 +1,4 @@
1
+ export { im as StockTransfer, io as StockTransferCreate, iq as StockTransferSort, kI as StockTransferType, ip as StockTransferUpdate, bw as default } from '../api-DmIZO_Np.cjs';
2
+ import '../client.cjs';
3
+ import '../interceptor-5MISI1yn.cjs';
4
+ import '../types.cjs';
@@ -0,0 +1,4 @@
1
+ export { im as StockTransfer, io as StockTransferCreate, iq as StockTransferSort, kI as StockTransferType, ip as StockTransferUpdate, bw as default } from '../api-DDgIE2i8.js';
2
+ import '../client.js';
3
+ import '../interceptor-5MISI1yn.js';
4
+ import '../types.js';