@commercelayer/sdk 7.0.0-rc.10 → 7.0.0-rc.12

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 (652) hide show
  1. package/lib/{api-DF66S5Gh.d.ts → api-BIiVfx1G.d.ts} +66 -47
  2. package/lib/{api-2OqdnITp.d.cts → api-xIgvzFhW.d.cts} +66 -47
  3. package/lib/api.cjs +24 -24
  4. package/lib/api.d.cts +1 -1
  5. package/lib/api.d.ts +1 -1
  6. package/lib/api.js +12 -12
  7. package/lib/bundle.cjs +26 -26
  8. package/lib/bundle.cjs.map +1 -1
  9. package/lib/bundle.d.cts +1 -1
  10. package/lib/bundle.d.ts +1 -1
  11. package/lib/bundle.js +13 -13
  12. package/lib/bundle.js.map +1 -1
  13. package/lib/chunk-2AFNQJXP.cjs.map +1 -1
  14. package/lib/chunk-2AMKJ6V7.cjs.map +1 -1
  15. package/lib/chunk-2HLQW5MF.cjs.map +1 -1
  16. package/lib/chunk-2HPO4UZA.cjs.map +1 -1
  17. package/lib/chunk-2JOYLKTP.cjs.map +1 -1
  18. package/lib/chunk-2KKHO6QF.js.map +1 -1
  19. package/lib/chunk-2L2ZM3VD.js.map +1 -1
  20. package/lib/chunk-2P6AFRJL.js.map +1 -1
  21. package/lib/chunk-2PYM3QGA.js.map +1 -1
  22. package/lib/chunk-2THU5NEW.cjs.map +1 -1
  23. package/lib/{chunk-BF7OPORP.js → chunk-2UUZHL2R.js} +2 -2
  24. package/lib/{chunk-BF7OPORP.js.map → chunk-2UUZHL2R.js.map} +1 -1
  25. package/lib/chunk-2XGMKMF5.cjs.map +1 -1
  26. package/lib/chunk-34H2NFDA.js.map +1 -1
  27. package/lib/chunk-35OHXDG3.cjs.map +1 -1
  28. package/lib/chunk-3ADITMLN.cjs.map +1 -1
  29. package/lib/chunk-3ANXNJ6U.cjs.map +1 -1
  30. package/lib/chunk-3AOPII3W.js.map +1 -1
  31. package/lib/chunk-3DFZ5QLR.js.map +1 -1
  32. package/lib/chunk-3I5BJF3J.js.map +1 -1
  33. package/lib/chunk-3N2MNKA3.js.map +1 -1
  34. package/lib/chunk-3NWQH32A.js.map +1 -1
  35. package/lib/chunk-3OBFBFUV.js.map +1 -1
  36. package/lib/chunk-3PVKJIA3.js.map +1 -1
  37. package/lib/chunk-3RR27O3T.js.map +1 -1
  38. package/lib/chunk-3TGZNMLP.cjs.map +1 -1
  39. package/lib/chunk-3URHH3S6.js.map +1 -1
  40. package/lib/chunk-3WKN5OCU.cjs.map +1 -1
  41. package/lib/chunk-3XWE56FL.cjs.map +1 -1
  42. package/lib/chunk-42DT6ZET.cjs.map +1 -1
  43. package/lib/chunk-432EXURP.js.map +1 -1
  44. package/lib/chunk-4IH4EHXT.cjs.map +1 -1
  45. package/lib/chunk-4KFJUIFD.js.map +1 -1
  46. package/lib/chunk-4KO5LZ7F.js.map +1 -1
  47. package/lib/chunk-4L4MGCUZ.js.map +1 -1
  48. package/lib/chunk-4L73LJKG.js.map +1 -1
  49. package/lib/{chunk-RWPFE3LF.cjs → chunk-4NI5SICY.cjs} +2 -2
  50. package/lib/chunk-4NI5SICY.cjs.map +1 -0
  51. package/lib/chunk-4SCFKFIM.cjs.map +1 -1
  52. package/lib/chunk-57XXD3GQ.cjs.map +1 -1
  53. package/lib/chunk-5EXCGVF2.cjs.map +1 -1
  54. package/lib/chunk-5FZNBGAF.cjs.map +1 -1
  55. package/lib/{chunk-NMVACSMG.js → chunk-5NMDIVXH.js} +2 -2
  56. package/lib/chunk-5NMDIVXH.js.map +1 -0
  57. package/lib/chunk-5OQQBNVB.js.map +1 -1
  58. package/lib/chunk-5P5Z7NXC.js.map +1 -1
  59. package/lib/chunk-5R76TU4I.cjs.map +1 -1
  60. package/lib/chunk-627I2FYX.cjs.map +1 -1
  61. package/lib/chunk-66JDSPFD.cjs.map +1 -1
  62. package/lib/chunk-67QVA2J3.cjs.map +1 -1
  63. package/lib/chunk-6AJSOS56.cjs.map +1 -1
  64. package/lib/chunk-6B66AQKB.cjs.map +1 -1
  65. package/lib/chunk-6OHA2TO3.cjs.map +1 -1
  66. package/lib/chunk-6PWK52UZ.cjs.map +1 -1
  67. package/lib/chunk-6SCAIB4K.cjs.map +1 -1
  68. package/lib/chunk-6SOWFGBP.cjs.map +1 -1
  69. package/lib/chunk-7CQTUOR4.cjs.map +1 -1
  70. package/lib/chunk-7ISS2FDY.js.map +1 -1
  71. package/lib/chunk-7JLRB7QH.js.map +1 -1
  72. package/lib/chunk-7SG4WU7W.js.map +1 -1
  73. package/lib/chunk-7SZY5BWE.js.map +1 -1
  74. package/lib/chunk-7VSYXEXL.js.map +1 -1
  75. package/lib/chunk-7Z2U4MHU.cjs.map +1 -1
  76. package/lib/chunk-A6BT5FSV.cjs.map +1 -1
  77. package/lib/chunk-A7BEMDVP.cjs.map +1 -1
  78. package/lib/chunk-AD73LDFJ.cjs.map +1 -1
  79. package/lib/{chunk-P3NADEGE.cjs → chunk-AGNIOGQC.cjs} +2 -2
  80. package/lib/chunk-AGNIOGQC.cjs.map +1 -0
  81. package/lib/chunk-AIGQRBCY.cjs.map +1 -1
  82. package/lib/chunk-ANCLAYJV.cjs.map +1 -1
  83. package/lib/chunk-AQFAND5D.cjs.map +1 -1
  84. package/lib/chunk-ARIBIRKF.cjs.map +1 -1
  85. package/lib/{chunk-EJSNNH47.js → chunk-AVJX4OEZ.js} +3 -3
  86. package/lib/{chunk-EJSNNH47.js.map → chunk-AVJX4OEZ.js.map} +1 -1
  87. package/lib/chunk-AW3TRBZ7.js.map +1 -1
  88. package/lib/chunk-AYTBSAHY.js.map +1 -1
  89. package/lib/chunk-B72FREUL.cjs.map +1 -1
  90. package/lib/chunk-BBEMCANC.cjs.map +1 -1
  91. package/lib/{chunk-JN4JL4WT.cjs → chunk-BJYOKKGX.cjs} +2 -2
  92. package/lib/{chunk-JN4JL4WT.cjs.map → chunk-BJYOKKGX.cjs.map} +1 -1
  93. package/lib/chunk-BN6XJAZH.cjs.map +1 -1
  94. package/lib/chunk-BTAKU6V5.cjs.map +1 -1
  95. package/lib/chunk-CG2ACHGS.js.map +1 -1
  96. package/lib/chunk-CHYP5F26.js.map +1 -1
  97. package/lib/chunk-CK6RZLVM.cjs.map +1 -1
  98. package/lib/chunk-CNCZCBI3.js.map +1 -1
  99. package/lib/chunk-CRRYP7ZN.js.map +1 -1
  100. package/lib/chunk-CTXBUDGO.cjs.map +1 -1
  101. package/lib/chunk-CUNOMS5N.js.map +1 -1
  102. package/lib/chunk-D26KDUDM.cjs.map +1 -1
  103. package/lib/chunk-D5E4OGXU.js.map +1 -1
  104. package/lib/chunk-D7KNSKNJ.js.map +1 -1
  105. package/lib/chunk-DAXKXBA3.js.map +1 -1
  106. package/lib/{chunk-465K3KVE.js → chunk-DGW3ZSW6.js} +2 -2
  107. package/lib/chunk-DGW3ZSW6.js.map +1 -0
  108. package/lib/chunk-DJ572MZB.cjs.map +1 -1
  109. package/lib/chunk-DOFPDQMJ.cjs.map +1 -1
  110. package/lib/chunk-DOGEZ6XX.cjs.map +1 -1
  111. package/lib/chunk-DSKZRVXS.js.map +1 -1
  112. package/lib/chunk-DTGODPCN.js.map +1 -1
  113. package/lib/chunk-DYZGWPZ6.js.map +1 -1
  114. package/lib/chunk-E3FDHGI7.js.map +1 -1
  115. package/lib/chunk-E4DYW6HB.cjs.map +1 -1
  116. package/lib/{chunk-ZFG533LP.js → chunk-E65GENXB.js} +2 -2
  117. package/lib/{chunk-ZFG533LP.js.map → chunk-E65GENXB.js.map} +1 -1
  118. package/lib/chunk-E6TBQVLK.cjs.map +1 -1
  119. package/lib/chunk-EADFDBOR.cjs.map +1 -1
  120. package/lib/chunk-ECMCBU3N.js.map +1 -1
  121. package/lib/chunk-EEFOL62K.js.map +1 -1
  122. package/lib/chunk-EHWAGYNX.js.map +1 -1
  123. package/lib/chunk-ELBOXOTA.js.map +1 -1
  124. package/lib/chunk-EP22KKHR.js.map +1 -1
  125. package/lib/chunk-EP7MAEQH.cjs.map +1 -1
  126. package/lib/chunk-EQD223JW.cjs.map +1 -1
  127. package/lib/{chunk-LCLXLB2R.cjs → chunk-ESMKOP42.cjs} +5 -2
  128. package/lib/chunk-ESMKOP42.cjs.map +1 -0
  129. package/lib/chunk-F6MSHDB7.cjs.map +1 -1
  130. package/lib/chunk-FAU5EILL.js.map +1 -1
  131. package/lib/{chunk-HLCGKY7R.js → chunk-FO7WBEPF.js} +2 -2
  132. package/lib/chunk-FO7WBEPF.js.map +1 -0
  133. package/lib/chunk-FSFXOZ35.cjs.map +1 -1
  134. package/lib/chunk-FTAZDUH6.js.map +1 -1
  135. package/lib/chunk-FVJDRHG7.js.map +1 -1
  136. package/lib/chunk-FXE62CPP.cjs.map +1 -1
  137. package/lib/chunk-FYKIHWAM.cjs.map +1 -1
  138. package/lib/chunk-G74OZ4M6.js.map +1 -1
  139. package/lib/chunk-GD4WRDF2.js.map +1 -1
  140. package/lib/chunk-GE6OHQR6.cjs.map +1 -1
  141. package/lib/chunk-GHLCA7BX.js.map +1 -1
  142. package/lib/chunk-GLSPCG3M.cjs.map +1 -1
  143. package/lib/chunk-H2USYPU6.js.map +1 -1
  144. package/lib/chunk-H4PUXGNI.cjs.map +1 -1
  145. package/lib/chunk-H4SVEI6E.js.map +1 -1
  146. package/lib/chunk-HAAE23MQ.js.map +1 -1
  147. package/lib/chunk-HBUDZOK7.cjs.map +1 -1
  148. package/lib/chunk-HCBXRHD7.js.map +1 -1
  149. package/lib/chunk-HDYENVKD.js.map +1 -1
  150. package/lib/{chunk-LEWK7QET.cjs → chunk-HERQULAV.cjs} +2 -2
  151. package/lib/chunk-HERQULAV.cjs.map +1 -0
  152. package/lib/chunk-HNHF6T2I.cjs.map +1 -1
  153. package/lib/{chunk-HQ35KQFG.cjs → chunk-HNONYIDO.cjs} +2 -2
  154. package/lib/chunk-HNONYIDO.cjs.map +1 -0
  155. package/lib/chunk-HQ5STEMD.js.map +1 -1
  156. package/lib/chunk-HQ6TJSB7.cjs.map +1 -1
  157. package/lib/chunk-HSILJQCD.js.map +1 -1
  158. package/lib/chunk-I3SKGXTB.cjs.map +1 -1
  159. package/lib/chunk-IDAOX5RB.cjs.map +1 -1
  160. package/lib/chunk-IITNQS6D.js.map +1 -1
  161. package/lib/chunk-IKENWSRH.cjs.map +1 -1
  162. package/lib/chunk-IKHD5UQP.cjs.map +1 -1
  163. package/lib/chunk-INJ7FRDA.cjs.map +1 -1
  164. package/lib/chunk-INZD34YD.cjs.map +1 -1
  165. package/lib/chunk-J4CTOHX6.cjs.map +1 -1
  166. package/lib/chunk-J6NBJHWL.cjs.map +1 -1
  167. package/lib/chunk-J6PTNG3D.js.map +1 -1
  168. package/lib/chunk-J7ZSBB35.js.map +1 -1
  169. package/lib/chunk-JAQECLCE.js.map +1 -1
  170. package/lib/chunk-JECYKPCC.cjs.map +1 -1
  171. package/lib/chunk-JPUF5YXX.js.map +1 -1
  172. package/lib/chunk-JRTJ6LWK.js.map +1 -1
  173. package/lib/chunk-JT7HVLLW.cjs.map +1 -1
  174. package/lib/chunk-JVF5KY2J.cjs.map +1 -1
  175. package/lib/chunk-JWC2GSYH.cjs.map +1 -1
  176. package/lib/chunk-JYOFP6BM.js.map +1 -1
  177. package/lib/chunk-JYXAF775.js.map +1 -1
  178. package/lib/chunk-K2CU5HIV.js.map +1 -1
  179. package/lib/chunk-K6WSCQKS.cjs.map +1 -1
  180. package/lib/chunk-KH5OQRQL.js.map +1 -1
  181. package/lib/{chunk-7X36B7N6.js → chunk-KITKWF6F.js} +2 -2
  182. package/lib/chunk-KITKWF6F.js.map +1 -0
  183. package/lib/{chunk-KBN3FFXD.cjs → chunk-KPRWSW6P.cjs} +2 -2
  184. package/lib/chunk-KPRWSW6P.cjs.map +1 -0
  185. package/lib/{chunk-7GVHCOUC.js → chunk-KU5U6DTU.js} +2 -2
  186. package/lib/{chunk-7GVHCOUC.js.map → chunk-KU5U6DTU.js.map} +1 -1
  187. package/lib/chunk-KWRDUU7K.js.map +1 -1
  188. package/lib/chunk-L4LPS3DV.cjs.map +1 -1
  189. package/lib/chunk-L4TDKOAC.js.map +1 -1
  190. package/lib/chunk-L5NEDGXK.js.map +1 -1
  191. package/lib/chunk-L6IGO47T.js.map +1 -1
  192. package/lib/chunk-LCNT6GY3.js.map +1 -1
  193. package/lib/chunk-LIT4FEIU.cjs.map +1 -1
  194. package/lib/chunk-LJ2EP6AL.cjs.map +1 -1
  195. package/lib/chunk-LNMY5BDT.js.map +1 -1
  196. package/lib/chunk-LTLMRGB7.js.map +1 -1
  197. package/lib/chunk-M2ZERG2X.cjs.map +1 -1
  198. package/lib/chunk-MADGMICB.js.map +1 -1
  199. package/lib/{chunk-VDZUWCIN.cjs → chunk-MCGX2ZDC.cjs} +2 -2
  200. package/lib/{chunk-VDZUWCIN.cjs.map → chunk-MCGX2ZDC.cjs.map} +1 -1
  201. package/lib/chunk-MJRMRWP3.js.map +1 -1
  202. package/lib/chunk-MPSHBMZS.js.map +1 -1
  203. package/lib/chunk-MQZSDICO.cjs.map +1 -1
  204. package/lib/chunk-MUPRLXGP.js.map +1 -1
  205. package/lib/chunk-MWYBER5I.cjs.map +1 -1
  206. package/lib/chunk-MZNHRIXE.js.map +1 -1
  207. package/lib/chunk-N4P7A3RY.js.map +1 -1
  208. package/lib/chunk-N6MHUHGE.cjs.map +1 -1
  209. package/lib/chunk-N753UD4K.cjs.map +1 -1
  210. package/lib/chunk-NAWKHFBZ.js.map +1 -1
  211. package/lib/chunk-NBYV35R4.cjs.map +1 -1
  212. package/lib/chunk-NDPDO54G.js.map +1 -1
  213. package/lib/chunk-NEC22ZSI.cjs.map +1 -1
  214. package/lib/{chunk-OPQJPXLM.cjs → chunk-NIHOABAW.cjs} +2 -2
  215. package/lib/chunk-NIHOABAW.cjs.map +1 -0
  216. package/lib/chunk-NJYMO7FP.cjs.map +1 -1
  217. package/lib/chunk-NODKE6P4.js.map +1 -1
  218. package/lib/chunk-OGLS27LJ.js.map +1 -1
  219. package/lib/chunk-OYFNK2SE.cjs.map +1 -1
  220. package/lib/chunk-PEU5GGGE.js.map +1 -1
  221. package/lib/chunk-PNSVP3KP.cjs.map +1 -1
  222. package/lib/chunk-PQS6KXZ2.cjs.map +1 -1
  223. package/lib/chunk-PV7MUP5Z.js.map +1 -1
  224. package/lib/chunk-PZZLLHJP.js.map +1 -1
  225. package/lib/chunk-Q2ZSQM7I.js.map +1 -1
  226. package/lib/chunk-Q66HILUF.js.map +1 -1
  227. package/lib/chunk-Q66JEOCJ.cjs.map +1 -1
  228. package/lib/chunk-Q7YHSPJL.js.map +1 -1
  229. package/lib/chunk-QGE4ELJO.cjs.map +1 -1
  230. package/lib/chunk-QK5MFD4L.js.map +1 -1
  231. package/lib/chunk-QK7D6L3W.js.map +1 -1
  232. package/lib/chunk-QYDOENWU.cjs.map +1 -1
  233. package/lib/chunk-QZTNLPOD.cjs.map +1 -1
  234. package/lib/chunk-QZWQNPKC.js.map +1 -1
  235. package/lib/chunk-R2LRLUUY.js.map +1 -1
  236. package/lib/chunk-R755X3AG.cjs.map +1 -1
  237. package/lib/chunk-RHARO4TQ.cjs.map +1 -1
  238. package/lib/{chunk-QHRQCFDB.js → chunk-RL7Y22OT.js} +2 -2
  239. package/lib/chunk-RL7Y22OT.js.map +1 -0
  240. package/lib/chunk-ROPOLXIV.js.map +1 -1
  241. package/lib/chunk-RT7XLEV6.js.map +1 -1
  242. package/lib/chunk-RTDD2NRL.cjs.map +1 -1
  243. package/lib/chunk-RTGW34KX.cjs.map +1 -1
  244. package/lib/{chunk-RTLW5O74.cjs → chunk-S3MCPCGR.cjs} +4 -4
  245. package/lib/{chunk-RTLW5O74.cjs.map → chunk-S3MCPCGR.cjs.map} +1 -1
  246. package/lib/chunk-SGOUEVJ3.cjs.map +1 -1
  247. package/lib/chunk-SGWRNEJB.cjs.map +1 -1
  248. package/lib/chunk-SKFA2ZIK.js.map +1 -1
  249. package/lib/chunk-SN6BP777.js.map +1 -1
  250. package/lib/chunk-SOXJJRL2.js.map +1 -1
  251. package/lib/chunk-SPLHKBWG.cjs.map +1 -1
  252. package/lib/chunk-SRW7OWVS.cjs.map +1 -1
  253. package/lib/chunk-SUJCEUOZ.cjs.map +1 -1
  254. package/lib/chunk-SWWPX4V4.cjs.map +1 -1
  255. package/lib/chunk-THO6KQJZ.js.map +1 -1
  256. package/lib/chunk-THVPSJTK.cjs.map +1 -1
  257. package/lib/chunk-TIJIXGNJ.cjs.map +1 -1
  258. package/lib/chunk-TM5OCFYV.cjs.map +1 -1
  259. package/lib/{chunk-VLLLEX5J.js → chunk-TOV6ECTA.js} +2 -2
  260. package/lib/chunk-TOV6ECTA.js.map +1 -0
  261. package/lib/chunk-TQFODT4D.cjs.map +1 -1
  262. package/lib/chunk-TSD2PK6H.js.map +1 -1
  263. package/lib/chunk-TSLXKI72.js.map +1 -1
  264. package/lib/chunk-U5FTZYJJ.js.map +1 -1
  265. package/lib/chunk-U6PW4AZV.js.map +1 -1
  266. package/lib/chunk-UB6JC3W7.js.map +1 -1
  267. package/lib/chunk-UBXNH6J3.js.map +1 -1
  268. package/lib/chunk-UP7FR6HD.cjs.map +1 -1
  269. package/lib/chunk-VNWOCO65.cjs.map +1 -1
  270. package/lib/chunk-VPXMI42G.cjs.map +1 -1
  271. package/lib/chunk-VRFSITD3.js.map +1 -1
  272. package/lib/chunk-VUCYIRSC.cjs.map +1 -1
  273. package/lib/{chunk-NJQDJCFB.cjs → chunk-W6AL2GJ4.cjs} +2 -2
  274. package/lib/{chunk-NJQDJCFB.cjs.map → chunk-W6AL2GJ4.cjs.map} +1 -1
  275. package/lib/{chunk-EKGR3EB3.js → chunk-W6YJDUYD.js} +2 -2
  276. package/lib/chunk-W6YJDUYD.js.map +1 -0
  277. package/lib/chunk-WAL76UPE.cjs.map +1 -1
  278. package/lib/chunk-WBPEFNL7.cjs.map +1 -1
  279. package/lib/{chunk-NKJBVNTV.cjs → chunk-WC4Z7ENS.cjs} +2 -2
  280. package/lib/chunk-WC4Z7ENS.cjs.map +1 -0
  281. package/lib/{chunk-BOPK7T5K.js → chunk-WI5IVLYL.js} +2 -2
  282. package/lib/chunk-WI5IVLYL.js.map +1 -0
  283. package/lib/chunk-WKN5RLNR.js.map +1 -1
  284. package/lib/chunk-WP3L72CW.js.map +1 -1
  285. package/lib/chunk-WTHX574O.js.map +1 -1
  286. package/lib/{chunk-IIR3UVU2.js → chunk-WVAW33XQ.js} +3 -3
  287. package/lib/chunk-WVAW33XQ.js.map +1 -0
  288. package/lib/{chunk-JENLN6VJ.js → chunk-WVKEXOIY.js} +5 -2
  289. package/lib/chunk-WVKEXOIY.js.map +1 -0
  290. package/lib/chunk-WXD4O4UY.js.map +1 -1
  291. package/lib/{chunk-RIMDGLIA.cjs → chunk-WXE5KXJC.cjs} +3 -3
  292. package/lib/chunk-WXE5KXJC.cjs.map +1 -0
  293. package/lib/chunk-X2D47UM7.cjs.map +1 -1
  294. package/lib/chunk-X6PHZA6P.cjs.map +1 -1
  295. package/lib/chunk-XD7GS4QW.js.map +1 -1
  296. package/lib/chunk-XMDDYWH5.js.map +1 -1
  297. package/lib/chunk-XPF5Z2WY.js.map +1 -1
  298. package/lib/chunk-XR3KEV7U.js.map +1 -1
  299. package/lib/chunk-XUC3BYL2.cjs.map +1 -1
  300. package/lib/chunk-Y2IGLW5N.js.map +1 -1
  301. package/lib/chunk-Y3BFYVWA.js.map +1 -1
  302. package/lib/{chunk-VMJUXZ67.cjs → chunk-Y5BP4C42.cjs} +2 -2
  303. package/lib/chunk-Y5BP4C42.cjs.map +1 -0
  304. package/lib/chunk-YAKNUPNE.cjs.map +1 -1
  305. package/lib/chunk-YAVHAWTZ.js.map +1 -1
  306. package/lib/chunk-YBXRC6MC.js.map +1 -1
  307. package/lib/chunk-YHYBOXVX.cjs.map +1 -1
  308. package/lib/chunk-YIDX7HVR.cjs.map +1 -1
  309. package/lib/chunk-YN4M5CNJ.js.map +1 -1
  310. package/lib/chunk-YOHBJHTH.cjs.map +1 -1
  311. package/lib/chunk-YUGZUUAU.js.map +1 -1
  312. package/lib/chunk-YY5ENJSH.cjs.map +1 -1
  313. package/lib/chunk-Z2QVXW6T.cjs.map +1 -1
  314. package/lib/chunk-Z667GAZJ.js.map +1 -1
  315. package/lib/chunk-Z7DKPFKZ.js.map +1 -1
  316. package/lib/chunk-ZAISVVBE.cjs.map +1 -1
  317. package/lib/chunk-ZASD6IUL.js.map +1 -1
  318. package/lib/chunk-ZEEB5YAU.js.map +1 -1
  319. package/lib/chunk-ZQSCFH5J.cjs.map +1 -1
  320. package/lib/chunk-ZTVQSWSD.cjs.map +1 -1
  321. package/lib/chunk-ZU7GFVQ6.js.map +1 -1
  322. package/lib/chunk-ZZF34M2E.cjs.map +1 -1
  323. package/lib/client.d.cts +3 -1
  324. package/lib/commercelayer.cjs +5 -5
  325. package/lib/commercelayer.d.cts +6 -4
  326. package/lib/commercelayer.d.ts +3 -3
  327. package/lib/commercelayer.js +1 -1
  328. package/lib/enum.d.cts +1 -1
  329. package/lib/enum.d.ts +1 -1
  330. package/lib/index.cjs +29 -29
  331. package/lib/index.d.cts +5 -2
  332. package/lib/index.d.ts +1 -1
  333. package/lib/index.js +14 -14
  334. package/lib/jsonapi.d.cts +1 -1
  335. package/lib/jsonapi.d.ts +1 -1
  336. package/lib/model.d.cts +1 -1
  337. package/lib/model.d.ts +1 -1
  338. package/lib/query.d.cts +1 -1
  339. package/lib/query.d.ts +1 -1
  340. package/lib/resource.d.cts +1 -1
  341. package/lib/resource.d.ts +1 -1
  342. package/lib/resources/addresses.d.cts +4 -1
  343. package/lib/resources/addresses.d.ts +1 -1
  344. package/lib/resources/adjustments.d.cts +4 -1
  345. package/lib/resources/adjustments.d.ts +1 -1
  346. package/lib/resources/adyen_gateways.d.cts +4 -1
  347. package/lib/resources/adyen_gateways.d.ts +1 -1
  348. package/lib/resources/adyen_payments.cjs +2 -2
  349. package/lib/resources/adyen_payments.d.cts +4 -1
  350. package/lib/resources/adyen_payments.d.ts +1 -1
  351. package/lib/resources/adyen_payments.js +1 -1
  352. package/lib/resources/applications.cjs +2 -2
  353. package/lib/resources/applications.d.cts +4 -1
  354. package/lib/resources/applications.d.ts +1 -1
  355. package/lib/resources/applications.js +1 -1
  356. package/lib/resources/attachments.d.cts +4 -1
  357. package/lib/resources/attachments.d.ts +1 -1
  358. package/lib/resources/authorizations.d.cts +4 -1
  359. package/lib/resources/authorizations.d.ts +1 -1
  360. package/lib/resources/avalara_accounts.d.cts +4 -1
  361. package/lib/resources/avalara_accounts.d.ts +1 -1
  362. package/lib/resources/axerve_gateways.d.cts +4 -1
  363. package/lib/resources/axerve_gateways.d.ts +1 -1
  364. package/lib/resources/axerve_payments.d.cts +4 -1
  365. package/lib/resources/axerve_payments.d.ts +1 -1
  366. package/lib/resources/bing_geocoders.d.cts +4 -1
  367. package/lib/resources/bing_geocoders.d.ts +1 -1
  368. package/lib/resources/braintree_gateways.d.cts +4 -1
  369. package/lib/resources/braintree_gateways.d.ts +1 -1
  370. package/lib/resources/braintree_payments.d.cts +4 -1
  371. package/lib/resources/braintree_payments.d.ts +1 -1
  372. package/lib/resources/bundles.d.cts +4 -1
  373. package/lib/resources/bundles.d.ts +1 -1
  374. package/lib/resources/buy_x_pay_y_promotions.d.cts +4 -1
  375. package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
  376. package/lib/resources/captures.d.cts +4 -1
  377. package/lib/resources/captures.d.ts +1 -1
  378. package/lib/resources/carrier_accounts.d.cts +4 -1
  379. package/lib/resources/carrier_accounts.d.ts +1 -1
  380. package/lib/resources/checkout_com_gateways.d.cts +4 -1
  381. package/lib/resources/checkout_com_gateways.d.ts +1 -1
  382. package/lib/resources/checkout_com_payments.cjs +2 -2
  383. package/lib/resources/checkout_com_payments.d.cts +4 -1
  384. package/lib/resources/checkout_com_payments.d.ts +1 -1
  385. package/lib/resources/checkout_com_payments.js +1 -1
  386. package/lib/resources/cleanups.d.cts +4 -1
  387. package/lib/resources/cleanups.d.ts +1 -1
  388. package/lib/resources/coupon_codes_promotion_rules.d.cts +4 -1
  389. package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
  390. package/lib/resources/coupon_recipients.d.cts +4 -1
  391. package/lib/resources/coupon_recipients.d.ts +1 -1
  392. package/lib/resources/coupons.d.cts +4 -1
  393. package/lib/resources/coupons.d.ts +1 -1
  394. package/lib/resources/custom_promotion_rules.d.cts +4 -1
  395. package/lib/resources/custom_promotion_rules.d.ts +1 -1
  396. package/lib/resources/customer_addresses.d.cts +4 -1
  397. package/lib/resources/customer_addresses.d.ts +1 -1
  398. package/lib/resources/customer_groups.d.cts +4 -1
  399. package/lib/resources/customer_groups.d.ts +1 -1
  400. package/lib/resources/customer_password_resets.d.cts +4 -1
  401. package/lib/resources/customer_password_resets.d.ts +1 -1
  402. package/lib/resources/customer_payment_sources.d.cts +4 -1
  403. package/lib/resources/customer_payment_sources.d.ts +1 -1
  404. package/lib/resources/customer_subscriptions.d.cts +4 -1
  405. package/lib/resources/customer_subscriptions.d.ts +1 -1
  406. package/lib/resources/customers.cjs +2 -2
  407. package/lib/resources/customers.d.cts +4 -1
  408. package/lib/resources/customers.d.ts +1 -1
  409. package/lib/resources/customers.js +1 -1
  410. package/lib/resources/delivery_lead_times.d.cts +4 -1
  411. package/lib/resources/delivery_lead_times.d.ts +1 -1
  412. package/lib/resources/discount_engine_items.d.cts +4 -1
  413. package/lib/resources/discount_engine_items.d.ts +1 -1
  414. package/lib/resources/discount_engines.d.cts +4 -1
  415. package/lib/resources/discount_engines.d.ts +1 -1
  416. package/lib/resources/easypost_pickups.d.cts +4 -1
  417. package/lib/resources/easypost_pickups.d.ts +1 -1
  418. package/lib/resources/event_callbacks.d.cts +4 -1
  419. package/lib/resources/event_callbacks.d.ts +1 -1
  420. package/lib/resources/events.d.cts +4 -1
  421. package/lib/resources/events.d.ts +1 -1
  422. package/lib/resources/exports.d.cts +4 -1
  423. package/lib/resources/exports.d.ts +1 -1
  424. package/lib/resources/external_gateways.d.cts +4 -1
  425. package/lib/resources/external_gateways.d.ts +1 -1
  426. package/lib/resources/external_payments.d.cts +4 -1
  427. package/lib/resources/external_payments.d.ts +1 -1
  428. package/lib/resources/external_promotions.d.cts +4 -1
  429. package/lib/resources/external_promotions.d.ts +1 -1
  430. package/lib/resources/external_tax_calculators.d.cts +4 -1
  431. package/lib/resources/external_tax_calculators.d.ts +1 -1
  432. package/lib/resources/fixed_amount_promotions.d.cts +4 -1
  433. package/lib/resources/fixed_amount_promotions.d.ts +1 -1
  434. package/lib/resources/fixed_price_promotions.d.cts +4 -1
  435. package/lib/resources/fixed_price_promotions.d.ts +1 -1
  436. package/lib/resources/flex_promotions.cjs +2 -2
  437. package/lib/resources/flex_promotions.d.cts +4 -1
  438. package/lib/resources/flex_promotions.d.ts +1 -1
  439. package/lib/resources/flex_promotions.js +1 -1
  440. package/lib/resources/free_gift_promotions.d.cts +4 -1
  441. package/lib/resources/free_gift_promotions.d.ts +1 -1
  442. package/lib/resources/free_shipping_promotions.d.cts +4 -1
  443. package/lib/resources/free_shipping_promotions.d.ts +1 -1
  444. package/lib/resources/geocoders.d.cts +4 -1
  445. package/lib/resources/geocoders.d.ts +1 -1
  446. package/lib/resources/gift_card_recipients.d.cts +4 -1
  447. package/lib/resources/gift_card_recipients.d.ts +1 -1
  448. package/lib/resources/gift_cards.d.cts +4 -1
  449. package/lib/resources/gift_cards.d.ts +1 -1
  450. package/lib/resources/google_geocoders.d.cts +4 -1
  451. package/lib/resources/google_geocoders.d.ts +1 -1
  452. package/lib/resources/imports.d.cts +4 -1
  453. package/lib/resources/imports.d.ts +1 -1
  454. package/lib/resources/in_stock_subscriptions.d.cts +4 -1
  455. package/lib/resources/in_stock_subscriptions.d.ts +1 -1
  456. package/lib/resources/inventory_models.d.cts +4 -1
  457. package/lib/resources/inventory_models.d.ts +1 -1
  458. package/lib/resources/inventory_return_locations.d.cts +4 -1
  459. package/lib/resources/inventory_return_locations.d.ts +1 -1
  460. package/lib/resources/inventory_stock_locations.d.cts +4 -1
  461. package/lib/resources/inventory_stock_locations.d.ts +1 -1
  462. package/lib/resources/klarna_gateways.d.cts +4 -1
  463. package/lib/resources/klarna_gateways.d.ts +1 -1
  464. package/lib/resources/klarna_payments.d.cts +4 -1
  465. package/lib/resources/klarna_payments.d.ts +1 -1
  466. package/lib/resources/line_item_options.d.cts +4 -1
  467. package/lib/resources/line_item_options.d.ts +1 -1
  468. package/lib/resources/line_items.cjs +2 -2
  469. package/lib/resources/line_items.d.cts +4 -1
  470. package/lib/resources/line_items.d.ts +1 -1
  471. package/lib/resources/line_items.js +1 -1
  472. package/lib/resources/links.d.cts +4 -1
  473. package/lib/resources/links.d.ts +1 -1
  474. package/lib/resources/manual_gateways.d.cts +4 -1
  475. package/lib/resources/manual_gateways.d.ts +1 -1
  476. package/lib/resources/manual_tax_calculators.d.cts +4 -1
  477. package/lib/resources/manual_tax_calculators.d.ts +1 -1
  478. package/lib/resources/markets.d.cts +4 -1
  479. package/lib/resources/markets.d.ts +1 -1
  480. package/lib/resources/merchants.d.cts +4 -1
  481. package/lib/resources/merchants.d.ts +1 -1
  482. package/lib/resources/notifications.d.cts +4 -1
  483. package/lib/resources/notifications.d.ts +1 -1
  484. package/lib/resources/order_amount_promotion_rules.d.cts +4 -1
  485. package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
  486. package/lib/resources/order_copies.d.cts +4 -1
  487. package/lib/resources/order_copies.d.ts +1 -1
  488. package/lib/resources/order_factories.d.cts +4 -1
  489. package/lib/resources/order_factories.d.ts +1 -1
  490. package/lib/resources/order_subscription_items.d.cts +4 -1
  491. package/lib/resources/order_subscription_items.d.ts +1 -1
  492. package/lib/resources/order_subscriptions.d.cts +4 -1
  493. package/lib/resources/order_subscriptions.d.ts +1 -1
  494. package/lib/resources/orders.d.cts +4 -1
  495. package/lib/resources/orders.d.ts +1 -1
  496. package/lib/resources/organizations.d.cts +4 -1
  497. package/lib/resources/organizations.d.ts +1 -1
  498. package/lib/resources/packages.d.cts +4 -1
  499. package/lib/resources/packages.d.ts +1 -1
  500. package/lib/resources/parcel_line_items.d.cts +4 -1
  501. package/lib/resources/parcel_line_items.d.ts +1 -1
  502. package/lib/resources/parcels.d.cts +4 -1
  503. package/lib/resources/parcels.d.ts +1 -1
  504. package/lib/resources/payment_gateways.d.cts +4 -1
  505. package/lib/resources/payment_gateways.d.ts +1 -1
  506. package/lib/resources/payment_methods.cjs +2 -2
  507. package/lib/resources/payment_methods.d.cts +4 -1
  508. package/lib/resources/payment_methods.d.ts +1 -1
  509. package/lib/resources/payment_methods.js +1 -1
  510. package/lib/resources/payment_options.cjs +2 -2
  511. package/lib/resources/payment_options.d.cts +4 -1
  512. package/lib/resources/payment_options.d.ts +1 -1
  513. package/lib/resources/payment_options.js +1 -1
  514. package/lib/resources/paypal_gateways.d.cts +4 -1
  515. package/lib/resources/paypal_gateways.d.ts +1 -1
  516. package/lib/resources/paypal_payments.d.cts +4 -1
  517. package/lib/resources/paypal_payments.d.ts +1 -1
  518. package/lib/resources/percentage_discount_promotions.d.cts +4 -1
  519. package/lib/resources/percentage_discount_promotions.d.ts +1 -1
  520. package/lib/resources/pickups.d.cts +4 -1
  521. package/lib/resources/pickups.d.ts +1 -1
  522. package/lib/resources/price_frequency_tiers.d.cts +4 -1
  523. package/lib/resources/price_frequency_tiers.d.ts +1 -1
  524. package/lib/resources/price_list_schedulers.d.cts +4 -1
  525. package/lib/resources/price_list_schedulers.d.ts +1 -1
  526. package/lib/resources/price_lists.cjs +2 -2
  527. package/lib/resources/price_lists.d.cts +4 -1
  528. package/lib/resources/price_lists.d.ts +1 -1
  529. package/lib/resources/price_lists.js +1 -1
  530. package/lib/resources/price_tiers.d.cts +4 -1
  531. package/lib/resources/price_tiers.d.ts +1 -1
  532. package/lib/resources/price_volume_tiers.d.cts +4 -1
  533. package/lib/resources/price_volume_tiers.d.ts +1 -1
  534. package/lib/resources/prices.cjs +2 -2
  535. package/lib/resources/prices.d.cts +4 -1
  536. package/lib/resources/prices.d.ts +1 -1
  537. package/lib/resources/prices.js +1 -1
  538. package/lib/resources/promotion_rules.d.cts +4 -1
  539. package/lib/resources/promotion_rules.d.ts +1 -1
  540. package/lib/resources/promotions.d.cts +4 -1
  541. package/lib/resources/promotions.d.ts +1 -1
  542. package/lib/resources/recurring_order_copies.d.cts +4 -1
  543. package/lib/resources/recurring_order_copies.d.ts +1 -1
  544. package/lib/resources/refunds.d.cts +4 -1
  545. package/lib/resources/refunds.d.ts +1 -1
  546. package/lib/resources/reserved_stocks.d.cts +4 -1
  547. package/lib/resources/reserved_stocks.d.ts +1 -1
  548. package/lib/resources/resource_errors.d.cts +4 -1
  549. package/lib/resources/resource_errors.d.ts +1 -1
  550. package/lib/resources/return_line_items.d.cts +4 -1
  551. package/lib/resources/return_line_items.d.ts +1 -1
  552. package/lib/resources/returns.d.cts +4 -1
  553. package/lib/resources/returns.d.ts +1 -1
  554. package/lib/resources/satispay_gateways.d.cts +4 -1
  555. package/lib/resources/satispay_gateways.d.ts +1 -1
  556. package/lib/resources/satispay_payments.d.cts +4 -1
  557. package/lib/resources/satispay_payments.d.ts +1 -1
  558. package/lib/resources/shipments.d.cts +4 -1
  559. package/lib/resources/shipments.d.ts +1 -1
  560. package/lib/resources/shipping_categories.d.cts +4 -1
  561. package/lib/resources/shipping_categories.d.ts +1 -1
  562. package/lib/resources/shipping_method_tiers.d.cts +4 -1
  563. package/lib/resources/shipping_method_tiers.d.ts +1 -1
  564. package/lib/resources/shipping_methods.cjs +2 -2
  565. package/lib/resources/shipping_methods.d.cts +4 -1
  566. package/lib/resources/shipping_methods.d.ts +1 -1
  567. package/lib/resources/shipping_methods.js +1 -1
  568. package/lib/resources/shipping_weight_tiers.d.cts +4 -1
  569. package/lib/resources/shipping_weight_tiers.d.ts +1 -1
  570. package/lib/resources/shipping_zones.d.cts +4 -1
  571. package/lib/resources/shipping_zones.d.ts +1 -1
  572. package/lib/resources/sku_list_items.d.cts +4 -1
  573. package/lib/resources/sku_list_items.d.ts +1 -1
  574. package/lib/resources/sku_list_promotion_rules.d.cts +4 -1
  575. package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
  576. package/lib/resources/sku_lists.d.cts +4 -1
  577. package/lib/resources/sku_lists.d.ts +1 -1
  578. package/lib/resources/sku_options.d.cts +4 -1
  579. package/lib/resources/sku_options.d.ts +1 -1
  580. package/lib/resources/skus.d.cts +4 -1
  581. package/lib/resources/skus.d.ts +1 -1
  582. package/lib/resources/stock_items.d.cts +4 -1
  583. package/lib/resources/stock_items.d.ts +1 -1
  584. package/lib/resources/stock_line_items.d.cts +4 -1
  585. package/lib/resources/stock_line_items.d.ts +1 -1
  586. package/lib/resources/stock_locations.d.cts +4 -1
  587. package/lib/resources/stock_locations.d.ts +1 -1
  588. package/lib/resources/stock_reservations.d.cts +4 -1
  589. package/lib/resources/stock_reservations.d.ts +1 -1
  590. package/lib/resources/stock_transfers.d.cts +4 -1
  591. package/lib/resources/stock_transfers.d.ts +1 -1
  592. package/lib/resources/stores.d.cts +4 -1
  593. package/lib/resources/stores.d.ts +1 -1
  594. package/lib/resources/stripe_gateways.d.cts +4 -1
  595. package/lib/resources/stripe_gateways.d.ts +1 -1
  596. package/lib/resources/stripe_payments.d.cts +4 -1
  597. package/lib/resources/stripe_payments.d.ts +1 -1
  598. package/lib/resources/stripe_tax_accounts.d.cts +4 -1
  599. package/lib/resources/stripe_tax_accounts.d.ts +1 -1
  600. package/lib/resources/subscription_models.d.cts +4 -1
  601. package/lib/resources/subscription_models.d.ts +1 -1
  602. package/lib/resources/tags.d.cts +4 -1
  603. package/lib/resources/tags.d.ts +1 -1
  604. package/lib/resources/talon_one_accounts.cjs +2 -2
  605. package/lib/resources/talon_one_accounts.d.cts +4 -1
  606. package/lib/resources/talon_one_accounts.d.ts +1 -1
  607. package/lib/resources/talon_one_accounts.js +1 -1
  608. package/lib/resources/tax_calculators.d.cts +4 -1
  609. package/lib/resources/tax_calculators.d.ts +1 -1
  610. package/lib/resources/tax_categories.d.cts +4 -1
  611. package/lib/resources/tax_categories.d.ts +1 -1
  612. package/lib/resources/tax_rules.d.cts +4 -1
  613. package/lib/resources/tax_rules.d.ts +1 -1
  614. package/lib/resources/taxjar_accounts.d.cts +4 -1
  615. package/lib/resources/taxjar_accounts.d.ts +1 -1
  616. package/lib/resources/transactions.d.cts +4 -1
  617. package/lib/resources/transactions.d.ts +1 -1
  618. package/lib/resources/versions.d.cts +4 -1
  619. package/lib/resources/versions.d.ts +1 -1
  620. package/lib/resources/vertex_accounts.d.cts +4 -1
  621. package/lib/resources/vertex_accounts.d.ts +1 -1
  622. package/lib/resources/voids.d.cts +4 -1
  623. package/lib/resources/voids.d.ts +1 -1
  624. package/lib/resources/webhooks.d.cts +4 -1
  625. package/lib/resources/webhooks.d.ts +1 -1
  626. package/lib/resources/wire_transfers.d.cts +4 -1
  627. package/lib/resources/wire_transfers.d.ts +1 -1
  628. package/lib/static.cjs +3 -3
  629. package/lib/static.d.cts +1 -1
  630. package/lib/static.d.ts +1 -1
  631. package/lib/static.js +2 -2
  632. package/package.json +8 -8
  633. package/lib/chunk-465K3KVE.js.map +0 -1
  634. package/lib/chunk-7X36B7N6.js.map +0 -1
  635. package/lib/chunk-BOPK7T5K.js.map +0 -1
  636. package/lib/chunk-EKGR3EB3.js.map +0 -1
  637. package/lib/chunk-HLCGKY7R.js.map +0 -1
  638. package/lib/chunk-HQ35KQFG.cjs.map +0 -1
  639. package/lib/chunk-IIR3UVU2.js.map +0 -1
  640. package/lib/chunk-JENLN6VJ.js.map +0 -1
  641. package/lib/chunk-KBN3FFXD.cjs.map +0 -1
  642. package/lib/chunk-LCLXLB2R.cjs.map +0 -1
  643. package/lib/chunk-LEWK7QET.cjs.map +0 -1
  644. package/lib/chunk-NKJBVNTV.cjs.map +0 -1
  645. package/lib/chunk-NMVACSMG.js.map +0 -1
  646. package/lib/chunk-OPQJPXLM.cjs.map +0 -1
  647. package/lib/chunk-P3NADEGE.cjs.map +0 -1
  648. package/lib/chunk-QHRQCFDB.js.map +0 -1
  649. package/lib/chunk-RIMDGLIA.cjs.map +0 -1
  650. package/lib/chunk-RWPFE3LF.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AA;AACnD,IAAO,OAAA,KAAA,CAAM,qBAAmC,CAAA,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAqB,GAAA;AACpB,IAAA,OAAO,UAAU,CAAA,IAAA;AAAA;AAGnB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,SAAU,EAAA;AAC/B,IAAO,iBAAQ,GAAA","file":"chunk-35OHXDG3.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 { Order, OrderType } from './orders'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { InventoryStockLocation, InventoryStockLocationType } from './inventory_stock_locations'\nimport type { StockLocation } from './stock_locations'\nimport type { Address, AddressType } from './addresses'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { Pickup } from './pickups'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { LineItem } from './line_items'\nimport type { CarrierAccount } from './carrier_accounts'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ShipmentType = 'shipments'\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort\n// export type ShipmentFilter = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceFilter\n\n\ninterface Shipment extends Resource {\n\t\n\treadonly type: ShipmentType\n\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The shipment status. One of 'draft' (default), 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, in cents.\n\t * @example ```1000```\n\t */\n\tcost_amount_cents?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, float.\n\t * @example ```10```\n\t */\n\tcost_amount_float?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_cost_amount?: string | null\n\t/** \n\t * The total number of SKUs in the shipment's line items. This can be useful to display a preview of the shipment content.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * The available shipping rates.\n\t * @example ```[{\"id\":\"rate_f89e4663c3ed47ee94d37763f6d21d54\",\"rate\":\"45.59\",\"carrier\":\"DHLExpress\",\"service\":\"MedicalExpress\"}]```\n\t */\n\trates?: Array<Record<string, any>> | null\n\t/** \n\t * The shipping rate purchase error code, if any.\n\t * @example ```\"SHIPMENT.POSTAGE.FAILURE\"```\n\t */\n\tpurchase_error_code?: string | null\n\t/** \n\t * The shipping rate purchase error message, if any.\n\t * @example ```\"Account not allowed for this service.\"```\n\t */\n\tpurchase_error_message?: string | null\n\t/** \n\t * Any errors collected when fetching shipping rates.\n\t * @example ```[{\"carrier\":\"DHLExpress\",\"message\":\"to_address.postal_code: Shorter than minimum length 3\",\"type\":\"rate_error\"}]```\n\t */\n\tget_rates_errors?: Array<Record<string, any>> | null\n\t/** \n\t * Time at which the getting of the shipping rates started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_started_at?: string | null\n\t/** \n\t * Time at which the getting of the shipping rates completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_started_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_failed_at?: string | null\n\t/** \n\t * Time at which the shipment 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 shipment 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 shipment was packing.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpacking_at?: string | null\n\t/** \n\t * Time at which the shipment was ready to ship.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tready_to_ship_at?: string | null\n\t/** \n\t * Time at which the shipment was shipped.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tshipped_at?: string | null\n\n\torder?: Order | null\n\tshipping_category?: ShippingCategory | null\n\tinventory_stock_location?: InventoryStockLocation | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tshipping_address?: Address | null\n\tshipping_method?: ShippingMethod | null\n\tdelivery_lead_time?: DeliveryLeadTime | null\n\tpickup?: Pickup | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tline_items?: LineItem[] | null\n\tavailable_shipping_methods?: ShippingMethod[] | null\n\tcarrier_accounts?: CarrierAccount[] | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShipmentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location: InventoryStockLocationRel\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ShipmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as upcoming. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_upcoming?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered). Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to put this shipment 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 shipment.\n\t * @example ```true```\n\t */\n\t_picking?: boolean | null\n\t/** \n\t * Send this attribute if you want to start packing this shipment.\n\t * @example ```true```\n\t */\n\t_packing?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as ready to ship.\n\t * @example ```true```\n\t */\n\t_ready_to_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as shipped.\n\t * @example ```true```\n\t */\n\t_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as delivered.\n\t * @example ```true```\n\t */\n\t_deliver?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically destroy the stock reservations for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_release_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically decrement and release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_decrement_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want get the shipping rates from the associated carrier accounts.\n\t * @example ```true```\n\t */\n\t_get_rates?: boolean | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * Send this attribute if you want to purchase this shipment with the selected rate.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location?: InventoryStockLocationRel | null\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Shipments extends ApiResource<Shipment> {\n\n\tstatic readonly TYPE: ShipmentType = 'shipments' as const\n\n\tasync create(resource: ShipmentCreate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.create<ShipmentCreate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShipmentUpdate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ ...resource, type: Shipments.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: Shipments.TYPE } : id, options)\n\t}\n\n\tasync order(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options) as unknown as InventoryStockLocation\n\t}\n\n\tasync stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync pickup(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Pickup>, options?: ResourcesConfig): Promise<Pickup> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Pickup>({ type: 'pickups' }, `shipments/${_shipmentId}/pickup`, params, options) as unknown as Pickup\n\t}\n\n\tasync stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync line_items(shipmentId: string | Shipment, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList<ShippingMethod>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options) as unknown as ListResponse<ShippingMethod>\n\t}\n\n\tasync carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList<CarrierAccount>, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<CarrierAccount>({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options) as unknown as ListResponse<CarrierAccount>\n\t}\n\n\tasync parcels(shipmentId: string | Shipment, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(shipmentId: string | Shipment, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(shipmentId: string | Shipment, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(shipmentId: string | Shipment, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(shipmentId: string | Shipment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _packing: true }, params, options)\n\t}\n\n\tasync _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ready_to_ship: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _deliver: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\tasync _get_rates(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _get_rates: true }, params, options)\n\t}\n\n\tasync _purchase(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisShipment(resource: any): resource is Shipment {\n\t\treturn resource.type && (resource.type === Shipments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShipmentRel {\n\t\treturn super.relationshipOneToOne<ShipmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShipmentRel[] {\n\t\treturn super.relationshipOneToMany<ShipmentRel>(...ids)\n\t}\n\n\n\ttype(): ShipmentType {\n\t\treturn Shipments.TYPE\n\t}\n\n}\n\n\nconst instance = new Shipments()\nexport default instance\n\nexport type { Shipments, Shipment, ShipmentCreate, ShipmentUpdate, ShipmentType }\n"]}
