@commercelayer/sdk 7.0.0-rc.11 → 7.0.0-rc.13

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 (714) hide show
  1. package/lib/{api-Hgzs8bs4.d.ts → api-C7ddKOtt.d.ts} +119 -47
  2. package/lib/{api-DNeGwzrs.d.cts → api-DuTbl3z_.d.cts} +119 -47
  3. package/lib/api.cjs +42 -42
  4. package/lib/api.d.cts +1 -1
  5. package/lib/api.d.ts +1 -1
  6. package/lib/api.js +21 -21
  7. package/lib/bundle.cjs +44 -44
  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 +22 -22
  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-JRYILJJY.cjs → chunk-2VPJZZIF.cjs} +3 -3
  24. package/lib/chunk-2VPJZZIF.cjs.map +1 -0
  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-5U5QLF2Z.js → chunk-67KNILG6.js} +3 -3
  63. package/lib/chunk-67KNILG6.js.map +1 -0
  64. package/lib/chunk-67QVA2J3.cjs.map +1 -1
  65. package/lib/chunk-6AJSOS56.cjs.map +1 -1
  66. package/lib/chunk-6B66AQKB.cjs.map +1 -1
  67. package/lib/chunk-6OHA2TO3.cjs.map +1 -1
  68. package/lib/chunk-6SCAIB4K.cjs.map +1 -1
  69. package/lib/chunk-6SOWFGBP.cjs.map +1 -1
  70. package/lib/{chunk-EQD223JW.cjs → chunk-73PUROZG.cjs} +2 -2
  71. package/lib/chunk-73PUROZG.cjs.map +1 -0
  72. package/lib/chunk-7CQTUOR4.cjs.map +1 -1
  73. package/lib/chunk-7JLRB7QH.js.map +1 -1
  74. package/lib/{chunk-ANCLAYJV.cjs → chunk-7KY7C5RC.cjs} +2 -2
  75. package/lib/chunk-7KY7C5RC.cjs.map +1 -0
  76. package/lib/chunk-7SG4WU7W.js.map +1 -1
  77. package/lib/chunk-7SZY5BWE.js.map +1 -1
  78. package/lib/chunk-7VSYXEXL.js.map +1 -1
  79. package/lib/chunk-7Z2U4MHU.cjs.map +1 -1
  80. package/lib/chunk-A6BT5FSV.cjs.map +1 -1
  81. package/lib/chunk-A7BEMDVP.cjs.map +1 -1
  82. package/lib/chunk-AD73LDFJ.cjs.map +1 -1
  83. package/lib/{chunk-P3NADEGE.cjs → chunk-AGNIOGQC.cjs} +2 -2
  84. package/lib/chunk-AGNIOGQC.cjs.map +1 -0
  85. package/lib/chunk-AIGQRBCY.cjs.map +1 -1
  86. package/lib/chunk-AQFAND5D.cjs.map +1 -1
  87. package/lib/chunk-ARIBIRKF.cjs.map +1 -1
  88. package/lib/chunk-AW3TRBZ7.js.map +1 -1
  89. package/lib/{chunk-BF7OPORP.js → chunk-AWP3PHRS.js} +2 -2
  90. package/lib/chunk-AWP3PHRS.js.map +1 -0
  91. package/lib/chunk-AYTBSAHY.js.map +1 -1
  92. package/lib/chunk-B72FREUL.cjs.map +1 -1
  93. package/lib/{chunk-JN4JL4WT.cjs → chunk-BJYOKKGX.cjs} +2 -2
  94. package/lib/chunk-BJYOKKGX.cjs.map +1 -0
  95. package/lib/chunk-BN6XJAZH.cjs.map +1 -1
  96. package/lib/chunk-BTAKU6V5.cjs.map +1 -1
  97. package/lib/chunk-CG2ACHGS.js.map +1 -1
  98. package/lib/chunk-CHYP5F26.js.map +1 -1
  99. package/lib/chunk-CK6RZLVM.cjs.map +1 -1
  100. package/lib/chunk-CNCZCBI3.js.map +1 -1
  101. package/lib/chunk-CRRYP7ZN.js.map +1 -1
  102. package/lib/chunk-CTXBUDGO.cjs.map +1 -1
  103. package/lib/chunk-CUNOMS5N.js.map +1 -1
  104. package/lib/chunk-D26KDUDM.cjs.map +1 -1
  105. package/lib/chunk-D5E4OGXU.js.map +1 -1
  106. package/lib/chunk-D7KNSKNJ.js.map +1 -1
  107. package/lib/chunk-DAXKXBA3.js.map +1 -1
  108. package/lib/{chunk-465K3KVE.js → chunk-DGW3ZSW6.js} +2 -2
  109. package/lib/chunk-DGW3ZSW6.js.map +1 -0
  110. package/lib/chunk-DJ572MZB.cjs.map +1 -1
  111. package/lib/chunk-DOFPDQMJ.cjs.map +1 -1
  112. package/lib/chunk-DOGEZ6XX.cjs.map +1 -1
  113. package/lib/chunk-DSKZRVXS.js.map +1 -1
  114. package/lib/chunk-DYZGWPZ6.js.map +1 -1
  115. package/lib/{chunk-7ISS2FDY.js → chunk-DZLNYX4L.js} +2 -2
  116. package/lib/chunk-DZLNYX4L.js.map +1 -0
  117. package/lib/chunk-E3FDHGI7.js.map +1 -1
  118. package/lib/chunk-E4DYW6HB.cjs.map +1 -1
  119. package/lib/{chunk-ZFG533LP.js → chunk-E65GENXB.js} +2 -2
  120. package/lib/chunk-E65GENXB.js.map +1 -0
  121. package/lib/chunk-E6TBQVLK.cjs.map +1 -1
  122. package/lib/chunk-EADFDBOR.cjs.map +1 -1
  123. package/lib/chunk-ECMCBU3N.js.map +1 -1
  124. package/lib/chunk-EEFOL62K.js.map +1 -1
  125. package/lib/chunk-ELBOXOTA.js.map +1 -1
  126. package/lib/chunk-EP22KKHR.js.map +1 -1
  127. package/lib/chunk-EP7MAEQH.cjs.map +1 -1
  128. package/lib/{chunk-LCLXLB2R.cjs → chunk-ESMKOP42.cjs} +5 -2
  129. package/lib/chunk-ESMKOP42.cjs.map +1 -0
  130. package/lib/chunk-F6MSHDB7.cjs.map +1 -1
  131. package/lib/chunk-FAU5EILL.js.map +1 -1
  132. package/lib/{chunk-HLCGKY7R.js → chunk-FO7WBEPF.js} +2 -2
  133. package/lib/chunk-FO7WBEPF.js.map +1 -0
  134. package/lib/{chunk-HAAE23MQ.js → chunk-FRZBCW3D.js} +2 -2
  135. package/lib/chunk-FRZBCW3D.js.map +1 -0
  136. package/lib/chunk-FSFXOZ35.cjs.map +1 -1
  137. package/lib/chunk-FTAZDUH6.js.map +1 -1
  138. package/lib/chunk-FVJDRHG7.js.map +1 -1
  139. package/lib/{chunk-HSILJQCD.js → chunk-FWFGGAKV.js} +2 -2
  140. package/lib/chunk-FWFGGAKV.js.map +1 -0
  141. package/lib/chunk-FXE62CPP.cjs.map +1 -1
  142. package/lib/chunk-FYKIHWAM.cjs.map +1 -1
  143. package/lib/chunk-G74OZ4M6.js.map +1 -1
  144. package/lib/chunk-GD4WRDF2.js.map +1 -1
  145. package/lib/chunk-GE6OHQR6.cjs.map +1 -1
  146. package/lib/chunk-GHLCA7BX.js.map +1 -1
  147. package/lib/chunk-GLSPCG3M.cjs.map +1 -1
  148. package/lib/chunk-H2USYPU6.js.map +1 -1
  149. package/lib/chunk-H4PUXGNI.cjs.map +1 -1
  150. package/lib/chunk-H4SVEI6E.js.map +1 -1
  151. package/lib/chunk-HBUDZOK7.cjs.map +1 -1
  152. package/lib/chunk-HCBXRHD7.js.map +1 -1
  153. package/lib/chunk-HDYENVKD.js.map +1 -1
  154. package/lib/{chunk-LEWK7QET.cjs → chunk-HERQULAV.cjs} +2 -2
  155. package/lib/chunk-HERQULAV.cjs.map +1 -0
  156. package/lib/chunk-HNHF6T2I.cjs.map +1 -1
  157. package/lib/{chunk-HQ35KQFG.cjs → chunk-HNONYIDO.cjs} +2 -2
  158. package/lib/chunk-HNONYIDO.cjs.map +1 -0
  159. package/lib/chunk-HQ5STEMD.js.map +1 -1
  160. package/lib/chunk-HQ6TJSB7.cjs.map +1 -1
  161. package/lib/chunk-I3SKGXTB.cjs.map +1 -1
  162. package/lib/{chunk-BBEMCANC.cjs → chunk-I5KTGLTE.cjs} +2 -2
  163. package/lib/chunk-I5KTGLTE.cjs.map +1 -0
  164. package/lib/chunk-IITNQS6D.js.map +1 -1
  165. package/lib/chunk-IKENWSRH.cjs.map +1 -1
  166. package/lib/chunk-IKHD5UQP.cjs.map +1 -1
  167. package/lib/chunk-INJ7FRDA.cjs.map +1 -1
  168. package/lib/chunk-J4CTOHX6.cjs.map +1 -1
  169. package/lib/chunk-J6NBJHWL.cjs.map +1 -1
  170. package/lib/chunk-J6PTNG3D.js.map +1 -1
  171. package/lib/{chunk-ROPOLXIV.js → chunk-J6Z6ZR33.js} +2 -2
  172. package/lib/chunk-J6Z6ZR33.js.map +1 -0
  173. package/lib/chunk-J7ZSBB35.js.map +1 -1
  174. package/lib/chunk-JAQECLCE.js.map +1 -1
  175. package/lib/chunk-JECYKPCC.cjs.map +1 -1
  176. package/lib/chunk-JPUF5YXX.js.map +1 -1
  177. package/lib/chunk-JRTJ6LWK.js.map +1 -1
  178. package/lib/chunk-JT7HVLLW.cjs.map +1 -1
  179. package/lib/chunk-JVF5KY2J.cjs.map +1 -1
  180. package/lib/chunk-JWC2GSYH.cjs.map +1 -1
  181. package/lib/chunk-JYOFP6BM.js.map +1 -1
  182. package/lib/chunk-JYXAF775.js.map +1 -1
  183. package/lib/chunk-K2CU5HIV.js.map +1 -1
  184. package/lib/chunk-K6WSCQKS.cjs.map +1 -1
  185. package/lib/chunk-KH5OQRQL.js.map +1 -1
  186. package/lib/{chunk-7X36B7N6.js → chunk-KITKWF6F.js} +2 -2
  187. package/lib/chunk-KITKWF6F.js.map +1 -0
  188. package/lib/{chunk-KBN3FFXD.cjs → chunk-KPRWSW6P.cjs} +2 -2
  189. package/lib/chunk-KPRWSW6P.cjs.map +1 -0
  190. package/lib/{chunk-7GVHCOUC.js → chunk-KU5U6DTU.js} +2 -2
  191. package/lib/chunk-KU5U6DTU.js.map +1 -0
  192. package/lib/chunk-KWRDUU7K.js.map +1 -1
  193. package/lib/{chunk-DTGODPCN.js → chunk-KYZ4CKIR.js} +2 -2
  194. package/lib/chunk-KYZ4CKIR.js.map +1 -0
  195. package/lib/{chunk-EHWAGYNX.js → chunk-KZ75CT2Q.js} +2 -2
  196. package/lib/chunk-KZ75CT2Q.js.map +1 -0
  197. package/lib/chunk-L4LPS3DV.cjs.map +1 -1
  198. package/lib/chunk-L4TDKOAC.js.map +1 -1
  199. package/lib/{chunk-INZD34YD.cjs → chunk-L5FMOT44.cjs} +2 -2
  200. package/lib/chunk-L5FMOT44.cjs.map +1 -0
  201. package/lib/chunk-L5NEDGXK.js.map +1 -1
  202. package/lib/chunk-L6IGO47T.js.map +1 -1
  203. package/lib/chunk-LCNT6GY3.js.map +1 -1
  204. package/lib/chunk-LIT4FEIU.cjs.map +1 -1
  205. package/lib/chunk-LJ2EP6AL.cjs.map +1 -1
  206. package/lib/{chunk-WBPEFNL7.cjs → chunk-LJFBPFPR.cjs} +2 -2
  207. package/lib/chunk-LJFBPFPR.cjs.map +1 -0
  208. package/lib/chunk-LNMY5BDT.js.map +1 -1
  209. package/lib/chunk-LTLMRGB7.js.map +1 -1
  210. package/lib/chunk-MADGMICB.js.map +1 -1
  211. package/lib/{chunk-VDZUWCIN.cjs → chunk-MCGX2ZDC.cjs} +2 -2
  212. package/lib/chunk-MCGX2ZDC.cjs.map +1 -0
  213. package/lib/chunk-MJRMRWP3.js.map +1 -1
  214. package/lib/chunk-MQZSDICO.cjs.map +1 -1
  215. package/lib/chunk-MUPRLXGP.js.map +1 -1
  216. package/lib/chunk-MWYBER5I.cjs.map +1 -1
  217. package/lib/chunk-MZNHRIXE.js.map +1 -1
  218. package/lib/chunk-N4P7A3RY.js.map +1 -1
  219. package/lib/chunk-N753UD4K.cjs.map +1 -1
  220. package/lib/chunk-NAWKHFBZ.js.map +1 -1
  221. package/lib/chunk-NBYV35R4.cjs.map +1 -1
  222. package/lib/chunk-NDPDO54G.js.map +1 -1
  223. package/lib/chunk-NEC22ZSI.cjs.map +1 -1
  224. package/lib/{chunk-OPQJPXLM.cjs → chunk-NIHOABAW.cjs} +2 -2
  225. package/lib/chunk-NIHOABAW.cjs.map +1 -0
  226. package/lib/chunk-NJYMO7FP.cjs.map +1 -1
  227. package/lib/chunk-NODKE6P4.js.map +1 -1
  228. package/lib/{chunk-6PWK52UZ.cjs → chunk-NYS7N44P.cjs} +2 -2
  229. package/lib/chunk-NYS7N44P.cjs.map +1 -0
  230. package/lib/chunk-OGLS27LJ.js.map +1 -1
  231. package/lib/chunk-OYFNK2SE.cjs.map +1 -1
  232. package/lib/chunk-PEU5GGGE.js.map +1 -1
  233. package/lib/{chunk-M2ZERG2X.cjs → chunk-PGZTQAOR.cjs} +2 -2
  234. package/lib/chunk-PGZTQAOR.cjs.map +1 -0
  235. package/lib/chunk-PNSVP3KP.cjs.map +1 -1
  236. package/lib/chunk-PQS6KXZ2.cjs.map +1 -1
  237. package/lib/chunk-PV7MUP5Z.js.map +1 -1
  238. package/lib/chunk-PZZLLHJP.js.map +1 -1
  239. package/lib/chunk-Q2ZSQM7I.js.map +1 -1
  240. package/lib/chunk-Q66HILUF.js.map +1 -1
  241. package/lib/chunk-Q66JEOCJ.cjs.map +1 -1
  242. package/lib/chunk-Q7YHSPJL.js.map +1 -1
  243. package/lib/chunk-QGE4ELJO.cjs.map +1 -1
  244. package/lib/chunk-QK5MFD4L.js.map +1 -1
  245. package/lib/chunk-QK7D6L3W.js.map +1 -1
  246. package/lib/chunk-QYDOENWU.cjs.map +1 -1
  247. package/lib/chunk-QZTNLPOD.cjs.map +1 -1
  248. package/lib/chunk-QZWQNPKC.js.map +1 -1
  249. package/lib/chunk-R2LRLUUY.js.map +1 -1
  250. package/lib/chunk-R755X3AG.cjs.map +1 -1
  251. package/lib/chunk-RHARO4TQ.cjs.map +1 -1
  252. package/lib/{chunk-QHRQCFDB.js → chunk-RL7Y22OT.js} +2 -2
  253. package/lib/chunk-RL7Y22OT.js.map +1 -0
  254. package/lib/chunk-RT7XLEV6.js.map +1 -1
  255. package/lib/chunk-RTDD2NRL.cjs.map +1 -1
  256. package/lib/chunk-RTGW34KX.cjs.map +1 -1
  257. package/lib/{chunk-M55NSZVW.js → chunk-S4GBVQLI.js} +3 -3
  258. package/lib/chunk-S4GBVQLI.js.map +1 -0
  259. package/lib/{chunk-MPSHBMZS.js → chunk-SDRMBCHM.js} +2 -2
  260. package/lib/chunk-SDRMBCHM.js.map +1 -0
  261. package/lib/chunk-SGOUEVJ3.cjs.map +1 -1
  262. package/lib/chunk-SGWRNEJB.cjs.map +1 -1
  263. package/lib/chunk-SKFA2ZIK.js.map +1 -1
  264. package/lib/chunk-SOXJJRL2.js.map +1 -1
  265. package/lib/chunk-SPLHKBWG.cjs.map +1 -1
  266. package/lib/chunk-SRW7OWVS.cjs.map +1 -1
  267. package/lib/chunk-SUJCEUOZ.cjs.map +1 -1
  268. package/lib/chunk-SWWPX4V4.cjs.map +1 -1
  269. package/lib/chunk-THO6KQJZ.js.map +1 -1
  270. package/lib/chunk-THVPSJTK.cjs.map +1 -1
  271. package/lib/chunk-TIJIXGNJ.cjs.map +1 -1
  272. package/lib/chunk-TM5OCFYV.cjs.map +1 -1
  273. package/lib/{chunk-FKDKRSPO.js → chunk-TOV6ECTA.js} +2 -2
  274. package/lib/chunk-TOV6ECTA.js.map +1 -0
  275. package/lib/chunk-TQFODT4D.cjs.map +1 -1
  276. package/lib/chunk-TSD2PK6H.js.map +1 -1
  277. package/lib/chunk-TSLXKI72.js.map +1 -1
  278. package/lib/chunk-U5FTZYJJ.js.map +1 -1
  279. package/lib/chunk-U6PW4AZV.js.map +1 -1
  280. package/lib/chunk-UB6JC3W7.js.map +1 -1
  281. package/lib/chunk-UBXNH6J3.js.map +1 -1
  282. package/lib/chunk-UP7FR6HD.cjs.map +1 -1
  283. package/lib/{chunk-NJQDJCFB.cjs → chunk-UROMLQDG.cjs} +2 -2
  284. package/lib/chunk-UROMLQDG.cjs.map +1 -0
  285. package/lib/chunk-VNWOCO65.cjs.map +1 -1
  286. package/lib/chunk-VPXMI42G.cjs.map +1 -1
  287. package/lib/chunk-VRFSITD3.js.map +1 -1
  288. package/lib/chunk-VUCYIRSC.cjs.map +1 -1
  289. package/lib/{chunk-EKGR3EB3.js → chunk-W6YJDUYD.js} +2 -2
  290. package/lib/chunk-W6YJDUYD.js.map +1 -0
  291. package/lib/chunk-WAL76UPE.cjs.map +1 -1
  292. package/lib/{chunk-KJAD45RP.cjs → chunk-WC4Z7ENS.cjs} +2 -2
  293. package/lib/chunk-WC4Z7ENS.cjs.map +1 -0
  294. package/lib/{chunk-BOPK7T5K.js → chunk-WI5IVLYL.js} +2 -2
  295. package/lib/chunk-WI5IVLYL.js.map +1 -0
  296. package/lib/chunk-WKN5RLNR.js.map +1 -1
  297. package/lib/chunk-WP3L72CW.js.map +1 -1
  298. package/lib/chunk-WTHX574O.js.map +1 -1
  299. package/lib/{chunk-JENLN6VJ.js → chunk-WVKEXOIY.js} +5 -2
  300. package/lib/chunk-WVKEXOIY.js.map +1 -0
  301. package/lib/chunk-WXD4O4UY.js.map +1 -1
  302. package/lib/chunk-X2D47UM7.cjs.map +1 -1
  303. package/lib/chunk-X6PHZA6P.cjs.map +1 -1
  304. package/lib/chunk-XD7GS4QW.js.map +1 -1
  305. package/lib/chunk-XMDDYWH5.js.map +1 -1
  306. package/lib/{chunk-3LTCO2OB.cjs → chunk-XOYVZN2R.cjs} +4 -4
  307. package/lib/chunk-XOYVZN2R.cjs.map +1 -0
  308. package/lib/chunk-XPF5Z2WY.js.map +1 -1
  309. package/lib/chunk-XR3KEV7U.js.map +1 -1
  310. package/lib/chunk-XUC3BYL2.cjs.map +1 -1
  311. package/lib/{chunk-YUGZUUAU.js → chunk-XXKXNBD5.js} +2 -2
  312. package/lib/chunk-XXKXNBD5.js.map +1 -0
  313. package/lib/{chunk-N6MHUHGE.cjs → chunk-Y27X5PYA.cjs} +2 -2
  314. package/lib/chunk-Y27X5PYA.cjs.map +1 -0
  315. package/lib/chunk-Y2IGLW5N.js.map +1 -1
  316. package/lib/chunk-Y3BFYVWA.js.map +1 -1
  317. package/lib/{chunk-VMJUXZ67.cjs → chunk-Y5BP4C42.cjs} +2 -2
  318. package/lib/chunk-Y5BP4C42.cjs.map +1 -0
  319. package/lib/chunk-YAKNUPNE.cjs.map +1 -1
  320. package/lib/chunk-YAVHAWTZ.js.map +1 -1
  321. package/lib/chunk-YBXRC6MC.js.map +1 -1
  322. package/lib/chunk-YHYBOXVX.cjs.map +1 -1
  323. package/lib/chunk-YIDX7HVR.cjs.map +1 -1
  324. package/lib/chunk-YN4M5CNJ.js.map +1 -1
  325. package/lib/chunk-YOHBJHTH.cjs.map +1 -1
  326. package/lib/chunk-YY5ENJSH.cjs.map +1 -1
  327. package/lib/{chunk-SN6BP777.js → chunk-YZ57ATOP.js} +2 -2
  328. package/lib/chunk-YZ57ATOP.js.map +1 -0
  329. package/lib/chunk-Z2QVXW6T.cjs.map +1 -1
  330. package/lib/chunk-Z667GAZJ.js.map +1 -1
  331. package/lib/chunk-Z7DKPFKZ.js.map +1 -1
  332. package/lib/chunk-ZAISVVBE.cjs.map +1 -1
  333. package/lib/chunk-ZASD6IUL.js.map +1 -1
  334. package/lib/chunk-ZEEB5YAU.js.map +1 -1
  335. package/lib/{chunk-IDAOX5RB.cjs → chunk-ZLDJ7WAY.cjs} +2 -2
  336. package/lib/chunk-ZLDJ7WAY.cjs.map +1 -0
  337. package/lib/chunk-ZQSCFH5J.cjs.map +1 -1
  338. package/lib/chunk-ZTVQSWSD.cjs.map +1 -1
  339. package/lib/chunk-ZU7GFVQ6.js.map +1 -1
  340. package/lib/chunk-ZZF34M2E.cjs.map +1 -1
  341. package/lib/client.d.cts +3 -1
  342. package/lib/commercelayer.cjs +5 -5
  343. package/lib/commercelayer.d.cts +6 -4
  344. package/lib/commercelayer.d.ts +3 -3
  345. package/lib/commercelayer.js +1 -1
  346. package/lib/enum.d.cts +1 -1
  347. package/lib/enum.d.ts +1 -1
  348. package/lib/index.cjs +47 -47
  349. package/lib/index.d.cts +5 -2
  350. package/lib/index.d.ts +1 -1
  351. package/lib/index.js +23 -23
  352. package/lib/jsonapi.d.cts +1 -1
  353. package/lib/jsonapi.d.ts +1 -1
  354. package/lib/model.d.cts +1 -1
  355. package/lib/model.d.ts +1 -1
  356. package/lib/query.d.cts +1 -1
  357. package/lib/query.d.ts +1 -1
  358. package/lib/resource.d.cts +1 -1
  359. package/lib/resource.d.ts +1 -1
  360. package/lib/resources/addresses.d.cts +4 -1
  361. package/lib/resources/addresses.d.ts +1 -1
  362. package/lib/resources/adjustments.d.cts +4 -1
  363. package/lib/resources/adjustments.d.ts +1 -1
  364. package/lib/resources/adyen_gateways.d.cts +4 -1
  365. package/lib/resources/adyen_gateways.d.ts +1 -1
  366. package/lib/resources/adyen_payments.cjs +2 -2
  367. package/lib/resources/adyen_payments.d.cts +4 -1
  368. package/lib/resources/adyen_payments.d.ts +1 -1
  369. package/lib/resources/adyen_payments.js +1 -1
  370. package/lib/resources/applications.cjs +2 -2
  371. package/lib/resources/applications.d.cts +4 -1
  372. package/lib/resources/applications.d.ts +1 -1
  373. package/lib/resources/applications.js +1 -1
  374. package/lib/resources/attachments.d.cts +4 -1
  375. package/lib/resources/attachments.d.ts +1 -1
  376. package/lib/resources/authorizations.d.cts +4 -1
  377. package/lib/resources/authorizations.d.ts +1 -1
  378. package/lib/resources/avalara_accounts.d.cts +4 -1
  379. package/lib/resources/avalara_accounts.d.ts +1 -1
  380. package/lib/resources/axerve_gateways.d.cts +4 -1
  381. package/lib/resources/axerve_gateways.d.ts +1 -1
  382. package/lib/resources/axerve_payments.d.cts +4 -1
  383. package/lib/resources/axerve_payments.d.ts +1 -1
  384. package/lib/resources/bing_geocoders.d.cts +4 -1
  385. package/lib/resources/bing_geocoders.d.ts +1 -1
  386. package/lib/resources/braintree_gateways.d.cts +4 -1
  387. package/lib/resources/braintree_gateways.d.ts +1 -1
  388. package/lib/resources/braintree_payments.d.cts +4 -1
  389. package/lib/resources/braintree_payments.d.ts +1 -1
  390. package/lib/resources/bundles.d.cts +4 -1
  391. package/lib/resources/bundles.d.ts +1 -1
  392. package/lib/resources/buy_x_pay_y_promotions.cjs +2 -2
  393. package/lib/resources/buy_x_pay_y_promotions.d.cts +4 -1
  394. package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
  395. package/lib/resources/buy_x_pay_y_promotions.js +1 -1
  396. package/lib/resources/captures.d.cts +4 -1
  397. package/lib/resources/captures.d.ts +1 -1
  398. package/lib/resources/carrier_accounts.d.cts +4 -1
  399. package/lib/resources/carrier_accounts.d.ts +1 -1
  400. package/lib/resources/checkout_com_gateways.d.cts +4 -1
  401. package/lib/resources/checkout_com_gateways.d.ts +1 -1
  402. package/lib/resources/checkout_com_payments.cjs +2 -2
  403. package/lib/resources/checkout_com_payments.d.cts +4 -1
  404. package/lib/resources/checkout_com_payments.d.ts +1 -1
  405. package/lib/resources/checkout_com_payments.js +1 -1
  406. package/lib/resources/cleanups.d.cts +4 -1
  407. package/lib/resources/cleanups.d.ts +1 -1
  408. package/lib/resources/coupon_codes_promotion_rules.d.cts +4 -1
  409. package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
  410. package/lib/resources/coupon_recipients.d.cts +4 -1
  411. package/lib/resources/coupon_recipients.d.ts +1 -1
  412. package/lib/resources/coupons.d.cts +4 -1
  413. package/lib/resources/coupons.d.ts +1 -1
  414. package/lib/resources/custom_promotion_rules.d.cts +4 -1
  415. package/lib/resources/custom_promotion_rules.d.ts +1 -1
  416. package/lib/resources/customer_addresses.d.cts +4 -1
  417. package/lib/resources/customer_addresses.d.ts +1 -1
  418. package/lib/resources/customer_groups.d.cts +4 -1
  419. package/lib/resources/customer_groups.d.ts +1 -1
  420. package/lib/resources/customer_password_resets.d.cts +4 -1
  421. package/lib/resources/customer_password_resets.d.ts +1 -1
  422. package/lib/resources/customer_payment_sources.d.cts +4 -1
  423. package/lib/resources/customer_payment_sources.d.ts +1 -1
  424. package/lib/resources/customer_subscriptions.d.cts +4 -1
  425. package/lib/resources/customer_subscriptions.d.ts +1 -1
  426. package/lib/resources/customers.cjs +2 -2
  427. package/lib/resources/customers.d.cts +4 -1
  428. package/lib/resources/customers.d.ts +1 -1
  429. package/lib/resources/customers.js +1 -1
  430. package/lib/resources/delivery_lead_times.d.cts +4 -1
  431. package/lib/resources/delivery_lead_times.d.ts +1 -1
  432. package/lib/resources/discount_engine_items.d.cts +4 -1
  433. package/lib/resources/discount_engine_items.d.ts +1 -1
  434. package/lib/resources/discount_engines.d.cts +4 -1
  435. package/lib/resources/discount_engines.d.ts +1 -1
  436. package/lib/resources/easypost_pickups.d.cts +4 -1
  437. package/lib/resources/easypost_pickups.d.ts +1 -1
  438. package/lib/resources/event_callbacks.d.cts +4 -1
  439. package/lib/resources/event_callbacks.d.ts +1 -1
  440. package/lib/resources/events.d.cts +4 -1
  441. package/lib/resources/events.d.ts +1 -1
  442. package/lib/resources/exports.d.cts +4 -1
  443. package/lib/resources/exports.d.ts +1 -1
  444. package/lib/resources/external_gateways.d.cts +4 -1
  445. package/lib/resources/external_gateways.d.ts +1 -1
  446. package/lib/resources/external_payments.d.cts +4 -1
  447. package/lib/resources/external_payments.d.ts +1 -1
  448. package/lib/resources/external_promotions.cjs +2 -2
  449. package/lib/resources/external_promotions.d.cts +4 -1
  450. package/lib/resources/external_promotions.d.ts +1 -1
  451. package/lib/resources/external_promotions.js +1 -1
  452. package/lib/resources/external_tax_calculators.d.cts +4 -1
  453. package/lib/resources/external_tax_calculators.d.ts +1 -1
  454. package/lib/resources/fixed_amount_promotions.cjs +2 -2
  455. package/lib/resources/fixed_amount_promotions.d.cts +4 -1
  456. package/lib/resources/fixed_amount_promotions.d.ts +1 -1
  457. package/lib/resources/fixed_amount_promotions.js +1 -1
  458. package/lib/resources/fixed_price_promotions.cjs +2 -2
  459. package/lib/resources/fixed_price_promotions.d.cts +4 -1
  460. package/lib/resources/fixed_price_promotions.d.ts +1 -1
  461. package/lib/resources/fixed_price_promotions.js +1 -1
  462. package/lib/resources/flex_promotions.cjs +2 -2
  463. package/lib/resources/flex_promotions.d.cts +4 -1
  464. package/lib/resources/flex_promotions.d.ts +1 -1
  465. package/lib/resources/flex_promotions.js +1 -1
  466. package/lib/resources/free_gift_promotions.cjs +2 -2
  467. package/lib/resources/free_gift_promotions.d.cts +4 -1
  468. package/lib/resources/free_gift_promotions.d.ts +1 -1
  469. package/lib/resources/free_gift_promotions.js +1 -1
  470. package/lib/resources/free_shipping_promotions.cjs +2 -2
  471. package/lib/resources/free_shipping_promotions.d.cts +4 -1
  472. package/lib/resources/free_shipping_promotions.d.ts +1 -1
  473. package/lib/resources/free_shipping_promotions.js +1 -1
  474. package/lib/resources/geocoders.d.cts +4 -1
  475. package/lib/resources/geocoders.d.ts +1 -1
  476. package/lib/resources/gift_card_recipients.d.cts +4 -1
  477. package/lib/resources/gift_card_recipients.d.ts +1 -1
  478. package/lib/resources/gift_cards.d.cts +4 -1
  479. package/lib/resources/gift_cards.d.ts +1 -1
  480. package/lib/resources/google_geocoders.d.cts +4 -1
  481. package/lib/resources/google_geocoders.d.ts +1 -1
  482. package/lib/resources/imports.d.cts +4 -1
  483. package/lib/resources/imports.d.ts +1 -1
  484. package/lib/resources/in_stock_subscriptions.d.cts +4 -1
  485. package/lib/resources/in_stock_subscriptions.d.ts +1 -1
  486. package/lib/resources/inventory_models.d.cts +4 -1
  487. package/lib/resources/inventory_models.d.ts +1 -1
  488. package/lib/resources/inventory_return_locations.d.cts +4 -1
  489. package/lib/resources/inventory_return_locations.d.ts +1 -1
  490. package/lib/resources/inventory_stock_locations.d.cts +4 -1
  491. package/lib/resources/inventory_stock_locations.d.ts +1 -1
  492. package/lib/resources/klarna_gateways.d.cts +4 -1
  493. package/lib/resources/klarna_gateways.d.ts +1 -1
  494. package/lib/resources/klarna_payments.d.cts +4 -1
  495. package/lib/resources/klarna_payments.d.ts +1 -1
  496. package/lib/resources/line_item_options.d.cts +4 -1
  497. package/lib/resources/line_item_options.d.ts +1 -1
  498. package/lib/resources/line_items.cjs +2 -2
  499. package/lib/resources/line_items.d.cts +4 -1
  500. package/lib/resources/line_items.d.ts +1 -1
  501. package/lib/resources/line_items.js +1 -1
  502. package/lib/resources/links.d.cts +4 -1
  503. package/lib/resources/links.d.ts +1 -1
  504. package/lib/resources/manual_gateways.d.cts +4 -1
  505. package/lib/resources/manual_gateways.d.ts +1 -1
  506. package/lib/resources/manual_tax_calculators.d.cts +4 -1
  507. package/lib/resources/manual_tax_calculators.d.ts +1 -1
  508. package/lib/resources/markets.d.cts +4 -1
  509. package/lib/resources/markets.d.ts +1 -1
  510. package/lib/resources/merchants.d.cts +4 -1
  511. package/lib/resources/merchants.d.ts +1 -1
  512. package/lib/resources/notifications.d.cts +4 -1
  513. package/lib/resources/notifications.d.ts +1 -1
  514. package/lib/resources/order_amount_promotion_rules.d.cts +4 -1
  515. package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
  516. package/lib/resources/order_copies.d.cts +4 -1
  517. package/lib/resources/order_copies.d.ts +1 -1
  518. package/lib/resources/order_factories.d.cts +4 -1
  519. package/lib/resources/order_factories.d.ts +1 -1
  520. package/lib/resources/order_subscription_items.d.cts +4 -1
  521. package/lib/resources/order_subscription_items.d.ts +1 -1
  522. package/lib/resources/order_subscriptions.d.cts +4 -1
  523. package/lib/resources/order_subscriptions.d.ts +1 -1
  524. package/lib/resources/orders.d.cts +4 -1
  525. package/lib/resources/orders.d.ts +1 -1
  526. package/lib/resources/organizations.cjs +2 -2
  527. package/lib/resources/organizations.d.cts +4 -1
  528. package/lib/resources/organizations.d.ts +1 -1
  529. package/lib/resources/organizations.js +1 -1
  530. package/lib/resources/packages.d.cts +4 -1
  531. package/lib/resources/packages.d.ts +1 -1
  532. package/lib/resources/parcel_line_items.d.cts +4 -1
  533. package/lib/resources/parcel_line_items.d.ts +1 -1
  534. package/lib/resources/parcels.d.cts +4 -1
  535. package/lib/resources/parcels.d.ts +1 -1
  536. package/lib/resources/payment_gateways.d.cts +4 -1
  537. package/lib/resources/payment_gateways.d.ts +1 -1
  538. package/lib/resources/payment_methods.cjs +2 -2
  539. package/lib/resources/payment_methods.d.cts +4 -1
  540. package/lib/resources/payment_methods.d.ts +1 -1
  541. package/lib/resources/payment_methods.js +1 -1
  542. package/lib/resources/payment_options.cjs +2 -2
  543. package/lib/resources/payment_options.d.cts +4 -1
  544. package/lib/resources/payment_options.d.ts +1 -1
  545. package/lib/resources/payment_options.js +1 -1
  546. package/lib/resources/paypal_gateways.d.cts +4 -1
  547. package/lib/resources/paypal_gateways.d.ts +1 -1
  548. package/lib/resources/paypal_payments.d.cts +4 -1
  549. package/lib/resources/paypal_payments.d.ts +1 -1
  550. package/lib/resources/percentage_discount_promotions.cjs +2 -2
  551. package/lib/resources/percentage_discount_promotions.d.cts +4 -1
  552. package/lib/resources/percentage_discount_promotions.d.ts +1 -1
  553. package/lib/resources/percentage_discount_promotions.js +1 -1
  554. package/lib/resources/pickups.d.cts +4 -1
  555. package/lib/resources/pickups.d.ts +1 -1
  556. package/lib/resources/price_frequency_tiers.d.cts +4 -1
  557. package/lib/resources/price_frequency_tiers.d.ts +1 -1
  558. package/lib/resources/price_list_schedulers.d.cts +4 -1
  559. package/lib/resources/price_list_schedulers.d.ts +1 -1
  560. package/lib/resources/price_lists.cjs +2 -2
  561. package/lib/resources/price_lists.d.cts +4 -1
  562. package/lib/resources/price_lists.d.ts +1 -1
  563. package/lib/resources/price_lists.js +1 -1
  564. package/lib/resources/price_tiers.d.cts +4 -1
  565. package/lib/resources/price_tiers.d.ts +1 -1
  566. package/lib/resources/price_volume_tiers.d.cts +4 -1
  567. package/lib/resources/price_volume_tiers.d.ts +1 -1
  568. package/lib/resources/prices.cjs +2 -2
  569. package/lib/resources/prices.d.cts +4 -1
  570. package/lib/resources/prices.d.ts +1 -1
  571. package/lib/resources/prices.js +1 -1
  572. package/lib/resources/promotion_rules.d.cts +4 -1
  573. package/lib/resources/promotion_rules.d.ts +1 -1
  574. package/lib/resources/promotions.cjs +2 -2
  575. package/lib/resources/promotions.d.cts +4 -1
  576. package/lib/resources/promotions.d.ts +1 -1
  577. package/lib/resources/promotions.js +1 -1
  578. package/lib/resources/recurring_order_copies.d.cts +4 -1
  579. package/lib/resources/recurring_order_copies.d.ts +1 -1
  580. package/lib/resources/refunds.d.cts +4 -1
  581. package/lib/resources/refunds.d.ts +1 -1
  582. package/lib/resources/reserved_stocks.d.cts +4 -1
  583. package/lib/resources/reserved_stocks.d.ts +1 -1
  584. package/lib/resources/resource_errors.d.cts +4 -1
  585. package/lib/resources/resource_errors.d.ts +1 -1
  586. package/lib/resources/return_line_items.d.cts +4 -1
  587. package/lib/resources/return_line_items.d.ts +1 -1
  588. package/lib/resources/returns.d.cts +4 -1
  589. package/lib/resources/returns.d.ts +1 -1
  590. package/lib/resources/satispay_gateways.d.cts +4 -1
  591. package/lib/resources/satispay_gateways.d.ts +1 -1
  592. package/lib/resources/satispay_payments.d.cts +4 -1
  593. package/lib/resources/satispay_payments.d.ts +1 -1
  594. package/lib/resources/shipments.d.cts +4 -1
  595. package/lib/resources/shipments.d.ts +1 -1
  596. package/lib/resources/shipping_categories.d.cts +4 -1
  597. package/lib/resources/shipping_categories.d.ts +1 -1
  598. package/lib/resources/shipping_method_tiers.d.cts +4 -1
  599. package/lib/resources/shipping_method_tiers.d.ts +1 -1
  600. package/lib/resources/shipping_methods.cjs +2 -2
  601. package/lib/resources/shipping_methods.d.cts +4 -1
  602. package/lib/resources/shipping_methods.d.ts +1 -1
  603. package/lib/resources/shipping_methods.js +1 -1
  604. package/lib/resources/shipping_weight_tiers.d.cts +4 -1
  605. package/lib/resources/shipping_weight_tiers.d.ts +1 -1
  606. package/lib/resources/shipping_zones.d.cts +4 -1
  607. package/lib/resources/shipping_zones.d.ts +1 -1
  608. package/lib/resources/sku_list_items.d.cts +4 -1
  609. package/lib/resources/sku_list_items.d.ts +1 -1
  610. package/lib/resources/sku_list_promotion_rules.d.cts +4 -1
  611. package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
  612. package/lib/resources/sku_lists.d.cts +4 -1
  613. package/lib/resources/sku_lists.d.ts +1 -1
  614. package/lib/resources/sku_options.d.cts +4 -1
  615. package/lib/resources/sku_options.d.ts +1 -1
  616. package/lib/resources/skus.d.cts +4 -1
  617. package/lib/resources/skus.d.ts +1 -1
  618. package/lib/resources/stock_items.d.cts +4 -1
  619. package/lib/resources/stock_items.d.ts +1 -1
  620. package/lib/resources/stock_line_items.d.cts +4 -1
  621. package/lib/resources/stock_line_items.d.ts +1 -1
  622. package/lib/resources/stock_locations.d.cts +4 -1
  623. package/lib/resources/stock_locations.d.ts +1 -1
  624. package/lib/resources/stock_reservations.d.cts +4 -1
  625. package/lib/resources/stock_reservations.d.ts +1 -1
  626. package/lib/resources/stock_transfers.d.cts +4 -1
  627. package/lib/resources/stock_transfers.d.ts +1 -1
  628. package/lib/resources/stores.d.cts +4 -1
  629. package/lib/resources/stores.d.ts +1 -1
  630. package/lib/resources/stripe_gateways.d.cts +4 -1
  631. package/lib/resources/stripe_gateways.d.ts +1 -1
  632. package/lib/resources/stripe_payments.d.cts +4 -1
  633. package/lib/resources/stripe_payments.d.ts +1 -1
  634. package/lib/resources/stripe_tax_accounts.d.cts +4 -1
  635. package/lib/resources/stripe_tax_accounts.d.ts +1 -1
  636. package/lib/resources/subscription_models.d.cts +4 -1
  637. package/lib/resources/subscription_models.d.ts +1 -1
  638. package/lib/resources/tags.d.cts +4 -1
  639. package/lib/resources/tags.d.ts +1 -1
  640. package/lib/resources/talon_one_accounts.cjs +2 -2
  641. package/lib/resources/talon_one_accounts.d.cts +4 -1
  642. package/lib/resources/talon_one_accounts.d.ts +1 -1
  643. package/lib/resources/talon_one_accounts.js +1 -1
  644. package/lib/resources/tax_calculators.d.cts +4 -1
  645. package/lib/resources/tax_calculators.d.ts +1 -1
  646. package/lib/resources/tax_categories.d.cts +4 -1
  647. package/lib/resources/tax_categories.d.ts +1 -1
  648. package/lib/resources/tax_rules.d.cts +4 -1
  649. package/lib/resources/tax_rules.d.ts +1 -1
  650. package/lib/resources/taxjar_accounts.d.cts +4 -1
  651. package/lib/resources/taxjar_accounts.d.ts +1 -1
  652. package/lib/resources/transactions.d.cts +4 -1
  653. package/lib/resources/transactions.d.ts +1 -1
  654. package/lib/resources/versions.d.cts +4 -1
  655. package/lib/resources/versions.d.ts +1 -1
  656. package/lib/resources/vertex_accounts.d.cts +4 -1
  657. package/lib/resources/vertex_accounts.d.ts +1 -1
  658. package/lib/resources/voids.d.cts +4 -1
  659. package/lib/resources/voids.d.ts +1 -1
  660. package/lib/resources/webhooks.d.cts +4 -1
  661. package/lib/resources/webhooks.d.ts +1 -1
  662. package/lib/resources/wire_transfers.d.cts +4 -1
  663. package/lib/resources/wire_transfers.d.ts +1 -1
  664. package/lib/static.cjs +3 -3
  665. package/lib/static.d.cts +1 -1
  666. package/lib/static.d.ts +1 -1
  667. package/lib/static.js +2 -2
  668. package/package.json +9 -9
  669. package/lib/chunk-3LTCO2OB.cjs.map +0 -1
  670. package/lib/chunk-465K3KVE.js.map +0 -1
  671. package/lib/chunk-5U5QLF2Z.js.map +0 -1
  672. package/lib/chunk-6PWK52UZ.cjs.map +0 -1
  673. package/lib/chunk-7GVHCOUC.js.map +0 -1
  674. package/lib/chunk-7ISS2FDY.js.map +0 -1
  675. package/lib/chunk-7X36B7N6.js.map +0 -1
  676. package/lib/chunk-ANCLAYJV.cjs.map +0 -1
  677. package/lib/chunk-BBEMCANC.cjs.map +0 -1
  678. package/lib/chunk-BF7OPORP.js.map +0 -1
  679. package/lib/chunk-BOPK7T5K.js.map +0 -1
  680. package/lib/chunk-DTGODPCN.js.map +0 -1
  681. package/lib/chunk-EHWAGYNX.js.map +0 -1
  682. package/lib/chunk-EKGR3EB3.js.map +0 -1
  683. package/lib/chunk-EQD223JW.cjs.map +0 -1
  684. package/lib/chunk-FKDKRSPO.js.map +0 -1
  685. package/lib/chunk-HAAE23MQ.js.map +0 -1
  686. package/lib/chunk-HLCGKY7R.js.map +0 -1
  687. package/lib/chunk-HQ35KQFG.cjs.map +0 -1
  688. package/lib/chunk-HSILJQCD.js.map +0 -1
  689. package/lib/chunk-IDAOX5RB.cjs.map +0 -1
  690. package/lib/chunk-INZD34YD.cjs.map +0 -1
  691. package/lib/chunk-JENLN6VJ.js.map +0 -1
  692. package/lib/chunk-JN4JL4WT.cjs.map +0 -1
  693. package/lib/chunk-JRYILJJY.cjs.map +0 -1
  694. package/lib/chunk-KBN3FFXD.cjs.map +0 -1
  695. package/lib/chunk-KJAD45RP.cjs.map +0 -1
  696. package/lib/chunk-LCLXLB2R.cjs.map +0 -1
  697. package/lib/chunk-LEWK7QET.cjs.map +0 -1
  698. package/lib/chunk-M2ZERG2X.cjs.map +0 -1
  699. package/lib/chunk-M55NSZVW.js.map +0 -1
  700. package/lib/chunk-MPSHBMZS.js.map +0 -1
  701. package/lib/chunk-N6MHUHGE.cjs.map +0 -1
  702. package/lib/chunk-NJQDJCFB.cjs.map +0 -1
  703. package/lib/chunk-NMVACSMG.js.map +0 -1
  704. package/lib/chunk-OPQJPXLM.cjs.map +0 -1
  705. package/lib/chunk-P3NADEGE.cjs.map +0 -1
  706. package/lib/chunk-QHRQCFDB.js.map +0 -1
  707. package/lib/chunk-ROPOLXIV.js.map +0 -1
  708. package/lib/chunk-RWPFE3LF.cjs.map +0 -1
  709. package/lib/chunk-SN6BP777.js.map +0 -1
  710. package/lib/chunk-VDZUWCIN.cjs.map +0 -1
  711. package/lib/chunk-VMJUXZ67.cjs.map +0 -1
  712. package/lib/chunk-WBPEFNL7.cjs.map +0 -1
  713. package/lib/chunk-YUGZUUAU.js.map +0 -1
  714. package/lib/chunk-ZFG533LP.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/config.ts"],"names":[],"mappings":";AAEA,IAAM,MAAS,GAAA;AAAA,EACd,OAAS,EAAA;AAAA,IACR,MAAQ,EAAA,kBAAA;AAAA,IACR,UAAY,EAAA,CAAA;AAAA,IACZ,QAAU,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACP,OAAS,EAAA,IAAA;AAAA,IACT,kBAAA,EAAoB,CAAC,cAAA,EAAgB,aAAa;AAAA,GACnD;AAAA,EACA,OAAS,EAAA;AAAA,IACR,mBAAqB,EAAA;AAAA;AAEvB,CAAA;AAGA,IAAO,cAAQ,GAAA","file":"chunk-AYTBSAHY.js","sourcesContent":["import { ApiClientInitConfig } from \"./client\"\n\nconst config = {\n\tdefault: {\n\t\tdomain: 'commercelayer.io',\n\t\tpageNumber: 1,\n\t\tpageSize: 10,\n\t},\n\tclient: {\n\t\ttimeout: 15000,\n\t\trequiredAttributes: ['organization', 'accessToken'] as Array<keyof ApiClientInitConfig>,\n\t},\n\tjsonapi: {\n\t\tmaxResourceIncluded: 2\n\t}\n} as const\n\n\nexport default config\n"]}
