@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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AAA;AAGd,CAAA;AAIA,IAAO,cAAQ,GAAA","file":"chunk-H4SVEI6E.js","sourcesContent":["import { ErrorType, SdkError, handleError, isExpiredTokenError } from './error'\nimport type { InterceptorManager } from './interceptor'\nimport config from './config'\nimport type { FetchResponse, FetchRequestOptions, FetchClientOptions, Fetch } from './fetch'\nimport { fetchURL } from './fetch'\nimport { extractTokenData, isTokenExpired } from './util'\n\n\nimport Debug from './debug'\nconst debug = Debug('client')\n\n\n\nconst baseURL = (organization: string, domain?: string): string => {\n\treturn `https://${organization.toLowerCase()}.${domain || config.default.domain}/api`\n}\n\n\n\ntype RequestParams = Record<string, string | number | boolean>\ntype RequestHeaders = Record<string, string>\n\n\nexport type RefreshToken = (expiredToken: string) => Promise<string>\n\ntype RequestConfig = {\n\ttimeout?: number\n\tparams?: RequestParams\n\theaders?: RequestHeaders\n\tuserAgent?: string\n\tfetch?: Fetch\n\trefreshToken?: RefreshToken\n}\n\n\ntype ApiConfig = {\n\torganization?: string\n\tdomain?: string\n\taccessToken: string\n}\n\ntype ApiClientInitConfig = ApiConfig & RequestConfig\ntype ApiClientConfig = Partial<ApiClientInitConfig>\n\n\nexport type Method = 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH'\n\n\n\nclass ApiClient {\n\n\tstatic create(options: ApiClientInitConfig): ApiClient {\n\n\t\t// Take organization and domain from access token if not defined by user\n\t\tif ((!options.organization || !options.domain) && options.accessToken) {\n\t\t\tconst tokenData = extractTokenData(options.accessToken)\n\t\t\tif (!options.organization && tokenData?.organization) options.organization = tokenData.organization\n\t\t\tif (!options.domain && tokenData?.domain) options.domain = tokenData.domain\n\t\t}\n\n\t\tfor (const attr of config.client.requiredAttributes)\n\t\t\tif (!options[attr]) throw new SdkError({ message: `Undefined '${attr}' parameter` })\n\t\treturn new ApiClient(options)\n\n\t}\n\n\n\t#baseUrl: string\n\t#accessToken: string\n\t#organization: string\n\t#domain?: string\n\treadonly #clientConfig: RequestConfig\n\treadonly #interceptors: InterceptorManager\n\n\n\tprivate constructor(options: ApiClientInitConfig) {\n\n\t\tdebug('new client instance %O', options)\n\n\t\tthis.#baseUrl = baseURL(options.organization ?? '', options.domain)\n\t\tthis.#accessToken = options.accessToken\n\t\tthis.#organization = options.organization ?? ''\t// organization is always defined\n\t\tthis.#domain = options.domain\n\n\t\tconst fetchConfig: RequestConfig = {\n\t\t\ttimeout: options.timeout || config.client.timeout,\n\t\t\tfetch: options.fetch,\n\t\t\trefreshToken: options.refreshToken\n\t\t}\n\n\t\t// Set custom headers\n\t\tconst customHeaders = this.customHeaders(options.headers)\n\n\t\t// Set headers\n\t\tconst headers: RequestHeaders = {\n\t\t\t...customHeaders,\n\t\t\t'Accept': 'application/vnd.api+json',\n\t\t\t'Content-Type': 'application/vnd.api+json',\n\t\t\t'Authorization': 'Bearer ' + this.#accessToken\n\t\t}\n\n\t\t// Set User-Agent\n\t\tif (options.userAgent) headers['User-Agent'] = options.userAgent\n\n\t\tfetchConfig.headers = headers\n\n\t\tthis.#clientConfig = fetchConfig\n\n\t\tdebug('fetch config: %O', fetchConfig)\n\n\t\t// Interceptors\n\t\tthis.#interceptors = {}\n\n\t}\n\n\n\tget interceptors(): InterceptorManager { return this.#interceptors }\n\n\tget requestHeaders(): RequestHeaders {\n\t\tif (!this.#clientConfig.headers) this.#clientConfig.headers = {}\n\t\treturn this.#clientConfig.headers\n\t}\n\n\n\t/*\n\tset requestHeaders(headers: RequestHeaders) {\n\t\tthis.#clientConfig.headers = { ...this.#clientConfig.headers, ...headers }\n\t}\n\t*/\n\n\n\tconfig(config: ApiClientConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\tconst def = this.#clientConfig\n\t\tif (!def.headers) def.headers = {}\n\n\t\t// Client config\n\t\tif (config.timeout) def.timeout = config.timeout\n\n\t\tif (config.userAgent) this.userAgent(config.userAgent)\n\t\tif (config.fetch) this.#clientConfig.fetch = config.fetch\n\t\tif (config.refreshToken) this.#clientConfig.refreshToken = config.refreshToken\n\n\t\t// API Client config\n\t\tif (config.organization || config.domain) this.#baseUrl = baseURL(config.organization || this.#organization, config.domain || this.#domain)\n\t\tif (config.organization) this.#organization = config.organization\n\t\tif (config.domain) this.#domain = config.domain\n\t\tif (config.accessToken) {\n\t\t\tthis.#accessToken = config.accessToken\n\t\t\tdef.headers.Authorization = 'Bearer ' + this.#accessToken\n\t\t}\n\t\tif (config.headers) def.headers = { ...def.headers, ...this.customHeaders(config.headers) }\n\n\t\treturn this\n\n\t}\n\n\n\tuserAgent(userAgent: string): this {\n\t\tif (userAgent) this.requestHeaders['User-Agent'] = userAgent\n\t\treturn this\n\t}\n\n\n\tasync request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<FetchResponse> {\n\n\t\tdebug('request %s %s, %O, %O', method, path, body || {}, options || {})\n\n\t\t// Ignored params (in debug mode)\n\t\tif (options?.userAgent) debug('User-Agent header ignored in request config')\n\n\t\t// URL\n\t\tconst baseUrl = options?.organization ? baseURL(options.organization, options.domain) : this.#baseUrl\n\t\tconst url = new URL(`${baseUrl}/${path}`)\n\n\t\t// Body\n\t\tconst bodyData = body ? JSON.stringify({ data: body }) : undefined\n\n\t\t// Headers\n\t\tconst headers = { ...this.requestHeaders, ...this.customHeaders(options?.headers) }\n\n\t\t// Access token\n\t\tconst accessToken = options?.accessToken || this.#accessToken\n\t\tif (accessToken) headers.Authorization = 'Bearer ' + accessToken\n\n\t\tconst refreshToken = options?.refreshToken || this.#clientConfig.refreshToken\n\t\tconst fetchFunction = options?.fetch || this.#clientConfig.fetch\n\n\t\tconst requestOptions: FetchRequestOptions = { method, body: bodyData, headers }\n\n\t\t// Timeout\n\t\tconst timeout = options?.timeout || this.#clientConfig.timeout\n\t\tif (timeout) {\n\t\t\tif (AbortSignal?.timeout) requestOptions.signal = AbortSignal.timeout(timeout)\n\t\t\telse debug('Timeout not set. Undefined function: %s', 'AbortSignal.timeout')\n\t\t}\n\n\t\tif (options?.params) Object.entries(options?.params).forEach(([name, value]) => { url.searchParams.append(name, String(value)) })\n\n\t\tconst clientOptions: FetchClientOptions = {\n\t\t\tinterceptors: this.interceptors,\n\t\t\tfetch: fetchFunction\n\t\t}\n\n\t\t// const start = Date.now()\n\t\ttry {\t// Execute api call\n\t\t\treturn await fetchURL(url, requestOptions, clientOptions).catch((error: Error) => handleError(error))\n\t\t} catch (err: any) {\t// Error executing api call\n\n\t\t\tif (isExpiredTokenError(err) && refreshToken && isTokenExpired(accessToken)) {\t// If token has expired and must be refreshed\n\n\t\t\t\tdebug('Access token has expired')\n\t\t\t\tconst newAccessToken = await refreshToken(this.#accessToken)\t// Refresh access token ...\n\t\t\t\t\t.catch((e: any) => {\t// Error refreshing access token\n\t\t\t\t\t\tdebug('Refresh token error: %s', e.message)\n\t\t\t\t\t\tconst tokenError = new SdkError({ message: 'Error refreshing access token', type: ErrorType.TOKEN_REFRESH })\n\t\t\t\t\t\ttokenError.source = e\n\t\t\t\t\t\tthrow tokenError\n\t\t\t\t\t})\n\n\t\t\t\tif (newAccessToken) {\t// ... set new access token in current config and repeat call\n\t\t\t\t\tdebug('Access token refreshed')\n\t\t\t\t\tthis.config({ accessToken: newAccessToken })\n\t\t\t\t\tthis.#accessToken = newAccessToken\n\t\t\t\t\tif (requestOptions.headers) (requestOptions.headers as Record<string, string>).Authorization = `Bearer ${newAccessToken}`\n\t\t\t\t\tconst response = await fetchURL(url, requestOptions, clientOptions).catch((error: Error) => handleError(error))\n\t\t\t\t\treturn response\n\t\t\t\t}\n\n\t\t\t} else throw err\n\n\t\t}\n\t\t// .finally(() => { console.log(`<<-- ${method} ${path} ${Date.now() - start}`) })\n\n\t}\n\n\n\tprivate customHeaders(headers?: RequestHeaders): RequestHeaders {\n\t\tconst customHeaders: RequestHeaders = {}\n\t\tif (headers) {\n\t\t\tfor (const [name, value] of Object.entries(headers))\n\t\t\t\tif (!['accept', 'content-type', 'authorization', 'user-agent'].includes(name.toLowerCase())) customHeaders[name] = value\n\t\t}\n\t\treturn customHeaders\n\t}\n\n\n\tget currentAccessToken(): string {\n\t\treturn this.#accessToken\n\t}\n\n\tget currentOrganization(): string {\n\t\treturn this.#organization\n\t}\n\n}\n\n\n\nexport default ApiClient\n\nexport type { ApiClientInitConfig, ApiClientConfig, RequestConfig }\n"]}
1
+ {"version":3,"sources":["../src/client.ts"],"names":[],"mappings":";;;;;;AASA,IAAM,KAAA,GAAQ,cAAM,QAAQ,CAAA;AAI5B,IAAM,OAAA,GAAU,CAAC,YAAA,EAAsB,MAAA,KAA4B;AAClE,EAAA,OAAO,CAAA,QAAA,EAAW,aAAa,WAAA,EAAa,IAAI,MAAA,IAAU,cAAA,CAAO,QAAQ,MAAM,CAAA,IAAA,CAAA;AAChF,CAAA;AAkCA,IAAM,SAAA,GAAN,MAAM,UAAA,CAAU;AAAA,EAEf,OAAO,OAAO,OAAA,EAAyC;AAGtD,IAAA,IAAA,CAAK,CAAC,OAAA,CAAQ,YAAA,IAAgB,CAAC,OAAA,CAAQ,MAAA,KAAW,QAAQ,WAAA,EAAa;AACtE,MAAA,MAAM,SAAA,GAAY,gBAAA,CAAiB,OAAA,CAAQ,WAAW,CAAA;AACtD,MAAA,IAAI,CAAC,OAAA,CAAQ,YAAA,IAAgB,WAAW,YAAA,EAAc,OAAA,CAAQ,eAAe,SAAA,CAAU,YAAA;AACvF,MAAA,IAAI,CAAC,OAAA,CAAQ,MAAA,IAAU,WAAW,MAAA,EAAQ,OAAA,CAAQ,SAAS,SAAA,CAAU,MAAA;AAAA;AAGtE,IAAA,KAAA,MAAW,IAAA,IAAQ,eAAO,MAAA,CAAO,kBAAA;AAChC,MAAA,IAAI,CAAC,OAAA,CAAQ,IAAI,CAAA,EAAG,MAAM,IAAI,QAAA,CAAS,EAAE,OAAA,EAAS,CAAA,WAAA,EAAc,IAAI,CAAA,WAAA,CAAA,EAAe,CAAA;AACpF,IAAA,OAAO,IAAI,WAAU,OAAO,CAAA;AAAA;AAE7B,EAGA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;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AA8B;AACjC,IAAA,OAAO,IAAA,CAAK,aAAA;AAAA;AAGd,CAAA;AAIA,IAAO,cAAA,GAAQ","file":"chunk-H4SVEI6E.js","sourcesContent":["import { ErrorType, SdkError, handleError, isExpiredTokenError } from './error'\nimport type { InterceptorManager } from './interceptor'\nimport config from './config'\nimport type { FetchResponse, FetchRequestOptions, FetchClientOptions, Fetch } from './fetch'\nimport { fetchURL } from './fetch'\nimport { extractTokenData, isTokenExpired } from './util'\n\n\nimport Debug from './debug'\nconst debug = Debug('client')\n\n\n\nconst baseURL = (organization: string, domain?: string): string => {\n\treturn `https://${organization.toLowerCase()}.${domain || config.default.domain}/api`\n}\n\n\n\ntype RequestParams = Record<string, string | number | boolean>\ntype RequestHeaders = Record<string, string>\n\n\nexport type RefreshToken = (expiredToken: string) => Promise<string>\n\ntype RequestConfig = {\n\ttimeout?: number\n\tparams?: RequestParams\n\theaders?: RequestHeaders\n\tuserAgent?: string\n\tfetch?: Fetch\n\trefreshToken?: RefreshToken\n}\n\n\ntype ApiConfig = {\n\torganization?: string\n\tdomain?: string\n\taccessToken: string\n}\n\ntype ApiClientInitConfig = ApiConfig & RequestConfig\ntype ApiClientConfig = Partial<ApiClientInitConfig>\n\n\nexport type Method = 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH'\n\n\n\nclass ApiClient {\n\n\tstatic create(options: ApiClientInitConfig): ApiClient {\n\n\t\t// Take organization and domain from access token if not defined by user\n\t\tif ((!options.organization || !options.domain) && options.accessToken) {\n\t\t\tconst tokenData = extractTokenData(options.accessToken)\n\t\t\tif (!options.organization && tokenData?.organization) options.organization = tokenData.organization\n\t\t\tif (!options.domain && tokenData?.domain) options.domain = tokenData.domain\n\t\t}\n\n\t\tfor (const attr of config.client.requiredAttributes)\n\t\t\tif (!options[attr]) throw new SdkError({ message: `Undefined '${attr}' parameter` })\n\t\treturn new ApiClient(options)\n\n\t}\n\n\n\t#baseUrl: string\n\t#accessToken: string\n\t#organization: string\n\t#domain?: string\n\treadonly #clientConfig: RequestConfig\n\treadonly #interceptors: InterceptorManager\n\n\n\tprivate constructor(options: ApiClientInitConfig) {\n\n\t\tdebug('new client instance %O', options)\n\n\t\tthis.#baseUrl = baseURL(options.organization ?? '', options.domain)\n\t\tthis.#accessToken = options.accessToken\n\t\tthis.#organization = options.organization ?? ''\t// organization is always defined\n\t\tthis.#domain = options.domain\n\n\t\tconst fetchConfig: RequestConfig = {\n\t\t\ttimeout: options.timeout || config.client.timeout,\n\t\t\tfetch: options.fetch,\n\t\t\trefreshToken: options.refreshToken\n\t\t}\n\n\t\t// Set custom headers\n\t\tconst customHeaders = this.customHeaders(options.headers)\n\n\t\t// Set headers\n\t\tconst headers: RequestHeaders = {\n\t\t\t...customHeaders,\n\t\t\t'Accept': 'application/vnd.api+json',\n\t\t\t'Content-Type': 'application/vnd.api+json',\n\t\t\t'Authorization': 'Bearer ' + this.#accessToken\n\t\t}\n\n\t\t// Set User-Agent\n\t\tif (options.userAgent) headers['User-Agent'] = options.userAgent\n\n\t\tfetchConfig.headers = headers\n\n\t\tthis.#clientConfig = fetchConfig\n\n\t\tdebug('fetch config: %O', fetchConfig)\n\n\t\t// Interceptors\n\t\tthis.#interceptors = {}\n\n\t}\n\n\n\tget interceptors(): InterceptorManager { return this.#interceptors }\n\n\tget requestHeaders(): RequestHeaders {\n\t\tif (!this.#clientConfig.headers) this.#clientConfig.headers = {}\n\t\treturn this.#clientConfig.headers\n\t}\n\n\n\t/*\n\tset requestHeaders(headers: RequestHeaders) {\n\t\tthis.#clientConfig.headers = { ...this.#clientConfig.headers, ...headers }\n\t}\n\t*/\n\n\n\tconfig(config: ApiClientConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\tconst def = this.#clientConfig\n\t\tif (!def.headers) def.headers = {}\n\n\t\t// Client config\n\t\tif (config.timeout) def.timeout = config.timeout\n\n\t\tif (config.userAgent) this.userAgent(config.userAgent)\n\t\tif (config.fetch) this.#clientConfig.fetch = config.fetch\n\t\tif (config.refreshToken) this.#clientConfig.refreshToken = config.refreshToken\n\n\t\t// API Client config\n\t\tif (config.organization || config.domain) this.#baseUrl = baseURL(config.organization || this.#organization, config.domain || this.#domain)\n\t\tif (config.organization) this.#organization = config.organization\n\t\tif (config.domain) this.#domain = config.domain\n\t\tif (config.accessToken) {\n\t\t\tthis.#accessToken = config.accessToken\n\t\t\tdef.headers.Authorization = 'Bearer ' + this.#accessToken\n\t\t}\n\t\tif (config.headers) def.headers = { ...def.headers, ...this.customHeaders(config.headers) }\n\n\t\treturn this\n\n\t}\n\n\n\tuserAgent(userAgent: string): this {\n\t\tif (userAgent) this.requestHeaders['User-Agent'] = userAgent\n\t\treturn this\n\t}\n\n\n\tasync request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<FetchResponse> {\n\n\t\tdebug('request %s %s, %O, %O', method, path, body || {}, options || {})\n\n\t\t// Ignored params (in debug mode)\n\t\tif (options?.userAgent) debug('User-Agent header ignored in request config')\n\n\t\t// URL\n\t\tconst baseUrl = options?.organization ? baseURL(options.organization, options.domain) : this.#baseUrl\n\t\tconst url = new URL(`${baseUrl}/${path}`)\n\n\t\t// Body\n\t\tconst bodyData = body ? JSON.stringify({ data: body }) : undefined\n\n\t\t// Headers\n\t\tconst headers = { ...this.requestHeaders, ...this.customHeaders(options?.headers) }\n\n\t\t// Access token\n\t\tconst accessToken = options?.accessToken || this.#accessToken\n\t\tif (accessToken) headers.Authorization = 'Bearer ' + accessToken\n\n\t\tconst refreshToken = options?.refreshToken || this.#clientConfig.refreshToken\n\t\tconst fetchFunction = options?.fetch || this.#clientConfig.fetch\n\n\t\tconst requestOptions: FetchRequestOptions = { method, body: bodyData, headers }\n\n\t\t// Timeout\n\t\tconst timeout = options?.timeout || this.#clientConfig.timeout\n\t\tif (timeout) {\n\t\t\tif (AbortSignal?.timeout) requestOptions.signal = AbortSignal.timeout(timeout)\n\t\t\telse debug('Timeout not set. Undefined function: %s', 'AbortSignal.timeout')\n\t\t}\n\n\t\tif (options?.params) Object.entries(options?.params).forEach(([name, value]) => { url.searchParams.append(name, String(value)) })\n\n\t\tconst clientOptions: FetchClientOptions = {\n\t\t\tinterceptors: this.interceptors,\n\t\t\tfetch: fetchFunction\n\t\t}\n\n\t\t// const start = Date.now()\n\t\ttry {\t// Execute api call\n\t\t\treturn await fetchURL(url, requestOptions, clientOptions).catch((error: Error) => handleError(error))\n\t\t} catch (err: any) {\t// Error executing api call\n\n\t\t\tif (isExpiredTokenError(err) && refreshToken && isTokenExpired(accessToken)) {\t// If token has expired and must be refreshed\n\n\t\t\t\tdebug('Access token has expired')\n\t\t\t\tconst newAccessToken = await refreshToken(this.#accessToken)\t// Refresh access token ...\n\t\t\t\t\t.catch((e: any) => {\t// Error refreshing access token\n\t\t\t\t\t\tdebug('Refresh token error: %s', e.message)\n\t\t\t\t\t\tconst tokenError = new SdkError({ message: 'Error refreshing access token', type: ErrorType.TOKEN_REFRESH })\n\t\t\t\t\t\ttokenError.source = e\n\t\t\t\t\t\tthrow tokenError\n\t\t\t\t\t})\n\n\t\t\t\tif (newAccessToken) {\t// ... set new access token in current config and repeat call\n\t\t\t\t\tdebug('Access token refreshed')\n\t\t\t\t\tthis.config({ accessToken: newAccessToken })\n\t\t\t\t\tthis.#accessToken = newAccessToken\n\t\t\t\t\tif (requestOptions.headers) (requestOptions.headers as Record<string, string>).Authorization = `Bearer ${newAccessToken}`\n\t\t\t\t\tconst response = await fetchURL(url, requestOptions, clientOptions).catch((error: Error) => handleError(error))\n\t\t\t\t\treturn response\n\t\t\t\t}\n\n\t\t\t} else throw err\n\n\t\t}\n\t\t// .finally(() => { console.log(`<<-- ${method} ${path} ${Date.now() - start}`) })\n\n\t}\n\n\n\tprivate customHeaders(headers?: RequestHeaders): RequestHeaders {\n\t\tconst customHeaders: RequestHeaders = {}\n\t\tif (headers) {\n\t\t\tfor (const [name, value] of Object.entries(headers))\n\t\t\t\tif (!['accept', 'content-type', 'authorization', 'user-agent'].includes(name.toLowerCase())) customHeaders[name] = value\n\t\t}\n\t\treturn customHeaders\n\t}\n\n\n\tget currentAccessToken(): string {\n\t\treturn this.#accessToken\n\t}\n\n\tget currentOrganization(): string {\n\t\treturn this.#organization\n\t}\n\n}\n\n\n\nexport default ApiClient\n\nexport type { ApiClientInitConfig, ApiClientConfig, RequestConfig }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/buy_x_pay_y_promotions.ts"],"names":[],"mappings":";;;AA0RA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,wBAAA;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,MAAM,MAAA,CAAO,mBAAiD,EAAA,MAAA,EAAsC,OAA4C,EAAA;AAC/I,IAAM,MAAA,oBAAA,GAAwB,oBAA0C,EAAM,IAAA,mBAAA;AAC9E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAA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B,GAAuC,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAA4C,CAAA,GAAG,GAAG,CAAA;AAAA;AAChE,EAGA,IAA8B,GAAA;AAC7B,IAAA,OAAO,mBAAmB,CAAA,IAAA;AAAA;AAG5B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,8BAAQ,GAAA","file":"chunk-HAAE23MQ.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 { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype BuyXPayYPromotionType = 'buy_x_pay_y_promotions'\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BuyXPayYPromotionSort = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceSort\n// export type BuyXPayYPromotionFilter = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceFilter\n\n\ninterface BuyXPayYPromotion extends Resource {\n\t\n\treadonly type: BuyXPayYPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx: number\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty: number\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface BuyXPayYPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx: number\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty: number\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BuyXPayYPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: 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\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx?: number | null\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty?: number | null\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass BuyXPayYPromotions extends ApiResource<BuyXPayYPromotion> {\n\n\tstatic readonly TYPE: BuyXPayYPromotionType = 'buy_x_pay_y_promotions' as const\n\n\tasync create(resource: BuyXPayYPromotionCreate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.create<BuyXPayYPromotionCreate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BuyXPayYPromotionUpdate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.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: BuyXPayYPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | BuyXPayYPromotion, triggerValue: string, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | BuyXPayYPromotion, triggerValue: string, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisBuyXPayYPromotion(resource: any): resource is BuyXPayYPromotion {\n\t\treturn resource.type && (resource.type === BuyXPayYPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BuyXPayYPromotionRel {\n\t\treturn super.relationshipOneToOne<BuyXPayYPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BuyXPayYPromotionRel[] {\n\t\treturn super.relationshipOneToMany<BuyXPayYPromotionRel>(...ids)\n\t}\n\n\n\ttype(): BuyXPayYPromotionType {\n\t\treturn BuyXPayYPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new BuyXPayYPromotions()\nexport default instance\n\nexport type { BuyXPayYPromotions, BuyXPayYPromotion, BuyXPayYPromotionCreate, BuyXPayYPromotionUpdate, BuyXPayYPromotionType }\n"]}
1
+ {"version":3,"sources":["../src/resources/buy_x_pay_y_promotions.ts"],"names":[],"mappings":";;;AA0RA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAAA,CAA+B;AAAA,EAE/D,OAAgB,IAAA,GAA8B,wBAAA;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,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,EAAA,EAAyB,OAAA,EAA0C;AAC/E,IAAA,MAAM,IAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,OAAO,EAAA,KAAO,QAAA,GAAW,EAAE,EAAA,EAAI,IAAA,EAAM,mBAAA,CAAmB,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAAM,MAAA,CAAO,mBAAA,EAAiD,MAAA,EAAsC,OAAA,EAA4C;AAC/I,IAAA,MAAM,oBAAA,GAAwB,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AClE,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,8BAAA,GAAQ","file":"chunk-HAAE23MQ.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 { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\nimport type { PromotionRule } from './promotion_rules'\n\n\ntype BuyXPayYPromotionType = 'buy_x_pay_y_promotions'\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BuyXPayYPromotionSort = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceSort\n// export type BuyXPayYPromotionFilter = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceFilter\n\n\ninterface BuyXPayYPromotion extends Resource {\n\t\n\treadonly type: BuyXPayYPromotionType\n\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * The number of times this promotion has been applied.\n\t * @example ```2```\n\t */\n\ttotal_usage_count?: number | null\n\t/** \n\t * Indicates if the promotion is active (enabled and not expired).\n\t * @example ```true```\n\t */\n\tactive?: boolean | null\n\t/** \n\t * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.\n\t * @example ```\"pending\"```\n\t */\n\tstatus?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx: number\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty: number\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface BuyXPayYPromotionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at: string\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at: string\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx: number\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty: number\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BuyXPayYPromotionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The promotion's internal name.\n\t * @example ```\"Personal promotion\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Indicates if the promotion will be applied exclusively, based on its priority score.\n\t * @example ```true```\n\t */\n\texclusive?: boolean | null\n\t/** \n\t * The priority assigned to the promotion (lower means higher priority).\n\t * @example ```2```\n\t */\n\tpriority?: number | null\n\t/** \n\t * The activation date/time of this promotion.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tstarts_at?: string | null\n\t/** \n\t * The expiration date/time of this promotion (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\t/** \n\t * The total number of times this promotion can be applied. When 'null' it means promotion can be applied infinite times.\n\t * @example ```5```\n\t */\n\ttotal_usage_limit?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: 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\t/** \n\t * The quantity which defines the threshold for free items (works by multiple of x).\n\t * @example ```3```\n\t */\n\tx?: number | null\n\t/** \n\t * The quantity which defines how many items you get for free, with the formula x-y.\n\t * @example ```2```\n\t */\n\ty?: number | null\n\t/** \n\t * Indicates if the cheapest items are discounted, allowing all of the SKUs in the associated list to be eligible for counting.\n\t * @example ```true```\n\t */\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass BuyXPayYPromotions extends ApiResource<BuyXPayYPromotion> {\n\n\tstatic readonly TYPE: BuyXPayYPromotionType = 'buy_x_pay_y_promotions' as const\n\n\tasync create(resource: BuyXPayYPromotionCreate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.create<BuyXPayYPromotionCreate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BuyXPayYPromotionUpdate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.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: BuyXPayYPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | BuyXPayYPromotion, triggerValue: string, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | BuyXPayYPromotion, triggerValue: string, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisBuyXPayYPromotion(resource: any): resource is BuyXPayYPromotion {\n\t\treturn resource.type && (resource.type === BuyXPayYPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BuyXPayYPromotionRel {\n\t\treturn super.relationshipOneToOne<BuyXPayYPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BuyXPayYPromotionRel[] {\n\t\treturn super.relationshipOneToMany<BuyXPayYPromotionRel>(...ids)\n\t}\n\n\n\ttype(): BuyXPayYPromotionType {\n\t\treturn BuyXPayYPromotions.TYPE\n\t}\n\n}\n\n\nconst instance = new BuyXPayYPromotions()\nexport default instance\n\nexport type { BuyXPayYPromotions, BuyXPayYPromotion, BuyXPayYPromotionCreate, BuyXPayYPromotionUpdate, BuyXPayYPromotionType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/avalara_accounts.ts"],"names":["ApiResource"],"mappings":";;;;;AAuIA,IAAM,eAAA,GAAN,MAAM,gBAAA,SAAwBA,6BAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAgC,EAAA,MAAA,EAA8C,OAAoD,EAAA;AAC9I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,gBAAgB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,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,gBAAA,CAAgB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACvG,EAEA,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MAAM,cAAA,CAAe,gBAA2C,EAAA,MAAA,EAAuC,OAA+D,EAAA;AACrK,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAmB,EAAE,IAAA,EAAM,gBAAiB,EAAA,EAAG,CAAoB,iBAAA,EAAA,iBAAiB,CAAmB,eAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7I,EAGA,iBAAiB,QAA2C,EAAA;AAC3D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,gBAAgB,CAAA,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAmD,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAoC,EAAA;AACzD,IAAO,OAAA,KAAA,CAAM,qBAAyC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAA2B,GAAA;AAC1B,IAAA,OAAO,gBAAgB,CAAA,IAAA;AAAA;AAGzB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,eAAgB,EAAA;AACrC,IAAO,wBAAQ,GAAA","file":"chunk-HBUDZOK7.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 { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AvalaraAccountType = 'avalara_accounts'\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AvalaraAccountSort = Pick<AvalaraAccount, 'id' | 'name'> & ResourceSort\n// export type AvalaraAccountFilter = Pick<AvalaraAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface AvalaraAccount extends Resource {\n\t\n\treadonly type: AvalaraAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface AvalaraAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface AvalaraAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername?: string | null\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass AvalaraAccounts extends ApiResource<AvalaraAccount> {\n\n\tstatic readonly TYPE: AvalaraAccountType = 'avalara_accounts' as const\n\n\tasync create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.create<AvalaraAccountCreate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.update<AvalaraAccountUpdate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.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: AvalaraAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `avalara_accounts/${_avalaraAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisAvalaraAccount(resource: any): resource is AvalaraAccount {\n\t\treturn resource.type && (resource.type === AvalaraAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AvalaraAccountRel {\n\t\treturn super.relationshipOneToOne<AvalaraAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AvalaraAccountRel[] {\n\t\treturn super.relationshipOneToMany<AvalaraAccountRel>(...ids)\n\t}\n\n\n\ttype(): AvalaraAccountType {\n\t\treturn AvalaraAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new AvalaraAccounts()\nexport default instance\n\nexport type { AvalaraAccounts, AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType }\n"]}
1
+ {"version":3,"sources":["../src/resources/avalara_accounts.ts"],"names":["ApiResource"],"mappings":";;;;;AAuIA,IAAM,eAAA,GAAN,MAAM,gBAAA,SAAwBA,6BAAA,CAA4B;AAAA,EAEzD,OAAgB,IAAA,GAA2B,kBAAA;AAAA,EAE3C,MAAM,MAAA,CAAO,QAAA,EAAgC,MAAA,EAA8C,OAAA,EAAoD;AAC9I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA6C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,gBAAA,CAAgB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,EAEA,MAAM,MAAA,CAAO,QAAA,EAAgC,MAAA,EAA8C,OAAA,EAAoD;AAC9I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA6C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,gBAAA,CAAgB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAChI,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,gBAAA,CAAgB,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA;AACvG,EAEA,MAAM,OAAA,CAAQ,gBAAA,EAA2C,MAAA,EAAkC,OAAA,EAA0D;AACpJ,IAAA,MAAM,iBAAA,GAAqB,iBAAoC,EAAA,IAAM,gBAAA;AACrE,IAAA,OAAO,IAAA,CAAK,SA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,CAAU,KAAA,CAAmB,EAAE,IAAA,EAAM,gBAAA,EAAiB,EAAG,CAAA,iBAAA,EAAoB,iBAAiB,CAAA,eAAA,CAAA,EAAmB,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7I,EAGA,iBAAiB,QAAA,EAA2C;AAC3D,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,gBAAA,CAAgB,IAAA;AAAA;AAC5D,EAGA,aAAa,EAAA,EAAmD;AAC/D,IAAA,OAAO,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA;AACxD,EAEA,sBAAsB,GAAA,EAAoC;AACzD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAyC,GAAG,GAAG,CAAA;AAAA;AAC7D,EAGA,IAAA,GAA2B;AAC1B,IAAA,OAAO,gBAAA,CAAgB,IAAA;AAAA;AAGzB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,eAAA,EAAgB;AACrC,IAAO,wBAAA,GAAQ","file":"chunk-HBUDZOK7.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 { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AvalaraAccountType = 'avalara_accounts'\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AvalaraAccountSort = Pick<AvalaraAccount, 'id' | 'name'> & ResourceSort\n// export type AvalaraAccountFilter = Pick<AvalaraAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface AvalaraAccount extends Resource {\n\t\n\treadonly type: AvalaraAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface AvalaraAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername: string\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword: string\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface AvalaraAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Avalara account username.\n\t * @example ```\"user@mydomain.com\"```\n\t */\n\tusername?: string | null\n\t/** \n\t * The Avalara account password.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * The Avalara company code.\n\t * @example ```\"MYCOMPANY\"```\n\t */\n\tcompany_code?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Avalara website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Indicates if the seller is responsible for paying/remitting the customs duty & import tax to the customs authorities.\n\t * @example ```true```\n\t */\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass AvalaraAccounts extends ApiResource<AvalaraAccount> {\n\n\tstatic readonly TYPE: AvalaraAccountType = 'avalara_accounts' as const\n\n\tasync create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.create<AvalaraAccountCreate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.update<AvalaraAccountUpdate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.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: AvalaraAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `avalara_accounts/${_avalaraAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisAvalaraAccount(resource: any): resource is AvalaraAccount {\n\t\treturn resource.type && (resource.type === AvalaraAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AvalaraAccountRel {\n\t\treturn super.relationshipOneToOne<AvalaraAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AvalaraAccountRel[] {\n\t\treturn super.relationshipOneToMany<AvalaraAccountRel>(...ids)\n\t}\n\n\n\ttype(): AvalaraAccountType {\n\t\treturn AvalaraAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new AvalaraAccounts()\nexport default instance\n\nexport type { AvalaraAccounts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AEA,MAAM,WAAA,CAAY,kBAA+C,EAAA,MAAA,EAAsC,OAA8D,EAAA;AACpK,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAkB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAgB,YAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3I,EAEA,MAAM,QAAA,CAAS,kBAA+C,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC3J,IAAM,MAAA,mBAAA,GAAuB,mBAAwC,EAAM,IAAA,kBAAA;AAC3E,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAuB,oBAAA,EAAA,mBAAmB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAGA,mBAAmB,QAA6C,EAAA;AAC/D,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,mBAAmB,CAAA,IAAA;AAAA;AAC/D,EAGA,aAAa,EAAqD,EAAA;AACjE,IAAO,OAAA,KAAA,CAAM,qBAA0C,EAAE,CAAA;AAAA;AAC1D,EAEA,sBAAsB,GAAsC,EAAA;AAC3D,IAAO,OAAA,KAAA,CAAM,qBAA2C,CAAA,GAAG,GAAG,CAAA;AAAA;AAC/D,EAGA,IAA6B,GAAA;AAC5B,IAAA,OAAO,mBAAmB,CAAA,IAAA;AAAA;AAG5B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,kBAAmB,EAAA;AACxC,IAAO,2BAAQ,GAAA","file":"chunk-HCBXRHD7.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 { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingCategoryType = 'shipping_categories'\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\n\n\nexport type ShippingCategorySort = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceSort\n// export type ShippingCategoryFilter = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface ShippingCategory extends Resource {\n\t\n\treadonly type: ShippingCategoryType\n\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface ShippingCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass ShippingCategories extends ApiResource<ShippingCategory> {\n\n\tstatic readonly TYPE: ShippingCategoryType = 'shipping_categories' as const\n\n\tasync create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.create<ShippingCategoryCreate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.update<ShippingCategoryUpdate, ShippingCategory>({ ...resource, type: ShippingCategories.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: ShippingCategories.TYPE } : id, options)\n\t}\n\n\tasync skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingCategory(resource: any): resource is ShippingCategory {\n\t\treturn resource.type && (resource.type === ShippingCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingCategoryRel {\n\t\treturn super.relationshipOneToOne<ShippingCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingCategoryRel[] {\n\t\treturn super.relationshipOneToMany<ShippingCategoryRel>(...ids)\n\t}\n\n\n\ttype(): ShippingCategoryType {\n\t\treturn ShippingCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingCategories()\nexport default instance\n\nexport type { ShippingCategories, ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate, ShippingCategoryType }\n"]}
1
+ {"version":3,"sources":["../src/resources/shipping_categories.ts"],"names":[],"mappings":";;;AAuEA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAAA,CAA8B;AAAA,EAE9D,OAAgB,IAAA,GAA6B,qBAAA;AAAA,EAE7C,MAAM,MAAA,CAAO,QAAA,EAAkC,MAAA,EAAgD,OAAA,EAAsD;AACpJ,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAiD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,mBAAA,CAAmB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvI,EAEA,MAAM,MAAA,CAAO,QAAA,EAAkC,MAAA,EAAgD,OAAA,EAAsD;AACpJ,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAiD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,mBAAA,CAAmB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AACvI,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,mBAAA,CAAmB,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA;AAC1G,EAEA,MAAM,IAAA,CAAK,kBAAA,EAA+C,MAAA,EAA+B,OAAA,EAAuD;AAC/I,IAAA,MAAM,mBAAA,GAAuB,mBAAwC,EAAA,IAAM,kBAAA;AAC3E,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAW,EAAE,IAAA,EAAM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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 { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingCategoryType = 'shipping_categories'\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\n\n\nexport type ShippingCategorySort = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceSort\n// export type ShippingCategoryFilter = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface ShippingCategory extends Resource {\n\t\n\treadonly type: ShippingCategoryType\n\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingCategoryCreate extends ResourceCreate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname: string\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\ninterface ShippingCategoryUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The shipping category name.\n\t * @example ```\"Merchandise\"```\n\t */\n\tname?: string | null\n\t/** \n\t * A string that you can use to identify the shipping category (must be unique within the environment).\n\t * @example ```\"europe1\"```\n\t */\n\tcode?: string | null\n\t\n}\n\n\nclass ShippingCategories extends ApiResource<ShippingCategory> {\n\n\tstatic readonly TYPE: ShippingCategoryType = 'shipping_categories' as const\n\n\tasync create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.create<ShippingCategoryCreate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.update<ShippingCategoryUpdate, ShippingCategory>({ ...resource, type: ShippingCategories.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: ShippingCategories.TYPE } : id, options)\n\t}\n\n\tasync skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingCategory(resource: any): resource is ShippingCategory {\n\t\treturn resource.type && (resource.type === ShippingCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingCategoryRel {\n\t\treturn super.relationshipOneToOne<ShippingCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingCategoryRel[] {\n\t\treturn super.relationshipOneToMany<ShippingCategoryRel>(...ids)\n\t}\n\n\n\ttype(): ShippingCategoryType {\n\t\treturn ShippingCategories.TYPE\n\t}\n\n}\n\n\nconst instance = new ShippingCategories()\nexport default instance\n\nexport type { ShippingCategories, ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate, ShippingCategoryType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/klarna_gateways.ts"],"names":[],"mappings":";;;AA2FA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuB,WAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAA+B,EAAA,MAAA,EAA6C,OAAmD,EAAA;AAC3I,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA2C,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,eAAe,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MAAM,IAAK,CAAA,SAAA,CAAU,MAAQ,CAAA,OAAO,EAAO,KAAA,QAAA,GAAW,EAAE,EAAA,EAAI,IAAM,EAAA,eAAA,CAAe,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACtG,EAEA,MAAM,eAAA,CAAgB,eAAyC,EAAA,MAAA,EAAyC,OAAiE,EAAA;AACxK,IAAM,MA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xB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"chunk-HDYENVKD.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\n\n\ntype KlarnaGatewayType = 'klarna_gateways'\ntype KlarnaGatewayRel = ResourceRel & { type: KlarnaGatewayType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\n\n\nexport type KlarnaGatewaySort = Pick<KlarnaGateway, 'id' | 'name'> & ResourceSort\n// export type KlarnaGatewayFilter = Pick<KlarnaGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface KlarnaGateway extends Resource {\n\t\n\treadonly type: KlarnaGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tklarna_payments?: KlarnaPayment[] | null\n\n}\n\n\ninterface KlarnaGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway country code one of EU, US, or OC.\n\t * @example ```\"EU\"```\n\t */\n\tcountry_code: string\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_secret: string\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\ninterface KlarnaGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway country code one of EU, US, or OC.\n\t * @example ```\"EU\"```\n\t */\n\tcountry_code?: string | null\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_secret?: string | null\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\nclass KlarnaGateways extends ApiResource<KlarnaGateway> {\n\n\tstatic readonly TYPE: KlarnaGatewayType = 'klarna_gateways' as const\n\n\tasync create(resource: KlarnaGatewayCreate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.create<KlarnaGatewayCreate, KlarnaGateway>({ ...resource, type: KlarnaGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.update<KlarnaGatewayUpdate, KlarnaGateway>({ ...resource, type: KlarnaGateways.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: KlarnaGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<KlarnaPayment>, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<KlarnaPayment>({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options) as unknown as ListResponse<KlarnaPayment>\n\t}\n\n\n\tisKlarnaGateway(resource: any): resource is KlarnaGateway {\n\t\treturn resource.type && (resource.type === KlarnaGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): KlarnaGatewayRel {\n\t\treturn super.relationshipOneToOne<KlarnaGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): KlarnaGatewayRel[] {\n\t\treturn super.relationshipOneToMany<KlarnaGatewayRel>(...ids)\n\t}\n\n\n\ttype(): KlarnaGatewayType {\n\t\treturn KlarnaGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new KlarnaGateways()\nexport default instance\n\nexport type { KlarnaGateways, KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate, KlarnaGatewayType }\n"]}
1
+ {"version":3,"sources":["../src/resources/klarna_gateways.ts"],"names":[],"mappings":";;;AA2FA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuB,WAAA,CAA2B;AAAA,EAEvD,OAAgB,IAAA,GAA0B,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAAA,EAA+B,MAAA,EAA6C,OAAA,EAAmD;AAC3I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2C,EAAE,GAAG,QAAA,E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MAAM,gBAAA,GAAoB,gBAAkC,EAAA,IAAM,eAAA;AAClE,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAA,EAAkB,EAAG,CAAA,gBAAA,EAAmB,gBAAgB,CAAA,gBAAA,CAAA,EAAoB,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/I,EAGA,gBAAgB,QAAA,EAA0C;AACzD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,eAAA,CAAe,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAA,EAAkD;AAC9D,IAAA,OAAO,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAA,EAAmC;AACxD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAwC,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAAA,GAA0B;AACzB,IAAA,OAAO,eAAA,CAAe,IAAA;AAAA;AAGxB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAA,EAAe;AACpC,IAAO,uBAAA,GAAQ","file":"chunk-HDYENVKD.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\n\n\ntype KlarnaGatewayType = 'klarna_gateways'\ntype KlarnaGatewayRel = ResourceRel & { type: KlarnaGatewayType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\n\n\nexport type KlarnaGatewaySort = Pick<KlarnaGateway, 'id' | 'name'> & ResourceSort\n// export type KlarnaGatewayFilter = Pick<KlarnaGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface KlarnaGateway extends Resource {\n\t\n\treadonly type: KlarnaGatewayType\n\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tklarna_payments?: KlarnaPayment[] | null\n\n}\n\n\ninterface KlarnaGatewayCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname: string\n\t/** \n\t * The gateway country code one of EU, US, or OC.\n\t * @example ```\"EU\"```\n\t */\n\tcountry_code: string\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_secret: string\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\ninterface KlarnaGatewayUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment gateway's internal name.\n\t * @example ```\"US payment gateway\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The gateway country code one of EU, US, or OC.\n\t * @example ```\"EU\"```\n\t */\n\tcountry_code?: string | null\n\t/** \n\t * The public key linked to your API credential.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_secret?: string | null\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\nclass KlarnaGateways extends ApiResource<KlarnaGateway> {\n\n\tstatic readonly TYPE: KlarnaGatewayType = 'klarna_gateways' as const\n\n\tasync create(resource: KlarnaGatewayCreate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.create<KlarnaGatewayCreate, KlarnaGateway>({ ...resource, type: KlarnaGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.update<KlarnaGatewayUpdate, KlarnaGateway>({ ...resource, type: KlarnaGateways.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: KlarnaGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<KlarnaPayment>, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<KlarnaPayment>({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options) as unknown as ListResponse<KlarnaPayment>\n\t}\n\n\n\tisKlarnaGateway(resource: any): resource is KlarnaGateway {\n\t\treturn resource.type && (resource.type === KlarnaGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): KlarnaGatewayRel {\n\t\treturn super.relationshipOneToOne<KlarnaGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): KlarnaGatewayRel[] {\n\t\treturn super.relationshipOneToMany<KlarnaGatewayRel>(...ids)\n\t}\n\n\n\ttype(): KlarnaGatewayType {\n\t\treturn KlarnaGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new KlarnaGateways()\nexport default instance\n\nexport type { KlarnaGateways, KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate, KlarnaGatewayType }\n"]}
@@ -57,5 +57,5 @@ var instance = new PaymentMethods();
57
57
  var payment_methods_default = instance;