1
+ {"version":3,"sources":["../src/resources/shipments.ts"],"names":["ApiResource"],"mappings":";;;;;AA0RA,IAAM,SAAA,GAAN,MAAM,UAAA,SAAkBA,6BAAA,CAAsB;AAAA,EAE7C,OAAgB,IAAA,GAAqB,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAAA,EAA0B,MAAA,EAAwC,OAAA,EAA8C;AAC5H,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAiC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,UAAA,CAAU,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAAA,EAA0B,MAAA,EAAwC,OAAA,EAA8C;AAC5H,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAiC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,UAAA,CAAU,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAA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AA,CAAiC,EAAE,EAAA,EAAK,OAAO,OAAO,QAAA,GAAW,EAAA,GAAI,EAAA,CAAG,EAAA,EAAI,MAAM,UAAA,CAAU,IAAA,EAAM,cAAc,YAAA,EAAa,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAGA,WAAW,QAAA,EAAqC;AAC/C,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,UAAA,CAAU,IAAA;AAAA;AACtD,EAGA,aAAa,EAAA,EAA6C;AACzD,IAAA,OAAO,KAAA,CAAM,qBAAkC,EAAE,CAAA;AAAA;AAClD,EAEA,sBAAsB,GAAA,EAA8B;AACnD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAmC,GAAG,GAAG,CAAA;AAAA;AACvD,EAGA,IAAA,GAAqB;AACpB,IAAA,OAAO,UAAA,CAAU,IAAA;AAAA;AAGnB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,SAAA,EAAU;AAC/B,IAAO,iBAAA,GAAQ","file":"chunk-35OHXDG3.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 { Order, OrderType } from './orders'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { InventoryStockLocation, InventoryStockLocationType } from './inventory_stock_locations'\nimport type { StockLocation } from './stock_locations'\nimport type { Address, AddressType } from './addresses'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { Pickup } from './pickups'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { LineItem } from './line_items'\nimport type { CarrierAccount } from './carrier_accounts'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ShipmentType = 'shipments'\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort\n// export type ShipmentFilter = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceFilter\n\n\ninterface Shipment extends Resource {\n\t\n\treadonly type: ShipmentType\n\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The shipment status. One of 'draft' (default), 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, in cents.\n\t * @example ```1000```\n\t */\n\tcost_amount_cents?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, float.\n\t * @example ```10```\n\t */\n\tcost_amount_float?: number | null\n\t/** \n\t * The cost of this shipment from the selected carrier account, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_cost_amount?: string | null\n\t/** \n\t * The total number of SKUs in the shipment's line items. This can be useful to display a preview of the shipment content.\n\t * @example ```2```\n\t */\n\tskus_count?: number | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * The available shipping rates.\n\t * @example ```[{\"id\":\"rate_f89e4663c3ed47ee94d37763f6d21d54\",\"rate\":\"45.59\",\"carrier\":\"DHLExpress\",\"service\":\"MedicalExpress\"}]```\n\t */\n\trates?: Array<Record<string, any>> | null\n\t/** \n\t * The shipping rate purchase error code, if any.\n\t * @example ```\"SHIPMENT.POSTAGE.FAILURE\"```\n\t */\n\tpurchase_error_code?: string | null\n\t/** \n\t * The shipping rate purchase error message, if any.\n\t * @example ```\"Account not allowed for this service.\"```\n\t */\n\tpurchase_error_message?: string | null\n\t/** \n\t * Any errors collected when fetching shipping rates.\n\t * @example ```[{\"carrier\":\"DHLExpress\",\"message\":\"to_address.postal_code: Shorter than minimum length 3\",\"type\":\"rate_error\"}]```\n\t */\n\tget_rates_errors?: Array<Record<string, any>> | null\n\t/** \n\t * Time at which the getting of the shipping rates started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_started_at?: string | null\n\t/** \n\t * Time at which the getting of the shipping rates completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tget_rates_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate started.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_started_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate completed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_completed_at?: string | null\n\t/** \n\t * Time at which the purchasing of the shipping rate failed.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpurchase_failed_at?: string | null\n\t/** \n\t * Time at which the shipment 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 shipment 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 shipment was packing.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tpacking_at?: string | null\n\t/** \n\t * Time at which the shipment was ready to ship.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tready_to_ship_at?: string | null\n\t/** \n\t * Time at which the shipment was shipped.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tshipped_at?: string | null\n\n\torder?: Order | null\n\tshipping_category?: ShippingCategory | null\n\tinventory_stock_location?: InventoryStockLocation | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tshipping_address?: Address | null\n\tshipping_method?: ShippingMethod | null\n\tdelivery_lead_time?: DeliveryLeadTime | null\n\tpickup?: Pickup | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tline_items?: LineItem[] | null\n\tavailable_shipping_methods?: ShippingMethod[] | null\n\tcarrier_accounts?: CarrierAccount[] | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShipmentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location: InventoryStockLocationRel\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ShipmentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Unique identifier for the shipment. Cannot be passed by sales channels.\n\t * @example ```\"#1234/S/001\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as upcoming. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_upcoming?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered). Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to put this shipment 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 shipment.\n\t * @example ```true```\n\t */\n\t_picking?: boolean | null\n\t/** \n\t * Send this attribute if you want to start packing this shipment.\n\t * @example ```true```\n\t */\n\t_packing?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as ready to ship.\n\t * @example ```true```\n\t */\n\t_ready_to_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as shipped.\n\t * @example ```true```\n\t */\n\t_ship?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this shipment as delivered.\n\t * @example ```true```\n\t */\n\t_deliver?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically destroy the stock reservations for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_release_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically decrement and release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_decrement_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want get the shipping rates from the associated carrier accounts.\n\t * @example ```true```\n\t */\n\t_get_rates?: boolean | null\n\t/** \n\t * The selected purchase rate from the available shipping rates.\n\t * @example ```\"rate_f89e4663c3ed47ee94d37763f6d21d54\"```\n\t */\n\tselected_rate_id?: string | null\n\t/** \n\t * Send this attribute if you want to purchase this shipment with the selected rate.\n\t * @example ```true```\n\t */\n\t_purchase?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location?: InventoryStockLocationRel | null\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Shipments extends ApiResource<Shipment> {\n\n\tstatic readonly TYPE: ShipmentType = 'shipments' as const\n\n\tasync create(resource: ShipmentCreate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.create<ShipmentCreate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShipmentUpdate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ ...resource, type: Shipments.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: Shipments.TYPE } : id, options)\n\t}\n\n\tasync order(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options) as unknown as InventoryStockLocation\n\t}\n\n\tasync stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync pickup(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Pickup>, options?: ResourcesConfig): Promise<Pickup> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Pickup>({ type: 'pickups' }, `shipments/${_shipmentId}/pickup`, params, options) as unknown as Pickup\n\t}\n\n\tasync stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync line_items(shipmentId: string | Shipment, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList<ShippingMethod>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options) as unknown as ListResponse<ShippingMethod>\n\t}\n\n\tasync carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList<CarrierAccount>, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<CarrierAccount>({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options) as unknown as ListResponse<CarrierAccount>\n\t}\n\n\tasync parcels(shipmentId: string | Shipment, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(shipmentId: string | Shipment, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(shipmentId: string | Shipment, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(shipmentId: string | Shipment, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(shipmentId: string | Shipment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _packing: true }, params, options)\n\t}\n\n\tasync _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ready_to_ship: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _deliver: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\tasync _get_rates(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _get_rates: true }, params, options)\n\t}\n\n\tasync _purchase(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Shipment, triggerValue: string, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisShipment(resource: any): resource is Shipment {\n\t\treturn resource.type && (resource.type === Shipments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShipmentRel {\n\t\treturn super.relationshipOneToOne<ShipmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShipmentRel[] {\n\t\treturn super.relationshipOneToMany<ShipmentRel>(...ids)\n\t}\n\n\n\ttype(): ShipmentType {\n\t\treturn Shipments.TYPE\n\t}\n\n}\n\n\nconst instance = new Shipments()\nexport default instance\n\nexport type { Shipments, Shipment, ShipmentCreate, ShipmentUpdate, ShipmentType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/stock_items.ts"],"names":["ApiResource"],"mappings":";;;;;AA0FA,IAAM,UAAA,GAAN,MAAM,WAAA,SAAmBA,6BAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GA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mC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,WAAW,CAAA,IAAA,EAAM,WAAW,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC9J,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,WAAW,CAAA,IAAA;AAAA;AACvD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,WAAW,CAAA,IAAA;AAAA;AAGpB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"chunk-3ADITMLN.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 { StockLocation, StockLocationType } from './stock_locations'\nimport type { Sku, SkuType } from './skus'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { StockReservation } from './stock_reservations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockItemType = 'stock_items'\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type StockItemSort = Pick<StockItem, 'id' | 'quantity'> & ResourceSort\n// export type StockItemFilter = Pick<StockItem, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface StockItem extends Resource {\n\t\n\treadonly type: StockItemType\n\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 item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location?: StockLocation | null\n\tsku?: Sku | null\n\treserved_stock?: ReservedStock | null\n\tstock_reservations?: StockReservation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockItemCreate extends ResourceCreate {\n\t\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 item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location: StockLocationRel\n\tsku?: SkuRel | null\n\n}\n\n\ninterface StockItemUpdate extends ResourceUpdate {\n\t\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 item quantity.\n\t * @example ```100```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to validate the stock item quantity against the existing reserved stock one, returns an error in case the former is smaller. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_validate?: boolean | null\n\n\tstock_location?: StockLocationRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass StockItems extends ApiResource<StockItem> {\n\n\tstatic readonly TYPE: StockItemType = 'stock_items' as const\n\n\tasync create(resource: StockItemCreate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.create<StockItemCreate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockItemUpdate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ ...resource, type: StockItems.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: StockItems.TYPE } : id, options)\n\t}\n\n\tasync stock_location(stockItemId: string | StockItem, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_items/${_stockItemId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync sku(stockItemId: string | StockItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_items/${_stockItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync reserved_stock(stockItemId: string | StockItem, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_items/${_stockItemId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync stock_reservations(stockItemId: string | StockItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `stock_items/${_stockItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync attachments(stockItemId: string | StockItem, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_items/${_stockItemId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockItemId: string | StockItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_items/${_stockItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _validate(id: string | StockItem, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ id: (typeof id === 'string')? id: id.id, type: StockItems.TYPE, _validate: true }, params, options)\n\t}\n\n\n\tisStockItem(resource: any): resource is StockItem {\n\t\treturn resource.type && (resource.type === StockItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockItemRel {\n\t\treturn super.relationshipOneToOne<StockItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockItemRel[] {\n\t\treturn super.relationshipOneToMany<StockItemRel>(...ids)\n\t}\n\n\n\ttype(): StockItemType {\n\t\treturn StockItems.TYPE\n\t}\n\n}\n\n\nconst instance = new StockItems()\nexport default instance\n\nexport type { StockItems, StockItem, StockItemCreate, StockItemUpdate, StockItemType }\n"]}
1
+ {"version":3,"sources":["../src/resources/stock_items.ts"],"names":["ApiResource"],"mappings":";;;;;AA0FA,IAAM,UAAA,GAAN,MAAM,WAAA,SAAmBA,6BAAA,CAAuB;AAAA,EAE/C,OAAgB,IAAA,GAAsB,aAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAAA,EAA2B,MAAA,EAAyC,OAAA,EAA+C;AAC/H,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAmC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,WAAA,CAAW,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAA,CAAO,QAAA,EAA2B,MAAA,EAAyC,OAAA,EAA+C;AAC/H,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,C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QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,WAAA,CAAW,IAAA;AAAA;AACvD,EAGA,aAAa,EAAA,EAA8C;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAAA,EAA+B;AACpD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAoC,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAA,GAAsB;AACrB,IAAA,OAAO,WAAA,CAAW,IAAA;AAAA;AAGpB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,UAAA,EAAW;AAChC,IAAO,mBAAA,GAAQ","file":"chunk-3ADITMLN.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 { StockLocation, StockLocationType } from './stock_locations'\nimport type { Sku, SkuType } from './skus'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { StockReservation } from './stock_reservations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockItemType = 'stock_items'\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type StockItemSort = Pick<StockItem, 'id' | 'quantity'> & ResourceSort\n// export type StockItemFilter = Pick<StockItem, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface StockItem extends Resource {\n\t\n\treadonly type: StockItemType\n\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 item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location?: StockLocation | null\n\tsku?: Sku | null\n\treserved_stock?: ReservedStock | null\n\tstock_reservations?: StockReservation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockItemCreate extends ResourceCreate {\n\t\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 item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location: StockLocationRel\n\tsku?: SkuRel | null\n\n}\n\n\ninterface StockItemUpdate extends ResourceUpdate {\n\t\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 item quantity.\n\t * @example ```100```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to validate the stock item quantity against the existing reserved stock one, returns an error in case the former is smaller. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_validate?: boolean | null\n\n\tstock_location?: StockLocationRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass StockItems extends ApiResource<StockItem> {\n\n\tstatic readonly TYPE: StockItemType = 'stock_items' as const\n\n\tasync create(resource: StockItemCreate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.create<StockItemCreate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockItemUpdate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ ...resource, type: StockItems.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: StockItems.TYPE } : id, options)\n\t}\n\n\tasync stock_location(stockItemId: string | StockItem, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_items/${_stockItemId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync sku(stockItemId: string | StockItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_items/${_stockItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync reserved_stock(stockItemId: string | StockItem, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_items/${_stockItemId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync stock_reservations(stockItemId: string | StockItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `stock_items/${_stockItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync attachments(stockItemId: string | StockItem, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_items/${_stockItemId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockItemId: string | StockItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_items/${_stockItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _validate(id: string | StockItem, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ id: (typeof id === 'string')? id: id.id, type: StockItems.TYPE, _validate: true }, params, options)\n\t}\n\n\n\tisStockItem(resource: any): resource is StockItem {\n\t\treturn resource.type && (resource.type === StockItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockItemRel {\n\t\treturn super.relationshipOneToOne<StockItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockItemRel[] {\n\t\treturn super.relationshipOneToMany<StockItemRel>(...ids)\n\t}\n\n\n\ttype(): StockItemType {\n\t\treturn StockItems.TYPE\n\t}\n\n}\n\n\nconst instance = new StockItems()\nexport default instance\n\nexport type { StockItems, StockItem, StockItemCreate, StockItemUpdate, StockItemType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/external_payments.ts"],"names":["ApiResource"],"mappings":";;;;;AA8EA,IAAM,gBAAA,GAAN,MAAM,iBAAA,SAAyBA,6BAA6B,CAAA;AAAA,EAE3D,OAAgB,IAA4B,GAAA,mBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAA,CAAO,QAAiC,EAAA,MAAA,EAA+C,OAAqD,EAAA;AACjJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,iBAAiB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CA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CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAqB,kBAAA,EAAA,kBAAkB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/H,EAGA,kBAAkB,QAA4C,EAAA;AAC7D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,iBAAiB,CAAA,IAAA;AAAA;AAC7D,EAGA,aAAa,EAAoD,EAAA;AAChE,IAAO,OAAA,KAAA,CAAM,qBAAyC,EAAE,CAAA;AAAA;AACzD,EAEA,sBAAsB,GAAqC,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAA0C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAA4B,GAAA;AAC3B,IAAA,OAAO,iBAAiB,CAAA,IAAA;AAAA;AAG1B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,gBAAiB,EAAA;AACtC,IAAO,yBAAQ,GAAA","file":"chunk-3ANXNJ6U.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 { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { Version } from './versions'\n\n\ntype ExternalPaymentType = 'external_payments'\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type ExternalPaymentSort = Pick<ExternalPayment, 'id'> & ResourceSort\n// export type ExternalPaymentFilter = Pick<ExternalPayment, 'id' | 'payment_source_token'> & ResourceFilter\n\n\ninterface ExternalPayment extends Resource {\n\t\n\treadonly type: ExternalPaymentType\n\n\t/** \n\t * The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_source_token: string\n\t/** \n\t * External payment options.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\twallet?: CustomerPaymentSource | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ExternalPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_source_token: string\n\t/** \n\t * External payment options.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface ExternalPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * External payment options.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass ExternalPayments extends ApiResource<ExternalPayment> {\n\n\tstatic readonly TYPE: ExternalPaymentType = 'external_payments' as const\n\n\tasync create(resource: ExternalPaymentCreate, params?: QueryParamsRetrieve<ExternalPayment>, options?: ResourcesConfig): Promise<ExternalPayment> {\n\t\treturn this.resources.create<ExternalPaymentCreate, ExternalPayment>({ ...resource, type: ExternalPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve<ExternalPayment>, options?: ResourcesConfig): Promise<ExternalPayment> {\n\t\treturn this.resources.update<ExternalPaymentUpdate, ExternalPayment>({ ...resource, type: ExternalPayments.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: ExternalPayments.TYPE } : id, options)\n\t}\n\n\tasync order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `external_payments/${_externalPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `external_payments/${_externalPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options) as unknown as CustomerPaymentSource\n\t}\n\n\tasync versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisExternalPayment(resource: any): resource is ExternalPayment {\n\t\treturn resource.type && (resource.type === ExternalPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExternalPaymentRel {\n\t\treturn super.relationshipOneToOne<ExternalPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExternalPaymentRel[] {\n\t\treturn super.relationshipOneToMany<ExternalPaymentRel>(...ids)\n\t}\n\n\n\ttype(): ExternalPaymentType {\n\t\treturn ExternalPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new ExternalPayments()\nexport default instance\n\nexport type { ExternalPayments, ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate, ExternalPaymentType }\n"]}
1
+ {"version":3,"sources":["../src/resources/external_payments.ts"],"names":["ApiResource"],"mappings":";;;;;AA8EA,IAAM,gBAAA,GAAN,MAAM,iBAAA,SAAyBA,6BAAA,CAA6B;AAAA,EAE3D,OAAgB,IAAA,GAA4B,mBAAA;AAAA,EAE5C,MAAM,MAAA,CAAO,QAAA,EAAiC,MAAA,EAA+C,OAAA,EAAqD;AACjJ,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA+C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,iBAAA,CAAiB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAA,CAAO,QAAA,EAAiC,MAAA,EAA+C,OAAA,EAAqD;AACjJ,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA+C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,iBAAA,CAAiB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnI,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,iBAAA,CAAiB,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,KAAA,CAAM,iBAAA,EAA6C,MAAA,EAAqC,OAAA,EAA2C;AACxI,IAAA,MAAM,kBAAA,GAAsB,kBAAsC,EAAA,IAAM,iBAAA;AACxE,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA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OAAO,KAAA,CAAM,qBAAyC,EAAE,CAAA;AAAA;AACzD,EAEA,sBAAsB,GAAA,EAAqC;AAC1D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA0C,GAAG,GAAG,CAAA;AAAA;AAC9D,EAGA,IAAA,GAA4B;AAC3B,IAAA,OAAO,iBAAA,CAAiB,IAAA;AAAA;AAG1B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,gBAAA,EAAiB;AACtC,IAAO,yBAAA,GAAQ","file":"chunk-3ANXNJ6U.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 { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { Version } from './versions'\n\n\ntype ExternalPaymentType = 'external_payments'\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type ExternalPaymentSort = Pick<ExternalPayment, 'id'> & ResourceSort\n// export type ExternalPaymentFilter = Pick<ExternalPayment, 'id' | 'payment_source_token'> & ResourceFilter\n\n\ninterface ExternalPayment extends Resource {\n\t\n\treadonly type: ExternalPaymentType\n\n\t/** \n\t * The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_source_token: string\n\t/** \n\t * External payment options.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\toptions?: Record<string, any> | null\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\twallet?: CustomerPaymentSource | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ExternalPaymentCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment source token, as generated by the external gateway SDK. Credit Card numbers are rejected.\n\t * @example ```\"xxxx.yyyy.zzzz\"```\n\t */\n\tpayment_source_token: string\n\t/** \n\t * External payment options.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface ExternalPaymentUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * External payment options.\n\t * @example ```{\"foo\":\"bar\"}```\n\t */\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass ExternalPayments extends ApiResource<ExternalPayment> {\n\n\tstatic readonly TYPE: ExternalPaymentType = 'external_payments' as const\n\n\tasync create(resource: ExternalPaymentCreate, params?: QueryParamsRetrieve<ExternalPayment>, options?: ResourcesConfig): Promise<ExternalPayment> {\n\t\treturn this.resources.create<ExternalPaymentCreate, ExternalPayment>({ ...resource, type: ExternalPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve<ExternalPayment>, options?: ResourcesConfig): Promise<ExternalPayment> {\n\t\treturn this.resources.update<ExternalPaymentUpdate, ExternalPayment>({ ...resource, type: ExternalPayments.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: ExternalPayments.TYPE } : id, options)\n\t}\n\n\tasync order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `external_payments/${_externalPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `external_payments/${_externalPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options) as unknown as CustomerPaymentSource\n\t}\n\n\tasync versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisExternalPayment(resource: any): resource is ExternalPayment {\n\t\treturn resource.type && (resource.type === ExternalPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExternalPaymentRel {\n\t\treturn super.relationshipOneToOne<ExternalPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExternalPaymentRel[] {\n\t\treturn super.relationshipOneToMany<ExternalPaymentRel>(...ids)\n\t}\n\n\n\ttype(): ExternalPaymentType {\n\t\treturn ExternalPayments.TYPE\n\t}\n\n}\n\n\nconst instance = new ExternalPayments()\nexport default instance\n\nexport type { ExternalPayments, ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate, ExternalPaymentType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/stock_locations.ts"],"names":[],"mappings":";;;AAsHA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuB,WAA2B,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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 { StockLocations, StockLocation, StockLocationCreate, StockLocationUpdate, StockLocationType }\n"]}
1
+ {"version":3,"sources":["../src/resources/stock_locations.ts"],"names":[],"mappings":";;;AAsHA,IAAM,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","file":"chunk-3AOPII3W.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 { StockLocations, StockLocation, StockLocationCreate, StockLocationUpdate, StockLocationType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":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CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAU,OAAA,EAAA,QAAQ,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpG,EAEA,MAAM,QAAA,CAAS,OAAyB,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACrI,IAAM,MAAA,QAAA,GAAY,QAAkB,EAAM,IAAA,OAAA;AAC1C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAU,OAAA,EAAA,QAAQ,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1G,EAGA,QAAQ,QAAkC,EAAA;AACzC,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,OAAO,CAAA,IAAA;AAAA;AACnD,EAGA,aAAa,EAA0C,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAA+B,EAAE,CAAA;AAAA;AAC/C,EAEA,sBAAsB,GAA2B,EAAA;AAChD,IAAO,OAAA,KAAA,CAAM,qBAAgC,CAAA,GAAG,GAAG,CAAA;AAAA;AACpD,EAGA,IAAkB,GAAA;AACjB,IAAA,OAAO,OAAO,CAAA,IAAA;AAAA;AAGhB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,MAAO,EAAA;AAC5B,IAAO,cAAQ,GAAA","file":"chunk-3DFZ5QLR.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 { Market, MarketType } from './markets'\nimport type { Merchant, MerchantType } from './merchants'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Order } from './orders'\nimport type { PaymentMethod } from './payment_methods'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype StoreType = 'stores'\ntype StoreRel = ResourceRel & { type: StoreType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\n\n\nexport type StoreSort = Pick<Store, 'id' | 'name' | 'code'> & ResourceSort\n// export type StoreFilter = Pick<Store, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface Store extends Resource {\n\t\n\treadonly type: StoreType\n\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket?: Market | null\n\tmerchant?: Merchant | null\n\tstock_location?: StockLocation | null\n\torders?: Order[] | null\n\tpayment_methods?: PaymentMethod[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StoreCreate extends ResourceCreate {\n\t\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket: MarketRel\n\tmerchant?: MerchantRel | null\n\tstock_location?: StockLocationRel | null\n\n}\n\n\ninterface StoreUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket?: MarketRel | null\n\tmerchant?: MerchantRel | null\n\tstock_location?: StockLocationRel | null\n\n}\n\n\nclass Stores extends ApiResource<Store> {\n\n\tstatic readonly TYPE: StoreType = 'stores' as const\n\n\tasync create(resource: StoreCreate, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store> {\n\t\treturn this.resources.create<StoreCreate, Store>({ ...resource, type: Stores.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StoreUpdate, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store> {\n\t\treturn this.resources.update<StoreUpdate, Store>({ ...resource, type: Stores.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: Stores.TYPE } : id, options)\n\t}\n\n\tasync market(storeId: string | Store, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `stores/${_storeId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync merchant(storeId: string | Store, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `stores/${_storeId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync stock_location(storeId: string | Store, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stores/${_storeId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync orders(storeId: string | Store, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stores/${_storeId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync payment_methods(storeId: string | Store, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `stores/${_storeId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync events(storeId: string | Store, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stores/${_storeId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(storeId: string | Store, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stores/${_storeId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisStore(resource: any): resource is Store {\n\t\treturn resource.type && (resource.type === Stores.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StoreRel {\n\t\treturn super.relationshipOneToOne<StoreRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StoreRel[] {\n\t\treturn super.relationshipOneToMany<StoreRel>(...ids)\n\t}\n\n\n\ttype(): StoreType {\n\t\treturn Stores.TYPE\n\t}\n\n}\n\n\nconst instance = new Stores()\nexport default instance\n\nexport type { Stores, Store, StoreCreate, StoreUpdate, StoreType }\n"]}
1
+ {"version":3,"sources":["../src/resources/stores.ts"],"names":[],"mappings":";;;AA0FA,IAAM,MAAA,GAAN,MAAM,OAAA,SAAe,WAAA,CAAmB;AAAA,EAEvC,OAAgB,IAAA,GAAkB,QAAA;AAAA,EAElC,MAAM,MAAA,CAAO,QAAA,EAAuB,MAAA,EAAqC,OAAA,EAA2C;AACnH,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2B,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,OAAA,CAAO,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,MAAA,CAAO,QAAA,EAAuB,MAAA,EAAqC,OAAA,EAA2C;AACnH,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O,CAAA;AAAA;AAC1G,EAGA,QAAQ,QAAA,EAAkC;AACzC,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,OAAA,CAAO,IAAA;AAAA;AACnD,EAGA,aAAa,EAAA,EAA0C;AACtD,IAAA,OAAO,KAAA,CAAM,qBAA+B,EAAE,CAAA;AAAA;AAC/C,EAEA,sBAAsB,GAAA,EAA2B;AAChD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAgC,GAAG,GAAG,CAAA;AAAA;AACpD,EAGA,IAAA,GAAkB;AACjB,IAAA,OAAO,OAAA,CAAO,IAAA;AAAA;AAGhB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,MAAA,EAAO;AAC5B,IAAO,cAAA,GAAQ","file":"chunk-3DFZ5QLR.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 { Market, MarketType } from './markets'\nimport type { Merchant, MerchantType } from './merchants'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Order } from './orders'\nimport type { PaymentMethod } from './payment_methods'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype StoreType = 'stores'\ntype StoreRel = ResourceRel & { type: StoreType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\n\n\nexport type StoreSort = Pick<Store, 'id' | 'name' | 'code'> & ResourceSort\n// export type StoreFilter = Pick<Store, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface Store extends Resource {\n\t\n\treadonly type: StoreType\n\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket?: Market | null\n\tmerchant?: Merchant | null\n\tstock_location?: StockLocation | null\n\torders?: Order[] | null\n\tpayment_methods?: PaymentMethod[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StoreCreate extends ResourceCreate {\n\t\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket: MarketRel\n\tmerchant?: MerchantRel | null\n\tstock_location?: StockLocationRel | null\n\n}\n\n\ninterface StoreUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The store's internal name.\n\t * @example ```\"Rome Shop\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the store (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tmarket?: MarketRel | null\n\tmerchant?: MerchantRel | null\n\tstock_location?: StockLocationRel | null\n\n}\n\n\nclass Stores extends ApiResource<Store> {\n\n\tstatic readonly TYPE: StoreType = 'stores' as const\n\n\tasync create(resource: StoreCreate, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store> {\n\t\treturn this.resources.create<StoreCreate, Store>({ ...resource, type: Stores.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StoreUpdate, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store> {\n\t\treturn this.resources.update<StoreUpdate, Store>({ ...resource, type: Stores.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: Stores.TYPE } : id, options)\n\t}\n\n\tasync market(storeId: string | Store, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `stores/${_storeId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync merchant(storeId: string | Store, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `stores/${_storeId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync stock_location(storeId: string | Store, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stores/${_storeId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync orders(storeId: string | Store, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stores/${_storeId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync payment_methods(storeId: string | Store, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `stores/${_storeId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync events(storeId: string | Store, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stores/${_storeId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(storeId: string | Store, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _storeId = (storeId as Store).id || storeId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stores/${_storeId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisStore(resource: any): resource is Store {\n\t\treturn resource.type && (resource.type === Stores.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StoreRel {\n\t\treturn super.relationshipOneToOne<StoreRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StoreRel[] {\n\t\treturn super.relationshipOneToMany<StoreRel>(...ids)\n\t}\n\n\n\ttype(): StoreType {\n\t\treturn Stores.TYPE\n\t}\n\n}\n\n\nconst instance = new Stores()\nexport default instance\n\nexport type { Stores, Store, StoreCreate, StoreUpdate, StoreType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/gift_card_recipients.ts"],"names":[],"mappings":";;;AA2FA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,sBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CAAO,QAAmC,EAAA,MAAA,EAAiD,OAAuD,EAAA;AACvJ,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,mBAAmB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,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,mBAAA,CAAmB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAA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AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,mBAAmB,CAAA,IAAA;AAAA;AAG5B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,4BAAQ,GAAA","file":"chunk-3I5BJF3J.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 { Customer, CustomerType } from './customers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype GiftCardRecipientType = 'gift_card_recipients'\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type GiftCardRecipientSort = Pick<GiftCardRecipient, 'id' | 'email'> & ResourceSort\n// export type GiftCardRecipientFilter = Pick<GiftCardRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface GiftCardRecipient extends Resource {\n\t\n\treadonly type: GiftCardRecipientType\n\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardRecipientCreate extends ResourceCreate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface GiftCardRecipientUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass GiftCardRecipients extends ApiResource<GiftCardRecipient> {\n\n\tstatic readonly TYPE: GiftCardRecipientType = 'gift_card_recipients' as const\n\n\tasync create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.create<GiftCardRecipientCreate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.update<GiftCardRecipientUpdate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.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: GiftCardRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `gift_card_recipients/${_giftCardRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisGiftCardRecipient(resource: any): resource is GiftCardRecipient {\n\t\treturn resource.type && (resource.type === GiftCardRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRecipientRel {\n\t\treturn super.relationshipOneToOne<GiftCardRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRecipientRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRecipientRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardRecipientType {\n\t\treturn GiftCardRecipients.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCardRecipients()\nexport default instance\n\nexport type { GiftCardRecipients, GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate, GiftCardRecipientType }\n"]}
1
+ {"version":3,"sources":["../src/resources/gift_card_recipients.ts"],"names":[],"mappings":";;;AA2FA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAAA,CAA+B;AAAA,EAE/D,OAAgB,IAAA,GAA8B,sBAAA;AAAA,EAE9C,MAAM,MAAA,CAAO,QAAA,EAAmC,MAAA,EAAiD,OAAA,EAAuD;AACvJ,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAmD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,mBAAA,CAAmB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzI,EAEA,MAAM,MAAA,CAAO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Ae,EAAE,IAAA,EAAM,UAAA,EAAW,EAAG,CAAA,qBAAA,EAAwB,oBAAoB,CAAA,SAAA,CAAA,EAAa,MAAA,EAAQ,OAAO,CAAA;AAAA;AACpI,EAGA,oBAAoB,QAAA,EAA8C;AACjE,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,mBAAA,CAAmB,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAA,EAAsD;AAClE,IAAA,OAAO,KAAA,CAAM,qBAA2C,EAAE,CAAA;AAAA;AAC3D,EAEA,sBAAsB,GAAA,EAAuC;AAC5D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA4C,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAAA,GAA8B;AAC7B,IAAA,OAAO,mBAAA,CAAmB,IAAA;AAAA;AAG5B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,kBAAA,EAAmB;AACxC,IAAO,4BAAA,GAAQ","file":"chunk-3I5BJF3J.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 { Customer, CustomerType } from './customers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype GiftCardRecipientType = 'gift_card_recipients'\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type GiftCardRecipientSort = Pick<GiftCardRecipient, 'id' | 'email'> & ResourceSort\n// export type GiftCardRecipientFilter = Pick<GiftCardRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface GiftCardRecipient extends Resource {\n\t\n\treadonly type: GiftCardRecipientType\n\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardRecipientCreate extends ResourceCreate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface GiftCardRecipientUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The recipient email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The recipient first name.\n\t * @example ```\"John\"```\n\t */\n\tfirst_name?: string | null\n\t/** \n\t * The recipient last name.\n\t * @example ```\"Smith\"```\n\t */\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass GiftCardRecipients extends ApiResource<GiftCardRecipient> {\n\n\tstatic readonly TYPE: GiftCardRecipientType = 'gift_card_recipients' as const\n\n\tasync create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.create<GiftCardRecipientCreate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.update<GiftCardRecipientUpdate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.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: GiftCardRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `gift_card_recipients/${_giftCardRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisGiftCardRecipient(resource: any): resource is GiftCardRecipient {\n\t\treturn resource.type && (resource.type === GiftCardRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRecipientRel {\n\t\treturn super.relationshipOneToOne<GiftCardRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRecipientRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRecipientRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardRecipientType {\n\t\treturn GiftCardRecipients.TYPE\n\t}\n\n}\n\n\nconst instance = new GiftCardRecipients()\nexport default instance\n\nexport type { GiftCardRecipients, GiftCardRecipient, GiftCardRecipientCreate, GiftCardR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AAO,CAAA;AAAA;AACpJ,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,QAAQ,CAAA,IAAA;AAAA;AAGjB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"chunk-3N2MNKA3.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Capture } from './captures'\nimport type { Return } from './returns'\nimport type { AdyenPayment } from './adyen_payments'\nimport type { AxervePayment } from './axerve_payments'\nimport type { BraintreePayment } from './braintree_payments'\nimport type { CheckoutComPayment } from './checkout_com_payments'\nimport type { ExternalPayment } from './external_payments'\nimport type { KlarnaPayment } from './klarna_payments'\nimport type { PaypalPayment } from './paypal_payments'\nimport type { SatispayPayment } from './satispay_payments'\nimport type { StripePayment } from './stripe_payments'\nimport type { WireTransfer } from './wire_transfers'\n\n\ntype RefundType = 'refunds'\ntype RefundRel = ResourceRel & { type: RefundType }\n\n\nexport type RefundSort = Pick<Refund, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type RefundFilter = Pick<Refund, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Refund extends Resource {\n\t\n\treadonly type: RefundType\n\n\t/** \n\t * The transaction number, auto generated.\n\t * @example ```\"42/T/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The transaction amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The transaction amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The transaction amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded: boolean\n\t/** \n\t * The message returned by the payment gateway.\n\t * @example ```\"Accepted\"```\n\t */\n\tmessage?: string | null\n\t/** \n\t * The error code, if any, returned by the payment gateway.\n\t * @example ```\"00001\"```\n\t */\n\terror_code?: string | null\n\t/** \n\t * The error detail, if any, returned by the payment gateway.\n\t * @example ```\"Already settled\"```\n\t */\n\terror_detail?: string | null\n\t/** \n\t * The token identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * The ID identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tgateway_transaction_id?: string | null\n\n\torder?: Order | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_capture?: Capture | null\n\treturn?: Return | null\n\n}\n\n\ninterface RefundUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded?: boolean | null\n\t/** \n\t * Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly.\n\t * @example ```true```\n\t */\n\t_forward?: boolean | null\n\t\n}\n\n\nclass Refunds extends ApiResource<Refund> {\n\n\tstatic readonly TYPE: RefundType = 'refunds' as const\n\n\tasync update(resource: RefundUpdate, params?: QueryParamsRetrieve<Refund>, options?: ResourcesConfig): Promise<Refund> {\n\t\treturn this.resources.update<RefundUpdate, Refund>({ ...resource, type: Refunds.TYPE }, params, options)\n\t}\n\n\tasync order(refundId: string | Refund, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `refunds/${_refundId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(refundId: string | Refund, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `refunds/${_refundId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(refundId: string | Refund, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `refunds/${_refundId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(refundId: string | Refund, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `refunds/${_refundId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_capture(refundId: string | Refund, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `refunds/${_refundId}/reference_capture`, params, options) as unknown as Capture\n\t}\n\n\tasync return(refundId: string | Refund, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `refunds/${_refundId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync _forward(id: string | Refund, params?: QueryParamsRetrieve<Refund>, options?: ResourcesConfig): Promise<Refund> {\n\t\treturn this.resources.update<RefundUpdate, Refund>({ id: (typeof id === 'string')? id: id.id, type: Refunds.TYPE, _forward: true }, params, options)\n\t}\n\n\n\tisRefund(resource: any): resource is Refund {\n\t\treturn resource.type && (resource.type === Refunds.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): RefundRel {\n\t\treturn super.relationshipOneToOne<RefundRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): RefundRel[] {\n\t\treturn super.relationshipOneToMany<RefundRel>(...ids)\n\t}\n\n\n\ttype(): RefundType {\n\t\treturn Refunds.TYPE\n\t}\n\n}\n\n\nconst instance = new Refunds()\nexport default instance\n\nexport type { Refunds, Refund, RefundUpdate, RefundType }\n"]}
1
+ {"version":3,"sources":["../src/resources/refunds.ts"],"names":[],"mappings":";;;AAmHA,IAAM,OAAA,GAAN,MAAM,QAAA,SAAgB,WAAA,CAAoB;AAAA,EAEzC,OAAgB,IAAA,GAAmB,SAAA;AAAA,EAEnC,MAAM,MAAA,CAAO,QAAA,EAAwB,MAAA,EAAsC,OAAA,EAA4C;AACtH,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA6B,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,QAAA,CAAQ,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxG,EAEA,MAAM,KAAA,CAAM,QAAA,EAA2B,MAAA,EAAqC,OAAA,EAA2C;AACtH,IAAA,MAAM,SAAA,GAAa,SAAoB,EAAA,IAAM,QAAA;AAC7C,IAAA,OAAO,I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ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Capture } from './captures'\nimport type { Return } from './returns'\nimport type { AdyenPayment } from './adyen_payments'\nimport type { AxervePayment } from './axerve_payments'\nimport type { BraintreePayment } from './braintree_payments'\nimport type { CheckoutComPayment } from './checkout_com_payments'\nimport type { ExternalPayment } from './external_payments'\nimport type { KlarnaPayment } from './klarna_payments'\nimport type { PaypalPayment } from './paypal_payments'\nimport type { SatispayPayment } from './satispay_payments'\nimport type { StripePayment } from './stripe_payments'\nimport type { WireTransfer } from './wire_transfers'\n\n\ntype RefundType = 'refunds'\ntype RefundRel = ResourceRel & { type: RefundType }\n\n\nexport type RefundSort = Pick<Refund, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type RefundFilter = Pick<Refund, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Refund extends Resource {\n\t\n\treadonly type: RefundType\n\n\t/** \n\t * The transaction number, auto generated.\n\t * @example ```\"42/T/001\"```\n\t */\n\tnumber: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated order.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code: string\n\t/** \n\t * The transaction amount, in cents.\n\t * @example ```1500```\n\t */\n\tamount_cents: number\n\t/** \n\t * The transaction amount, float.\n\t * @example ```15```\n\t */\n\tamount_float: number\n\t/** \n\t * The transaction amount, formatted.\n\t * @example ```\"€15,00\"```\n\t */\n\tformatted_amount: string\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded: boolean\n\t/** \n\t * The message returned by the payment gateway.\n\t * @example ```\"Accepted\"```\n\t */\n\tmessage?: string | null\n\t/** \n\t * The error code, if any, returned by the payment gateway.\n\t * @example ```\"00001\"```\n\t */\n\terror_code?: string | null\n\t/** \n\t * The error detail, if any, returned by the payment gateway.\n\t * @example ```\"Already settled\"```\n\t */\n\terror_detail?: string | null\n\t/** \n\t * The token identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\ttoken?: string | null\n\t/** \n\t * The ID identifying the transaction, returned by the payment gateway.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tgateway_transaction_id?: string | null\n\n\torder?: Order | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_capture?: Capture | null\n\treturn?: Return | null\n\n}\n\n\ninterface RefundUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the transaction is successful.\n\t */\n\tsucceeded?: boolean | null\n\t/** \n\t * Send this attribute if you want to forward a stuck transaction to succeeded and update associated order states accordingly.\n\t * @example ```true```\n\t */\n\t_forward?: boolean | null\n\t\n}\n\n\nclass Refunds extends ApiResource<Refund> {\n\n\tstatic readonly TYPE: RefundType = 'refunds' as const\n\n\tasync update(resource: RefundUpdate, params?: QueryParamsRetrieve<Refund>, options?: ResourcesConfig): Promise<Refund> {\n\t\treturn this.resources.update<RefundUpdate, Refund>({ ...resource, type: Refunds.TYPE }, params, options)\n\t}\n\n\tasync order(refundId: string | Refund, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `refunds/${_refundId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(refundId: string | Refund, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `refunds/${_refundId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(refundId: string | Refund, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `refunds/${_refundId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(refundId: string | Refund, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `refunds/${_refundId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_capture(refundId: string | Refund, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `refunds/${_refundId}/reference_capture`, params, options) as unknown as Capture\n\t}\n\n\tasync return(refundId: string | Refund, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `refunds/${_refundId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync _forward(id: string | Refund, params?: QueryParamsRetrieve<Refund>, options?: ResourcesConfig): Promise<Refund> {\n\t\treturn this.resources.update<RefundUpdate, Refund>({ id: (typeof id === 'string')? id: id.id, type: Refunds.TYPE, _forward: true }, params, options)\n\t}\n\n\n\tisRefund(resource: any): resource is Refund {\n\t\treturn resource.type && (resource.type === Refunds.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): RefundRel {\n\t\treturn super.relationshipOneToOne<RefundRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): RefundRel[] {\n\t\treturn super.relationshipOneToMany<RefundRel>(...ids)\n\t}\n\n\n\ttype(): RefundType {\n\t\treturn Refunds.TYPE\n\t}\n\n}\n\n\nconst instance = new Refunds()\nexport default instance\n\nexport type { Refunds, Refund, RefundUpdate, RefundType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/pickups.ts"],"names":[],"mappings":";;;AAuCA,IAAM,OAAA,GAAN,MAAM,QAAA,SAAgB,WAAoB,CAAA;AAAA,EAEzC,OAAgB,IAAmB,GAAA,SAAA;AAAA,EAEnC,MAAM,QAAA,CAAS,QAA2B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC/H,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgB,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,OAAA,CAAQ,QAA2B,EAAA,MAAA,EAAkC,OAA0D,EAAA;AACpI,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAY,QAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACzG,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAiC,OAAyD,EAAA;AACjI,IAAM,MAAA,SAAA,GAAa,SAAoB,EAAM,IAAA,QAAA;AAC7C,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAa,EAAE,IAAA,EAAM,QAAS,EAAA,EAAG,CAAW,QAAA,EAAA,SAAS,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtG,EAGA,SAAS,QAAmC,EAAA;AAC3C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAQ,CAAA,IAAA;AAAA;AACpD,EAGA,aAAa,EAA2C,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAgC,EAAE,CAAA;AAAA;AAChD,EAEA,sBAAsB,GAA4B,EAAA;AACjD,IAAO,OAAA,KAAA,CAAM,qBAAiC,CAAA,GAAG,GAAG,CAAA;AAAA;AACrD,EAGA,IAAmB,GAAA;AAClB,IAAA,OAAO,QAAQ,CAAA,IAAA;AAAA;AAGjB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,OAAQ,EAAA;AAC7B,IAAO,eAAQ,GAAA","file":"chunk-3NWQH32A.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Shipment } from './shipments'\nimport type { Parcel } from './parcels'\nimport type { Event } from './events'\n\n\ntype PickupType = 'pickups'\ntype PickupRel = ResourceRel & { type: PickupType }\n\n\nexport type PickupSort = Pick<Pickup, 'id' | 'status'> & ResourceSort\n// export type PickupFilter = Pick<Pickup, 'id' | 'status'> & ResourceFilter\n\n\ninterface Pickup extends Resource {\n\t\n\treadonly type: PickupType\n\n\t/** \n\t * The pick up status.\n\t * @example ```\"unknown\"```\n\t */\n\tstatus?: string | null\n\t/** \n\t * The pick up service internal ID.\n\t * @example ```\"pickup_13e5d7e2a7824432a07975bc553944bc\"```\n\t */\n\tinternal_id: string\n\n\tshipment?: Shipment | null\n\tparcels?: Parcel[] | null\n\tevents?: Event[] | null\n\n}\n\n\nclass Pickups extends ApiResource<Pickup> {\n\n\tstatic readonly TYPE: PickupType = 'pickups' as const\n\n\tasync shipment(pickupId: string | Pickup, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `pickups/${_pickupId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync parcels(pickupId: string | Pickup, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `pickups/${_pickupId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync events(pickupId: string | Pickup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `pickups/${_pickupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPickup(resource: any): resource is Pickup {\n\t\treturn resource.type && (resource.type === Pickups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PickupRel {\n\t\treturn super.relationshipOneToOne<PickupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PickupRel[] {\n\t\treturn super.relationshipOneToMany<PickupRel>(...ids)\n\t}\n\n\n\ttype(): PickupType {\n\t\treturn Pickups.TYPE\n\t}\n\n}\n\n\nconst instance = new Pickups()\nexport default instance\n\nexport type { Pickups, Pickup, PickupType }\n"]}
1
+ {"version":3,"sources":["../src/resources/pickups.ts"],"names":[],"mappings":";;;AAuCA,IAAM,OAAA,GAAN,MAAM,QAAA,SAAgB,WAAA,CAAoB;AAAA,EAEzC,OAAgB,IAAA,GAAmB,SAAA;AAAA,EAEnC,MAAM,QAAA,CAAS,QAAA,EAA2B,MAAA,EAAwC,OAAA,EAA8C;AAC/H,IAAA,MAAM,SAAA,GAAa,SAAoB,EAAA,IAAM,QAAA;AAC7C,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAgB,EAAE,IAAA,EAAM,WAAA,EAAY,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ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Shipment } from './shipments'\nimport type { Parcel } from './parcels'\nimport type { Event } from './events'\n\n\ntype PickupType = 'pickups'\ntype PickupRel = ResourceRel & { type: PickupType }\n\n\nexport type PickupSort = Pick<Pickup, 'id' | 'status'> & ResourceSort\n// export type PickupFilter = Pick<Pickup, 'id' | 'status'> & ResourceFilter\n\n\ninterface Pickup extends Resource {\n\t\n\treadonly type: PickupType\n\n\t/** \n\t * The pick up status.\n\t * @example ```\"unknown\"```\n\t */\n\tstatus?: string | null\n\t/** \n\t * The pick up service internal ID.\n\t * @example ```\"pickup_13e5d7e2a7824432a07975bc553944bc\"```\n\t */\n\tinternal_id: string\n\n\tshipment?: Shipment | null\n\tparcels?: Parcel[] | null\n\tevents?: Event[] | null\n\n}\n\n\nclass Pickups extends ApiResource<Pickup> {\n\n\tstatic readonly TYPE: PickupType = 'pickups' as const\n\n\tasync shipment(pickupId: string | Pickup, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `pickups/${_pickupId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync parcels(pickupId: string | Pickup, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `pickups/${_pickupId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync events(pickupId: string | Pickup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _pickupId = (pickupId as Pickup).id || pickupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `pickups/${_pickupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPickup(resource: any): resource is Pickup {\n\t\treturn resource.type && (resource.type === Pickups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PickupRel {\n\t\treturn super.relationshipOneToOne<PickupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PickupRel[] {\n\t\treturn super.relationshipOneToMany<PickupRel>(...ids)\n\t}\n\n\n\ttype(): PickupType {\n\t\treturn Pickups.TYPE\n\t}\n\n}\n\n\nconst instance = new Pickups()\nexport default instance\n\nexport type { Pickups, Pickup, PickupType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/bing_geocoders.ts"],"names":[],"mappings":";;;AAkEA,IAAM,aAAA,GAAN,MAAM,cAAA,SAAsB,WAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,cAAc,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,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,CAAc,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,OAAA,CAAQ,cAAuC,EAAA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AAA;AAAA;AAGvB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"chunk-3OBFBFUV.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 { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype BingGeocoderType = 'bing_geocoders'\ntype BingGeocoderRel = ResourceRel & { type: BingGeocoderType }\n\n\nexport type BingGeocoderSort = Pick<BingGeocoder, 'id' | 'name'> & ResourceSort\n// export type BingGeocoderFilter = Pick<BingGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface BingGeocoder extends Resource {\n\t\n\treadonly type: BingGeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface BingGeocoderCreate extends ResourceCreate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\t/** \n\t * The Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey: string\n\t\n}\n\n\ninterface BingGeocoderUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey?: string | null\n\t\n}\n\n\nclass BingGeocoders extends ApiResource<BingGeocoder> {\n\n\tstatic readonly TYPE: BingGeocoderType = 'bing_geocoders' as const\n\n\tasync create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.create<BingGeocoderCreate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.update<BingGeocoderUpdate, BingGeocoder>({ ...resource, type: BingGeocoders.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: BingGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bing_geocoders/${_bingGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisBingGeocoder(resource: any): resource is BingGeocoder {\n\t\treturn resource.type && (resource.type === BingGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BingGeocoderRel {\n\t\treturn super.relationshipOneToOne<BingGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BingGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<BingGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): BingGeocoderType {\n\t\treturn BingGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new BingGeocoders()\nexport default instance\n\nexport type { BingGeocoders, BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate, BingGeocoderType }\n"]}
1
+ {"version":3,"sources":["../src/resources/bing_geocoders.ts"],"names":[],"mappings":";;;AAkEA,IAAM,aAAA,GAAN,MAAM,cAAA,SAAsB,WAAA,CAA0B;AAAA,EAErD,OAAgB,IAAA,GAAyB,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAAA,EAA8B,MAAA,EAA4C,OAAA,EAAkD;AACxI,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAyC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,cAAA,CAAc,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,QAAA,EAA8B,MAAA,EAA4C,OAAA,EAAkD;AACxI,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAyC,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,cAAA,CAAc,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC1H,EAEA,MAAM,MAAA,CAAO,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,cAAA,CAAc,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA;AACrG,EAEA,MAAM,OAAA,CAAQ,cAAA,EAAuC,MAAA,EAAkC,OAAA,EAA0D;AAChJ,IA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AAA,GAAW,IAAI,aAAA,EAAc;AACnC,IAAO,sBAAA,GAAQ","file":"chunk-3OBFBFUV.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 { Market } from './markets'\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype BingGeocoderType = 'bing_geocoders'\ntype BingGeocoderRel = ResourceRel & { type: BingGeocoderType }\n\n\nexport type BingGeocoderSort = Pick<BingGeocoder, 'id' | 'name'> & ResourceSort\n// export type BingGeocoderFilter = Pick<BingGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface BingGeocoder extends Resource {\n\t\n\treadonly type: BingGeocoderType\n\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\n\tmarkets?: Market[] | null\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface BingGeocoderCreate extends ResourceCreate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname: string\n\t/** \n\t * The Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey: string\n\t\n}\n\n\ninterface BingGeocoderUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The geocoder's internal name.\n\t * @example ```\"Default geocoder\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Bing Virtualearth key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tkey?: string | null\n\t\n}\n\n\nclass BingGeocoders extends ApiResource<BingGeocoder> {\n\n\tstatic readonly TYPE: BingGeocoderType = 'bing_geocoders' as const\n\n\tasync create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.create<BingGeocoderCreate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.update<BingGeocoderUpdate, BingGeocoder>({ ...resource, type: BingGeocoders.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: BingGeocoders.TYPE } : id, options)\n\t}\n\n\tasync markets(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bing_geocoders/${_bingGeocoderId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync addresses(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisBingGeocoder(resource: any): resource is BingGeocoder {\n\t\treturn resource.type && (resource.type === BingGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BingGeocoderRel {\n\t\treturn super.relationshipOneToOne<BingGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BingGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<BingGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): BingGeocoderType {\n\t\treturn BingGeocoders.TYPE\n\t}\n\n}\n\n\nconst instance = new BingGeocoders()\nexport default instance\n\nexport type { BingGeocoders, BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate, BingGeocoderType }\n"]}