1
+ {"version":3,"sources":["../src/config.ts"],"names":[],"mappings":";AAEA,IAAM,MAAA,GAAS;AAAA,EACd,OAAA,EAAS;AAAA,IACR,MAAA,EAAQ,kBAAA;AAAA,IACR,UAAA,EAAY,CAAA;AAAA,IACZ,QAAA,EAAU;AAAA,GACX;AAAA,EACA,MAAA,EAAQ;AAAA,IACP,OAAA,EAAS,IAAA;AAAA,IACT,kBAAA,EAAoB,CAAC,cAAA,EAAgB,aAAa;AAAA,GACnD;AAAA,EACA,OAAA,EAAS;AAAA,IACR,mBAAA,EAAqB;AAAA;AAEvB,CAAA;AAGA,IAAO,cAAA,GAAQ","file":"chunk-AYTBSAHY.js","sourcesContent":["import { ApiClientInitConfig } from \"./client\"\n\nconst config = {\n\tdefault: {\n\t\tdomain: 'commercelayer.io',\n\t\tpageNumber: 1,\n\t\tpageSize: 10,\n\t},\n\tclient: {\n\t\ttimeout: 15000,\n\t\trequiredAttributes: ['organization', 'accessToken'] as Array<keyof ApiClientInitConfig>,\n\t},\n\tjsonapi: {\n\t\tmaxResourceIncluded: 2\n\t}\n} as const\n\n\nexport default config\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/line_item_options.ts"],"names":["ApiResource"],"mappings":";;;;;AAiKA,IAAM,eAAA,GAAN,MAAM,gBAAA,SAAwBA,6BAA4B,CAAA;AAAA,EAEzD,OAAgB,IAA2B,GAAA,mBAAA;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,MAAM,SAAA,CAAU,gBAA2C,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAChJ,IAAM,MAAA,iBAAA,GAAqB,iBAAoC,EAAM,IAAA,gBAAA;AACrE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAgB,EAAE,IAAA,EAA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AAM,gBAAgB,CAAA,IAAA,EAAM,WAAW,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACrL,EAEA,MAAM,YAAA,CAAa,EAA6B,EAAA,YAAA,EAAsB,QAA8C,OAAoD,EAAA;AACvK,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAA6C,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,gBAAgB,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACxL,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,yBAAQ,GAAA","file":"chunk-B72FREUL.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 { LineItem, LineItemType } from './line_items'\nimport type { SkuOption, SkuOptionType } from './sku_options'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype LineItemOptionType = 'line_item_options'\ntype LineItemOptionRel = ResourceRel & { type: LineItemOptionType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type LineItemOptionSort = Pick<LineItemOption, 'id' | 'name' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'delay_hours'> & ResourceSort\n// export type LineItemOptionFilter = Pick<LineItemOption, 'id' | 'name' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceFilter\n\n\ninterface LineItemOption extends Resource {\n\t\n\treadonly type: LineItemOptionType\n\n\t/** \n\t * The name of the line item option. When blank, it gets populated with the name of the associated SKU option.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The line item option's quantity.\n\t * @example ```2```\n\t */\n\tquantity: number\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 option, in cents. When you add a line item option to an order, this is automatically populated from associated SKU option's price. Cannot be passed by sales channels.\n\t * @example ```990```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The unit amount of the line item option, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```9.9```\n\t */\n\tunit_amount_float?: number | null\n\t/** \n\t * The unit amount of the line item option, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€9,90\"```\n\t */\n\tformatted_unit_amount?: string | null\n\t/** \n\t * The unit amount x quantity, in cents.\n\t * @example ```1880```\n\t */\n\ttotal_amount_cents?: number | null\n\t/** \n\t * The unit amount x quantity, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```18.8```\n\t */\n\ttotal_amount_float: number\n\t/** \n\t * The unit amount x quantity, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€18,80\"```\n\t */\n\tformatted_total_amount?: string | null\n\t/** \n\t * The shipping delay that the customer can expect when adding this option (hours). Inherited from the associated SKU option.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The shipping delay that the customer can expect when adding this option (days, rounded).\n\t * @example ```2```\n\t */\n\tdelay_days?: number | null\n\t/** \n\t * Set of key-value pairs that represent the selected options.\n\t * @example ```{\"embossing_text\":\"Happy Birthday!\"}```\n\t */\n\toptions: Record<string, any>\n\n\tline_item?: LineItem | null\n\tsku_option?: SkuOption | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface LineItemOptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The name of the line item option. When blank, it gets populated with the name of the associated SKU option.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The line item option's quantity.\n\t * @example ```2```\n\t */\n\tquantity: number\n\t/** \n\t * The unit amount of the line item option, in cents. When you add a line item option to an order, this is automatically populated from associated SKU option's price. Cannot be passed by sales channels.\n\t * @example ```990```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * Set of key-value pairs that represent the selected options.\n\t * @example ```{\"embossing_text\":\"Happy Birthday!\"}```\n\t */\n\toptions: Record<string, any>\n\n\tline_item: LineItemRel\n\tsku_option: SkuOptionRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface LineItemOptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The name of the line item option. When blank, it gets populated with the name of the associated SKU option.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The line item option's quantity.\n\t * @example ```2```\n\t */\n\tquantity?: number | null\n\t/** \n\t * The unit amount of the line item option, in cents. When you add a line item option to an order, this is automatically populated from associated SKU option's price. Cannot be passed by sales channels.\n\t * @example ```990```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * Set of key-value pairs that represent the selected options.\n\t * @example ```{\"embossing_text\":\"Happy Birthday!\"}```\n\t */\n\toptions?: Record<string, any> | 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\tsku_option?: SkuOptionRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass LineItemOptions extends ApiResource<LineItemOption> {\n\n\tstatic readonly TYPE: LineItemOptionType = 'line_item_options' as const\n\n\tasync create(resource: LineItemOptionCreate, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.create<LineItemOptionCreate, LineItemOption>({ ...resource, type: LineItemOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: LineItemOptionUpdate, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.update<LineItemOptionUpdate, LineItemOption>({ ...resource, type: LineItemOptions.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: LineItemOptions.TYPE } : id, options)\n\t}\n\n\tasync line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `line_item_options/${_lineItemOptionId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<SkuOption>({ type: 'sku_options' }, `line_item_options/${_lineItemOptionId}/sku_option`, params, options) as unknown as SkuOption\n\t}\n\n\tasync events(lineItemOptionId: string | LineItemOption, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `line_item_options/${_lineItemOptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(lineItemOptionId: string | LineItemOption, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `line_item_options/${_lineItemOptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _add_tags(id: string | LineItemOption, triggerValue: string, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.update<LineItemOptionUpdate, LineItemOption>({ id: (typeof id === 'string')? id: id.id, type: LineItemOptions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | LineItemOption, triggerValue: string, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.update<LineItemOptionUpdate, LineItemOption>({ id: (typeof id === 'string')? id: id.id, type: LineItemOptions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisLineItemOption(resource: any): resource is LineItemOption {\n\t\treturn resource.type && (resource.type === LineItemOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): LineItemOptionRel {\n\t\treturn super.relationshipOneToOne<LineItemOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): LineItemOptionRel[] {\n\t\treturn super.relationshipOneToMany<LineItemOptionRel>(...ids)\n\t}\n\n\n\ttype(): LineItemOptionType {\n\t\treturn LineItemOptions.TYPE\n\t}\n\n}\n\n\nconst instance = new LineItemOptions()\nexport default instance\n\nexport type { LineItemOptions, LineItemOption, LineItemOpt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AAM,YAAA,CAAa,EAAA,EAA6B,YAAA,EAAsB,QAA8C,OAAA,EAAoD;AACvK,IAAA,OAAO,KAAK,SAAA,CAAU,MAAA,CAA6C,EAAE,EAAA,EAAK,OAAO,OAAO,QAAA,GAAW,EAAA,GAAI,EAAA,CAAG,EAAA,EAAI,MAAM,gBAAA,CAAgB,IAAA,EAAM,cAAc,YAAA,EAAa,EAAG,QAAQ,OAAO,CAAA;AAAA,EACxL;AAAA,EAGA,iBAAiB,QAAA,EAA2C;AAC3D,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,gBAAA,CAAgB,IAAA;AAAA,EAC5D;AAAA,EAGA,aAAa,EAAA,EAAmD;AAC/D,IAAA,OAAO,KAAA,CAAM,qBAAwC,EAAE,CAAA;AAAA,EACxD;AAAA,EAEA,sBAAsB,GAAA,EAAoC;AACzD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAyC,GAAG,GAAG,CAAA;AAAA,EAC7D;AAAA,EAGA,IAAA,GAA2B;AAC1B,IAAA,OAAO,gBAAA,CAAgB,IAAA;AAAA,EACxB;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,eAAA,EAAgB;AACrC,IAAO,yBAAA,GAAQ","file":"chunk-B72FREUL.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 { LineItem, LineItemType } from './line_items'\nimport type { SkuOption, SkuOptionType } from './sku_options'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype LineItemOptionType = 'line_item_options'\ntype LineItemOptionRel = ResourceRel & { type: LineItemOptionType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type LineItemOptionSort = Pick<LineItemOption, 'id' | 'name' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'delay_hours'> & ResourceSort\n// export type LineItemOptionFilter = Pick<LineItemOption, 'id' | 'name' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceFilter\n\n\ninterface LineItemOption extends Resource {\n\t\n\treadonly type: LineItemOptionType\n\n\t/** \n\t * The name of the line item option. When blank, it gets populated with the name of the associated SKU option.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The line item option's quantity.\n\t * @example ```2```\n\t */\n\tquantity: number\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 option, in cents. When you add a line item option to an order, this is automatically populated from associated SKU option's price. Cannot be passed by sales channels.\n\t * @example ```990```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * The unit amount of the line item option, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```9.9```\n\t */\n\tunit_amount_float?: number | null\n\t/** \n\t * The unit amount of the line item option, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€9,90\"```\n\t */\n\tformatted_unit_amount?: string | null\n\t/** \n\t * The unit amount x quantity, in cents.\n\t * @example ```1880```\n\t */\n\ttotal_amount_cents?: number | null\n\t/** \n\t * The unit amount x quantity, float. This can be useful to track the purchase on thrid party systems, e.g Google Analyitcs Enhanced Ecommerce.\n\t * @example ```18.8```\n\t */\n\ttotal_amount_float: number\n\t/** \n\t * The unit amount x quantity, formatted. This can be useful to display the amount with currency in you views.\n\t * @example ```\"€18,80\"```\n\t */\n\tformatted_total_amount?: string | null\n\t/** \n\t * The shipping delay that the customer can expect when adding this option (hours). Inherited from the associated SKU option.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The shipping delay that the customer can expect when adding this option (days, rounded).\n\t * @example ```2```\n\t */\n\tdelay_days?: number | null\n\t/** \n\t * Set of key-value pairs that represent the selected options.\n\t * @example ```{\"embossing_text\":\"Happy Birthday!\"}```\n\t */\n\toptions: Record<string, any>\n\n\tline_item?: LineItem | null\n\tsku_option?: SkuOption | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface LineItemOptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The name of the line item option. When blank, it gets populated with the name of the associated SKU option.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The line item option's quantity.\n\t * @example ```2```\n\t */\n\tquantity: number\n\t/** \n\t * The unit amount of the line item option, in cents. When you add a line item option to an order, this is automatically populated from associated SKU option's price. Cannot be passed by sales channels.\n\t * @example ```990```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * Set of key-value pairs that represent the selected options.\n\t * @example ```{\"embossing_text\":\"Happy Birthday!\"}```\n\t */\n\toptions: Record<string, any>\n\n\tline_item: LineItemRel\n\tsku_option: SkuOptionRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface LineItemOptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The name of the line item option. When blank, it gets populated with the name of the associated SKU option.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The line item option's quantity.\n\t * @example ```2```\n\t */\n\tquantity?: number | null\n\t/** \n\t * The unit amount of the line item option, in cents. When you add a line item option to an order, this is automatically populated from associated SKU option's price. Cannot be passed by sales channels.\n\t * @example ```990```\n\t */\n\tunit_amount_cents?: number | null\n\t/** \n\t * Set of key-value pairs that represent the selected options.\n\t * @example ```{\"embossing_text\":\"Happy Birthday!\"}```\n\t */\n\toptions?: Record<string, any> | 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\tsku_option?: SkuOptionRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass LineItemOptions extends ApiResource<LineItemOption> {\n\n\tstatic readonly TYPE: LineItemOptionType = 'line_item_options' as const\n\n\tasync create(resource: LineItemOptionCreate, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.create<LineItemOptionCreate, LineItemOption>({ ...resource, type: LineItemOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: LineItemOptionUpdate, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.update<LineItemOptionUpdate, LineItemOption>({ ...resource, type: LineItemOptions.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: LineItemOptions.TYPE } : id, options)\n\t}\n\n\tasync line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `line_item_options/${_lineItemOptionId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<SkuOption>({ type: 'sku_options' }, `line_item_options/${_lineItemOptionId}/sku_option`, params, options) as unknown as SkuOption\n\t}\n\n\tasync events(lineItemOptionId: string | LineItemOption, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `line_item_options/${_lineItemOptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(lineItemOptionId: string | LineItemOption, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `line_item_options/${_lineItemOptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _add_tags(id: string | LineItemOption, triggerValue: string, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.update<LineItemOptionUpdate, LineItemOption>({ id: (typeof id === 'string')? id: id.id, type: LineItemOptions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | LineItemOption, triggerValue: string, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.update<LineItemOptionUpdate, LineItemOption>({ id: (typeof id === 'string')? id: id.id, type: LineItemOptions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisLineItemOption(resource: any): resource is LineItemOption {\n\t\treturn resource.type && (resource.type === LineItemOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): LineItemOptionRel {\n\t\treturn super.relationshipOneToOne<LineItemOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): LineItemOptionRel[] {\n\t\treturn super.relationshipOneToMany<LineItemOptionRel>(...ids)\n\t}\n\n\n\ttype(): LineItemOptionType {\n\t\treturn LineItemOptions.TYPE\n\t}\n\n}\n\n\nconst instance = new LineItemOptions()\nexport default instance\n\nexport type { LineItemOptions, LineItemOption, LineItemOptionCreate, LineItemOptionUpdate, LineItemOptionType }\n"]}
@@ -71,5 +71,5 @@ var instance = new Prices();
71
71
  var prices_default = instance;