58
58
 
59
59
  exports.payment_methods_default = payment_methods_default;
60
- //# sourceMappingURL=chunk-LEWK7QET.cjs.map
61
- //# sourceMappingURL=chunk-LEWK7QET.cjs.map
60
+ //# sourceMappingURL=chunk-HERQULAV.cjs.map
61
+ //# sourceMappingURL=chunk-HERQULAV.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/payment_methods.ts"],"names":["ApiResource"],"mappings":";;;;;AA8NA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAAA,CAA2B;AAAA,EAEvD,OAAgB,IAAA,GAA0B,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAAA,EAA+B,MAAA,EAA6C,OAAA,EAAmD;AAC3I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,eAAA,CAAe,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,QAAA,EAA+B,MAAA,EAA6C,OAAA,EAAmD;AAC3I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,eAAA,CAAe,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC7H,EAEA,MAAM,MAAA,CAAO,EAAA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M,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAA,EAAmC;AACxD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAwC,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAAA,GAA0B;AACzB,IAAA,OAAO,eAAA,CAAe,IAAA;AAAA;AAGxB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAA,EAAe;AACpC,IAAO,uBAAA,GAAQ","file":"chunk-HERQULAV.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 { Market, MarketType } from './markets'\nimport type { PaymentGateway, PaymentGatewayType } from './payment_gateways'\nimport type { Store, StoreType } from './stores'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PaymentMethodType = 'payment_methods'\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype PaymentGatewayRel = ResourceRel & { type: PaymentGatewayType }\ntype StoreRel = ResourceRel & { type: StoreType }\n\n\nexport type PaymentMethodSort = Pick<PaymentMethod, 'id' | 'name' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceSort\n// export type PaymentMethodFilter = Pick<PaymentMethod, 'id' | 'name' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceFilter\n\n\ninterface PaymentMethod extends Resource {\n\t\n\treadonly type: PaymentMethodType\n\n\t/** \n\t * The payment method's internal name.\n\t * @example ```\"Stripe Payment\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'.\n\t * @example ```\"stripe_payments\"```\n\t */\n\tpayment_source_type: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark the payment as MOTO, must be supported by payment gateway.\n\t */\n\tmoto?: boolean | null\n\t/** \n\t * Send this attribute if you want to require the payment capture before fulfillment.\n\t * @example ```true```\n\t */\n\trequire_capture?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically place the order upon authorization performed asynchronously.\n\t * @example ```true```\n\t */\n\tauto_place?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically capture the payment upon authorization.\n\t */\n\tauto_capture?: boolean | null\n\t/** \n\t * The payment method's price, in cents.\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * The payment method's price, float.\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The payment method's price, formatted.\n\t * @example ```\"€0,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * Send this attribute if you want to limit automatic capture to orders for which the total amount is equal or less than the specified value, in cents.\n\t */\n\tauto_capture_max_amount_cents?: number | null\n\t/** \n\t * The automatic capture max amount, float.\n\t */\n\tauto_capture_max_amount_float?: number | null\n\t/** \n\t * The automatic capture max amount, formatted.\n\t * @example ```\"€0,00\"```\n\t */\n\tformatted_auto_capture_max_amount?: string | null\n\t/** \n\t * Time at which this resource was disabled.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tdisabled_at?: string | null\n\n\tmarket?: Market | null\n\tpayment_gateway?: PaymentGateway | null\n\tstore?: Store | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PaymentMethodCreate extends ResourceCreate {\n\t\n\t/** \n\t * The payment method's internal name.\n\t * @example ```\"Stripe Payment\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'.\n\t * @example ```\"stripe_payments\"```\n\t */\n\tpayment_source_type: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers'\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark the payment as MOTO, must be supported by payment gateway.\n\t */\n\tmoto?: boolean | null\n\t/** \n\t * Send this attribute if you want to require the payment capture before fulfillment.\n\t * @example ```true```\n\t */\n\trequire_capture?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically place the order upon authorization performed asynchronously.\n\t * @example ```true```\n\t */\n\tauto_place?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically capture the payment upon authorization.\n\t */\n\tauto_capture?: boolean | null\n\t/** \n\t * The payment method's price, in cents.\n\t */\n\tprice_amount_cents: number\n\t/** \n\t * Send this attribute if you want to limit automatic capture to orders for which the total amount is equal or less than the specified value, in cents.\n\t */\n\tauto_capture_max_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tpayment_gateway: PaymentGatewayRel\n\tstore?: StoreRel | null\n\n}\n\n\ninterface PaymentMethodUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The payment method's internal name.\n\t * @example ```\"Stripe Payment\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'.\n\t * @example ```\"stripe_payments\"```\n\t */\n\tpayment_source_type?: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers' | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * Send this attribute if you want to mark the payment as MOTO, must be supported by payment gateway.\n\t */\n\tmoto?: boolean | null\n\t/** \n\t * Send this attribute if you want to require the payment capture before fulfillment.\n\t * @example ```true```\n\t */\n\trequire_capture?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically place the order upon authorization performed asynchronously.\n\t * @example ```true```\n\t */\n\tauto_place?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically capture the payment upon authorization.\n\t */\n\tauto_capture?: boolean | null\n\t/** \n\t * The payment method's price, in cents.\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to limit automatic capture to orders for which the total amount is equal or less than the specified value, in cents.\n\t */\n\tauto_capture_max_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to mark this resource as disabled.\n\t * @example ```true```\n\t */\n\t_disable?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this resource as enabled.\n\t * @example ```true```\n\t */\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tpayment_gateway?: PaymentGatewayRel | null\n\tstore?: StoreRel | null\n\n}\n\n\nclass PaymentMethods extends ApiResource<PaymentMethod> {\n\n\tstatic readonly TYPE: PaymentMethodType = 'payment_methods' as const\n\n\tasync create(resource: PaymentMethodCreate, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.create<PaymentMethodCreate, PaymentMethod>({ ...resource, type: PaymentMethods.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaymentMethodUpdate, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.update<PaymentMethodUpdate, PaymentMethod>({ ...resource, type: PaymentMethods.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: PaymentMethods.TYPE } : id, options)\n\t}\n\n\tasync market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `payment_methods/${_paymentMethodId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `payment_methods/${_paymentMethodId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync store(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<Store>({ type: 'stores' }, `payment_methods/${_paymentMethodId}/store`, params, options) as unknown as Store\n\t}\n\n\tasync attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `payment_methods/${_paymentMethodId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `payment_methods/${_paymentMethodId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.update<PaymentMethodUpdate, PaymentMethod>({ id: (typeof id === 'string')? id: id.id, type: PaymentMethods.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.update<PaymentMethodUpdate, PaymentMethod>({ id: (typeof id === 'string')? id: id.id, type: PaymentMethods.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPaymentMethod(resource: any): resource is PaymentMethod {\n\t\treturn resource.type && (resource.type === PaymentMethods.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaymentMethodRel {\n\t\treturn super.relationshipOneToOne<PaymentMethodRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaymentMethodRel[] {\n\t\treturn super.relationshipOneToMany<PaymentMethodRel>(...ids)\n\t}\n\n\n\ttype(): PaymentMethodType {\n\t\treturn PaymentMethods.TYPE\n\t}\n\n}\n\n\nconst instance = new PaymentMethods()\nexport default instance\n\nexport type { PaymentMethods, PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate, PaymentMethodType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/vertex_accounts.ts"],"names":["ApiResource"],"mappings":";;;;;AA0IA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA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AA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,eAAe,CAAA,IAAA;AAAA;AAGxB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"chunk-HNHF6T2I.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 { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype VertexAccountType = 'vertex_accounts'\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\n\n\nexport type VertexAccountSort = Pick<VertexAccount, 'id' | 'name'> & ResourceSort\n// export type VertexAccountFilter = Pick<VertexAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface VertexAccount extends Resource {\n\t\n\treadonly type: VertexAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Vertex account kind. One of 'cloud', 'on_demand', or 'on_premise'.\n\t * @example ```\"cloud\"```\n\t */\n\tkind?: 'cloud' | 'on_demand' | 'on_premise' | null\n\t/** \n\t * The Vertex API baseurl, optional for 'cloud' kind.\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t/** \n\t * The API endpoint as computed by specified kind and baseurl.\n\t * @example ```\"https://my_baseurl.ondemand.vertexinc.com\"```\n\t */\n\tapi_endpoint?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Vertex website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * The expiration date/time of the access token.\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\ttoken_expires_at?: string | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface VertexAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Vertex account kind. One of 'cloud', 'on_demand', or 'on_premise'.\n\t * @example ```\"cloud\"```\n\t */\n\tkind?: 'cloud' | 'on_demand' | 'on_premise' | null\n\t/** \n\t * The Vertex API baseurl, optional for 'cloud' kind.\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t/** \n\t * The Vertex account client ID.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_id: string\n\t/** \n\t * The Vertex account client secret.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_secret: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Vertex website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t\n}\n\n\ninterface VertexAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Vertex account kind. One of 'cloud', 'on_demand', or 'on_premise'.\n\t * @example ```\"cloud\"```\n\t */\n\tkind?: 'cloud' | 'on_demand' | 'on_premise' | null\n\t/** \n\t * The Vertex API baseurl, optional for 'cloud' kind.\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t/** \n\t * The Vertex account client ID.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_id?: string | null\n\t/** \n\t * The Vertex account client secret.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_secret?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Vertex website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Send this attribute if you want to manually refresh the access token.\n\t * @example ```true```\n\t */\n\t_refresh_token?: boolean | null\n\t\n}\n\n\nclass VertexAccounts extends ApiResource<VertexAccount> {\n\n\tstatic readonly TYPE: VertexAccountType = 'vertex_accounts' as const\n\n\tasync create(resource: VertexAccountCreate, params?: QueryParamsRetrieve<VertexAccount>, options?: ResourcesConfig): Promise<VertexAccount> {\n\t\treturn this.resources.create<VertexAccountCreate, VertexAccount>({ ...resource, type: VertexAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: VertexAccountUpdate, params?: QueryParamsRetrieve<VertexAccount>, options?: ResourcesConfig): Promise<VertexAccount> {\n\t\treturn this.resources.update<VertexAccountUpdate, VertexAccount>({ ...resource, type: VertexAccounts.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: VertexAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `vertex_accounts/${_vertexAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `vertex_accounts/${_vertexAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `vertex_accounts/${_vertexAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `vertex_accounts/${_vertexAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _refresh_token(id: string | VertexAccount, params?: QueryParamsRetrieve<VertexAccount>, options?: ResourcesConfig): Promise<VertexAccount> {\n\t\treturn this.resources.update<VertexAccountUpdate, VertexAccount>({ id: (typeof id === 'string')? id: id.id, type: VertexAccounts.TYPE, _refresh_token: true }, params, options)\n\t}\n\n\n\tisVertexAccount(resource: any): resource is VertexAccount {\n\t\treturn resource.type && (resource.type === VertexAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): VertexAccountRel {\n\t\treturn super.relationshipOneToOne<VertexAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): VertexAccountRel[] {\n\t\treturn super.relationshipOneToMany<VertexAccountRel>(...ids)\n\t}\n\n\n\ttype(): VertexAccountType {\n\t\treturn VertexAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new VertexAccounts()\nexport default instance\n\nexport type { VertexAccounts, VertexAccount, VertexAccountCreate, VertexAccountUpdate, VertexAccountType }\n"]}
1
+ {"version":3,"sources":["../src/resources/vertex_accounts.ts"],"names":["ApiResource"],"mappings":";;;;;AA0IA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAAA,CAA2B;AAAA,EAEvD,OAAgB,IAAA,GAA0B,iBAAA;AAAA,EAE1C,MAAM,MAAA,CAAO,QAAA,EAA+B,MAAA,EAA6C,OAAA,EAAmD;AAC3I,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2C,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,eAAA,CAAe,IAA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AAQ","file":"chunk-HNHF6T2I.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 { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype VertexAccountType = 'vertex_accounts'\ntype VertexAccountRel = ResourceRel & { type: VertexAccountType }\n\n\nexport type VertexAccountSort = Pick<VertexAccount, 'id' | 'name'> & ResourceSort\n// export type VertexAccountFilter = Pick<VertexAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface VertexAccount extends Resource {\n\t\n\treadonly type: VertexAccountType\n\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Vertex account kind. One of 'cloud', 'on_demand', or 'on_premise'.\n\t * @example ```\"cloud\"```\n\t */\n\tkind?: 'cloud' | 'on_demand' | 'on_premise' | null\n\t/** \n\t * The Vertex API baseurl, optional for 'cloud' kind.\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t/** \n\t * The API endpoint as computed by specified kind and baseurl.\n\t * @example ```\"https://my_baseurl.ondemand.vertexinc.com\"```\n\t */\n\tapi_endpoint?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Vertex website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * The expiration date/time of the access token.\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\ttoken_expires_at?: string | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface VertexAccountCreate extends ResourceCreate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname: string\n\t/** \n\t * The Vertex account kind. One of 'cloud', 'on_demand', or 'on_premise'.\n\t * @example ```\"cloud\"```\n\t */\n\tkind?: 'cloud' | 'on_demand' | 'on_premise' | null\n\t/** \n\t * The Vertex API baseurl, optional for 'cloud' kind.\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t/** \n\t * The Vertex account client ID.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_id: string\n\t/** \n\t * The Vertex account client secret.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_secret: string\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Vertex website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t\n}\n\n\ninterface VertexAccountUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The tax calculator's internal name.\n\t * @example ```\"Personal tax calculator\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The Vertex account kind. One of 'cloud', 'on_demand', or 'on_premise'.\n\t * @example ```\"cloud\"```\n\t */\n\tkind?: 'cloud' | 'on_demand' | 'on_premise' | null\n\t/** \n\t * The Vertex API baseurl, optional for 'cloud' kind.\n\t * @example ```\"yourbaseurl\"```\n\t */\n\tbaseurl?: string | null\n\t/** \n\t * The Vertex account client ID.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_id?: string | null\n\t/** \n\t * The Vertex account client secret.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tclient_secret?: string | null\n\t/** \n\t * Indicates if the transaction will be recorded and visible on the Vertex website.\n\t * @example ```true```\n\t */\n\tcommit_invoice?: boolean | null\n\t/** \n\t * Send this attribute if you want to manually refresh the access token.\n\t * @example ```true```\n\t */\n\t_refresh_token?: boolean | null\n\t\n}\n\n\nclass VertexAccounts extends ApiResource<VertexAccount> {\n\n\tstatic readonly TYPE: VertexAccountType = 'vertex_accounts' as const\n\n\tasync create(resource: VertexAccountCreate, params?: QueryParamsRetrieve<VertexAccount>, options?: ResourcesConfig): Promise<VertexAccount> {\n\t\treturn this.resources.create<VertexAccountCreate, VertexAccount>({ ...resource, type: VertexAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: VertexAccountUpdate, params?: QueryParamsRetrieve<VertexAccount>, options?: ResourcesConfig): Promise<VertexAccount> {\n\t\treturn this.resources.update<VertexAccountUpdate, VertexAccount>({ ...resource, type: VertexAccounts.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: VertexAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `vertex_accounts/${_vertexAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `vertex_accounts/${_vertexAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `vertex_accounts/${_vertexAccountId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(vertexAccountId: string | VertexAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _vertexAccountId = (vertexAccountId as VertexAccount).id || vertexAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `vertex_accounts/${_vertexAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _refresh_token(id: string | VertexAccount, params?: QueryParamsRetrieve<VertexAccount>, options?: ResourcesConfig): Promise<VertexAccount> {\n\t\treturn this.resources.update<VertexAccountUpdate, VertexAccount>({ id: (typeof id === 'string')? id: id.id, type: VertexAccounts.TYPE, _refresh_token: true }, params, options)\n\t}\n\n\n\tisVertexAccount(resource: any): resource is VertexAccount {\n\t\treturn resource.type && (resource.type === VertexAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): VertexAccountRel {\n\t\treturn super.relationshipOneToOne<VertexAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): VertexAccountRel[] {\n\t\treturn super.relationshipOneToMany<VertexAccountRel>(...ids)\n\t}\n\n\n\ttype(): VertexAccountType {\n\t\treturn VertexAccounts.TYPE\n\t}\n\n}\n\n\nconst instance = new VertexAccounts()\nexport default instance\n\nexport type { VertexAccounts, VertexAccount, VertexAccountCreate, VertexAccountUpdate, VertexAccountType }\n"]}
@@ -82,5 +82,5 @@ var instance = new LineItems();
82
82
  var line_items_default = instance;