72
72
 
73
73
  exports.prices_default = prices_default;
74
- //# sourceMappingURL=chunk-JN4JL4WT.cjs.map
75
- //# sourceMappingURL=chunk-JN4JL4WT.cjs.map
74
+ //# sourceMappingURL=chunk-BJYOKKGX.cjs.map
75
+ //# sourceMappingURL=chunk-BJYOKKGX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/prices.ts"],"names":["ApiResource"],"mappings":";;;;;AA0LA,IAAM,MAAA,GAAN,MAAM,OAAA,SAAeA,6BAAA,CAAmB;AAAA,EAEvC,OAAgB,IAAA,GAAkB,QAAA;AAAA,EAElC,MAAM,MAAA,CAAO,QAAA,EAAuB,MAAA,EAAqC,OAAA,EAA2C;AACnH,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2B,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,OAAA,CAAO,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACrG;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAAuB,MAAA,EAAqC,OAAA,EAA2C;AACnH,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAA2B,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,OAAA,CAAO,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EACrG;AAAA,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,OAAA,CAAO,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA,EAC9F;AAAA,EAEA,MAAM,UAAA,CAAW,OAAA,EAAyB,MAAA,EAAyC,OAAA,EAA+C;AACjI,IAAA,MAAM,QAAA,GAAY,QAAkB,EAAA,IAAM,OAAA;AAC1C,IAAA,OAAO,IAAA,CA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SAAA,CAAU,KAAA,CAAc,EAAE,IAAA,EAAM,SAAA,EAAU,EAAG,CAAA,OAAA,EAAU,QAAQ,CAAA,YAAA,CAAA,EAAgB,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC3G;AAAA,EAEA,MAAM,mBAAA,CAAoB,OAAA,EAAyB,MAAA,EAAyC,OAAA,EAAiE;AAC5J,IAAA,MAAM,QAAA,GAAY,QAAkB,EAAA,IAAM,OAAA;AAC1C,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAqB,EAAE,IAAA,EAAM,iBAAA,EAAkB,EAAG,CAAA,OAAA,EAAU,QAAQ,CAAA,oBAAA,CAAA,EAAwB,MAAA,EAAQ,OAAO,CAAA;AAAA,EAClI;AAAA,EAGA,QAAQ,QAAA,EAAkC;AACzC,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,OAAA,CAAO,IAAA;AAAA,EACnD;AAAA,EAGA,aAAa,EAAA,EAA0C;AACtD,IAAA,OAAO,KAAA,CAAM,qBAA+B,EAAE,CAAA;AAAA,EAC/C;AAAA,EAEA,sBAAsB,GAAA,EAA2B;AAChD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAgC,GAAG,GAAG,CAAA;AAAA,EACpD;AAAA,EAGA,IAAA,GAAkB;AACjB,IAAA,OAAO,OAAA,CAAO,IAAA;AAAA,EACf;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,MAAA,EAAO;AAC5B,IAAO,cAAA,GAAQ","file":"chunk-BJYOKKGX.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 { PriceList, PriceListType } from './price_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { PriceTier, PriceTierType } from './price_tiers'\nimport type { PriceVolumeTier } from './price_volume_tiers'\nimport type { PriceFrequencyTier } from './price_frequency_tiers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { StockLocation } from './stock_locations'\n\n\ntype PriceType = 'prices'\ntype PriceRel = ResourceRel & { type: PriceType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\n\n\nexport type PriceSort = Pick<Price, 'id' | 'currency_code' | 'amount_cents' | 'compare_at_amount_cents'> & ResourceSort\n// export type PriceFilter = Pick<Price, 'id' | 'currency_code' | 'amount_cents' | 'compare_at_amount_cents' | 'rules'> & ResourceFilter\n\n\ninterface Price extends Resource {\n\t\n\treadonly type: PriceType\n\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated price list.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * The code of the associated SKU. When creating a price, either a valid sku_code or a SKU relationship must be present.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU price amount for the associated price list, in cents.\n\t * @example ```10000```\n\t */\n\tamount_cents: number\n\t/** \n\t * The SKU price amount for the associated price list, float.\n\t * @example ```100```\n\t */\n\tamount_float?: number | null\n\t/** \n\t * The SKU price amount for the associated price list, formatted.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_amount?: string | null\n\t/** \n\t * The SKU price amount for the associated price list, in cents before any applied rule.\n\t * @example ```10000```\n\t */\n\toriginal_amount_cents?: number | null\n\t/** \n\t * The SKU price amount for the associated price list, in cents before any applied rule, formatted.\n\t * @example ```\"€100,00\"```\n\t */\n\tformatted_original_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 rule outcomes.\n\t * @example ```[]```\n\t */\n\trule_outcomes?: Record<string, any> | null\n\t/** \n\t * Time at which the resource was processed by API.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tprocessed_at?: string | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\t/** \n\t * The payload used to evaluate the rules.\n\t * @example ```{}```\n\t */\n\tresource_payload?: Record<string, any> | null\n\t/** \n\t * The custom_claim attached to the current JWT (if any).\n\t * @example ```{}```\n\t */\n\tjwt_custom_claim?: Record<string, any> | null\n\n\tprice_list?: PriceList | null\n\tsku?: Sku | null\n\tprice_tiers?: PriceTier[] | null\n\tprice_volume_tiers?: PriceVolumeTier[] | null\n\tprice_frequency_tiers?: PriceFrequencyTier[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tjwt_customer?: Customer | null\n\tjwt_markets?: Market[] | null\n\tjwt_stock_locations?: StockLocation[] | null\n\n}\n\n\ninterface PriceCreate extends ResourceCreate {\n\t\n\t/** \n\t * The code of the associated SKU. When creating a price, either a valid sku_code or a SKU relationship must be present.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU price amount for the associated price list, in cents.\n\t * @example ```10000```\n\t */\n\tamount_cents: number\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 rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\n\tprice_list: PriceListRel\n\tsku: SkuRel\n\tprice_tiers?: PriceTierRel[] | null\n\n}\n\n\ninterface PriceUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The code of the associated SKU. When creating a price, either a valid sku_code or a SKU relationship must be present.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU price amount for the associated price list, in cents.\n\t * @example ```10000```\n\t */\n\tamount_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 * Time at which the resource was processed by API.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tprocessed_at?: string | null\n\t/** \n\t * The rules (using Rules Engine) to be applied.\n\t * @example ```{}```\n\t */\n\trules?: Record<string, any> | null\n\n\tprice_list?: PriceListRel | null\n\tsku?: SkuRel | null\n\tprice_tiers?: PriceTierRel[] | null\n\n}\n\n\nclass Prices extends ApiResource<Price> {\n\n\tstatic readonly TYPE: PriceType = 'prices' as const\n\n\tasync create(resource: PriceCreate, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\treturn this.resources.create<PriceCreate, Price>({ ...resource, type: Prices.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceUpdate, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\treturn this.resources.update<PriceUpdate, Price>({ ...resource, type: Prices.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: Prices.TYPE } : id, options)\n\t}\n\n\tasync price_list(priceId: string | Price, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `prices/${_priceId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync sku(priceId: string | Price, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `prices/${_priceId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync price_tiers(priceId: string | Price, params?: QueryParamsList<PriceTier>, options?: ResourcesConfig): Promise<ListResponse<PriceTier>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceTier>({ type: 'price_tiers' }, `prices/${_priceId}/price_tiers`, params, options) as unknown as ListResponse<PriceTier>\n\t}\n\n\tasync price_volume_tiers(priceId: string | Price, params?: QueryParamsList<PriceVolumeTier>, options?: ResourcesConfig): Promise<ListResponse<PriceVolumeTier>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceVolumeTier>({ type: 'price_volume_tiers' }, `prices/${_priceId}/price_volume_tiers`, params, options) as unknown as ListResponse<PriceVolumeTier>\n\t}\n\n\tasync price_frequency_tiers(priceId: string | Price, params?: QueryParamsList<PriceFrequencyTier>, options?: ResourcesConfig): Promise<ListResponse<PriceFrequencyTier>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceFrequencyTier>({ type: 'price_frequency_tiers' }, `prices/${_priceId}/price_frequency_tiers`, params, options) as unknown as ListResponse<PriceFrequencyTier>\n\t}\n\n\tasync attachments(priceId: string | Price, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `prices/${_priceId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceId: string | Price, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `prices/${_priceId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync jwt_customer(priceId: string | Price, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `prices/${_priceId}/jwt_customer`, params, options) as unknown as Customer\n\t}\n\n\tasync jwt_markets(priceId: string | Price, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `prices/${_priceId}/jwt_markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync jwt_stock_locations(priceId: string | Price, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `prices/${_priceId}/jwt_stock_locations`, params, options) as unknown as ListResponse<StockLocation>\n\t}\n\n\n\tisPrice(resource: any): resource is Price {\n\t\treturn resource.type && (resource.type === Prices.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceRel {\n\t\treturn super.relationshipOneToOne<PriceRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceRel[] {\n\t\treturn super.relationshipOneToMany<PriceRel>(...ids)\n\t}\n\n\n\ttype(): PriceType {\n\t\treturn Prices.TYPE\n\t}\n\n}\n\n\nconst instance = new Prices()\nexport default instance\n\nexport type { Prices, Price, PriceCreate, PriceUpdate, PriceType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/wire_transfers.ts"],"names":["ApiResource"],"mappings":";;;;;AA+CA,IAAM,aAAA,GAAN,MAAM,cAAA,SAAsBA,6BAA0B,CAAA;AAAA,EAErD,OAAgB,IAAyB,GAAA,gBAAA;AAAA,EAEzC,MAAM,MAAA,CAAO,QAA8B,EAAA,MAAA,EAA4C,OAAkD,EAAA;AACxI,IAAO,OAAA,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AAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,cAAc,CAAA,IAAA;AAAA;AAC1D,EAGA,aAAa,EAAiD,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA;AACtD,EAEA,sBAAsB,GAAkC,EAAA;AACvD,IAAO,OAAA,KAAA,CAAM,qBAAuC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC3D,EAGA,IAAyB,GAAA;AACxB,IAAA,OAAO,cAAc,CAAA,IAAA;AAAA;AAGvB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,aAAc,EAAA;AACnC,IAAO,sBAAQ,GAAA","file":"chunk-BN6XJAZH.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 { Version } from './versions'\n\n\ntype WireTransferType = 'wire_transfers'\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type WireTransferSort = Pick<WireTransfer, 'id'> & ResourceSort\n// export type WireTransferFilter = Pick<WireTransfer, 'id'> & ResourceFilter\n\n\ninterface WireTransfer extends Resource {\n\t\n\treadonly type: WireTransferType\n\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface WireTransferCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface WireTransferUpdate extends ResourceUpdate {\n\t\n\torder?: OrderRel | null\n\n}\n\n\nclass WireTransfers extends ApiResource<WireTransfer> {\n\n\tstatic readonly TYPE: WireTransferType = 'wire_transfers' as const\n\n\tasync create(resource: WireTransferCreate, params?: QueryParamsRetrieve<WireTransfer>, options?: ResourcesConfig): Promise<WireTransfer> {\n\t\treturn this.resources.create<WireTransferCreate, WireTransfer>({ ...resource, type: WireTransfers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: WireTransferUpdate, params?: QueryParamsRetrieve<WireTransfer>, options?: ResourcesConfig): Promise<WireTransfer> {\n\t\treturn this.resources.update<WireTransferUpdate, WireTransfer>({ ...resource, type: WireTransfers.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: WireTransfers.TYPE } : id, options)\n\t}\n\n\tasync order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _wireTransferId = (wireTransferId as WireTransfer).id || wireTransferId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `wire_transfers/${_wireTransferId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync versions(wireTransferId: string | WireTransfer, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _wireTransferId = (wireTransferId as WireTransfer).id || wireTransferId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `wire_transfers/${_wireTransferId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisWireTransfer(resource: any): resource is WireTransfer {\n\t\treturn resource.type && (resource.type === WireTransfers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): WireTransferRel {\n\t\treturn super.relationshipOneToOne<WireTransferRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): WireTransferRel[] {\n\t\treturn super.relationshipOneToMany<WireTransferRel>(...ids)\n\t}\n\n\n\ttype(): WireTransferType {\n\t\treturn WireTransfers.TYPE\n\t}\n\n}\n\n\nconst instance = new WireTransfers()\nexport default instance\n\nexport type { WireTransfers, WireTransfer, WireTransfer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AAuC,MAAA,EAAmC,OAAA,EAA2D;AACnJ,IAAA,MAAM,eAAA,GAAmB,eAAgC,EAAA,IAAM,cAAA;AAC/D,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAe,EAAE,IAAA,EAAM,UAAA,EAAW,EAAG,CAAA,eAAA,EAAkB,eAAe,CAAA,SAAA,CAAA,EAAa,MAAA,EAAQ,OAAO,CAAA;AAAA,EACzH;AAAA,EAGA,eAAe,QAAA,EAAyC;AACvD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,cAAA,CAAc,IAAA;AAAA,EAC1D;AAAA,EAGA,aAAa,EAAA,EAAiD;AAC7D,IAAA,OAAO,KAAA,CAAM,qBAAsC,EAAE,CAAA;AAAA,EACtD;AAAA,EAEA,sBAAsB,GAAA,EAAkC;AACvD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAuC,GAAG,GAAG,CAAA;AAAA,EAC3D;AAAA,EAGA,IAAA,GAAyB;AACxB,IAAA,OAAO,cAAA,CAAc,IAAA;AAAA,EACtB;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,aAAA,EAAc;AACnC,IAAO,sBAAA,GAAQ","file":"chunk-BN6XJAZH.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 { Version } from './versions'\n\n\ntype WireTransferType = 'wire_transfers'\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type WireTransferSort = Pick<WireTransfer, 'id'> & ResourceSort\n// export type WireTransferFilter = Pick<WireTransfer, 'id'> & ResourceFilter\n\n\ninterface WireTransfer extends Resource {\n\t\n\treadonly type: WireTransferType\n\n\t/** \n\t * Information about the payment instrument used in the transaction.\n\t * @example ```{\"issuer\":\"cl bank\",\"card_type\":\"visa\"}```\n\t */\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface WireTransferCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface WireTransferUpdate extends ResourceUpdate {\n\t\n\torder?: OrderRel | null\n\n}\n\n\nclass WireTransfers extends ApiResource<WireTransfer> {\n\n\tstatic readonly TYPE: WireTransferType = 'wire_transfers' as const\n\n\tasync create(resource: WireTransferCreate, params?: QueryParamsRetrieve<WireTransfer>, options?: ResourcesConfig): Promise<WireTransfer> {\n\t\treturn this.resources.create<WireTransferCreate, WireTransfer>({ ...resource, type: WireTransfers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: WireTransferUpdate, params?: QueryParamsRetrieve<WireTransfer>, options?: ResourcesConfig): Promise<WireTransfer> {\n\t\treturn this.resources.update<WireTransferUpdate, WireTransfer>({ ...resource, type: WireTransfers.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: WireTransfers.TYPE } : id, options)\n\t}\n\n\tasync order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _wireTransferId = (wireTransferId as WireTransfer).id || wireTransferId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `wire_transfers/${_wireTransferId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync versions(wireTransferId: string | WireTransfer, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _wireTransferId = (wireTransferId as WireTransfer).id || wireTransferId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `wire_transfers/${_wireTransferId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisWireTransfer(resource: any): resource is WireTransfer {\n\t\treturn resource.type && (resource.type === WireTransfers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): WireTransferRel {\n\t\treturn super.relationshipOneToOne<WireTransferRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): WireTransferRel[] {\n\t\treturn super.relationshipOneToMany<WireTransferRel>(...ids)\n\t}\n\n\n\ttype(): WireTransferType {\n\t\treturn WireTransfers.TYPE\n\t}\n\n}\n\n\nconst instance = new WireTransfers()\nexport default instance\n\nexport type { WireTransfers, WireTransfer, WireTransferCreate, WireTransferUpdate, WireTransferType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/reserved_stocks.ts"],"names":["ApiResource"],"mappings":";;;;;AAoCA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAA2B,CAAA;AAAA,EAEvD,OAAgB,IAA0B,GAAA,iBAAA;AAAA,EAE1C,MAAM,UAAA,CAAW,eAAyC,EAAA,MAAA,EAAyC,OAA+C,EAAA;AACjJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAiB,EAAE,IAAA,EAAM,aAAc,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAe,WAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClI,EAEA,MAAM,GAAA,CAAI,eAAyC,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC9H,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAW,EAAE,IAAA,EAAM,MAAO,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAQ,IAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,kBAAA,CAAmB,eAAyC,EAAA,MAAA,EAA4C,OAAoE,EAAA;AACjL,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAwB,EAAE,IAAA,EAAM,oBAAqB,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAuB,mBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxJ,EAEA,MAAM,QAAA,CAAS,eAAyC,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACrJ,IAAM,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAmB,gBAAA,EAAA,gBAAgB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3H,EAGA,gBAAgB,QAA0C,EAAA;AACzD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,eAAe,CAAA,IAAA;AAAA;AAC3D,EAGA,aAAa,EAAkD,EAAA;AAC9D,IAAO,OAAA,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA;AACvD,EAEA,sBAAsB,GAAmC,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,eAAe,CAAA,IAAA;AAAA;AAGxB,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,uBAAQ,GAAA","file":"chunk-BTAKU6V5.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockItem } from './stock_items'\nimport type { Sku } from './skus'\nimport type { StockReservation } from './stock_reservations'\nimport type { Version } from './versions'\n\n\ntype ReservedStockType = 'reserved_stocks'\ntype ReservedStockRel = ResourceRel & { type: ReservedStockType }\n\n\nexport type ReservedStockSort = Pick<ReservedStock, 'id' | 'quantity'> & ResourceSort\n// export type ReservedStockFilter = Pick<ReservedStock, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface ReservedStock extends Resource {\n\t\n\treadonly type: ReservedStockType\n\n\t/** \n\t * The stock item reserved quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_item?: StockItem | null\n\tsku?: Sku | null\n\tstock_reservations?: StockReservation[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass ReservedStocks extends ApiResource<ReservedStock> {\n\n\tstatic readonly TYPE: ReservedStockType = 'reserved_stocks' as const\n\n\tasync stock_item(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `reserved_stocks/${_reservedStockId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync sku(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `reserved_stocks/${_reservedStockId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync stock_reservations(reservedStockId: string | ReservedStock, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `reserved_stocks/${_reservedStockId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync versions(reservedStockId: string | ReservedStock, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `reserved_stocks/${_reservedStockId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisReservedStock(resource: any): resource is ReservedStock {\n\t\treturn resource.type && (resource.type === ReservedStocks.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ReservedStockRel {\n\t\treturn super.relationshipOneToOne<ReservedStockRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ReservedStockRel[] {\n\t\treturn super.relationshipOneToMany<ReservedStockRel>(...ids)\n\t}\n\n\n\ttype(): ReservedStockType {\n\t\treturn ReservedStocks.TYPE\n\t}\n\n}\n\n\nconst instance = new ReservedStocks()\nexport default instance\n\nexport type { ReservedStocks, ReservedStock, ReservedStockType }\n"]}
1
+ {"version":3,"sources":["../src/resources/reserved_stocks.ts"],"names":["ApiResource"],"mappings":";;;;;AAoCA,IAAM,cAAA,GAAN,MAAM,eAAA,SAAuBA,6BAAA,CAA2B;AAAA,EAEvD,OAAgB,IAAA,GAA0B,iBAAA;AAAA,EAE1C,MAAM,UAAA,CAAW,eAAA,EAAyC,MAAA,EAAyC,OAAA,EAA+C;AACjJ,IAAA,MAAM,gBAAA,GAAoB,gBAAkC,EAAA,IAAM,eAAA;AAClE,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAiB,EAAE,IAAA,EAAM,aAAA,EAAc,EAAG,CAAA,gBAAA,EAAmB,gBAAgB,CAAA,WAAA,CAAA,EAAe,MAAA,EAAQ,OAAO,CAAA;AAAA,EAClI;AAAA,EAEA,MAAM,GAAA,CAAI,eAAA,EAAyC,MAAA,EAAmC,OAAA,EAAyC;AAC9H,IAAA,MAAM,gBAAA,GAAoB,gBAAkC,EAAA,IAAM,eAAA;AAClE,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAW,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,uBAAA,GAAQ","file":"chunk-BTAKU6V5.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockItem } from './stock_items'\nimport type { Sku } from './skus'\nimport type { StockReservation } from './stock_reservations'\nimport type { Version } from './versions'\n\n\ntype ReservedStockType = 'reserved_stocks'\ntype ReservedStockRel = ResourceRel & { type: ReservedStockType }\n\n\nexport type ReservedStockSort = Pick<ReservedStock, 'id' | 'quantity'> & ResourceSort\n// export type ReservedStockFilter = Pick<ReservedStock, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface ReservedStock extends Resource {\n\t\n\treadonly type: ReservedStockType\n\n\t/** \n\t * The stock item reserved quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_item?: StockItem | null\n\tsku?: Sku | null\n\tstock_reservations?: StockReservation[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass ReservedStocks extends ApiResource<ReservedStock> {\n\n\tstatic readonly TYPE: ReservedStockType = 'reserved_stocks' as const\n\n\tasync stock_item(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `reserved_stocks/${_reservedStockId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync sku(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `reserved_stocks/${_reservedStockId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync stock_reservations(reservedStockId: string | ReservedStock, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `reserved_stocks/${_reservedStockId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync versions(reservedStockId: string | ReservedStock, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `reserved_stocks/${_reservedStockId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisReservedStock(resource: any): resource is ReservedStock {\n\t\treturn resource.type && (resource.type === ReservedStocks.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ReservedStockRel {\n\t\treturn super.relationshipOneToOne<ReservedStockRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ReservedStockRel[] {\n\t\treturn super.relationshipOneToMany<ReservedStockRel>(...ids)\n\t}\n\n\n\ttype(): ReservedStockType {\n\t\treturn ReservedStocks.TYPE\n\t}\n\n}\n\n\nconst instance = new ReservedStocks()\nexport default instance\n\nexport type { ReservedStocks, ReservedStock, ReservedStockType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/sku_list_promotion_rules.ts"],"names":[],"mappings":";;;AA+FA,IAAM,qBAAA,GAAN,MAAM,sBAAA,SAA8B,WAAkC,CAAA;AAAA,EAErE,OAAgB,IAAiC,GAAA,0BAAA;AAAA,EAEjD,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,sBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,EAEA,MAAM,MAAA,CA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,EAAE,IAAA,EAAM,MAAO,EAAA,EAAG,CAA4B,yBAAA,EAAA,uBAAuB,CAAS,KAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/H,EAGA,uBAAuB,QAAiD,EAAA;AACvE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,sBAAsB,CAAA,IAAA;AAAA;AAClE,EAGA,aAAa,EAAyD,EAAA;AACrE,IAAO,OAAA,KAAA,CAAM,qBAA8C,EAAE,CAAA;AAAA;AAC9D,EAEA,sBAAsB,GAA0C,EAAA;AAC/D,IAAO,OAAA,KAAA,CAAM,qBAA+C,CAAA,GAAG,GAAG,CAAA;AAAA;AACnE,EAGA,IAAiC,GAAA;AAChC,IAAA,OAAO,sBAAsB,CAAA,IAAA;AAAA;AAG/B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,qBAAsB,EAAA;AAC3C,IAAO,gCAAQ,GAAA","file":"chunk-CG2ACHGS.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 { Version } from './versions'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\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 SkuListPromotionRuleType = 'sku_list_promotion_rules'\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\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 SkuListRel = ResourceRel & { type: SkuListType }\n\n\nexport type SkuListPromotionRuleSort = Pick<SkuListPromotionRule, 'id'> & ResourceSort\n// export type SkuListPromotionRuleFilter = Pick<SkuListPromotionRule, 'id'> & ResourceFilter\n\n\ninterface SkuListPromotionRule extends Resource {\n\t\n\treadonly type: SkuListPromotionRuleType\n\n\t/** \n\t * Indicates if the rule is activated only when all of the SKUs of the list is also part of the order.\n\t * @example ```true```\n\t */\n\tall_skus?: boolean | null\n\t/** \n\t * The min quantity of SKUs of the list that must be also part of the order. If positive, overwrites the 'all_skus' option. When the SKU list is manual, its items quantities are honoured.\n\t * @example ```3```\n\t */\n\tmin_quantity?: number | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface SkuListPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Indicates if the rule is activated only when all of the SKUs of the list is also part of the order.\n\t * @example ```true```\n\t */\n\tall_skus?: boolean | null\n\t/** \n\t * The min quantity of SKUs of the list that must be also part of the order. If positive, overwrites the 'all_skus' option. When the SKU list is manual, its items quantities are honoured.\n\t * @example ```3```\n\t */\n\tmin_quantity?: number | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\tsku_list?: SkuListRel | null\n\n}\n\n\ninterface SkuListPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the rule is activated only when all of the SKUs of the list is also part of the order.\n\t * @example ```true```\n\t */\n\tall_skus?: boolean | null\n\t/** \n\t * The min quantity of SKUs of the list that must be also part of the order. If positive, overwrites the 'all_skus' option. When the SKU list is manual, its items quantities are honoured.\n\t * @example ```3```\n\t */\n\tmin_quantity?: number | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\tsku_list?: SkuListRel | null\n\n}\n\n\nclass SkuListPromotionRules extends ApiResource<SkuListPromotionRule> {\n\n\tstatic readonly TYPE: SkuListPromotionRuleType = 'sku_list_promotion_rules' as const\n\n\tasync create(resource: SkuListPromotionRuleCreate, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\treturn this.resources.create<SkuListPromotionRuleCreate, SkuListPromotionRule>({ ...resource, type: SkuListPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\treturn this.resources.update<SkuListPromotionRuleUpdate, SkuListPromotionRule>({ ...resource, type: SkuListPromotionRules.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: SkuListPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync sku_list(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\n\tisSkuListPromotionRule(resource: any): resource is SkuListPromotionRule {\n\t\treturn resource.type && (resource.type === SkuListPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<SkuListPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<SkuListPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): SkuListPromotionRuleType {\n\t\treturn SkuListPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuListPromotionRules()\nexport default instance\n\nexport type { SkuListPromotionRules, SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate, SkuListPromotionRuleType }\n"]}
1
+ {"version":3,"sources":["../src/resources/sku_list_promotion_rules.ts"],"names":[],"mappings":";;;AA+FA,IAAM,qBAAA,GAAN,MAAM,sBAAA,SAA8B,WAAA,CAAkC;AAAA,EAErE,OAAgB,IAAA,GAAiC,0BAAA;AAAA,EAEjD,MAAM,MAAA,CAAO,QAAA,EAAsC,MAAA,EAAoD,OAAA,EAA0D;AAChK,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAyD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,sBAAA,CAAsB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAClJ;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAAsC,MAAA,EAAoD,OAAA,EAA0D;AAChK,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAyD,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,sBAAA,CAAsB,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAClJ;AAAA,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,sBAAA,CAAsB,IAAA,EAAK,GAAI,IAAI,OAAO,CAAA;AAAA,EAC7G;AAAA,EAEA,MAAM,QAAA,CAAS,sBAAA,EAAuD,MAAA,EAAmC,OAAA,EAA2D;AACnK,IAAA,MAAM,uBAAA,GAA2B,uBAAgD,EAAA,IAAM,sBAAA;AACvF,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAAe,EAAE,IAAA,EAAM,UAAA,EAAW,EAAG,CAAA,yBAAA,EAA4B,uBAAuB,CAAA,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import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\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 SkuListPromotionRuleType = 'sku_list_promotion_rules'\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\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 SkuListRel = ResourceRel & { type: SkuListType }\n\n\nexport type SkuListPromotionRuleSort = Pick<SkuListPromotionRule, 'id'> & ResourceSort\n// export type SkuListPromotionRuleFilter = Pick<SkuListPromotionRule, 'id'> & ResourceFilter\n\n\ninterface SkuListPromotionRule extends Resource {\n\t\n\treadonly type: SkuListPromotionRuleType\n\n\t/** \n\t * Indicates if the rule is activated only when all of the SKUs of the list is also part of the order.\n\t * @example ```true```\n\t */\n\tall_skus?: boolean | null\n\t/** \n\t * The min quantity of SKUs of the list that must be also part of the order. If positive, overwrites the 'all_skus' option. When the SKU list is manual, its items quantities are honoured.\n\t * @example ```3```\n\t */\n\tmin_quantity?: number | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface SkuListPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Indicates if the rule is activated only when all of the SKUs of the list is also part of the order.\n\t * @example ```true```\n\t */\n\tall_skus?: boolean | null\n\t/** \n\t * The min quantity of SKUs of the list that must be also part of the order. If positive, overwrites the 'all_skus' option. When the SKU list is manual, its items quantities are honoured.\n\t * @example ```3```\n\t */\n\tmin_quantity?: number | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\tsku_list?: SkuListRel | null\n\n}\n\n\ninterface SkuListPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Indicates if the rule is activated only when all of the SKUs of the list is also part of the order.\n\t * @example ```true```\n\t */\n\tall_skus?: boolean | null\n\t/** \n\t * The min quantity of SKUs of the list that must be also part of the order. If positive, overwrites the 'all_skus' option. When the SKU list is manual, its items quantities are honoured.\n\t * @example ```3```\n\t */\n\tmin_quantity?: number | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\tsku_list?: SkuListRel | null\n\n}\n\n\nclass SkuListPromotionRules extends ApiResource<SkuListPromotionRule> {\n\n\tstatic readonly TYPE: SkuListPromotionRuleType = 'sku_list_promotion_rules' as const\n\n\tasync create(resource: SkuListPromotionRuleCreate, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\treturn this.resources.create<SkuListPromotionRuleCreate, SkuListPromotionRule>({ ...resource, type: SkuListPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\treturn this.resources.update<SkuListPromotionRuleUpdate, SkuListPromotionRule>({ ...resource, type: SkuListPromotionRules.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: SkuListPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync sku_list(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\n\tisSkuListPromotionRule(resource: any): resource is SkuListPromotionRule {\n\t\treturn resource.type && (resource.type === SkuListPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<SkuListPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<SkuListPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): SkuListPromotionRuleType {\n\t\treturn SkuListPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuListPromotionRules()\nexport default instance\n\nexport type { SkuListPromotionRules, SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate, SkuListPromotionRuleType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/query.ts"],"names":[],"mappings":";;;;AAOA,IAAM,KAAA,GAAQ,cAAM,OAAO,CAAA;AAG3B,IAAM,YAAe,GAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,OAAO,iBAAiB,CAAA;AAC9D,IAAM,aAAA,GAAgB,CAAC,MAA4B,KAAA;AAClD,EAAA,OAAO,aAAa,IAAK,CAAA,CAAA,CAAA,KAAK,MAAO,CAAA,QAAA,CAAS,CAAC,CAAC,CAAA;AACjD,CAAA;AAEA,IAAM,aAAA,GAAgB,CAAC,QAAQ,CAAA;AAC/B,IAAM,cAAA,GAAiB,CAAC,MAA4B,KAAA;AACnD,EAAA,OAAO,cAAc,IAAK,CAAA,CAAA,CAAA,KAAK,MAAO,CAAA,QAAA,CAAS,CAAC,CAAC,CAAA;AAClD,CAAA;A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,OACxB,CAAA;AAAA;AACF;AAGD,EAAA,KAAA,CAAM,2BAA2B,EAAE,CAAA;AAEnC,EAAO,OAAA,EAAA;AAER;AAGA,IAAM,oBAAuB,GAAA,CAAC,MAA4B,EAAA,YAAA,GAAwB,IAAiB,KAAA;AAClG,EAAI,IAAA,CAAC,UAAW,MAAO,CAAA,IAAA,CAAK,MAAM,CAAE,CAAA,MAAA,KAAW,GAAW,OAAA,EAAA;AAC1D,EAAO,OAAA,CAAA,EAAG,YAAe,GAAA,GAAA,GAAM,EAAE,CAAA,EAAG,OAAO,OAAQ,CAAA,MAAM,CAAE,CAAA,GAAA,CAAI,CAAC,CAAC,KAAK,GAAG,CAAA,KAAM,CAAG,EAAA,GAAG,CAAI,CAAA,EAAA,MAAA,CAAO,GAAG,CAAC,CAAE,CAAA,CAAA,CAAE,IAAK,CAAA,GAAG,CAAC,CAAA,CAAA;AAClH","file":"chunk-CHYP5F26.js","sourcesContent":["\nimport type { Resource, ResourceType } from \"./resource\"\nimport { ErrorType, SdkError } from \"./error\"\nimport type { PositiveNumberRange, StringKey } from \"./types\"\nimport type { ResourceFields, ResourceSortFields, ResourceTypeLock } from \"./enum\"\n\nimport Debug from './debug'\nconst debug = Debug('query')\n\n\nconst arrayFilters = ['_any', '_all', '_in', '_not_in_or_null']\nconst isArrayFilter = (filter: string): boolean => {\n\treturn arrayFilters.some(f => filter.endsWith(f))\n}\n\nconst objectFilters = ['_jcont']\nconst isObjectFilter = (filter: string): boolean => {\n\treturn objectFilters.some(f => filter.endsWith(f))\n}\n\n\n// type QueryResType<T> = T extends { type: infer Type } ? Type : never\ntype QueryResType<T extends Resource> = T['type']\n\nexport type QueryInclude = string[]\n\ntype QueryResourceFields<R extends ResourceTypeLock> = keyof ResourceFields[R]\ntype QueryArrayFields<R extends Resource> = Array<QueryResourceFields<QueryResType<R>>>\ntype QueryRecordFields = { [key in keyof ResourceFields]?: Array<(QueryResourceFields<key>)> }\nexport type QueryFields<R extends Resource> = QueryArrayFields<R> | QueryRecordFields\n\nexport interface QueryParamsRetrieve<R extends Resource = Resource> {\n\tinclude?: QueryInclude\n\tfields?: QueryFields<R>\n}\n\ntype QuerySortType = 'asc' | 'desc'\ntype QueryResourceSortable<R extends Resource> = ResourceSortFields[QueryResType<R>]\ntype QueryResourceSortableFields<R extends Resource> = StringKey<QueryResourceSortable<R>>\ntype QueryArraySortable<R extends Resource> = Array<QueryResourceSortableFields<R> | `-${QueryResourceSortableFields<R>}`>\ntype QueryRecordSortable<R extends Resource> = Partial<Record<keyof QueryResourceSortable<R>, QuerySortType>>\nexport type QuerySort<R extends Resource> = QueryArraySortable<R> | QueryRecordSortable<R>\n\nexport type QueryFilter = Record<string, string | number | boolean | object | Array<string | number>>\n\nexport type QueryPageNumber = number\nexport type QueryPageSize = PositiveNumberRange<25>\n\nexport interface QueryParamsList<R extends Resource = Resource> extends QueryParamsRetrieve<R> {\n\tsort?: QuerySort<R>\n\tfilters?: QueryFilter\n\tpageNumber?: QueryPageNumber\n\tpageSize?: QueryPageSize\n}\n\nexport type QueryParams<R extends Resource = Resource> = QueryParamsRetrieve<R> | QueryParamsList<R>\n\n\n\nconst isParamsList = <R extends Resource>(params: any): params is QueryParamsList<R> => {\n\treturn params && (params.filters || params.pageNumber || params.pageSize || params.sort)\n}\n\n\ntype QueryStringParams = Record<string, string>\n\nconst generateQueryStringParams = <R extends Resource>(params: QueryParams<R> | undefined, res: string | ResourceType): QueryStringParams => {\n\n\tdebug('generate query string params: %O, %O', params, res)\n\n\tconst qp: QueryStringParams = {}\n\tif (!params) return qp\n\n\t// Include\n\tif (params.include) qp.include = params.include.join(',')\n\t// Fields\n\tif (params.fields) {\n\t\tif (Array.isArray(params.fields)) params.fields = { [(res as ResourceType).type || res]: params.fields }\n\t\tObject.entries(params.fields).forEach(([p, v]) => {\n\t\t\tqp[`fields[${p}]`] = v.join(',')\n\t\t})\n\t}\n\n\tif (isParamsList(params)) {\n\t\t// Sort\n\t\tif (params.sort) {\n\t\t\tif (Array.isArray(params.sort)) qp.sort = params.sort.join(',')\n\t\t\telse qp.sort = Object.entries(params.sort).map(([k, v]) => `${v === 'desc' ? '-' : ''}${k}`).join(',')\n\t\t}\n\t\t// Page\n\t\tif (params.pageNumber) qp['page[number]'] = String(params.pageNumber)\n\t\tif (params.pageSize) qp['page[size]'] = String(params.pageSize)\n\t\t// Filters\n\t\tif (params.filters) {\n\t\t\tObject.entries(params.filters).forEach(([p, v]) => {\n\t\t\t\tlet val\n\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\tif (!isArrayFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Array value is supported only for the following filters: ${arrayFilters.join(', ')}`, type: ErrorType.REQUEST })\n\t\t\t\t\tval = v.join(',')\n\t\t\t\t}\n\t\t\t\telse if (typeof v === 'object') {\n\t\t\t\t\tif (!isObjectFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Object value is supported only for the following filters: ${objectFilters.join(', ')}`, type: ErrorType.REQUEST })\n\t\t\t\t\tval = JSON.stringify(v)\n\t\t\t\t}\n\t\t\t\telse val = String(v)\n\t\t\t\tqp[`filter[q][${p}]`] = val\n\t\t\t})\n\t\t}\n\t}\n\n\tdebug('query string params: %O', qp)\n\n\treturn qp\n\n}\n\n\nconst generateSearchString = (params?: QueryStringParams, questionMark: boolean = true): string => {\n\tif (!params || (Object.keys(params).length === 0)) return ''\n\treturn `${questionMark ? '?' : ''}${Object.entries(params).map(([key, val]) => `${key}=${String(val)}`).join('&')}`\n}\n\n\nexport { generateQueryStringParams, isParamsList, generateSearchString }\n"]}
1
+ {"version":3,"sources":["../src/query.ts"],"names":[],"mappings":";;;;AAOA,IAAM,KAAA,GAAQ,cAAM,OAAO,CAAA;AAG3B,IAAM,YAAA,GAAe,CAAC,MAAA,EAAQ,MAAA,EAAQ,OAAO,iBAAiB,CAAA;AAC9D,IAAM,aAAA,GAAgB,CAAC,MAAA,KAA4B;AAClD,EAAA,OAAO,aAAa,IAAA,CAAK,CAAA,C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EAAqB,CAAC,gEAAgE,aAAA,CAAc,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,EAAI,+BAAyB,CAAA;AACjM,UAAA,GAAA,GAAM,IAAA,CAAK,UAAU,CAAC,CAAA;AAAA,QACvB,CAAA,MACK,GAAA,GAAM,MAAA,CAAO,CAAC,CAAA;AACnB,QAAA,EAAA,CAAG,CAAA,UAAA,EAAa,CAAC,CAAA,CAAA,CAAG,CAAA,GAAI,GAAA;AAAA,MACzB,CAAC,CAAA;AAAA,IACF;AAAA,EACD;AAEA,EAAA,KAAA,CAAM,2BAA2B,EAAE,CAAA;AAEnC,EAAA,OAAO,EAAA;AAER;AAGA,IAAM,oBAAA,GAAuB,CAAC,MAAA,EAA4B,YAAA,GAAwB,IAAA,KAAiB;AAClG,EAAA,IAAI,CAAC,UAAW,MAAA,CAAO,IAAA,CAAK,MAAM,CAAA,CAAE,MAAA,KAAW,GAAI,OAAO,EAAA;AAC1D,EAAA,OAAO,CAAA,EAAG,YAAA,GAAe,GAAA,GAAM,EAAE,CAAA,EAAG,OAAO,OAAA,CAAQ,MAAM,CAAA,CAAE,GAAA,CAAI,CAAC,CAAC,KAAK,GAAG,CAAA,KAAM,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI,MAAA,CAAO,GAAG,CAAC,CAAA,CAAE,CAAA,CAAE,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA;AAClH","file":"chunk-CHYP5F26.js","sourcesContent":["\nimport type { Resource, ResourceType } from \"./resource\"\nimport { ErrorType, SdkError } from \"./error\"\nimport type { PositiveNumberRange, StringKey } from \"./types\"\nimport type { ResourceFields, ResourceSortFields, ResourceTypeLock } from \"./enum\"\n\nimport Debug from './debug'\nconst debug = Debug('query')\n\n\nconst arrayFilters = ['_any', '_all', '_in', '_not_in_or_null']\nconst isArrayFilter = (filter: string): boolean => {\n\treturn arrayFilters.some(f => filter.endsWith(f))\n}\n\nconst objectFilters = ['_jcont']\nconst isObjectFilter = (filter: string): boolean => {\n\treturn objectFilters.some(f => filter.endsWith(f))\n}\n\n\n// type QueryResType<T> = T extends { type: infer Type } ? Type : never\ntype QueryResType<T extends Resource> = T['type']\n\nexport type QueryInclude = string[]\n\ntype QueryResourceFields<R extends ResourceTypeLock> = keyof ResourceFields[R]\ntype QueryArrayFields<R extends Resource> = Array<QueryResourceFields<QueryResType<R>>>\ntype QueryRecordFields = { [key in keyof ResourceFields]?: Array<(QueryResourceFields<key>)> }\nexport type QueryFields<R extends Resource> = QueryArrayFields<R> | QueryRecordFields\n\nexport interface QueryParamsRetrieve<R extends Resource = Resource> {\n\tinclude?: QueryInclude\n\tfields?: QueryFields<R>\n}\n\ntype QuerySortType = 'asc' | 'desc'\ntype QueryResourceSortable<R extends Resource> = ResourceSortFields[QueryResType<R>]\ntype QueryResourceSortableFields<R extends Resource> = StringKey<QueryResourceSortable<R>>\ntype QueryArraySortable<R extends Resource> = Array<QueryResourceSortableFields<R> | `-${QueryResourceSortableFields<R>}`>\ntype QueryRecordSortable<R extends Resource> = Partial<Record<keyof QueryResourceSortable<R>, QuerySortType>>\nexport type QuerySort<R extends Resource> = QueryArraySortable<R> | QueryRecordSortable<R>\n\nexport type QueryFilter = Record<string, string | number | boolean | object | Array<string | number>>\n\nexport type QueryPageNumber = number\nexport type QueryPageSize = PositiveNumberRange<25>\n\nexport interface QueryParamsList<R extends Resource = Resource> extends QueryParamsRetrieve<R> {\n\tsort?: QuerySort<R>\n\tfilters?: QueryFilter\n\tpageNumber?: QueryPageNumber\n\tpageSize?: QueryPageSize\n}\n\nexport type QueryParams<R extends Resource = Resource> = QueryParamsRetrieve<R> | QueryParamsList<R>\n\n\n\nconst isParamsList = <R extends Resource>(params: any): params is QueryParamsList<R> => {\n\treturn params && (params.filters || params.pageNumber || params.pageSize || params.sort)\n}\n\n\ntype QueryStringParams = Record<string, string>\n\nconst generateQueryStringParams = <R extends Resource>(params: QueryParams<R> | undefined, res: string | ResourceType): QueryStringParams => {\n\n\tdebug('generate query string params: %O, %O', params, res)\n\n\tconst qp: QueryStringParams = {}\n\tif (!params) return qp\n\n\t// Include\n\tif (params.include) qp.include = params.include.join(',')\n\t// Fields\n\tif (params.fields) {\n\t\tif (Array.isArray(params.fields)) params.fields = { [(res as ResourceType).type || res]: params.fields }\n\t\tObject.entries(params.fields).forEach(([p, v]) => {\n\t\t\tqp[`fields[${p}]`] = v.join(',')\n\t\t})\n\t}\n\n\tif (isParamsList(params)) {\n\t\t// Sort\n\t\tif (params.sort) {\n\t\t\tif (Array.isArray(params.sort)) qp.sort = params.sort.join(',')\n\t\t\telse qp.sort = Object.entries(params.sort).map(([k, v]) => `${v === 'desc' ? '-' : ''}${k}`).join(',')\n\t\t}\n\t\t// Page\n\t\tif (params.pageNumber) qp['page[number]'] = String(params.pageNumber)\n\t\tif (params.pageSize) qp['page[size]'] = String(params.pageSize)\n\t\t// Filters\n\t\tif (params.filters) {\n\t\t\tObject.entries(params.filters).forEach(([p, v]) => {\n\t\t\t\tlet val\n\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\tif (!isArrayFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Array value is supported only for the following filters: ${arrayFilters.join(', ')}`, type: ErrorType.REQUEST })\n\t\t\t\t\tval = v.join(',')\n\t\t\t\t}\n\t\t\t\telse if (typeof v === 'object') {\n\t\t\t\t\tif (!isObjectFilter(p)) throw new SdkError({ message: `Incorrect filter [${p}]: Object value is supported only for the following filters: ${objectFilters.join(', ')}`, type: ErrorType.REQUEST })\n\t\t\t\t\tval = JSON.stringify(v)\n\t\t\t\t}\n\t\t\t\telse val = String(v)\n\t\t\t\tqp[`filter[q][${p}]`] = val\n\t\t\t})\n\t\t}\n\t}\n\n\tdebug('query string params: %O', qp)\n\n\treturn qp\n\n}\n\n\nconst generateSearchString = (params?: QueryStringParams, questionMark: boolean = true): string => {\n\tif (!params || (Object.keys(params).length === 0)) return ''\n\treturn `${questionMark ? '?' : ''}${Object.entries(params).map(([key, val]) => `${key}=${String(val)}`).join('&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;AAAA;AAC1J,EAEA,MAAM,QAAA,CAAS,oBAAmD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC/J,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACtI,EAEA,MAAM,qBAAA,CAAsB,oBAAmD,EAAA,MAAA,EAA8C,OAAsE,EAAA;AAClM,IAAM,MAAA,qBAAA,GAAyB,qBAA4C,EAAM,IAAA,oBAAA;AACjF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAA0B,EAAE,IAAA,EAAM,uBAAwB,EAAA,EAAG,CAAyB,sBAAA,EAAA,qBAAqB,CAA0B,sBAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3K,EAGA,qBAAqB,QAA+C,EAAA;AACnE,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,oBAAoB,CAAA,IAAA;AAAA;AAChE,EAGA,aAAa,EAAuD,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA;AAC5D,EAEA,sBAAsB,GAAwC,EAAA;AAC7D,IAAO,OAAA,KAAA,CAAM,qBAA6C,CAAA,GAAG,GAAG,CAAA;AAAA;AACjE,EAGA,IAA+B,GAAA;AAC9B,IAAA,OAAO,oBAAoB,CAAA,IAAA;AAAA;AAG7B,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,mBAAoB,EAAA;AACzC,IAAO,6BAAQ,GAAA","file":"chunk-CK6RZLVM.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\n\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 webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.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: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateways, CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
1
+ {"version":3,"sources":["../src/resources/checkout_com_gateways.ts"],"names":["ApiResource"],"mappings":";;;;;AAgGA,IAAM,mBAAA,GAAN,MAAM,oBAAA,SAA4BA,6BAAA,CAAgC;AAAA,EAEjE,OAAgB,IAAA,GAA+B,uBAAA;AAAA,EAE/C,MAA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AAA,sBAAA,EAAyB,qBAAqB,CAAA,SAAA,CAAA,EAAa,MAAA,EAAQ,OAAO,CAAA;AAAA,EACtI;AAAA,EAEA,MAAM,qBAAA,CAAsB,oBAAA,EAAmD,MAAA,EAA8C,OAAA,EAAsE;AAClM,IAAA,MAAM,qBAAA,GAAyB,qBAA4C,EAAA,IAAM,oBAAA;AACjF,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,KAAA,CAA0B,EAAE,IAAA,EAAM,uBAAA,EAAwB,EAAG,CAAA,sBAAA,EAAyB,qBAAqB,CAAA,sBAAA,CAAA,EAA0B,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC3K;AAAA,EAGA,qBAAqB,QAAA,EAA+C;AACnE,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,oBAAA,CAAoB,IAAA;AAAA,EAChE;AAAA,EAGA,aAAa,EAAA,EAAuD;AACnE,IAAA,OAAO,KAAA,CAAM,qBAA4C,EAAE,CAAA;AAAA,EAC5D;AAAA,EAEA,sBAAsB,GAAA,EAAwC;AAC7D,IAAA,OAAO,KAAA,CAAM,qBAAA,CAA6C,GAAG,GAAG,CAAA;AAAA,EACjE;AAAA,EAGA,IAAA,GAA+B;AAC9B,IAAA,OAAO,oBAAA,CAAoB,IAAA;AAAA,EAC5B;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,mBAAA,EAAoB;AACzC,IAAO,6BAAA,GAAQ","file":"chunk-CK6RZLVM.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 { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\n\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 webhook endpoint ID, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_id?: string | null\n\t/** \n\t * The gateway webhook endpoint secret, generated automatically.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\twebhook_endpoint_secret?: string | null\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/checkout_com_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key: string\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate 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 secret key.\n\t * @example ```\"sk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tsecret_key?: string | null\n\t/** \n\t * The gateway public key.\n\t * @example ```\"pk_test_xxxx-yyyy-zzzz\"```\n\t */\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.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: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new CheckoutComGateways()\nexport default instance\n\nexport type { CheckoutComGateways, CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/order_subscriptions.ts"],"names":[],"mappings":";;;AAmOA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAA+B,CAAA;AAAA,EAE/D,OAAgB,IAA8B,GAAA,qBAAA;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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;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,2BAAQ,GAAA","file":"chunk-CNCZCBI3.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 { SubscriptionModel } from './subscription_models'\nimport type { Order, OrderType } from './orders'\nimport type { Customer } from './customers'\nimport type { CustomerPaymentSource, CustomerPaymentSourceType } from './customer_payment_sources'\nimport type { OrderSubscriptionItem } from './order_subscription_items'\nimport type { OrderFactory } from './order_factories'\nimport type { RecurringOrderCopy } from './recurring_order_copies'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype OrderSubscriptionType = 'order_subscriptions'\ntype OrderSubscriptionRel = ResourceRel & { type: OrderSubscriptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype TagRel = ResourceRel & { type: TagType }\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\n\n\nexport type OrderSubscriptionSort = Pick<OrderSubscription, 'id' | 'number' | 'status' | 'frequency' | 'starts_at' | 'expires_at' | 'last_run_at' | 'next_run_at' | 'occurrencies' | 'errors_count' | 'succeeded_on_last_run'> & ResourceSort\n// export type OrderSubscriptionFilter = Pick<OrderSubscription, 'id' | 'number' | 'status' | 'frequency' | 'customer_email' | 'starts_at' | 'expires_at' | 'last_run_at' | 'next_run_at' | 'occurrencies' | 'errors_count' | 'succeeded_on_last_run'> & ResourceFilter\n\n\ninterface OrderSubscription extends Resource {\n\t\n\treadonly type: OrderSubscriptionType\n\n\t/** \n\t * Unique identifier for the subscription (numeric).\n\t * @example ```\"1234\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * The subscription status. One of 'draft' (default), 'inactive', 'active', 'running', or 'cancelled'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'inactive' | 'active' | 'running' | 'cancelled'\n\t/** \n\t * The frequency of the subscription. Use one of the supported within 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or provide your custom crontab expression (min unit is hour). Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency: string\n\t/** \n\t * Indicates if the subscription will be activated considering the placed source order as its first run.\n\t * @example ```true```\n\t */\n\tactivate_by_source_order?: boolean | null\n\t/** \n\t * Indicates if the subscription created orders are automatically placed at the end of the copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates the number of hours the renewal alert will be triggered before the subscription next run. Must be included between 1 and 720 hours.\n\t * @example ```1```\n\t */\n\trenewal_alert_period?: number | null\n\t/** \n\t * The email address of the customer, if any, associated to the source order.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email?: string | null\n\t/** \n\t * The activation date/time of this subscription.\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 subscription (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 date/time of the subscription last run.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tlast_run_at?: string | null\n\t/** \n\t * The date/time of the subscription next run. Can be updated but only in the future, to copy with frequency changes.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tnext_run_at?: string | null\n\t/** \n\t * The number of times this subscription has run.\n\t * @example ```2```\n\t */\n\toccurrencies?: number | null\n\t/** \n\t * Indicates the number of subscription errors, if any.\n\t * @example ```3```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates if the subscription has succeeded on its last run.\n\t * @example ```true```\n\t */\n\tsucceeded_on_last_run?: boolean | null\n\n\tmarket?: Market | null\n\tsubscription_model?: SubscriptionModel | null\n\tsource_order?: Order | null\n\tcustomer?: Customer | null\n\tcustomer_payment_source?: CustomerPaymentSource | null\n\torder_subscription_items?: OrderSubscriptionItem[] | null\n\torder_factories?: OrderFactory[] | null\n\trecurring_order_copies?: RecurringOrderCopy[] | null\n\torders?: Order[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The frequency of the subscription. Use one of the supported within 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or provide your custom crontab expression (min unit is hour). Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency: string\n\t/** \n\t * Indicates if the subscription will be activated considering the placed source order as its first run.\n\t * @example ```true```\n\t */\n\tactivate_by_source_order?: boolean | null\n\t/** \n\t * Indicates if the subscription created orders are automatically placed at the end of the copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates the number of hours the renewal alert will be triggered before the subscription next run. Must be included between 1 and 720 hours.\n\t * @example ```1```\n\t */\n\trenewal_alert_period?: number | null\n\t/** \n\t * The activation date/time of this subscription.\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 subscription (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tmarket?: MarketRel | null\n\tsource_order: OrderRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface OrderSubscriptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The frequency of the subscription. Use one of the supported within 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or provide your custom crontab expression (min unit is hour). Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\t/** \n\t * Indicates if the subscription will be activated considering the placed source order as its first run.\n\t * @example ```true```\n\t */\n\tactivate_by_source_order?: boolean | null\n\t/** \n\t * Indicates if the subscription created orders are automatically placed at the end of the copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates the number of hours the renewal alert will be triggered before the subscription next run. Must be included between 1 and 720 hours.\n\t * @example ```1```\n\t */\n\trenewal_alert_period?: number | null\n\t/** \n\t * The expiration date/time of this subscription (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 date/time of the subscription next run. Can be updated but only in the future, to copy with frequency changes.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tnext_run_at?: string | null\n\t/** \n\t * Send this attribute if you want to mark this subscription as active.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this subscription as inactive.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this subscription as cancelled.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to convert a manual subscription to an automatic one. A subscription model is required before conversion.\n\t * @example ```true```\n\t */\n\t_convert?: 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\tcustomer_payment_source?: CustomerPaymentSourceRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass OrderSubscriptions extends ApiResource<OrderSubscription> {\n\n\tstatic readonly TYPE: OrderSubscriptionType = 'order_subscriptions' as const\n\n\tasync create(resource: OrderSubscriptionCreate, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.create<OrderSubscriptionCreate, OrderSubscription>({ ...resource, type: OrderSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderSubscriptionUpdate, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ ...resource, type: OrderSubscriptions.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: OrderSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync market(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `order_subscriptions/${_orderSubscriptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync subscription_model(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `order_subscriptions/${_orderSubscriptionId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync source_order(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync customer(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `order_subscriptions/${_orderSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync customer_payment_source(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `order_subscriptions/${_orderSubscriptionId}/customer_payment_source`, params, options) as unknown as CustomerPaymentSource\n\t}\n\n\tasync order_subscription_items(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<OrderSubscriptionItem>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscriptionItem>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<OrderSubscriptionItem>({ type: 'order_subscription_items' }, `order_subscriptions/${_orderSubscriptionId}/order_subscription_items`, params, options) as unknown as ListResponse<OrderSubscriptionItem>\n\t}\n\n\tasync order_factories(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<OrderFactory>, options?: ResourcesConfig): Promise<ListResponse<OrderFactory>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<OrderFactory>({ type: 'order_factories' }, `order_subscriptions/${_orderSubscriptionId}/order_factories`, params, options) as unknown as ListResponse<OrderFactory>\n\t}\n\n\tasync recurring_order_copies(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<RecurringOrderCopy>, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<RecurringOrderCopy>({ type: 'recurring_order_copies' }, `order_subscriptions/${_orderSubscriptionId}/recurring_order_copies`, params, options) as unknown as ListResponse<RecurringOrderCopy>\n\t}\n\n\tasync orders(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync events(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `order_subscriptions/${_orderSubscriptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _activate(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _convert(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _convert: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | OrderSubscription, triggerValue: string, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | OrderSubscription, triggerValue: string, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisOrderSubscription(resource: any): resource is OrderSubscription {\n\t\treturn resource.type && (resource.type === OrderSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderSubscriptionRel {\n\t\treturn super.relationshipOneToOne<OrderSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<OrderSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): OrderSubscriptionType {\n\t\treturn OrderSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderSubscriptions()\nexport default instance\n\nexport type { OrderSubscriptions, OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate, OrderSubscriptionType }\n"]}
1
+ {"version":3,"sources":["../src/resources/order_subscriptions.ts"],"names":[],"mappings":";;;AAmOA,IAAM,kBAAA,GAAN,MAAM,mBAAA,SAA2B,WAAA,CAA+B;AAAA,EAE/D,OAAgB,IAAA,GAA8B,qBAAA;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,EACzI;AAAA,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,EACzI;AAAA,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,IA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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 { SubscriptionModel } from './subscription_models'\nimport type { Order, OrderType } from './orders'\nimport type { Customer } from './customers'\nimport type { CustomerPaymentSource, CustomerPaymentSourceType } from './customer_payment_sources'\nimport type { OrderSubscriptionItem } from './order_subscription_items'\nimport type { OrderFactory } from './order_factories'\nimport type { RecurringOrderCopy } from './recurring_order_copies'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype OrderSubscriptionType = 'order_subscriptions'\ntype OrderSubscriptionRel = ResourceRel & { type: OrderSubscriptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype TagRel = ResourceRel & { type: TagType }\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\n\n\nexport type OrderSubscriptionSort = Pick<OrderSubscription, 'id' | 'number' | 'status' | 'frequency' | 'starts_at' | 'expires_at' | 'last_run_at' | 'next_run_at' | 'occurrencies' | 'errors_count' | 'succeeded_on_last_run'> & ResourceSort\n// export type OrderSubscriptionFilter = Pick<OrderSubscription, 'id' | 'number' | 'status' | 'frequency' | 'customer_email' | 'starts_at' | 'expires_at' | 'last_run_at' | 'next_run_at' | 'occurrencies' | 'errors_count' | 'succeeded_on_last_run'> & ResourceFilter\n\n\ninterface OrderSubscription extends Resource {\n\t\n\treadonly type: OrderSubscriptionType\n\n\t/** \n\t * Unique identifier for the subscription (numeric).\n\t * @example ```\"1234\"```\n\t */\n\tnumber?: string | null\n\t/** \n\t * The subscription status. One of 'draft' (default), 'inactive', 'active', 'running', or 'cancelled'.\n\t * @example ```\"draft\"```\n\t */\n\tstatus: 'draft' | 'inactive' | 'active' | 'running' | 'cancelled'\n\t/** \n\t * The frequency of the subscription. Use one of the supported within 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or provide your custom crontab expression (min unit is hour). Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency: string\n\t/** \n\t * Indicates if the subscription will be activated considering the placed source order as its first run.\n\t * @example ```true```\n\t */\n\tactivate_by_source_order?: boolean | null\n\t/** \n\t * Indicates if the subscription created orders are automatically placed at the end of the copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates the number of hours the renewal alert will be triggered before the subscription next run. Must be included between 1 and 720 hours.\n\t * @example ```1```\n\t */\n\trenewal_alert_period?: number | null\n\t/** \n\t * The email address of the customer, if any, associated to the source order.\n\t * @example ```\"john@example.com\"```\n\t */\n\tcustomer_email?: string | null\n\t/** \n\t * The activation date/time of this subscription.\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 subscription (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 date/time of the subscription last run.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tlast_run_at?: string | null\n\t/** \n\t * The date/time of the subscription next run. Can be updated but only in the future, to copy with frequency changes.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tnext_run_at?: string | null\n\t/** \n\t * The number of times this subscription has run.\n\t * @example ```2```\n\t */\n\toccurrencies?: number | null\n\t/** \n\t * Indicates the number of subscription errors, if any.\n\t * @example ```3```\n\t */\n\terrors_count?: number | null\n\t/** \n\t * Indicates if the subscription has succeeded on its last run.\n\t * @example ```true```\n\t */\n\tsucceeded_on_last_run?: boolean | null\n\n\tmarket?: Market | null\n\tsubscription_model?: SubscriptionModel | null\n\tsource_order?: Order | null\n\tcustomer?: Customer | null\n\tcustomer_payment_source?: CustomerPaymentSource | null\n\torder_subscription_items?: OrderSubscriptionItem[] | null\n\torder_factories?: OrderFactory[] | null\n\trecurring_order_copies?: RecurringOrderCopy[] | null\n\torders?: Order[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderSubscriptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The frequency of the subscription. Use one of the supported within 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or provide your custom crontab expression (min unit is hour). Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency: string\n\t/** \n\t * Indicates if the subscription will be activated considering the placed source order as its first run.\n\t * @example ```true```\n\t */\n\tactivate_by_source_order?: boolean | null\n\t/** \n\t * Indicates if the subscription created orders are automatically placed at the end of the copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates the number of hours the renewal alert will be triggered before the subscription next run. Must be included between 1 and 720 hours.\n\t * @example ```1```\n\t */\n\trenewal_alert_period?: number | null\n\t/** \n\t * The activation date/time of this subscription.\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 subscription (must be after starts_at).\n\t * @example ```\"2018-01-02T12:00:00.000Z\"```\n\t */\n\texpires_at?: string | null\n\n\tmarket?: MarketRel | null\n\tsource_order: OrderRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface OrderSubscriptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The frequency of the subscription. Use one of the supported within 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or provide your custom crontab expression (min unit is hour). Must be supported by existing associated subscription_model.\n\t * @example ```\"monthly\"```\n\t */\n\tfrequency?: string | null\n\t/** \n\t * Indicates if the subscription will be activated considering the placed source order as its first run.\n\t * @example ```true```\n\t */\n\tactivate_by_source_order?: boolean | null\n\t/** \n\t * Indicates if the subscription created orders are automatically placed at the end of the copy.\n\t * @example ```true```\n\t */\n\tplace_target_order?: boolean | null\n\t/** \n\t * Indicates the number of hours the renewal alert will be triggered before the subscription next run. Must be included between 1 and 720 hours.\n\t * @example ```1```\n\t */\n\trenewal_alert_period?: number | null\n\t/** \n\t * The expiration date/time of this subscription (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 date/time of the subscription next run. Can be updated but only in the future, to copy with frequency changes.\n\t * @example ```\"2018-01-01T12:00:00.000Z\"```\n\t */\n\tnext_run_at?: string | null\n\t/** \n\t * Send this attribute if you want to mark this subscription as active.\n\t * @example ```true```\n\t */\n\t_activate?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this subscription as inactive.\n\t * @example ```true```\n\t */\n\t_deactivate?: boolean | null\n\t/** \n\t * Send this attribute if you want to mark this subscription as cancelled.\n\t * @example ```true```\n\t */\n\t_cancel?: boolean | null\n\t/** \n\t * Send this attribute if you want to convert a manual subscription to an automatic one. A subscription model is required before conversion.\n\t * @example ```true```\n\t */\n\t_convert?: 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\tcustomer_payment_source?: CustomerPaymentSourceRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass OrderSubscriptions extends ApiResource<OrderSubscription> {\n\n\tstatic readonly TYPE: OrderSubscriptionType = 'order_subscriptions' as const\n\n\tasync create(resource: OrderSubscriptionCreate, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.create<OrderSubscriptionCreate, OrderSubscription>({ ...resource, type: OrderSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderSubscriptionUpdate, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ ...resource, type: OrderSubscriptions.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: OrderSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync market(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `order_subscriptions/${_orderSubscriptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync subscription_model(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `order_subscriptions/${_orderSubscriptionId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync source_order(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync customer(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `order_subscriptions/${_orderSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync customer_payment_source(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `order_subscriptions/${_orderSubscriptionId}/customer_payment_source`, params, options) as unknown as CustomerPaymentSource\n\t}\n\n\tasync order_subscription_items(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<OrderSubscriptionItem>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscriptionItem>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<OrderSubscriptionItem>({ type: 'order_subscription_items' }, `order_subscriptions/${_orderSubscriptionId}/order_subscription_items`, params, options) as unknown as ListResponse<OrderSubscriptionItem>\n\t}\n\n\tasync order_factories(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<OrderFactory>, options?: ResourcesConfig): Promise<ListResponse<OrderFactory>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<OrderFactory>({ type: 'order_factories' }, `order_subscriptions/${_orderSubscriptionId}/order_factories`, params, options) as unknown as ListResponse<OrderFactory>\n\t}\n\n\tasync recurring_order_copies(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<RecurringOrderCopy>, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<RecurringOrderCopy>({ type: 'recurring_order_copies' }, `order_subscriptions/${_orderSubscriptionId}/recurring_order_copies`, params, options) as unknown as ListResponse<RecurringOrderCopy>\n\t}\n\n\tasync orders(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync events(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `order_subscriptions/${_orderSubscriptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _activate(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _convert(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _convert: true }, params, options)\n\t}\n\n\tasync _add_tags(id: string | OrderSubscription, triggerValue: string, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | OrderSubscription, triggerValue: string, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisOrderSubscription(resource: any): resource is OrderSubscription {\n\t\treturn resource.type && (resource.type === OrderSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderSubscriptionRel {\n\t\treturn super.relationshipOneToOne<OrderSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<OrderSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): OrderSubscriptionType {\n\t\treturn OrderSubscriptions.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderSubscriptions()\nexport default instance\n\nexport type { OrderSubscriptions, OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate, OrderSubscriptionType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/axerve_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,MAAA,gBAAA,GAAoB,gBAAkC,EAAM,IAAA,eAAA;AAClE,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAqB,EAAE,IAAA,EAAM,i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} 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 { AxervePayment, AxervePaymentType } from './axerve_payments'\n\n\ntype AxerveGatewayType = 'axerve_gateways'\ntype AxerveGatewayRel = ResourceRel & { type: AxerveGatewayType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\n\n\nexport type AxerveGatewaySort = Pick<AxerveGateway, 'id' | 'name'> & ResourceSort\n// export type AxerveGatewayFilter = Pick<AxerveGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AxerveGateway extends Resource {\n\t\n\treadonly type: AxerveGatewayType\n\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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/axerve_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\taxerve_payments?: AxervePayment[] | null\n\n}\n\n\ninterface AxerveGatewayCreate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\ninterface AxerveGatewayUpdate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\nclass AxerveGateways extends ApiResource<AxerveGateway> {\n\n\tstatic readonly TYPE: AxerveGatewayType = 'axerve_gateways' as const\n\n\tasync create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.create<AxerveGatewayCreate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.update<AxerveGatewayUpdate, AxerveGateway>({ ...resource, type: AxerveGateways.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: AxerveGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<AxervePayment>, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<AxervePayment>({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options) as unknown as ListResponse<AxervePayment>\n\t}\n\n\n\tisAxerveGateway(resource: any): resource is AxerveGateway {\n\t\treturn resource.type && (resource.type === AxerveGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxerveGatewayRel {\n\t\treturn super.relationshipOneToOne<AxerveGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxerveGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AxerveGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AxerveGatewayType {\n\t\treturn AxerveGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AxerveGateways()\nexport default instance\n\nexport type { AxerveGateways, AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType }\n"]}
1
+ {"version":3,"sources":["../src/resources/axerve_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,EAAU,IAAA,EAAM,eAAA,CAAe,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC7H;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAA+B,MAAA,EAA6C,OAAA,EAAmD;AAC3I,IAAA,OAAO,IAAA,CAAK,SAA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,gBAAgB,CAAA,gBAAA,CAAA,EAAoB,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC/I;AAAA,EAGA,gBAAgB,QAAA,EAA0C;AACzD,IAAA,OAAO,QAAA,CAAS,IAAA,IAAS,QAAA,CAAS,IAAA,KAAS,eAAA,CAAe,IAAA;AAAA,EAC3D;AAAA,EAGA,aAAa,EAAA,EAAkD;AAC9D,IAAA,OAAO,KAAA,CAAM,qBAAuC,EAAE,CAAA;AAAA,EACvD;AAAA,EAEA,sBAAsB,GAAA,EAAmC;AACxD,IAAA,OAAO,KAAA,CAAM,qBAAA,CAAwC,GAAG,GAAG,CAAA;AAAA,EAC5D;AAAA,EAGA,IAAA,GAA0B;AACzB,IAAA,OAAO,eAAA,CAAe,IAAA;AAAA,EACvB;AAED,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,cAAA,EAAe;AACpC,IAAO,uBAAA,GAAQ","file":"chunk-CRRYP7ZN.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 { AxervePayment, AxervePaymentType } from './axerve_payments'\n\n\ntype AxerveGatewayType = 'axerve_gateways'\ntype AxerveGatewayRel = ResourceRel & { type: AxerveGatewayType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\n\n\nexport type AxerveGatewaySort = Pick<AxerveGateway, 'id' | 'name'> & ResourceSort\n// export type AxerveGatewayFilter = Pick<AxerveGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AxerveGateway extends Resource {\n\t\n\treadonly type: AxerveGatewayType\n\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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway webhook URL, generated automatically.\n\t * @example ```\"https://core.commercelayer.co/webhook_callbacks/axerve_gateways/xxxxx\"```\n\t */\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\taxerve_payments?: AxervePayment[] | null\n\n}\n\n\ninterface AxerveGatewayCreate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin: string\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key: string\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\ninterface AxerveGatewayUpdate 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 merchant login code.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tlogin?: string | null\n\t/** \n\t * The gateway API key.\n\t * @example ```\"xxxx-yyyy-zzzz\"```\n\t */\n\tapi_key?: string | null\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\nclass AxerveGateways extends ApiResource<AxerveGateway> {\n\n\tstatic readonly TYPE: AxerveGatewayType = 'axerve_gateways' as const\n\n\tasync create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.create<AxerveGatewayCreate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.update<AxerveGatewayUpdate, AxerveGateway>({ ...resource, type: AxerveGateways.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: AxerveGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<AxervePayment>, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<AxervePayment>({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options) as unknown as ListResponse<AxervePayment>\n\t}\n\n\n\tisAxerveGateway(resource: any): resource is AxerveGateway {\n\t\treturn resource.type && (resource.type === AxerveGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxerveGatewayRel {\n\t\treturn super.relationshipOneToOne<AxerveGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxerveGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AxerveGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AxerveGatewayType {\n\t\treturn AxerveGateways.TYPE\n\t}\n\n}\n\n\nconst instance = new AxerveGateways()\nexport default instance\n\nexport type { AxerveGateways, AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType }\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resources/order_amount_promotion_rules.ts"],"names":["ApiResource"],"mappings":";;;;;AAkGA,IAAM,yBAAA,GAAN,MAAM,0BAAA,SAAkCA,6BAAsC,CAAA;AAAA,EAE7E,OAAgB,IAAqC,GAAA,8BAAA;AAAA,EAErD,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,0BAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,EAEA,MAAM,MAAA,CAAO,QAA0C,EAAA,MAAA,EAAwD,OAA8D,EAAA;AAC5K,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiE,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,0BAA0B,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9J,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,0BAAA,CAA0B,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,QAAA,CAAS,0BAA+D,EAAA,MAAA,EAAmC,OAA2D,EAAA;AAC3K,IAAM,MAAA,2BAAA,GAA+B,2BAAwD,EAAM,IAAA,0BAAA;AACnG,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAgC,6BAAA,EAAA,2BAA2B,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnJ,EAGA,2BAA2B,QAAqD,EAAA;AAC/E,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,0BAA0B,CAAA,IAAA;AAAA;AACtE,EAGA,aAAa,EAA6D,EAAA;AACzE,IAAO,OAAA,KAAA,CAAM,qBAAkD,EAAE,CAAA;AAAA;AAClE,EAEA,sBAAsB,GAA8C,EAAA;AACnE,IAAO,OAAA,KAAA,CAAM,qBAAmD,CAAA,GAAG,GAAG,CAAA;AAAA;AACvE,EAGA,IAAqC,GAAA;AACpC,IAAA,OAAO,0BAA0B,CAAA,IAAA;AAAA;AAGnC,CAAA;AAGA,IAAM,QAAA,GAAW,IAAI,yBAA0B,EAAA;AAC/C,IAAO,oCAAQ,GAAA","file":"chunk-CTXBUDGO.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 { Version } from './versions'\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 OrderAmountPromotionRuleType = 'order_amount_promotion_rules'\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\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 }\n\n\nexport type OrderAmountPromotionRuleSort = Pick<OrderAmountPromotionRule, 'id'> & ResourceSort\n// export type OrderAmountPromotionRuleFilter = Pick<OrderAmountPromotionRule, 'id'> & ResourceFilter\n\n\ninterface OrderAmountPromotionRule extends Resource {\n\t\n\treadonly type: OrderAmountPromotionRuleType\n\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, float.\n\t * @example ```10```\n\t */\n\torder_amount_float?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_order_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderAmountPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface OrderAmountPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {\n\n\tstatic readonly TYPE: OrderAmountPromotionRuleType = 'order_amount_promotion_rules' as const\n\n\tasync create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.create<OrderAmountPromotionRuleCreate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.update<OrderAmountPromotionRuleUpdate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderAmountPromotionRuleId = (orderAmountPromotionRuleId as OrderAmountPromotionRule).id || orderAmountPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule {\n\t\treturn resource.type && (resource.type === OrderAmountPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<OrderAmountPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderAmountPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderAmountPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderAmountPromotionRuleType {\n\t\treturn OrderAmountPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderAmountPromotionRules()\nexport default instance\n\nexport type { OrderAmountPromotionRules, OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType }\n"]}
1
+ {"version":3,"sources":["../src/resources/order_amount_promotion_rules.ts"],"names":["ApiResource"],"mappings":";;;;;AAkGA,IAAM,yBAAA,GAAN,MAAM,0BAAA,SAAkCA,6BAAA,CAAsC;AAAA,EAE7E,OAAgB,IAAA,GAAqC,8BAAA;AAAA,EAErD,MAAM,MAAA,CAAO,QAAA,EAA0C,MAAA,EAAwD,OAAA,EAA8D;AAC5K,IAAA,OAAO,IAAA,CAAK,SAAA,CAAU,MAAA,CAAiE,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,0BAAA,CAA0B,IAAA,EAAK,EAAG,MAAA,EAAQ,OAAO,CAAA;AAAA,EAC9J;AAAA,EAEA,MAAM,MAAA,CAAO,QAAA,EAA0C,MAAA,EAAwD,OAAA,EAA8D;AAC5K,IAAA,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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 { Version } from './versions'\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 OrderAmountPromotionRuleType = 'order_amount_promotion_rules'\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\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 }\n\n\nexport type OrderAmountPromotionRuleSort = Pick<OrderAmountPromotionRule, 'id'> & ResourceSort\n// export type OrderAmountPromotionRuleFilter = Pick<OrderAmountPromotionRule, 'id'> & ResourceFilter\n\n\ninterface OrderAmountPromotionRule extends Resource {\n\t\n\treadonly type: OrderAmountPromotionRuleType\n\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, float.\n\t * @example ```10```\n\t */\n\torder_amount_float?: number | null\n\t/** \n\t * Apply the promotion only when order is over this amount, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_order_amount?: string | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | FlexPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderAmountPromotionRuleCreate extends ResourceCreate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel\n\n}\n\n\ninterface OrderAmountPromotionRuleUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * Apply the promotion only when order is over this amount, in cents.\n\t * @example ```1000```\n\t */\n\torder_amount_cents?: number | null\n\t/** \n\t * Send this attribute if you want to compare the specified amount with order's subtotal (excluding discounts, if any).\n\t * @example ```true```\n\t */\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | FlexPromotionRel | null\n\n}\n\n\nclass OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {\n\n\tstatic readonly TYPE: OrderAmountPromotionRuleType = 'order_amount_promotion_rules' as const\n\n\tasync create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.create<OrderAmountPromotionRuleCreate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.update<OrderAmountPromotionRuleUpdate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.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: OrderAmountPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderAmountPromotionRuleId = (orderAmountPromotionRuleId as OrderAmountPromotionRule).id || orderAmountPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule {\n\t\treturn resource.type && (resource.type === OrderAmountPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<OrderAmountPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderAmountPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderAmountPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderAmountPromotionRuleType {\n\t\treturn OrderAmountPromotionRules.TYPE\n\t}\n\n}\n\n\nconst instance = new OrderAmountPromotionRules()\nexport default instance\n\nexport type { OrderAmountPromotionRules, OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType }\n"]}