83
83
 
84
84
  exports.line_items_default = line_items_default;
85
- //# sourceMappingURL=chunk-HQ35KQFG.cjs.map
86
- //# sourceMappingURL=chunk-HQ35KQFG.cjs.map
85
+ //# sourceMappingURL=chunk-HNONYIDO.cjs.map
86
+ //# sourceMappingURL=chunk-HNONYIDO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/line_items.ts"],"names":["ApiResource"],"mappings":";;;;;AA4YA,IAAM,SAAA,GAAN,MAAM,UAAA,SAAkBA,6BAAA,CAAsB;AAAA,EAE7C,OAAgB,IAAA,GAAqB,YAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAAA,EAA0B,MAAA,EAAwC,OAAA,EAA8C;AAC5H,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAi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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,kBAAA,GAAQ","file":"chunk-HNONYIDO.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 { LineItemOption } from './line_item_options'\nimport type { ReturnLineItem } from './return_line_items'\nimport type { StockReservation } from './stock_reservations'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { Notification } from './notifications'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Sku, SkuType } from './skus'\nimport type { Bundle, BundleType } from './bundles'\nimport type { GiftCard, GiftCardType } from './gift_cards'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { Adjustment, AdjustmentType } from './adjustments'\nimport type { DiscountEngineItem, DiscountEngineItemType } from './discount_engine_items'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FlexPromotion, FlexPromotionType } from './flex_promotions'\n\n\ntype LineItemType = 'line_items'\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype BundleRel = ResourceRel & { type: BundleType }\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdjustmentRel = ResourceRel & { type: AdjustmentType }\ntype DiscountEngineItemRel = ResourceRel & { type: DiscountEngineItemType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FlexPromotionRel = ResourceRel & { type: FlexPromotionType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type LineItemSort = Pick<LineItem, 'id' | 'currency_code' | 'unit_amount_cents' | 'compare_at_amount_cents' | 'options_amount_cents' | 'discount_cents' | 'total_amount_cents' | 'tax_amount_cents' | 'name' | 'item_type' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type LineItemFilter = Pick<LineItem, 'id' | 'sku_code' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'compare_at_amount_cents' | 'options_amount_cents' | 'discount_cents' | 'total_amount_cents' | 'tax_amount_cents' | 'name' | 'image_url' | 'item_type' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface LineItem extends Resource {\n\t\n\treadonly type: LineItemType\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 code of the associated bundle.\n\t * @example ```\"BUNDLEMM000000FFFFFFXLXX\"```\n\t */\n\tbundle_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\t/** \n\t * When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'.\n\t * @example ```true```\n\t */\n\t_external_price?: boolean | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the order's market.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.\n\t * @example ```10000```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The unit amount of the line item, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```100```\n\t */\n\tunit_amount_float?: number | null\n\t/** \n\t * The unit amount of the line item, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_unit_amount?: string | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The compared price amount, float.\n\t * @example ```130```\n\t */\n\tcompare_at_amount_float?: number | null\n\t/** \n\t * The compared price amount, formatted.\n\t * @example ```\"€130,00\"```\n\t */\n\tformatted_compare_at_amount?: string | null\n\t/** \n\t * The options amount of the line item, in cents. Cannot be passed by sales channels.\n\t * @example ```1000```\n\t */\n\toptions_amount_cents?: number | null\n\t/** \n\t * The options amount of the line item, float.\n\t * @example ```10```\n\t */\n\toptions_amount_float?: number | null\n\t/** \n\t * The options amount of the line item, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_options_amount?: string | null\n\t/** \n\t * The discount applied to the line item, in cents. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value.\n\t * @example ```-1000```\n\t */\n\tdiscount_cents?: number | null\n\t/** \n\t * The discount applied to the line item, float. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value.\n\t * @example ```10```\n\t */\n\tdiscount_float?: number | null\n\t/** \n\t * The discount applied to the line item, fromatted. When you apply a discount to an order, this is automatically calculated basing on the line item total_amount_cents value.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_discount?: string | null\n\t/** \n\t * Calculated as unit amount x quantity + options amount, in cents.\n\t * @example ```18800```\n\t */\n\ttotal_amount_cents?: number | null\n\t/** \n\t * Calculated as unit amount x quantity + options amount, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```188```\n\t */\n\ttotal_amount_float: number\n\t/** \n\t * Calculated as unit amount x quantity + options amount, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€188,00\"```\n\t */\n\tformatted_total_amount?: string | null\n\t/** \n\t * The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, in cents.\n\t * @example ```1880```\n\t */\n\ttax_amount_cents?: number | null\n\t/** \n\t * The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, float.\n\t * @example ```18.8```\n\t */\n\ttax_amount_float: number\n\t/** \n\t * The collected tax amount, otherwise calculated as total amount cents - discount cent * tax rate, formatted.\n\t * @example ```\"€18,80\"```\n\t */\n\tformatted_tax_amount?: string | null\n\t/** \n\t * The name of the line item. When blank, it gets populated with the name of the associated item (if present).\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only).\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The discount breakdown for this line item (if calculated).\n\t * @example ```{\"41\":{\"name\":\"10% ALL\",\"cents\":-900,\"weight\":0.416,\"coupon_code\":\"XXXXXXXX\"}}```\n\t */\n\tdiscount_breakdown?: Record<string, any> | null\n\t/** \n\t * The tax rate for this line item (if calculated).\n\t * @example ```0.22```\n\t */\n\ttax_rate?: number | null\n\t/** \n\t * The tax breakdown for this line item (if calculated).\n\t * @example ```{\"id\":\"1234\",\"city_amount\":\"0.0\",\"state_amount\":6.6,\"city_tax_rate\":0,\"county_amount\":2.78,\"taxable_amount\":139,\"county_tax_rate\":0.02,\"tax_collectable\":10.08,\"special_tax_rate\":0.005,\"combined_tax_rate\":0.0725,\"city_taxable_amount\":0,\"state_sales_tax_rate\":0.0475,\"state_taxable_amount\":139,\"county_taxable_amount\":139,\"special_district_amount\":0.7,\"special_district_taxable_amount\":139}```\n\t */\n\ttax_breakdown?: Record<string, any> | null\n\t/** \n\t * The type of the associated item. One of 'skus', 'bundles', 'gift_cards', 'shipments', 'payment_methods', 'adjustments', 'discount_engine_items', 'percentage_discount_promotions', 'free_shipping_promotions', 'buy_x_pay_y_promotions', 'free_gift_promotions', 'fixed_price_promotions', 'external_promotions', 'fixed_amount_promotions', or 'flex_promotions'.\n\t * @example ```\"skus\"```\n\t */\n\titem_type?: 'skus' | 'bundles' | 'gift_cards' | 'shipments' | 'payment_methods' | 'adjustments' | 'discount_engine_items' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'buy_x_pay_y_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | 'flex_promotions' | null\n\t/** \n\t * The frequency which generates a subscription. Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\t/** \n\t * The coupon code, if any, used to trigger this promotion line item. null for other line item types or if the promotion line item wasn't triggered by a coupon.\n\t * @example ```\"SUMMERDISCOUNT\"```\n\t */\n\tcoupon_code?: string | null\n\t/** \n\t * The rule outcomes.\n\t * @example ```[]```\n\t */\n\trule_outcomes?: Record<string, any> | null\n\t/** \n\t * The circuit breaker state, by default it is 'closed'. It can become 'open' once the number of consecutive failures overlaps the specified threshold, in such case no further calls to the failing callback are made.\n\t * @example ```\"closed\"```\n\t */\n\tcircuit_state?: string | null\n\t/** \n\t * The number of consecutive failures recorded by the circuit breaker associated to this resource, will be reset on first successful call to callback.\n\t * @example ```5```\n\t */\n\tcircuit_failure_count?: number | null\n\n\torder?: Order | null\n\titem?: Sku | Bundle | GiftCard | Shipment | PaymentMethod | Adjustment | DiscountEngineItem | PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tsku?: Sku | null\n\tbundle?: Bundle | null\n\tadjustment?: Adjustment | null\n\tgift_card?: GiftCard | null\n\tshipment?: Shipment | null\n\tpayment_method?: PaymentMethod | null\n\tline_item_options?: LineItemOption[] | null\n\treturn_line_items?: ReturnLineItem[] | null\n\tstock_reservations?: StockReservation[] | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tnotifications?: Notification[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface LineItemCreate 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 code of the associated bundle.\n\t * @example ```\"BUNDLEMM000000FFFFFFXLXX\"```\n\t */\n\tbundle_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\t/** \n\t * When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'.\n\t * @example ```true```\n\t */\n\t_external_price?: boolean | null\n\t/** \n\t * When creating a new line item, set this attribute to '1' if you want to update the line item quantity (if present) instead of creating a new line item for the same SKU.\n\t * @example ```true```\n\t */\n\t_update_quantity?: boolean | null\n\t/** \n\t * Send this attribute if you want to reserve the stock for the line item's SKUs quantity. Stock reservations expiration depends on the inventory model's cutoff. When used on update the existing active stock reservations are renewed. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.\n\t * @example ```10000```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The name of the line item. When blank, it gets populated with the name of the associated item (if present).\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only).\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The type of the associated item. One of 'skus', 'bundles', 'gift_cards', 'shipments', 'payment_methods', 'adjustments', 'discount_engine_items', 'percentage_discount_promotions', 'free_shipping_promotions', 'buy_x_pay_y_promotions', 'free_gift_promotions', 'fixed_price_promotions', 'external_promotions', 'fixed_amount_promotions', or 'flex_promotions'.\n\t * @example ```\"skus\"```\n\t */\n\titem_type?: 'skus' | 'bundles' | 'gift_cards' | 'shipments' | 'payment_methods' | 'adjustments' | 'discount_engine_items' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'buy_x_pay_y_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | 'flex_promotions' | null\n\t/** \n\t * The frequency which generates a subscription. Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\n\torder: OrderRel\n\titem?: SkuRel | BundleRel | GiftCardRel | ShipmentRel | PaymentMethodRel | AdjustmentRel | DiscountEngineItemRel | PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface LineItemUpdate 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 code of the associated bundle.\n\t * @example ```\"BUNDLEMM000000FFFFFFXLXX\"```\n\t */\n\tbundle_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity?: number | null\n\t/** \n\t * When creating or updating a new line item, set this attribute to '1' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to '0'.\n\t * @example ```true```\n\t */\n\t_external_price?: boolean | null\n\t/** \n\t * Send this attribute if you want to reserve the stock for the line item's SKUs quantity. Stock reservations expiration depends on the inventory model's cutoff. When used on update the existing active stock reservations are renewed. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * The unit amount of the line item, in cents. Can be specified only via an integration application, or when the item is missing, otherwise is automatically computed by using one of the available methods. Cannot be passed by sales channels.\n\t * @example ```10000```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The compared price amount, in cents. Useful to display a percentage discount.\n\t * @example ```13000```\n\t */\n\tcompare_at_amount_cents?: number | null\n\t/** \n\t * The options amount of the line item, in cents. Cannot be passed by sales channels.\n\t * @example ```1000```\n\t */\n\toptions_amount_cents?: number | null\n\t/** \n\t * The name of the line item. When blank, it gets populated with the name of the associated item (if present).\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The image_url of the line item. When blank, it gets populated with the image_url of the associated item (if present, SKU only).\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The frequency which generates a subscription. Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\t/** \n\t * Send this attribute if you want to reset the circuit breaker associated to this resource to 'closed' state and zero failures count. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reset_circuit?: 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\ttags?: TagRel[] | null\n\n}\n\n\nclass LineItems extends ApiResource<LineItem> {\n\n\tstatic readonly TYPE: LineItemType = 'line_items' as const\n\n\tasync create(resource: LineItemCreate, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.create<LineItemCreate, LineItem>({ ...resource, type: LineItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: LineItemUpdate, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ ...resource, type: LineItems.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: LineItems.TYPE } : id, options)\n\t}\n\n\tasync order(lineItemId: string | LineItem, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `line_items/${_lineItemId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync line_item_options(lineItemId: string | LineItem, params?: QueryParamsList<LineItemOption>, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<LineItemOption>({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options) as unknown as ListResponse<LineItemOption>\n\t}\n\n\tasync return_line_items(lineItemId: string | LineItem, params?: QueryParamsList<ReturnLineItem>, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<ReturnLineItem>({ type: 'return_line_items' }, `line_items/${_lineItemId}/return_line_items`, params, options) as unknown as ListResponse<ReturnLineItem>\n\t}\n\n\tasync stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `line_items/${_lineItemId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `line_items/${_lineItemId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync notifications(lineItemId: string | LineItem, params?: QueryParamsList<Notification>, options?: ResourcesConfig): Promise<ListResponse<Notification>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Notification>({ type: 'notifications' }, `line_items/${_lineItemId}/notifications`, params, options) as unknown as ListResponse<Notification>\n\t}\n\n\tasync events(lineItemId: string | LineItem, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `line_items/${_lineItemId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(lineItemId: string | LineItem, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `line_items/${_lineItemId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _external_price(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _external_price: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | LineItem, triggerValue: string, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisLineItem(resource: any): resource is LineItem {\n\t\treturn resource.type && (resource.type === LineItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): LineItemRel {\n\t\treturn super.relationshipOneToOne<LineItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): LineItemRel[] {\n\t\treturn super.relationshipOneToMany<LineItemRel>(...ids)\n\t}\n\n\n\ttype(): LineItemType {\n\t\treturn LineItems.TYPE\n\t}\n\n}\n\n\nconst instance = new LineItems()\nexport default instance\n\nexport type { LineItems, LineItem, LineItemCreate, LineItemUpdate, LineItemType }\n"]}