@commercelayer/sdk 7.0.0-beta.19 → 7.0.0-beta.20

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 (879) hide show
  1. package/lib/{api-CUXmETkx.d.ts → api-DDgIE2i8.d.ts} +6 -3
  2. package/lib/{api-CRmSToGa.d.cts → api-DmIZO_Np.d.cts} +6 -3
  3. package/lib/api.cjs +2 -0
  4. package/lib/api.cjs.map +1 -0
  5. package/lib/api.d.cts +1 -1
  6. package/lib/api.d.ts +1 -1
  7. package/lib/api.js +2 -0
  8. package/lib/api.js.map +1 -0
  9. package/lib/client.cjs +2 -0
  10. package/lib/client.cjs.map +1 -0
  11. package/lib/client.js +2 -0
  12. package/lib/client.js.map +1 -0
  13. package/lib/commercelayer.cjs +2 -0
  14. package/lib/commercelayer.cjs.map +1 -0
  15. package/lib/commercelayer.d.cts +1 -1
  16. package/lib/commercelayer.d.ts +1 -1
  17. package/lib/commercelayer.js +2 -0
  18. package/lib/commercelayer.js.map +1 -0
  19. package/lib/config.cjs +2 -0
  20. package/lib/config.cjs.map +1 -0
  21. package/lib/config.js +2 -0
  22. package/lib/config.js.map +1 -0
  23. package/lib/debug.cjs +2 -0
  24. package/lib/debug.cjs.map +1 -0
  25. package/lib/debug.js +2 -0
  26. package/lib/debug.js.map +1 -0
  27. package/lib/enum.cjs +2 -0
  28. package/lib/enum.cjs.map +1 -0
  29. package/lib/enum.d.cts +1 -1
  30. package/lib/enum.d.ts +1 -1
  31. package/lib/enum.js +2 -0
  32. package/lib/enum.js.map +1 -0
  33. package/lib/error.cjs +2 -0
  34. package/lib/error.cjs.map +1 -0
  35. package/lib/error.js +2 -0
  36. package/lib/error.js.map +1 -0
  37. package/lib/fetch.cjs +2 -0
  38. package/lib/fetch.cjs.map +1 -0
  39. package/lib/fetch.js +2 -0
  40. package/lib/fetch.js.map +1 -0
  41. package/lib/index.cjs +2 -0
  42. package/lib/index.cjs.map +1 -0
  43. package/lib/index.d.cts +1 -1
  44. package/lib/index.d.ts +1 -1
  45. package/lib/index.js +2 -0
  46. package/lib/index.js.map +1 -0
  47. package/lib/interceptor.cjs +2 -0
  48. package/lib/interceptor.cjs.map +1 -0
  49. package/lib/interceptor.js +2 -0
  50. package/lib/interceptor.js.map +1 -0
  51. package/lib/jsonapi.cjs +12 -10
  52. package/lib/jsonapi.cjs.map +1 -0
  53. package/lib/jsonapi.d.cts +1 -1
  54. package/lib/jsonapi.d.ts +1 -1
  55. package/lib/jsonapi.js +3 -1
  56. package/lib/jsonapi.js.map +1 -0
  57. package/lib/model.cjs +2 -0
  58. package/lib/model.cjs.map +1 -0
  59. package/lib/model.d.cts +1 -1
  60. package/lib/model.d.ts +1 -1
  61. package/lib/model.js +2 -0
  62. package/lib/model.js.map +1 -0
  63. package/lib/query.cjs +2 -0
  64. package/lib/query.cjs.map +1 -0
  65. package/lib/query.d.cts +1 -1
  66. package/lib/query.d.ts +1 -1
  67. package/lib/query.js +2 -0
  68. package/lib/query.js.map +1 -0
  69. package/lib/resource.cjs +11 -0
  70. package/lib/resource.cjs.map +1 -0
  71. package/lib/resource.d.cts +2 -2
  72. package/lib/resource.d.ts +2 -2
  73. package/lib/resource.js +10 -1
  74. package/lib/resource.js.map +1 -0
  75. package/lib/resources/addresses.cjs +2 -0
  76. package/lib/resources/addresses.cjs.map +1 -0
  77. package/lib/resources/addresses.d.cts +1 -1
  78. package/lib/resources/addresses.d.ts +1 -1
  79. package/lib/resources/addresses.js +2 -0
  80. package/lib/resources/addresses.js.map +1 -0
  81. package/lib/resources/adjustments.cjs +2 -0
  82. package/lib/resources/adjustments.cjs.map +1 -0
  83. package/lib/resources/adjustments.d.cts +1 -1
  84. package/lib/resources/adjustments.d.ts +1 -1
  85. package/lib/resources/adjustments.js +2 -0
  86. package/lib/resources/adjustments.js.map +1 -0
  87. package/lib/resources/adyen_gateways.cjs +2 -0
  88. package/lib/resources/adyen_gateways.cjs.map +1 -0
  89. package/lib/resources/adyen_gateways.d.cts +1 -1
  90. package/lib/resources/adyen_gateways.d.ts +1 -1
  91. package/lib/resources/adyen_gateways.js +2 -0
  92. package/lib/resources/adyen_gateways.js.map +1 -0
  93. package/lib/resources/adyen_payments.cjs +2 -0
  94. package/lib/resources/adyen_payments.cjs.map +1 -0
  95. package/lib/resources/adyen_payments.d.cts +1 -1
  96. package/lib/resources/adyen_payments.d.ts +1 -1
  97. package/lib/resources/adyen_payments.js +2 -0
  98. package/lib/resources/adyen_payments.js.map +1 -0
  99. package/lib/resources/applications.cjs +2 -0
  100. package/lib/resources/applications.cjs.map +1 -0
  101. package/lib/resources/applications.d.cts +1 -1
  102. package/lib/resources/applications.d.ts +1 -1
  103. package/lib/resources/applications.js +2 -0
  104. package/lib/resources/applications.js.map +1 -0
  105. package/lib/resources/attachments.cjs +2 -0
  106. package/lib/resources/attachments.cjs.map +1 -0
  107. package/lib/resources/attachments.d.cts +1 -1
  108. package/lib/resources/attachments.d.ts +1 -1
  109. package/lib/resources/attachments.js +2 -0
  110. package/lib/resources/attachments.js.map +1 -0
  111. package/lib/resources/authorizations.cjs +2 -0
  112. package/lib/resources/authorizations.cjs.map +1 -0
  113. package/lib/resources/authorizations.d.cts +1 -1
  114. package/lib/resources/authorizations.d.ts +1 -1
  115. package/lib/resources/authorizations.js +2 -0
  116. package/lib/resources/authorizations.js.map +1 -0
  117. package/lib/resources/avalara_accounts.cjs +2 -0
  118. package/lib/resources/avalara_accounts.cjs.map +1 -0
  119. package/lib/resources/avalara_accounts.d.cts +1 -1
  120. package/lib/resources/avalara_accounts.d.ts +1 -1
  121. package/lib/resources/avalara_accounts.js +2 -0
  122. package/lib/resources/avalara_accounts.js.map +1 -0
  123. package/lib/resources/axerve_gateways.cjs +2 -0
  124. package/lib/resources/axerve_gateways.cjs.map +1 -0
  125. package/lib/resources/axerve_gateways.d.cts +1 -1
  126. package/lib/resources/axerve_gateways.d.ts +1 -1
  127. package/lib/resources/axerve_gateways.js +2 -0
  128. package/lib/resources/axerve_gateways.js.map +1 -0
  129. package/lib/resources/axerve_payments.cjs +2 -0
  130. package/lib/resources/axerve_payments.cjs.map +1 -0
  131. package/lib/resources/axerve_payments.d.cts +1 -1
  132. package/lib/resources/axerve_payments.d.ts +1 -1
  133. package/lib/resources/axerve_payments.js +2 -0
  134. package/lib/resources/axerve_payments.js.map +1 -0
  135. package/lib/resources/bing_geocoders.cjs +2 -0
  136. package/lib/resources/bing_geocoders.cjs.map +1 -0
  137. package/lib/resources/bing_geocoders.d.cts +1 -1
  138. package/lib/resources/bing_geocoders.d.ts +1 -1
  139. package/lib/resources/bing_geocoders.js +2 -0
  140. package/lib/resources/bing_geocoders.js.map +1 -0
  141. package/lib/resources/braintree_gateways.cjs +2 -0
  142. package/lib/resources/braintree_gateways.cjs.map +1 -0
  143. package/lib/resources/braintree_gateways.d.cts +1 -1
  144. package/lib/resources/braintree_gateways.d.ts +1 -1
  145. package/lib/resources/braintree_gateways.js +2 -0
  146. package/lib/resources/braintree_gateways.js.map +1 -0
  147. package/lib/resources/braintree_payments.cjs +2 -0
  148. package/lib/resources/braintree_payments.cjs.map +1 -0
  149. package/lib/resources/braintree_payments.d.cts +1 -1
  150. package/lib/resources/braintree_payments.d.ts +1 -1
  151. package/lib/resources/braintree_payments.js +2 -0
  152. package/lib/resources/braintree_payments.js.map +1 -0
  153. package/lib/resources/bundles.cjs +2 -0
  154. package/lib/resources/bundles.cjs.map +1 -0
  155. package/lib/resources/bundles.d.cts +1 -1
  156. package/lib/resources/bundles.d.ts +1 -1
  157. package/lib/resources/bundles.js +2 -0
  158. package/lib/resources/bundles.js.map +1 -0
  159. package/lib/resources/buy_x_pay_y_promotions.cjs +2 -0
  160. package/lib/resources/buy_x_pay_y_promotions.cjs.map +1 -0
  161. package/lib/resources/buy_x_pay_y_promotions.d.cts +1 -1
  162. package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
  163. package/lib/resources/buy_x_pay_y_promotions.js +2 -0
  164. package/lib/resources/buy_x_pay_y_promotions.js.map +1 -0
  165. package/lib/resources/captures.cjs +2 -0
  166. package/lib/resources/captures.cjs.map +1 -0
  167. package/lib/resources/captures.d.cts +1 -1
  168. package/lib/resources/captures.d.ts +1 -1
  169. package/lib/resources/captures.js +2 -0
  170. package/lib/resources/captures.js.map +1 -0
  171. package/lib/resources/carrier_accounts.cjs +2 -0
  172. package/lib/resources/carrier_accounts.cjs.map +1 -0
  173. package/lib/resources/carrier_accounts.d.cts +1 -1
  174. package/lib/resources/carrier_accounts.d.ts +1 -1
  175. package/lib/resources/carrier_accounts.js +2 -0
  176. package/lib/resources/carrier_accounts.js.map +1 -0
  177. package/lib/resources/checkout_com_gateways.cjs +2 -0
  178. package/lib/resources/checkout_com_gateways.cjs.map +1 -0
  179. package/lib/resources/checkout_com_gateways.d.cts +1 -1
  180. package/lib/resources/checkout_com_gateways.d.ts +1 -1
  181. package/lib/resources/checkout_com_gateways.js +2 -0
  182. package/lib/resources/checkout_com_gateways.js.map +1 -0
  183. package/lib/resources/checkout_com_payments.cjs +2 -0
  184. package/lib/resources/checkout_com_payments.cjs.map +1 -0
  185. package/lib/resources/checkout_com_payments.d.cts +1 -1
  186. package/lib/resources/checkout_com_payments.d.ts +1 -1
  187. package/lib/resources/checkout_com_payments.js +2 -0
  188. package/lib/resources/checkout_com_payments.js.map +1 -0
  189. package/lib/resources/cleanups.cjs +2 -0
  190. package/lib/resources/cleanups.cjs.map +1 -0
  191. package/lib/resources/cleanups.d.cts +1 -1
  192. package/lib/resources/cleanups.d.ts +1 -1
  193. package/lib/resources/cleanups.js +2 -0
  194. package/lib/resources/cleanups.js.map +1 -0
  195. package/lib/resources/coupon_codes_promotion_rules.cjs +2 -0
  196. package/lib/resources/coupon_codes_promotion_rules.cjs.map +1 -0
  197. package/lib/resources/coupon_codes_promotion_rules.d.cts +1 -1
  198. package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
  199. package/lib/resources/coupon_codes_promotion_rules.js +2 -0
  200. package/lib/resources/coupon_codes_promotion_rules.js.map +1 -0
  201. package/lib/resources/coupon_recipients.cjs +2 -0
  202. package/lib/resources/coupon_recipients.cjs.map +1 -0
  203. package/lib/resources/coupon_recipients.d.cts +1 -1
  204. package/lib/resources/coupon_recipients.d.ts +1 -1
  205. package/lib/resources/coupon_recipients.js +2 -0
  206. package/lib/resources/coupon_recipients.js.map +1 -0
  207. package/lib/resources/coupons.cjs +2 -0
  208. package/lib/resources/coupons.cjs.map +1 -0
  209. package/lib/resources/coupons.d.cts +1 -1
  210. package/lib/resources/coupons.d.ts +1 -1
  211. package/lib/resources/coupons.js +2 -0
  212. package/lib/resources/coupons.js.map +1 -0
  213. package/lib/resources/custom_promotion_rules.cjs +2 -0
  214. package/lib/resources/custom_promotion_rules.cjs.map +1 -0
  215. package/lib/resources/custom_promotion_rules.d.cts +1 -1
  216. package/lib/resources/custom_promotion_rules.d.ts +1 -1
  217. package/lib/resources/custom_promotion_rules.js +2 -0
  218. package/lib/resources/custom_promotion_rules.js.map +1 -0
  219. package/lib/resources/customer_addresses.cjs +2 -0
  220. package/lib/resources/customer_addresses.cjs.map +1 -0
  221. package/lib/resources/customer_addresses.d.cts +1 -1
  222. package/lib/resources/customer_addresses.d.ts +1 -1
  223. package/lib/resources/customer_addresses.js +2 -0
  224. package/lib/resources/customer_addresses.js.map +1 -0
  225. package/lib/resources/customer_groups.cjs +2 -0
  226. package/lib/resources/customer_groups.cjs.map +1 -0
  227. package/lib/resources/customer_groups.d.cts +1 -1
  228. package/lib/resources/customer_groups.d.ts +1 -1
  229. package/lib/resources/customer_groups.js +2 -0
  230. package/lib/resources/customer_groups.js.map +1 -0
  231. package/lib/resources/customer_password_resets.cjs +2 -0
  232. package/lib/resources/customer_password_resets.cjs.map +1 -0
  233. package/lib/resources/customer_password_resets.d.cts +1 -1
  234. package/lib/resources/customer_password_resets.d.ts +1 -1
  235. package/lib/resources/customer_password_resets.js +2 -0
  236. package/lib/resources/customer_password_resets.js.map +1 -0
  237. package/lib/resources/customer_payment_sources.cjs +2 -0
  238. package/lib/resources/customer_payment_sources.cjs.map +1 -0
  239. package/lib/resources/customer_payment_sources.d.cts +1 -1
  240. package/lib/resources/customer_payment_sources.d.ts +1 -1
  241. package/lib/resources/customer_payment_sources.js +2 -0
  242. package/lib/resources/customer_payment_sources.js.map +1 -0
  243. package/lib/resources/customer_subscriptions.cjs +2 -0
  244. package/lib/resources/customer_subscriptions.cjs.map +1 -0
  245. package/lib/resources/customer_subscriptions.d.cts +1 -1
  246. package/lib/resources/customer_subscriptions.d.ts +1 -1
  247. package/lib/resources/customer_subscriptions.js +2 -0
  248. package/lib/resources/customer_subscriptions.js.map +1 -0
  249. package/lib/resources/customers.cjs +2 -0
  250. package/lib/resources/customers.cjs.map +1 -0
  251. package/lib/resources/customers.d.cts +1 -1
  252. package/lib/resources/customers.d.ts +1 -1
  253. package/lib/resources/customers.js +2 -0
  254. package/lib/resources/customers.js.map +1 -0
  255. package/lib/resources/delivery_lead_times.cjs +2 -0
  256. package/lib/resources/delivery_lead_times.cjs.map +1 -0
  257. package/lib/resources/delivery_lead_times.d.cts +1 -1
  258. package/lib/resources/delivery_lead_times.d.ts +1 -1
  259. package/lib/resources/delivery_lead_times.js +2 -0
  260. package/lib/resources/delivery_lead_times.js.map +1 -0
  261. package/lib/resources/discount_engine_items.cjs +2 -0
  262. package/lib/resources/discount_engine_items.cjs.map +1 -0
  263. package/lib/resources/discount_engine_items.d.cts +1 -1
  264. package/lib/resources/discount_engine_items.d.ts +1 -1
  265. package/lib/resources/discount_engine_items.js +2 -0
  266. package/lib/resources/discount_engine_items.js.map +1 -0
  267. package/lib/resources/discount_engines.cjs +2 -0
  268. package/lib/resources/discount_engines.cjs.map +1 -0
  269. package/lib/resources/discount_engines.d.cts +1 -1
  270. package/lib/resources/discount_engines.d.ts +1 -1
  271. package/lib/resources/discount_engines.js +2 -0
  272. package/lib/resources/discount_engines.js.map +1 -0
  273. package/lib/resources/easypost_pickups.cjs +2 -0
  274. package/lib/resources/easypost_pickups.cjs.map +1 -0
  275. package/lib/resources/easypost_pickups.d.cts +1 -1
  276. package/lib/resources/easypost_pickups.d.ts +1 -1
  277. package/lib/resources/easypost_pickups.js +2 -0
  278. package/lib/resources/easypost_pickups.js.map +1 -0
  279. package/lib/resources/event_callbacks.cjs +2 -0
  280. package/lib/resources/event_callbacks.cjs.map +1 -0
  281. package/lib/resources/event_callbacks.d.cts +1 -1
  282. package/lib/resources/event_callbacks.d.ts +1 -1
  283. package/lib/resources/event_callbacks.js +2 -0
  284. package/lib/resources/event_callbacks.js.map +1 -0
  285. package/lib/resources/events.cjs +2 -0
  286. package/lib/resources/events.cjs.map +1 -0
  287. package/lib/resources/events.d.cts +1 -1
  288. package/lib/resources/events.d.ts +1 -1
  289. package/lib/resources/events.js +2 -0
  290. package/lib/resources/events.js.map +1 -0
  291. package/lib/resources/exports.cjs +2 -0
  292. package/lib/resources/exports.cjs.map +1 -0
  293. package/lib/resources/exports.d.cts +1 -1
  294. package/lib/resources/exports.d.ts +1 -1
  295. package/lib/resources/exports.js +2 -0
  296. package/lib/resources/exports.js.map +1 -0
  297. package/lib/resources/external_gateways.cjs +2 -0
  298. package/lib/resources/external_gateways.cjs.map +1 -0
  299. package/lib/resources/external_gateways.d.cts +1 -1
  300. package/lib/resources/external_gateways.d.ts +1 -1
  301. package/lib/resources/external_gateways.js +2 -0
  302. package/lib/resources/external_gateways.js.map +1 -0
  303. package/lib/resources/external_payments.cjs +2 -0
  304. package/lib/resources/external_payments.cjs.map +1 -0
  305. package/lib/resources/external_payments.d.cts +1 -1
  306. package/lib/resources/external_payments.d.ts +1 -1
  307. package/lib/resources/external_payments.js +2 -0
  308. package/lib/resources/external_payments.js.map +1 -0
  309. package/lib/resources/external_promotions.cjs +2 -0
  310. package/lib/resources/external_promotions.cjs.map +1 -0
  311. package/lib/resources/external_promotions.d.cts +1 -1
  312. package/lib/resources/external_promotions.d.ts +1 -1
  313. package/lib/resources/external_promotions.js +2 -0
  314. package/lib/resources/external_promotions.js.map +1 -0
  315. package/lib/resources/external_tax_calculators.cjs +2 -0
  316. package/lib/resources/external_tax_calculators.cjs.map +1 -0
  317. package/lib/resources/external_tax_calculators.d.cts +1 -1
  318. package/lib/resources/external_tax_calculators.d.ts +1 -1
  319. package/lib/resources/external_tax_calculators.js +2 -0
  320. package/lib/resources/external_tax_calculators.js.map +1 -0
  321. package/lib/resources/fixed_amount_promotions.cjs +2 -0
  322. package/lib/resources/fixed_amount_promotions.cjs.map +1 -0
  323. package/lib/resources/fixed_amount_promotions.d.cts +1 -1
  324. package/lib/resources/fixed_amount_promotions.d.ts +1 -1
  325. package/lib/resources/fixed_amount_promotions.js +2 -0
  326. package/lib/resources/fixed_amount_promotions.js.map +1 -0
  327. package/lib/resources/fixed_price_promotions.cjs +2 -0
  328. package/lib/resources/fixed_price_promotions.cjs.map +1 -0
  329. package/lib/resources/fixed_price_promotions.d.cts +1 -1
  330. package/lib/resources/fixed_price_promotions.d.ts +1 -1
  331. package/lib/resources/fixed_price_promotions.js +2 -0
  332. package/lib/resources/fixed_price_promotions.js.map +1 -0
  333. package/lib/resources/flex_promotions.cjs +2 -0
  334. package/lib/resources/flex_promotions.cjs.map +1 -0
  335. package/lib/resources/flex_promotions.d.cts +1 -1
  336. package/lib/resources/flex_promotions.d.ts +1 -1
  337. package/lib/resources/flex_promotions.js +2 -0
  338. package/lib/resources/flex_promotions.js.map +1 -0
  339. package/lib/resources/free_gift_promotions.cjs +2 -0
  340. package/lib/resources/free_gift_promotions.cjs.map +1 -0
  341. package/lib/resources/free_gift_promotions.d.cts +1 -1
  342. package/lib/resources/free_gift_promotions.d.ts +1 -1
  343. package/lib/resources/free_gift_promotions.js +2 -0
  344. package/lib/resources/free_gift_promotions.js.map +1 -0
  345. package/lib/resources/free_shipping_promotions.cjs +2 -0
  346. package/lib/resources/free_shipping_promotions.cjs.map +1 -0
  347. package/lib/resources/free_shipping_promotions.d.cts +1 -1
  348. package/lib/resources/free_shipping_promotions.d.ts +1 -1
  349. package/lib/resources/free_shipping_promotions.js +2 -0
  350. package/lib/resources/free_shipping_promotions.js.map +1 -0
  351. package/lib/resources/geocoders.cjs +2 -0
  352. package/lib/resources/geocoders.cjs.map +1 -0
  353. package/lib/resources/geocoders.d.cts +1 -1
  354. package/lib/resources/geocoders.d.ts +1 -1
  355. package/lib/resources/geocoders.js +2 -0
  356. package/lib/resources/geocoders.js.map +1 -0
  357. package/lib/resources/gift_card_recipients.cjs +2 -0
  358. package/lib/resources/gift_card_recipients.cjs.map +1 -0
  359. package/lib/resources/gift_card_recipients.d.cts +1 -1
  360. package/lib/resources/gift_card_recipients.d.ts +1 -1
  361. package/lib/resources/gift_card_recipients.js +2 -0
  362. package/lib/resources/gift_card_recipients.js.map +1 -0
  363. package/lib/resources/gift_cards.cjs +2 -0
  364. package/lib/resources/gift_cards.cjs.map +1 -0
  365. package/lib/resources/gift_cards.d.cts +1 -1
  366. package/lib/resources/gift_cards.d.ts +1 -1
  367. package/lib/resources/gift_cards.js +2 -0
  368. package/lib/resources/gift_cards.js.map +1 -0
  369. package/lib/resources/google_geocoders.cjs +2 -0
  370. package/lib/resources/google_geocoders.cjs.map +1 -0
  371. package/lib/resources/google_geocoders.d.cts +1 -1
  372. package/lib/resources/google_geocoders.d.ts +1 -1
  373. package/lib/resources/google_geocoders.js +2 -0
  374. package/lib/resources/google_geocoders.js.map +1 -0
  375. package/lib/resources/imports.cjs +2 -0
  376. package/lib/resources/imports.cjs.map +1 -0
  377. package/lib/resources/imports.d.cts +1 -1
  378. package/lib/resources/imports.d.ts +1 -1
  379. package/lib/resources/imports.js +2 -0
  380. package/lib/resources/imports.js.map +1 -0
  381. package/lib/resources/in_stock_subscriptions.cjs +2 -0
  382. package/lib/resources/in_stock_subscriptions.cjs.map +1 -0
  383. package/lib/resources/in_stock_subscriptions.d.cts +1 -1
  384. package/lib/resources/in_stock_subscriptions.d.ts +1 -1
  385. package/lib/resources/in_stock_subscriptions.js +2 -0
  386. package/lib/resources/in_stock_subscriptions.js.map +1 -0
  387. package/lib/resources/inventory_models.cjs +2 -0
  388. package/lib/resources/inventory_models.cjs.map +1 -0
  389. package/lib/resources/inventory_models.d.cts +1 -1
  390. package/lib/resources/inventory_models.d.ts +1 -1
  391. package/lib/resources/inventory_models.js +2 -0
  392. package/lib/resources/inventory_models.js.map +1 -0
  393. package/lib/resources/inventory_return_locations.cjs +2 -0
  394. package/lib/resources/inventory_return_locations.cjs.map +1 -0
  395. package/lib/resources/inventory_return_locations.d.cts +1 -1
  396. package/lib/resources/inventory_return_locations.d.ts +1 -1
  397. package/lib/resources/inventory_return_locations.js +2 -0
  398. package/lib/resources/inventory_return_locations.js.map +1 -0
  399. package/lib/resources/inventory_stock_locations.cjs +2 -0
  400. package/lib/resources/inventory_stock_locations.cjs.map +1 -0
  401. package/lib/resources/inventory_stock_locations.d.cts +1 -1
  402. package/lib/resources/inventory_stock_locations.d.ts +1 -1
  403. package/lib/resources/inventory_stock_locations.js +2 -0
  404. package/lib/resources/inventory_stock_locations.js.map +1 -0
  405. package/lib/resources/klarna_gateways.cjs +2 -0
  406. package/lib/resources/klarna_gateways.cjs.map +1 -0
  407. package/lib/resources/klarna_gateways.d.cts +1 -1
  408. package/lib/resources/klarna_gateways.d.ts +1 -1
  409. package/lib/resources/klarna_gateways.js +2 -0
  410. package/lib/resources/klarna_gateways.js.map +1 -0
  411. package/lib/resources/klarna_payments.cjs +2 -0
  412. package/lib/resources/klarna_payments.cjs.map +1 -0
  413. package/lib/resources/klarna_payments.d.cts +1 -1
  414. package/lib/resources/klarna_payments.d.ts +1 -1
  415. package/lib/resources/klarna_payments.js +2 -0
  416. package/lib/resources/klarna_payments.js.map +1 -0
  417. package/lib/resources/line_item_options.cjs +2 -0
  418. package/lib/resources/line_item_options.cjs.map +1 -0
  419. package/lib/resources/line_item_options.d.cts +1 -1
  420. package/lib/resources/line_item_options.d.ts +1 -1
  421. package/lib/resources/line_item_options.js +2 -0
  422. package/lib/resources/line_item_options.js.map +1 -0
  423. package/lib/resources/line_items.cjs +2 -0
  424. package/lib/resources/line_items.cjs.map +1 -0
  425. package/lib/resources/line_items.d.cts +1 -1
  426. package/lib/resources/line_items.d.ts +1 -1
  427. package/lib/resources/line_items.js +2 -0
  428. package/lib/resources/line_items.js.map +1 -0
  429. package/lib/resources/links.cjs +2 -0
  430. package/lib/resources/links.cjs.map +1 -0
  431. package/lib/resources/links.d.cts +1 -1
  432. package/lib/resources/links.d.ts +1 -1
  433. package/lib/resources/links.js +2 -0
  434. package/lib/resources/links.js.map +1 -0
  435. package/lib/resources/manual_gateways.cjs +2 -0
  436. package/lib/resources/manual_gateways.cjs.map +1 -0
  437. package/lib/resources/manual_gateways.d.cts +1 -1
  438. package/lib/resources/manual_gateways.d.ts +1 -1
  439. package/lib/resources/manual_gateways.js +2 -0
  440. package/lib/resources/manual_gateways.js.map +1 -0
  441. package/lib/resources/manual_tax_calculators.cjs +2 -0
  442. package/lib/resources/manual_tax_calculators.cjs.map +1 -0
  443. package/lib/resources/manual_tax_calculators.d.cts +1 -1
  444. package/lib/resources/manual_tax_calculators.d.ts +1 -1
  445. package/lib/resources/manual_tax_calculators.js +2 -0
  446. package/lib/resources/manual_tax_calculators.js.map +1 -0
  447. package/lib/resources/markets.cjs +2 -0
  448. package/lib/resources/markets.cjs.map +1 -0
  449. package/lib/resources/markets.d.cts +1 -1
  450. package/lib/resources/markets.d.ts +1 -1
  451. package/lib/resources/markets.js +2 -0
  452. package/lib/resources/markets.js.map +1 -0
  453. package/lib/resources/merchants.cjs +2 -0
  454. package/lib/resources/merchants.cjs.map +1 -0
  455. package/lib/resources/merchants.d.cts +1 -1
  456. package/lib/resources/merchants.d.ts +1 -1
  457. package/lib/resources/merchants.js +2 -0
  458. package/lib/resources/merchants.js.map +1 -0
  459. package/lib/resources/notifications.cjs +2 -0
  460. package/lib/resources/notifications.cjs.map +1 -0
  461. package/lib/resources/notifications.d.cts +1 -1
  462. package/lib/resources/notifications.d.ts +1 -1
  463. package/lib/resources/notifications.js +2 -0
  464. package/lib/resources/notifications.js.map +1 -0
  465. package/lib/resources/order_amount_promotion_rules.cjs +2 -0
  466. package/lib/resources/order_amount_promotion_rules.cjs.map +1 -0
  467. package/lib/resources/order_amount_promotion_rules.d.cts +1 -1
  468. package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
  469. package/lib/resources/order_amount_promotion_rules.js +2 -0
  470. package/lib/resources/order_amount_promotion_rules.js.map +1 -0
  471. package/lib/resources/order_copies.cjs +2 -0
  472. package/lib/resources/order_copies.cjs.map +1 -0
  473. package/lib/resources/order_copies.d.cts +1 -1
  474. package/lib/resources/order_copies.d.ts +1 -1
  475. package/lib/resources/order_copies.js +2 -0
  476. package/lib/resources/order_copies.js.map +1 -0
  477. package/lib/resources/order_factories.cjs +2 -0
  478. package/lib/resources/order_factories.cjs.map +1 -0
  479. package/lib/resources/order_factories.d.cts +1 -1
  480. package/lib/resources/order_factories.d.ts +1 -1
  481. package/lib/resources/order_factories.js +2 -0
  482. package/lib/resources/order_factories.js.map +1 -0
  483. package/lib/resources/order_subscription_items.cjs +2 -0
  484. package/lib/resources/order_subscription_items.cjs.map +1 -0
  485. package/lib/resources/order_subscription_items.d.cts +1 -1
  486. package/lib/resources/order_subscription_items.d.ts +1 -1
  487. package/lib/resources/order_subscription_items.js +2 -0
  488. package/lib/resources/order_subscription_items.js.map +1 -0
  489. package/lib/resources/order_subscriptions.cjs +2 -0
  490. package/lib/resources/order_subscriptions.cjs.map +1 -0
  491. package/lib/resources/order_subscriptions.d.cts +1 -1
  492. package/lib/resources/order_subscriptions.d.ts +1 -1
  493. package/lib/resources/order_subscriptions.js +2 -0
  494. package/lib/resources/order_subscriptions.js.map +1 -0
  495. package/lib/resources/orders.cjs +2 -0
  496. package/lib/resources/orders.cjs.map +1 -0
  497. package/lib/resources/orders.d.cts +1 -1
  498. package/lib/resources/orders.d.ts +1 -1
  499. package/lib/resources/orders.js +2 -0
  500. package/lib/resources/orders.js.map +1 -0
  501. package/lib/resources/organizations.cjs +2 -0
  502. package/lib/resources/organizations.cjs.map +1 -0
  503. package/lib/resources/organizations.d.cts +1 -1
  504. package/lib/resources/organizations.d.ts +1 -1
  505. package/lib/resources/organizations.js +2 -0
  506. package/lib/resources/organizations.js.map +1 -0
  507. package/lib/resources/packages.cjs +2 -0
  508. package/lib/resources/packages.cjs.map +1 -0
  509. package/lib/resources/packages.d.cts +1 -1
  510. package/lib/resources/packages.d.ts +1 -1
  511. package/lib/resources/packages.js +2 -0
  512. package/lib/resources/packages.js.map +1 -0
  513. package/lib/resources/parcel_line_items.cjs +2 -0
  514. package/lib/resources/parcel_line_items.cjs.map +1 -0
  515. package/lib/resources/parcel_line_items.d.cts +1 -1
  516. package/lib/resources/parcel_line_items.d.ts +1 -1
  517. package/lib/resources/parcel_line_items.js +2 -0
  518. package/lib/resources/parcel_line_items.js.map +1 -0
  519. package/lib/resources/parcels.cjs +2 -0
  520. package/lib/resources/parcels.cjs.map +1 -0
  521. package/lib/resources/parcels.d.cts +1 -1
  522. package/lib/resources/parcels.d.ts +1 -1
  523. package/lib/resources/parcels.js +2 -0
  524. package/lib/resources/parcels.js.map +1 -0
  525. package/lib/resources/payment_gateways.cjs +2 -0
  526. package/lib/resources/payment_gateways.cjs.map +1 -0
  527. package/lib/resources/payment_gateways.d.cts +1 -1
  528. package/lib/resources/payment_gateways.d.ts +1 -1
  529. package/lib/resources/payment_gateways.js +2 -0
  530. package/lib/resources/payment_gateways.js.map +1 -0
  531. package/lib/resources/payment_methods.cjs +2 -0
  532. package/lib/resources/payment_methods.cjs.map +1 -0
  533. package/lib/resources/payment_methods.d.cts +1 -1
  534. package/lib/resources/payment_methods.d.ts +1 -1
  535. package/lib/resources/payment_methods.js +2 -0
  536. package/lib/resources/payment_methods.js.map +1 -0
  537. package/lib/resources/payment_options.cjs +2 -0
  538. package/lib/resources/payment_options.cjs.map +1 -0
  539. package/lib/resources/payment_options.d.cts +1 -1
  540. package/lib/resources/payment_options.d.ts +1 -1
  541. package/lib/resources/payment_options.js +2 -0
  542. package/lib/resources/payment_options.js.map +1 -0
  543. package/lib/resources/paypal_gateways.cjs +2 -0
  544. package/lib/resources/paypal_gateways.cjs.map +1 -0
  545. package/lib/resources/paypal_gateways.d.cts +1 -1
  546. package/lib/resources/paypal_gateways.d.ts +1 -1
  547. package/lib/resources/paypal_gateways.js +2 -0
  548. package/lib/resources/paypal_gateways.js.map +1 -0
  549. package/lib/resources/paypal_payments.cjs +2 -0
  550. package/lib/resources/paypal_payments.cjs.map +1 -0
  551. package/lib/resources/paypal_payments.d.cts +1 -1
  552. package/lib/resources/paypal_payments.d.ts +1 -1
  553. package/lib/resources/paypal_payments.js +2 -0
  554. package/lib/resources/paypal_payments.js.map +1 -0
  555. package/lib/resources/percentage_discount_promotions.cjs +2 -0
  556. package/lib/resources/percentage_discount_promotions.cjs.map +1 -0
  557. package/lib/resources/percentage_discount_promotions.d.cts +1 -1
  558. package/lib/resources/percentage_discount_promotions.d.ts +1 -1
  559. package/lib/resources/percentage_discount_promotions.js +2 -0
  560. package/lib/resources/percentage_discount_promotions.js.map +1 -0
  561. package/lib/resources/pickups.cjs +2 -0
  562. package/lib/resources/pickups.cjs.map +1 -0
  563. package/lib/resources/pickups.d.cts +1 -1
  564. package/lib/resources/pickups.d.ts +1 -1
  565. package/lib/resources/pickups.js +2 -0
  566. package/lib/resources/pickups.js.map +1 -0
  567. package/lib/resources/price_frequency_tiers.cjs +2 -0
  568. package/lib/resources/price_frequency_tiers.cjs.map +1 -0
  569. package/lib/resources/price_frequency_tiers.d.cts +1 -1
  570. package/lib/resources/price_frequency_tiers.d.ts +1 -1
  571. package/lib/resources/price_frequency_tiers.js +2 -0
  572. package/lib/resources/price_frequency_tiers.js.map +1 -0
  573. package/lib/resources/price_list_schedulers.cjs +2 -0
  574. package/lib/resources/price_list_schedulers.cjs.map +1 -0
  575. package/lib/resources/price_list_schedulers.d.cts +1 -1
  576. package/lib/resources/price_list_schedulers.d.ts +1 -1
  577. package/lib/resources/price_list_schedulers.js +2 -0
  578. package/lib/resources/price_list_schedulers.js.map +1 -0
  579. package/lib/resources/price_lists.cjs +2 -0
  580. package/lib/resources/price_lists.cjs.map +1 -0
  581. package/lib/resources/price_lists.d.cts +1 -1
  582. package/lib/resources/price_lists.d.ts +1 -1
  583. package/lib/resources/price_lists.js +2 -0
  584. package/lib/resources/price_lists.js.map +1 -0
  585. package/lib/resources/price_tiers.cjs +2 -0
  586. package/lib/resources/price_tiers.cjs.map +1 -0
  587. package/lib/resources/price_tiers.d.cts +1 -1
  588. package/lib/resources/price_tiers.d.ts +1 -1
  589. package/lib/resources/price_tiers.js +2 -0
  590. package/lib/resources/price_tiers.js.map +1 -0
  591. package/lib/resources/price_volume_tiers.cjs +2 -0
  592. package/lib/resources/price_volume_tiers.cjs.map +1 -0
  593. package/lib/resources/price_volume_tiers.d.cts +1 -1
  594. package/lib/resources/price_volume_tiers.d.ts +1 -1
  595. package/lib/resources/price_volume_tiers.js +2 -0
  596. package/lib/resources/price_volume_tiers.js.map +1 -0
  597. package/lib/resources/prices.cjs +2 -0
  598. package/lib/resources/prices.cjs.map +1 -0
  599. package/lib/resources/prices.d.cts +1 -1
  600. package/lib/resources/prices.d.ts +1 -1
  601. package/lib/resources/prices.js +2 -0
  602. package/lib/resources/prices.js.map +1 -0
  603. package/lib/resources/promotion_rules.cjs +2 -0
  604. package/lib/resources/promotion_rules.cjs.map +1 -0
  605. package/lib/resources/promotion_rules.d.cts +1 -1
  606. package/lib/resources/promotion_rules.d.ts +1 -1
  607. package/lib/resources/promotion_rules.js +2 -0
  608. package/lib/resources/promotion_rules.js.map +1 -0
  609. package/lib/resources/promotions.cjs +2 -0
  610. package/lib/resources/promotions.cjs.map +1 -0
  611. package/lib/resources/promotions.d.cts +1 -1
  612. package/lib/resources/promotions.d.ts +1 -1
  613. package/lib/resources/promotions.js +2 -0
  614. package/lib/resources/promotions.js.map +1 -0
  615. package/lib/resources/recurring_order_copies.cjs +2 -0
  616. package/lib/resources/recurring_order_copies.cjs.map +1 -0
  617. package/lib/resources/recurring_order_copies.d.cts +1 -1
  618. package/lib/resources/recurring_order_copies.d.ts +1 -1
  619. package/lib/resources/recurring_order_copies.js +2 -0
  620. package/lib/resources/recurring_order_copies.js.map +1 -0
  621. package/lib/resources/refunds.cjs +2 -0
  622. package/lib/resources/refunds.cjs.map +1 -0
  623. package/lib/resources/refunds.d.cts +1 -1
  624. package/lib/resources/refunds.d.ts +1 -1
  625. package/lib/resources/refunds.js +2 -0
  626. package/lib/resources/refunds.js.map +1 -0
  627. package/lib/resources/reserved_stocks.cjs +2 -0
  628. package/lib/resources/reserved_stocks.cjs.map +1 -0
  629. package/lib/resources/reserved_stocks.d.cts +1 -1
  630. package/lib/resources/reserved_stocks.d.ts +1 -1
  631. package/lib/resources/reserved_stocks.js +2 -0
  632. package/lib/resources/reserved_stocks.js.map +1 -0
  633. package/lib/resources/resource_errors.cjs +2 -0
  634. package/lib/resources/resource_errors.cjs.map +1 -0
  635. package/lib/resources/resource_errors.d.cts +1 -1
  636. package/lib/resources/resource_errors.d.ts +1 -1
  637. package/lib/resources/resource_errors.js +2 -0
  638. package/lib/resources/resource_errors.js.map +1 -0
  639. package/lib/resources/return_line_items.cjs +2 -0
  640. package/lib/resources/return_line_items.cjs.map +1 -0
  641. package/lib/resources/return_line_items.d.cts +1 -1
  642. package/lib/resources/return_line_items.d.ts +1 -1
  643. package/lib/resources/return_line_items.js +2 -0
  644. package/lib/resources/return_line_items.js.map +1 -0
  645. package/lib/resources/returns.cjs +2 -0
  646. package/lib/resources/returns.cjs.map +1 -0
  647. package/lib/resources/returns.d.cts +1 -1
  648. package/lib/resources/returns.d.ts +1 -1
  649. package/lib/resources/returns.js +2 -0
  650. package/lib/resources/returns.js.map +1 -0
  651. package/lib/resources/satispay_gateways.cjs +2 -0
  652. package/lib/resources/satispay_gateways.cjs.map +1 -0
  653. package/lib/resources/satispay_gateways.d.cts +1 -1
  654. package/lib/resources/satispay_gateways.d.ts +1 -1
  655. package/lib/resources/satispay_gateways.js +2 -0
  656. package/lib/resources/satispay_gateways.js.map +1 -0
  657. package/lib/resources/satispay_payments.cjs +2 -0
  658. package/lib/resources/satispay_payments.cjs.map +1 -0
  659. package/lib/resources/satispay_payments.d.cts +1 -1
  660. package/lib/resources/satispay_payments.d.ts +1 -1
  661. package/lib/resources/satispay_payments.js +2 -0
  662. package/lib/resources/satispay_payments.js.map +1 -0
  663. package/lib/resources/shipments.cjs +2 -0
  664. package/lib/resources/shipments.cjs.map +1 -0
  665. package/lib/resources/shipments.d.cts +1 -1
  666. package/lib/resources/shipments.d.ts +1 -1
  667. package/lib/resources/shipments.js +2 -0
  668. package/lib/resources/shipments.js.map +1 -0
  669. package/lib/resources/shipping_categories.cjs +2 -0
  670. package/lib/resources/shipping_categories.cjs.map +1 -0
  671. package/lib/resources/shipping_categories.d.cts +1 -1
  672. package/lib/resources/shipping_categories.d.ts +1 -1
  673. package/lib/resources/shipping_categories.js +2 -0
  674. package/lib/resources/shipping_categories.js.map +1 -0
  675. package/lib/resources/shipping_method_tiers.cjs +2 -0
  676. package/lib/resources/shipping_method_tiers.cjs.map +1 -0
  677. package/lib/resources/shipping_method_tiers.d.cts +1 -1
  678. package/lib/resources/shipping_method_tiers.d.ts +1 -1
  679. package/lib/resources/shipping_method_tiers.js +2 -0
  680. package/lib/resources/shipping_method_tiers.js.map +1 -0
  681. package/lib/resources/shipping_methods.cjs +2 -0
  682. package/lib/resources/shipping_methods.cjs.map +1 -0
  683. package/lib/resources/shipping_methods.d.cts +1 -1
  684. package/lib/resources/shipping_methods.d.ts +1 -1
  685. package/lib/resources/shipping_methods.js +2 -0
  686. package/lib/resources/shipping_methods.js.map +1 -0
  687. package/lib/resources/shipping_weight_tiers.cjs +2 -0
  688. package/lib/resources/shipping_weight_tiers.cjs.map +1 -0
  689. package/lib/resources/shipping_weight_tiers.d.cts +1 -1
  690. package/lib/resources/shipping_weight_tiers.d.ts +1 -1
  691. package/lib/resources/shipping_weight_tiers.js +2 -0
  692. package/lib/resources/shipping_weight_tiers.js.map +1 -0
  693. package/lib/resources/shipping_zones.cjs +2 -0
  694. package/lib/resources/shipping_zones.cjs.map +1 -0
  695. package/lib/resources/shipping_zones.d.cts +1 -1
  696. package/lib/resources/shipping_zones.d.ts +1 -1
  697. package/lib/resources/shipping_zones.js +2 -0
  698. package/lib/resources/shipping_zones.js.map +1 -0
  699. package/lib/resources/sku_list_items.cjs +2 -0
  700. package/lib/resources/sku_list_items.cjs.map +1 -0
  701. package/lib/resources/sku_list_items.d.cts +1 -1
  702. package/lib/resources/sku_list_items.d.ts +1 -1
  703. package/lib/resources/sku_list_items.js +2 -0
  704. package/lib/resources/sku_list_items.js.map +1 -0
  705. package/lib/resources/sku_list_promotion_rules.cjs +2 -0
  706. package/lib/resources/sku_list_promotion_rules.cjs.map +1 -0
  707. package/lib/resources/sku_list_promotion_rules.d.cts +1 -1
  708. package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
  709. package/lib/resources/sku_list_promotion_rules.js +2 -0
  710. package/lib/resources/sku_list_promotion_rules.js.map +1 -0
  711. package/lib/resources/sku_lists.cjs +2 -0
  712. package/lib/resources/sku_lists.cjs.map +1 -0
  713. package/lib/resources/sku_lists.d.cts +1 -1
  714. package/lib/resources/sku_lists.d.ts +1 -1
  715. package/lib/resources/sku_lists.js +2 -0
  716. package/lib/resources/sku_lists.js.map +1 -0
  717. package/lib/resources/sku_options.cjs +2 -0
  718. package/lib/resources/sku_options.cjs.map +1 -0
  719. package/lib/resources/sku_options.d.cts +1 -1
  720. package/lib/resources/sku_options.d.ts +1 -1
  721. package/lib/resources/sku_options.js +2 -0
  722. package/lib/resources/sku_options.js.map +1 -0
  723. package/lib/resources/skus.cjs +2 -0
  724. package/lib/resources/skus.cjs.map +1 -0
  725. package/lib/resources/skus.d.cts +1 -1
  726. package/lib/resources/skus.d.ts +1 -1
  727. package/lib/resources/skus.js +2 -0
  728. package/lib/resources/skus.js.map +1 -0
  729. package/lib/resources/stock_items.cjs +2 -0
  730. package/lib/resources/stock_items.cjs.map +1 -0
  731. package/lib/resources/stock_items.d.cts +1 -1
  732. package/lib/resources/stock_items.d.ts +1 -1
  733. package/lib/resources/stock_items.js +2 -0
  734. package/lib/resources/stock_items.js.map +1 -0
  735. package/lib/resources/stock_line_items.cjs +2 -0
  736. package/lib/resources/stock_line_items.cjs.map +1 -0
  737. package/lib/resources/stock_line_items.d.cts +1 -1
  738. package/lib/resources/stock_line_items.d.ts +1 -1
  739. package/lib/resources/stock_line_items.js +2 -0
  740. package/lib/resources/stock_line_items.js.map +1 -0
  741. package/lib/resources/stock_locations.cjs +2 -0
  742. package/lib/resources/stock_locations.cjs.map +1 -0
  743. package/lib/resources/stock_locations.d.cts +1 -1
  744. package/lib/resources/stock_locations.d.ts +1 -1
  745. package/lib/resources/stock_locations.js +2 -0
  746. package/lib/resources/stock_locations.js.map +1 -0
  747. package/lib/resources/stock_reservations.cjs +2 -0
  748. package/lib/resources/stock_reservations.cjs.map +1 -0
  749. package/lib/resources/stock_reservations.d.cts +1 -1
  750. package/lib/resources/stock_reservations.d.ts +1 -1
  751. package/lib/resources/stock_reservations.js +2 -0
  752. package/lib/resources/stock_reservations.js.map +1 -0
  753. package/lib/resources/stock_transfers.cjs +2 -0
  754. package/lib/resources/stock_transfers.cjs.map +1 -0
  755. package/lib/resources/stock_transfers.d.cts +1 -1
  756. package/lib/resources/stock_transfers.d.ts +1 -1
  757. package/lib/resources/stock_transfers.js +2 -0
  758. package/lib/resources/stock_transfers.js.map +1 -0
  759. package/lib/resources/stores.cjs +2 -0
  760. package/lib/resources/stores.cjs.map +1 -0
  761. package/lib/resources/stores.d.cts +1 -1
  762. package/lib/resources/stores.d.ts +1 -1
  763. package/lib/resources/stores.js +2 -0
  764. package/lib/resources/stores.js.map +1 -0
  765. package/lib/resources/stripe_gateways.cjs +2 -0
  766. package/lib/resources/stripe_gateways.cjs.map +1 -0
  767. package/lib/resources/stripe_gateways.d.cts +1 -1
  768. package/lib/resources/stripe_gateways.d.ts +1 -1
  769. package/lib/resources/stripe_gateways.js +2 -0
  770. package/lib/resources/stripe_gateways.js.map +1 -0
  771. package/lib/resources/stripe_payments.cjs +2 -0
  772. package/lib/resources/stripe_payments.cjs.map +1 -0
  773. package/lib/resources/stripe_payments.d.cts +1 -1
  774. package/lib/resources/stripe_payments.d.ts +1 -1
  775. package/lib/resources/stripe_payments.js +2 -0
  776. package/lib/resources/stripe_payments.js.map +1 -0
  777. package/lib/resources/stripe_tax_accounts.cjs +2 -0
  778. package/lib/resources/stripe_tax_accounts.cjs.map +1 -0
  779. package/lib/resources/stripe_tax_accounts.d.cts +1 -1
  780. package/lib/resources/stripe_tax_accounts.d.ts +1 -1
  781. package/lib/resources/stripe_tax_accounts.js +2 -0
  782. package/lib/resources/stripe_tax_accounts.js.map +1 -0
  783. package/lib/resources/subscription_models.cjs +2 -0
  784. package/lib/resources/subscription_models.cjs.map +1 -0
  785. package/lib/resources/subscription_models.d.cts +1 -1
  786. package/lib/resources/subscription_models.d.ts +1 -1
  787. package/lib/resources/subscription_models.js +2 -0
  788. package/lib/resources/subscription_models.js.map +1 -0
  789. package/lib/resources/tags.cjs +2 -0
  790. package/lib/resources/tags.cjs.map +1 -0
  791. package/lib/resources/tags.d.cts +1 -1
  792. package/lib/resources/tags.d.ts +1 -1
  793. package/lib/resources/tags.js +2 -0
  794. package/lib/resources/tags.js.map +1 -0
  795. package/lib/resources/talon_one_accounts.cjs +2 -0
  796. package/lib/resources/talon_one_accounts.cjs.map +1 -0
  797. package/lib/resources/talon_one_accounts.d.cts +1 -1
  798. package/lib/resources/talon_one_accounts.d.ts +1 -1
  799. package/lib/resources/talon_one_accounts.js +2 -0
  800. package/lib/resources/talon_one_accounts.js.map +1 -0
  801. package/lib/resources/tax_calculators.cjs +2 -0
  802. package/lib/resources/tax_calculators.cjs.map +1 -0
  803. package/lib/resources/tax_calculators.d.cts +1 -1
  804. package/lib/resources/tax_calculators.d.ts +1 -1
  805. package/lib/resources/tax_calculators.js +2 -0
  806. package/lib/resources/tax_calculators.js.map +1 -0
  807. package/lib/resources/tax_categories.cjs +2 -0
  808. package/lib/resources/tax_categories.cjs.map +1 -0
  809. package/lib/resources/tax_categories.d.cts +1 -1
  810. package/lib/resources/tax_categories.d.ts +1 -1
  811. package/lib/resources/tax_categories.js +2 -0
  812. package/lib/resources/tax_categories.js.map +1 -0
  813. package/lib/resources/tax_rules.cjs +2 -0
  814. package/lib/resources/tax_rules.cjs.map +1 -0
  815. package/lib/resources/tax_rules.d.cts +1 -1
  816. package/lib/resources/tax_rules.d.ts +1 -1
  817. package/lib/resources/tax_rules.js +2 -0
  818. package/lib/resources/tax_rules.js.map +1 -0
  819. package/lib/resources/taxjar_accounts.cjs +2 -0
  820. package/lib/resources/taxjar_accounts.cjs.map +1 -0
  821. package/lib/resources/taxjar_accounts.d.cts +1 -1
  822. package/lib/resources/taxjar_accounts.d.ts +1 -1
  823. package/lib/resources/taxjar_accounts.js +2 -0
  824. package/lib/resources/taxjar_accounts.js.map +1 -0
  825. package/lib/resources/transactions.cjs +2 -0
  826. package/lib/resources/transactions.cjs.map +1 -0
  827. package/lib/resources/transactions.d.cts +1 -1
  828. package/lib/resources/transactions.d.ts +1 -1
  829. package/lib/resources/transactions.js +2 -0
  830. package/lib/resources/transactions.js.map +1 -0
  831. package/lib/resources/versions.cjs +2 -0
  832. package/lib/resources/versions.cjs.map +1 -0
  833. package/lib/resources/versions.d.cts +1 -1
  834. package/lib/resources/versions.d.ts +1 -1
  835. package/lib/resources/versions.js +2 -0
  836. package/lib/resources/versions.js.map +1 -0
  837. package/lib/resources/vertex_accounts.cjs +2 -0
  838. package/lib/resources/vertex_accounts.cjs.map +1 -0
  839. package/lib/resources/vertex_accounts.d.cts +1 -1
  840. package/lib/resources/vertex_accounts.d.ts +1 -1
  841. package/lib/resources/vertex_accounts.js +2 -0
  842. package/lib/resources/vertex_accounts.js.map +1 -0
  843. package/lib/resources/voids.cjs +2 -0
  844. package/lib/resources/voids.cjs.map +1 -0
  845. package/lib/resources/voids.d.cts +1 -1
  846. package/lib/resources/voids.d.ts +1 -1
  847. package/lib/resources/voids.js +2 -0
  848. package/lib/resources/voids.js.map +1 -0
  849. package/lib/resources/webhooks.cjs +2 -0
  850. package/lib/resources/webhooks.cjs.map +1 -0
  851. package/lib/resources/webhooks.d.cts +1 -1
  852. package/lib/resources/webhooks.d.ts +1 -1
  853. package/lib/resources/webhooks.js +2 -0
  854. package/lib/resources/webhooks.js.map +1 -0
  855. package/lib/resources/wire_transfers.cjs +2 -0
  856. package/lib/resources/wire_transfers.cjs.map +1 -0
  857. package/lib/resources/wire_transfers.d.cts +1 -1
  858. package/lib/resources/wire_transfers.d.ts +1 -1
  859. package/lib/resources/wire_transfers.js +2 -0
  860. package/lib/resources/wire_transfers.js.map +1 -0
  861. package/lib/static.cjs +2 -0
  862. package/lib/static.cjs.map +1 -0
  863. package/lib/static.d.cts +1 -1
  864. package/lib/static.d.ts +1 -1
  865. package/lib/static.js +2 -0
  866. package/lib/static.js.map +1 -0
  867. package/lib/types.cjs +2 -0
  868. package/lib/types.cjs.map +1 -0
  869. package/lib/types.js +2 -0
  870. package/lib/types.js.map +1 -0
  871. package/lib/util.cjs +2 -0
  872. package/lib/util.cjs.map +1 -0
  873. package/lib/util.js +2 -0
  874. package/lib/util.js.map +1 -0
  875. package/package.json +1 -1
  876. package/lib/common.cjs +0 -17
  877. package/lib/common.d.cts +0 -13
  878. package/lib/common.d.ts +0 -13
  879. package/lib/common.js +0 -13
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/sku_list_items.ts"],"names":[],"mappings":";;AA2FA,MAAM,qBAAqB,WAAyB,CAAA;AAAA,EAEnD,OAAgB,IAAwB,GAAA,gBAAA;AAAA,EAExC,MAAM,MAAA,CAAO,QAA6B,EAAA,MAAA,EAA2C,OAAiD,EAAA;AACrI,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,YAAa,CAAA,IAA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,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAkB,eAAA,EAAA,cAAc,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACxH,EAGA,cAAc,QAAwC,EAAA;AACrD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,YAAa,CAAA,IAAA;AAAA;AACzD,EAGA,aAAa,EAAgD,EAAA;AAC5D,IAAO,OAAA,KAAA,CAAM,qBAAqC,EAAE,CAAA;AAAA;AACrD,EAEA,sBAAsB,GAAiC,EAAA;AACtD,IAAO,OAAA,KAAA,CAAM,qBAAsC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC1D,EAGA,IAAwB,GAAA;AACvB,IAAA,OAAO,YAAa,CAAA,IAAA;AAAA;AAGtB;AAGA,MAAM,QAAA,GAAW,IAAI,YAAa,EAAA;AAClC,IAAO,sBAAQ,GAAA","file":"sku_list_items.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 { SkuList, SkuListType } from './sku_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { Version } from './versions'\n\n\ntype SkuListItemType = 'sku_list_items'\ntype SkuListItemRel = ResourceRel & { type: SkuListItemType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type SkuListItemSort = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceSort\n// export type SkuListItemFilter = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceFilter\n\n\ninterface SkuListItem extends Resource {\n\t\n\treadonly type: SkuListItemType\n\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list?: SkuList | null\n\tsku?: Sku | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\n\tsku_list: SkuListRel\n\tsku: SkuRel\n\n}\n\n\ninterface SkuListItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU list item's position.\n\t * @example ```2```\n\t */\n\tposition?: number | null\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The SKU quantity for this SKU list item.\n\t * @example ```1```\n\t */\n\tquantity?: number | null\n\t\n}\n\n\nclass SkuListItems extends ApiResource<SkuListItem> {\n\n\tstatic readonly TYPE: SkuListItemType = 'sku_list_items' as const\n\n\tasync create(resource: SkuListItemCreate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.create<SkuListItemCreate, SkuListItem>({ ...resource, type: SkuListItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.update<SkuListItemUpdate, SkuListItem>({ ...resource, type: SkuListItems.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: SkuListItems.TYPE } : id, options)\n\t}\n\n\tasync sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync versions(skuListItemId: string | SkuListItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuListItem(resource: any): resource is SkuListItem {\n\t\treturn resource.type && (resource.type === SkuListItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListItemRel {\n\t\treturn super.relationshipOneToOne<SkuListItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListItemRel[] {\n\t\treturn super.relationshipOneToMany<SkuListItemRel>(...ids)\n\t}\n\n\n\ttype(): SkuListItemType {\n\t\treturn SkuListItems.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuListItems()\nexport default instance\n\nexport type { SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType }\n"]}
@@ -42,5 +42,7 @@ const instance = new SkuListPromotionRules();
42
42
  var sku_list_promotion_rules_default = instance;
43
43
 
44
44
  module.exports = sku_list_promotion_rules_default;
45
+ //# sourceMappingURL=sku_list_promotion_rules.cjs.map
45
46
 
46
47
  module.exports = exports.default;
48
+ //# sourceMappingURL=sku_list_promotion_rules.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/sku_list_promotion_rules.ts"],"names":["ApiResource"],"mappings":";;;;AA+FA,MAAM,8BAA8BA,oBAAkC,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,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,EAEA,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,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,qBAAA,CAAsB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC7G,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACnK,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAA4B,yBAAA,EAAA,uBAAuB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC3I,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzJ,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,WAAY,EAAA,EAAG,CAA4B,yBAAA,EAAA,uBAAuB,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC5I,EAEA,MAAM,IAAA,CAAK,sBAAuD,EAAA,MAAA,EAA+B,OAAuD,EAAA;AACvJ,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;AACvF,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAW,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,qBAAsB,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,qBAAsB,CAAA,IAAA;AAAA;AAG/B;AAGA,MAAM,QAAA,GAAW,IAAI,qBAAsB,EAAA;AAC3C,IAAO,gCAAQ,GAAA","file":"sku_list_promotion_rules.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 { 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 { SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate, SkuListPromotionRuleType }\n"]}
@@ -1,4 +1,4 @@
1
- export { hR as SkuListPromotionRule, hS as SkuListPromotionRuleCreate, hU as SkuListPromotionRuleSort, ko as SkuListPromotionRuleType, hT as SkuListPromotionRuleUpdate, bo as default } from '../api-CRmSToGa.cjs';
1
+ export { hR as SkuListPromotionRule, hS as SkuListPromotionRuleCreate, hU as SkuListPromotionRuleSort, ko as SkuListPromotionRuleType, hT as SkuListPromotionRuleUpdate, bo as default } from '../api-DmIZO_Np.cjs';
2
2
  import '../client.cjs';
3
3
  import '../interceptor-5MISI1yn.cjs';
4
4
  import '../types.cjs';
@@ -1,4 +1,4 @@
1
- export { hR as SkuListPromotionRule, hS as SkuListPromotionRuleCreate, hU as SkuListPromotionRuleSort, ko as SkuListPromotionRuleType, hT as SkuListPromotionRuleUpdate, bo as default } from '../api-CUXmETkx.js';
1
+ export { hR as SkuListPromotionRule, hS as SkuListPromotionRuleCreate, hU as SkuListPromotionRuleSort, ko as SkuListPromotionRuleType, hT as SkuListPromotionRuleUpdate, bo as default } from '../api-DDgIE2i8.js';
2
2
  import '../client.js';
3
3
  import '../interceptor-5MISI1yn.js';
4
4
  import '../types.js';
@@ -40,3 +40,5 @@ const instance = new SkuListPromotionRules();
40
40
  var sku_list_promotion_rules_default = instance;
41
41
 
42
42
  export { sku_list_promotion_rules_default as default };
43
+ //# sourceMappingURL=sku_list_promotion_rules.js.map
44
+ //# sourceMappingURL=sku_list_promotion_rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/sku_list_promotion_rules.ts"],"names":[],"mappings":";;AA+FA,MAAM,8BAA8B,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,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,EAEA,MAAM,MAAA,CAAO,QAAsC,EAAA,MAAA,EAAoD,OAA0D,EAAA;AAChK,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAyD,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,qBAAsB,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAClJ,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,qBAAA,CAAsB,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC7G,EAEA,MAAM,QAAA,CAAS,sBAAuD,EAAA,MAAA,EAAmC,OAA2D,EAAA;AACnK,IAAM,MAAA,uBAAA,GAA2B,uBAAgD,EAAM,IAAA,sBAAA;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AAC3C,IAAO,gCAAQ,GAAA","file":"sku_list_promotion_rules.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 { SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate, SkuListPromotionRuleType }\n"]}
@@ -58,5 +58,7 @@ const instance = new SkuLists();
58
58
  var sku_lists_default = instance;
59
59
 
60
60
  module.exports = sku_lists_default;
61
+ //# sourceMappingURL=sku_lists.cjs.map
61
62
 
62
63
  module.exports = exports.default;
64
+ //# sourceMappingURL=sku_lists.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/sku_lists.ts"],"names":["ApiResource"],"mappings":";;;;AAmIA,MAAM,iBAAiBA,oBAAqB,CAAA;AAAA,EAE3C,OAAgB,IAAoB,GAAA,WAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAA+B,EAAE,GAAG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OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAa,UAAA,EAAA,UAAU,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/G,EAGA,UAAU,QAAoC,EAAA;AAC7C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAS,CAAA,IAAA;AAAA;AACrD,EAGA,aAAa,EAA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,iBAAQ,GAAA","file":"sku_lists.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 { Customer, CustomerType } from './customers'\nimport type { Sku } from './skus'\nimport type { SkuListItem } from './sku_list_items'\nimport type { Bundle } from './bundles'\nimport type { Attachment } from './attachments'\nimport type { Link } from './links'\nimport type { Version } from './versions'\n\n\ntype SkuListType = 'sku_lists'\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type SkuListSort = Pick<SkuList, 'id' | 'name' | 'slug' | 'manual'> & ResourceSort\n// export type SkuListFilter = Pick<SkuList, 'id' | 'name' | 'slug' | 'description' | 'image_url' | 'manual'> & ResourceFilter\n\n\ninterface SkuList extends Resource {\n\t\n\treadonly type: SkuListType\n\n\t/** \n\t * The SKU list's internal name.\n\t * @example ```\"Personal list\"```\n\t */\n\tname: string\n\t/** \n\t * The SKU list's internal slug.\n\t * @example ```\"personal-list-1\"```\n\t */\n\tslug: string\n\t/** \n\t * An internal description of the SKU list.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU list.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the SKU list is populated manually.\n\t */\n\tmanual?: boolean | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tcustomer?: Customer | null\n\tskus?: Sku[] | null\n\tsku_list_items?: SkuListItem[] | null\n\tbundles?: Bundle[] | null\n\tattachments?: Attachment[] | null\n\tlinks?: Link[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU list's internal name.\n\t * @example ```\"Personal list\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the SKU list.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU list.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the SKU list is populated manually.\n\t */\n\tmanual?: boolean | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface SkuListUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU list's internal name.\n\t * @example ```\"Personal list\"```\n\t */\n\tname?: string | null\n\t/** \n\t * An internal description of the SKU list.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU list.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the SKU list is populated manually.\n\t */\n\tmanual?: boolean | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass SkuLists extends ApiResource<SkuList> {\n\n\tstatic readonly TYPE: SkuListType = 'sku_lists' as const\n\n\tasync create(resource: SkuListCreate, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\treturn this.resources.create<SkuListCreate, SkuList>({ ...resource, type: SkuLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListUpdate, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\treturn this.resources.update<SkuListUpdate, SkuList>({ ...resource, type: SkuLists.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: SkuLists.TYPE } : id, options)\n\t}\n\n\tasync customer(skuListId: string | SkuList, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `sku_lists/${_skuListId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync skus(skuListId: string | SkuList, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_lists/${_skuListId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync sku_list_items(skuListId: string | SkuList, params?: QueryParamsList<SkuListItem>, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<SkuListItem>({ type: 'sku_list_items' }, `sku_lists/${_skuListId}/sku_list_items`, params, options) as unknown as ListResponse<SkuListItem>\n\t}\n\n\tasync bundles(skuListId: string | SkuList, params?: QueryParamsList<Bundle>, options?: ResourcesConfig): Promise<ListResponse<Bundle>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Bundle>({ type: 'bundles' }, `sku_lists/${_skuListId}/bundles`, params, options) as unknown as ListResponse<Bundle>\n\t}\n\n\tasync attachments(skuListId: string | SkuList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `sku_lists/${_skuListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync links(skuListId: string | SkuList, params?: QueryParamsList<Link>, options?: ResourcesConfig): Promise<ListResponse<Link>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Link>({ type: 'links' }, `sku_lists/${_skuListId}/links`, params, options) as unknown as ListResponse<Link>\n\t}\n\n\tasync versions(skuListId: string | SkuList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_lists/${_skuListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuList(resource: any): resource is SkuList {\n\t\treturn resource.type && (resource.type === SkuLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListRel {\n\t\treturn super.relationshipOneToOne<SkuListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListRel[] {\n\t\treturn super.relationshipOneToMany<SkuListRel>(...ids)\n\t}\n\n\n\ttype(): SkuListType {\n\t\treturn SkuLists.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuLists()\nexport default instance\n\nexport type { SkuList, SkuListCreate, SkuListUpdate, SkuListType }\n"]}
@@ -1,4 +1,4 @@
1
- export { hV as SkuList, hW as SkuListCreate, hY as SkuListSort, k7 as SkuListType, hX as SkuListUpdate, bp as default } from '../api-CRmSToGa.cjs';
1
+ export { hV as SkuList, hW as SkuListCreate, hY as SkuListSort, k7 as SkuListType, hX as SkuListUpdate, bp as default } from '../api-DmIZO_Np.cjs';
2
2
  import '../client.cjs';
3
3
  import '../interceptor-5MISI1yn.cjs';
4
4
  import '../types.cjs';
@@ -1,4 +1,4 @@
1
- export { hV as SkuList, hW as SkuListCreate, hY as SkuListSort, k7 as SkuListType, hX as SkuListUpdate, bp as default } from '../api-CUXmETkx.js';
1
+ export { hV as SkuList, hW as SkuListCreate, hY as SkuListSort, k7 as SkuListType, hX as SkuListUpdate, bp as default } from '../api-DDgIE2i8.js';
2
2
  import '../client.js';
3
3
  import '../interceptor-5MISI1yn.js';
4
4
  import '../types.js';
@@ -56,3 +56,5 @@ const instance = new SkuLists();
56
56
  var sku_lists_default = instance;
57
57
 
58
58
  export { sku_lists_default as default };
59
+ //# sourceMappingURL=sku_lists.js.map
60
+ //# sourceMappingURL=sku_lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/sku_lists.ts"],"names":[],"mappings":";;AAmIA,MAAM,iBAAiB,WAAqB,CAAA;AAAA,EAE3C,OAAgB,IAAoB,GAAA,WAAA;AAAA,EAEpC,MAAM,MAAA,CAAO,QAAyB,EAAA,MAAA,EAAuC,OAA6C,EAAA;AACzH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IAAM,MAAA,UAAA,GAAc,UAAsB,EAAM,IAAA,SAAA;AAChD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAa,UAAA,EAAA,UAAU,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/G,EAGA,UAAU,QAAoC,EAAA;AAC7C,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,QAAS,CAAA,IAAA;AAAA;AACrD,EAGA,aAAa,EAA4C,EAAA;AACxD,IAAO,OAAA,KAAA,CAAM,qBAAiC,EAAE,CAAA;AAAA;AACjD,EAEA,sBAAsB,GAA6B,EAAA;AAClD,IAAO,OAAA,KAAA,CAAM,qBAAkC,CAAA,GAAG,GAAG,CAAA;AAAA;AACtD,EAGA,IAAoB,GAAA;AACnB,IAAA,OAAO,QAAS,CAAA,IAAA;AAAA;AAGlB;AAGA,MAAM,QAAA,GAAW,IAAI,QAAS,EAAA;AAC9B,IAAO,iBAAQ,GAAA","file":"sku_lists.js","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer, CustomerType } from './customers'\nimport type { Sku } from './skus'\nimport type { SkuListItem } from './sku_list_items'\nimport type { Bundle } from './bundles'\nimport type { Attachment } from './attachments'\nimport type { Link } from './links'\nimport type { Version } from './versions'\n\n\ntype SkuListType = 'sku_lists'\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type SkuListSort = Pick<SkuList, 'id' | 'name' | 'slug' | 'manual'> & ResourceSort\n// export type SkuListFilter = Pick<SkuList, 'id' | 'name' | 'slug' | 'description' | 'image_url' | 'manual'> & ResourceFilter\n\n\ninterface SkuList extends Resource {\n\t\n\treadonly type: SkuListType\n\n\t/** \n\t * The SKU list's internal name.\n\t * @example ```\"Personal list\"```\n\t */\n\tname: string\n\t/** \n\t * The SKU list's internal slug.\n\t * @example ```\"personal-list-1\"```\n\t */\n\tslug: string\n\t/** \n\t * An internal description of the SKU list.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU list.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the SKU list is populated manually.\n\t */\n\tmanual?: boolean | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tcustomer?: Customer | null\n\tskus?: Sku[] | null\n\tsku_list_items?: SkuListItem[] | null\n\tbundles?: Bundle[] | null\n\tattachments?: Attachment[] | null\n\tlinks?: Link[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU list's internal name.\n\t * @example ```\"Personal list\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the SKU list.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU list.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the SKU list is populated manually.\n\t */\n\tmanual?: boolean | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface SkuListUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU list's internal name.\n\t * @example ```\"Personal list\"```\n\t */\n\tname?: string | null\n\t/** \n\t * An internal description of the SKU list.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU list.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * Indicates if the SKU list is populated manually.\n\t */\n\tmanual?: boolean | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass SkuLists extends ApiResource<SkuList> {\n\n\tstatic readonly TYPE: SkuListType = 'sku_lists' as const\n\n\tasync create(resource: SkuListCreate, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\treturn this.resources.create<SkuListCreate, SkuList>({ ...resource, type: SkuLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListUpdate, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\treturn this.resources.update<SkuListUpdate, SkuList>({ ...resource, type: SkuLists.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: SkuLists.TYPE } : id, options)\n\t}\n\n\tasync customer(skuListId: string | SkuList, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `sku_lists/${_skuListId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync skus(skuListId: string | SkuList, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_lists/${_skuListId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync sku_list_items(skuListId: string | SkuList, params?: QueryParamsList<SkuListItem>, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<SkuListItem>({ type: 'sku_list_items' }, `sku_lists/${_skuListId}/sku_list_items`, params, options) as unknown as ListResponse<SkuListItem>\n\t}\n\n\tasync bundles(skuListId: string | SkuList, params?: QueryParamsList<Bundle>, options?: ResourcesConfig): Promise<ListResponse<Bundle>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Bundle>({ type: 'bundles' }, `sku_lists/${_skuListId}/bundles`, params, options) as unknown as ListResponse<Bundle>\n\t}\n\n\tasync attachments(skuListId: string | SkuList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `sku_lists/${_skuListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync links(skuListId: string | SkuList, params?: QueryParamsList<Link>, options?: ResourcesConfig): Promise<ListResponse<Link>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Link>({ type: 'links' }, `sku_lists/${_skuListId}/links`, params, options) as unknown as ListResponse<Link>\n\t}\n\n\tasync versions(skuListId: string | SkuList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_lists/${_skuListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuList(resource: any): resource is SkuList {\n\t\treturn resource.type && (resource.type === SkuLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListRel {\n\t\treturn super.relationshipOneToOne<SkuListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListRel[] {\n\t\treturn super.relationshipOneToMany<SkuListRel>(...ids)\n\t}\n\n\n\ttype(): SkuListType {\n\t\treturn SkuLists.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuLists()\nexport default instance\n\nexport type { SkuList, SkuListCreate, SkuListUpdate, SkuListType }\n"]}
@@ -56,5 +56,7 @@ const instance = new SkuOptions();
56
56
  var sku_options_default = instance;
57
57
 
58
58
  module.exports = sku_options_default;
59
+ //# sourceMappingURL=sku_options.cjs.map
59
60
 
60
61
  module.exports = exports.default;
62
+ //# sourceMappingURL=sku_options.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/sku_options.ts"],"names":["ApiResource"],"mappings":";;;;AAsKA,MAAM,mBAAmBA,oBAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAO,CAAA,EAAA,EAAyB,OAA0C,EAAA;AAC/E,IAAA,MA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,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"sku_options.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype SkuOptionType = 'sku_options'\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type SkuOptionSort = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceSort\n// export type SkuOptionFilter = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'description' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceFilter\n\n\ninterface SkuOption extends Resource {\n\t\n\treadonly type: SkuOptionType\n\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The price of this shipping method, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The delay time, in days (rounded).\n\t * @example ```2```\n\t */\n\tdelay_days?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuOptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface SkuOptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | 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\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass SkuOptions extends ApiResource<SkuOption> {\n\n\tstatic readonly TYPE: SkuOptionType = 'sku_options' as const\n\n\tasync create(resource: SkuOptionCreate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.create<SkuOptionCreate, SkuOption>({ ...resource, type: SkuOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuOptionUpdate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ ...resource, type: SkuOptions.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: SkuOptions.TYPE } : id, options)\n\t}\n\n\tasync market(skuOptionId: string | SkuOption, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `sku_options/${_skuOptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(skuOptionId: string | SkuOption, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `sku_options/${_skuOptionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(skuOptionId: string | SkuOption, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `sku_options/${_skuOptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(skuOptionId: string | SkuOption, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `sku_options/${_skuOptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(skuOptionId: string | SkuOption, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_options/${_skuOptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _add_tags(id: string | SkuOption, triggerValue: string, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ id: (typeof id === 'string')? id: id.id, type: SkuOptions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | SkuOption, triggerValue: string, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ id: (typeof id === 'string')? id: id.id, type: SkuOptions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisSkuOption(resource: any): resource is SkuOption {\n\t\treturn resource.type && (resource.type === SkuOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuOptionRel {\n\t\treturn super.relationshipOneToOne<SkuOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuOptionRel[] {\n\t\treturn super.relationshipOneToMany<SkuOptionRel>(...ids)\n\t}\n\n\n\ttype(): SkuOptionType {\n\t\treturn SkuOptions.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuOptions()\nexport default instance\n\nexport type { SkuOption, SkuOptionCreate, SkuOptionUpdate, SkuOptionType }\n"]}
@@ -1,4 +1,4 @@
1
- export { hZ as SkuOption, h_ as SkuOptionCreate, i0 as SkuOptionSort, jP as SkuOptionType, h$ as SkuOptionUpdate, bq as default } from '../api-CRmSToGa.cjs';
1
+ export { hZ as SkuOption, h_ as SkuOptionCreate, i0 as SkuOptionSort, jP as SkuOptionType, h$ as SkuOptionUpdate, bq as default } from '../api-DmIZO_Np.cjs';
2
2
  import '../client.cjs';
3
3
  import '../interceptor-5MISI1yn.cjs';
4
4
  import '../types.cjs';
@@ -1,4 +1,4 @@
1
- export { hZ as SkuOption, h_ as SkuOptionCreate, i0 as SkuOptionSort, jP as SkuOptionType, h$ as SkuOptionUpdate, bq as default } from '../api-CUXmETkx.js';
1
+ export { hZ as SkuOption, h_ as SkuOptionCreate, i0 as SkuOptionSort, jP as SkuOptionType, h$ as SkuOptionUpdate, bq as default } from '../api-DDgIE2i8.js';
2
2
  import '../client.js';
3
3
  import '../interceptor-5MISI1yn.js';
4
4
  import '../types.js';
@@ -54,3 +54,5 @@ const instance = new SkuOptions();
54
54
  var sku_options_default = instance;
55
55
 
56
56
  export { sku_options_default as default };
57
+ //# sourceMappingURL=sku_options.js.map
58
+ //# sourceMappingURL=sku_options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/sku_options.ts"],"names":[],"mappings":";;AAsKA,MAAM,mBAAmB,WAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,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,UAAA,CAAW,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAClG,EAEA,MAAM,MAAA,CAAO,WAAiC,EAAA,MAAA,EAAsC,OAA4C,EAAA;AAC/H,IAAM,MAAA,YAAA,GAAgB,YAA0B,EAAM,IAAA,WAAA;AACtD,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAc,EAAE,IAAA,EAAM,SAAU,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAW,OAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/G,EA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EAAsB,QAAyC,OAA+C,EAAA;AACrJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,UAAW,CAAA,IAAA,EAAM,WAAW,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACtK,EAEA,MAAM,YAAA,CAAa,EAAwB,EAAA,YAAA,EAAsB,QAAyC,OAA+C,EAAA;AACxJ,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,UAAW,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACzK,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,UAAW,CAAA,IAAA;AAAA;AACvD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"sku_options.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 { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype SkuOptionType = 'sku_options'\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type SkuOptionSort = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceSort\n// export type SkuOptionFilter = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'description' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceFilter\n\n\ninterface SkuOption extends Resource {\n\t\n\treadonly type: SkuOptionType\n\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The price of this shipping method, float.\n\t * @example ```10```\n\t */\n\tprice_amount_float?: number | null\n\t/** \n\t * The price of this shipping method, formatted.\n\t * @example ```\"€10,00\"```\n\t */\n\tformatted_price_amount?: string | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The delay time, in days (rounded).\n\t * @example ```2```\n\t */\n\tdelay_days?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuOptionCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname: string\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | null\n\n\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface SkuOptionUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU option's internal name.\n\t * @example ```\"Embossing\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The international 3-letter currency code as defined by the ISO 4217 standard.\n\t * @example ```\"EUR\"```\n\t */\n\tcurrency_code?: string | null\n\t/** \n\t * An internal description of the SKU option.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The price of this shipping method, in cents.\n\t * @example ```1000```\n\t */\n\tprice_amount_cents?: number | null\n\t/** \n\t * The delay time (in hours) that should be added to the delivery lead time when this option is purchased.\n\t * @example ```48```\n\t */\n\tdelay_hours?: number | null\n\t/** \n\t * The regex that will be evaluated to match the SKU codes, max size is 5000.\n\t * @example ```\"^(A|B).*$\"```\n\t */\n\tsku_code_regex?: string | 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\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass SkuOptions extends ApiResource<SkuOption> {\n\n\tstatic readonly TYPE: SkuOptionType = 'sku_options' as const\n\n\tasync create(resource: SkuOptionCreate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.create<SkuOptionCreate, SkuOption>({ ...resource, type: SkuOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuOptionUpdate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ ...resource, type: SkuOptions.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: SkuOptions.TYPE } : id, options)\n\t}\n\n\tasync market(skuOptionId: string | SkuOption, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `sku_options/${_skuOptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(skuOptionId: string | SkuOption, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `sku_options/${_skuOptionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(skuOptionId: string | SkuOption, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `sku_options/${_skuOptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(skuOptionId: string | SkuOption, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `sku_options/${_skuOptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(skuOptionId: string | SkuOption, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_options/${_skuOptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _add_tags(id: string | SkuOption, triggerValue: string, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ id: (typeof id === 'string')? id: id.id, type: SkuOptions.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | SkuOption, triggerValue: string, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ id: (typeof id === 'string')? id: id.id, type: SkuOptions.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisSkuOption(resource: any): resource is SkuOption {\n\t\treturn resource.type && (resource.type === SkuOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuOptionRel {\n\t\treturn super.relationshipOneToOne<SkuOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuOptionRel[] {\n\t\treturn super.relationshipOneToMany<SkuOptionRel>(...ids)\n\t}\n\n\n\ttype(): SkuOptionType {\n\t\treturn SkuOptions.TYPE\n\t}\n\n}\n\n\nconst instance = new SkuOptions()\nexport default instance\n\nexport type { SkuOption, SkuOptionCreate, SkuOptionUpdate, SkuOptionType }\n"]}
@@ -100,5 +100,7 @@ const instance = new Skus();
100
100
  var skus_default = instance;
101
101
 
102
102
  module.exports = skus_default;
103
+ //# sourceMappingURL=skus.cjs.map
103
104
 
104
105
  module.exports = exports.default;
106
+ //# sourceMappingURL=skus.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/skus.ts"],"names":["ApiResource"],"mappings":";;;;AA6OA,MAAM,aAAaA,oBAAiB,CAAA;AAAA,EAEnC,OAAgB,IAAgB,GAAA,MAAA;AAAA,EAEhC,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,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,IAAA,CAAK,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC5F,EAEA,MAAM,iBAAA,CAAkB,KAAqB,EAAA,MAAA,EAAgD,OAAsD,EAAA;AAClJ,IAAM,MAAA,MAAA,GAAU,MAAc,EAA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AG,QAAQ,OAAO,CAAA;AAAA;AACpJ,EAEA,MAAM,YAAA,CAAa,EAAkB,EAAA,YAAA,EAAsB,QAAmC,OAAyC,EAAA;AACtI,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,IAAK,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACvJ,EAGA,MAAM,QAAgC,EAAA;AACrC,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,IAAK,CAAA,IAAA;AAAA;AACjD,EAGA,aAAa,EAAwC,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAA6B,EAAE,CAAA;AAAA;AAC7C,EAEA,sBAAsB,GAAyB,EAAA;AAC9C,IAAO,OAAA,KAAA,CAAM,qBAA8B,CAAA,GAAG,GAAG,CAAA;AAAA;AAClD,EAGA,IAAgB,GAAA;AACf,IAAA,OAAO,IAAK,CAAA,IAAA;AAAA;AAGd;AAGA,MAAM,QAAA,GAAW,IAAI,IAAK,EAAA;AAC1B,IAAO,YAAQ,GAAA","file":"skus.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 { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { Price } from './prices'\nimport type { StockItem } from './stock_items'\nimport type { StockReservation } from './stock_reservations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { SkuOption } from './sku_options'\nimport type { SkuListItem } from './sku_list_items'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Link } from './links'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { StockLocation } from './stock_locations'\n\n\ntype SkuType = 'skus'\ntype SkuRel = ResourceRel & { type: SkuType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type SkuSort = Pick<Sku, 'id' | 'code' | 'name' | 'do_not_ship' | 'do_not_track'> & ResourceSort\n// export type SkuFilter = Pick<Sku, 'id' | 'code' | 'name' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track'> & ResourceFilter\n\n\ninterface Sku extends Resource {\n\t\n\treadonly type: SkuType\n\n\t/** \n\t * The SKU code, that uniquely identifies the SKU within the organization.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the SKU.\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the SKU.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The number of pieces that compose the SKU. This is useful to describe sets and bundles.\n\t * @example ```6```\n\t */\n\tpieces_per_pack?: number | null\n\t/** \n\t * The weight of the SKU. If present, it will be used to calculate the shipping rates.\n\t * @example ```300```\n\t */\n\tweight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The Harmonized System Code used by customs to identify the products shipped across international borders.\n\t * @example ```\"4901.91.0020\"```\n\t */\n\ths_tariff_number?: string | null\n\t/** \n\t * Indicates if the SKU doesn't generate shipments.\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the SKU doesn't track the stock inventory.\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * Aggregated information about the SKU's inventory. Returned only when retrieving a single SKU.\n\t * @example ```{\"available\":true,\"quantity\":10,\"levels\":[{\"quantity\":4,\"delivery_lead_times\":[{\"shipping_method\":{\"name\":\"Standard Shipping\",\"reference\":null,\"price_amount_cents\":700,\"free_over_amount_cents\":9900,\"formatted_price_amount\":\"€7,00\",\"formatted_free_over_amount\":\"€99,00\"},\"min\":{\"hours\":72,\"days\":3},\"max\":{\"hours\":120,\"days\":5}},{\"shipping_method\":{\"name\":\"Express Delivery\",\"reference\":null,\"price_amount_cents\":1200,\"free_over_amount_cents\":null,\"formatted_price_amount\":\"€12,00\",\"formatted_free_over_amount\":null},\"min\":{\"hours\":48,\"days\":2},\"max\":{\"hours\":72,\"days\":3}}]},{\"quantity\":6,\"delivery_lead_times\":[{\"shipping_method\":{\"name\":\"Standard Shipping\",\"reference\":null,\"price_amount_cents\":700,\"free_over_amount_cents\":9900,\"formatted_price_amount\":\"€7,00\",\"formatted_free_over_amount\":\"€99,00\"},\"min\":{\"hours\":96,\"days\":4},\"max\":{\"hours\":144,\"days\":6}},{\"shipping_method\":{\"name\":\"Express Delivery\",\"reference\":null,\"price_amount_cents\":1200,\"free_over_amount_cents\":null,\"formatted_price_amount\":\"€12,00\",\"formatted_free_over_amount\":null},\"min\":{\"hours\":72,\"days\":3},\"max\":{\"hours\":96,\"days\":4}}]}]}```\n\t */\n\tinventory?: 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\tshipping_category?: ShippingCategory | null\n\tprices?: Price[] | null\n\tstock_items?: StockItem[] | null\n\tstock_reservations?: StockReservation[] | null\n\tdelivery_lead_times?: DeliveryLeadTime[] | null\n\tsku_options?: SkuOption[] | null\n\tsku_list_items?: SkuListItem[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tlinks?: Link[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | 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 SkuCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU code, that uniquely identifies the SKU within the organization.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the SKU.\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the SKU.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The number of pieces that compose the SKU. This is useful to describe sets and bundles.\n\t * @example ```6```\n\t */\n\tpieces_per_pack?: number | null\n\t/** \n\t * The weight of the SKU. If present, it will be used to calculate the shipping rates.\n\t * @example ```300```\n\t */\n\tweight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The Harmonized System Code used by customs to identify the products shipped across international borders.\n\t * @example ```\"4901.91.0020\"```\n\t */\n\ths_tariff_number?: string | null\n\t/** \n\t * Indicates if the SKU doesn't generate shipments.\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the SKU doesn't track the stock inventory.\n\t */\n\tdo_not_track?: boolean | null\n\n\tshipping_category: ShippingCategoryRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface SkuUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU code, that uniquely identifies the SKU within the organization.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The internal name of the SKU.\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * An internal description of the SKU.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The number of pieces that compose the SKU. This is useful to describe sets and bundles.\n\t * @example ```6```\n\t */\n\tpieces_per_pack?: number | null\n\t/** \n\t * The weight of the SKU. If present, it will be used to calculate the shipping rates.\n\t * @example ```300```\n\t */\n\tweight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The Harmonized System Code used by customs to identify the products shipped across international borders.\n\t * @example ```\"4901.91.0020\"```\n\t */\n\ths_tariff_number?: string | null\n\t/** \n\t * Indicates if the SKU doesn't generate shipments.\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the SKU doesn't track the stock inventory.\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Skus extends ApiResource<Sku> {\n\n\tstatic readonly TYPE: SkuType = 'skus' as const\n\n\tasync create(resource: SkuCreate, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.create<SkuCreate, Sku>({ ...resource, type: Skus.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuUpdate, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.update<SkuUpdate, Sku>({ ...resource, type: Skus.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: Skus.TYPE } : id, options)\n\t}\n\n\tasync shipping_category(skuId: string | Sku, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `skus/${_skuId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync prices(skuId: string | Sku, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `skus/${_skuId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync stock_items(skuId: string | Sku, params?: QueryParamsList<StockItem>, options?: ResourcesConfig): Promise<ListResponse<StockItem>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `skus/${_skuId}/stock_items`, params, options) as unknown as ListResponse<StockItem>\n\t}\n\n\tasync stock_reservations(skuId: string | Sku, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `skus/${_skuId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync delivery_lead_times(skuId: string | Sku, params?: QueryParamsList<DeliveryLeadTime>, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `skus/${_skuId}/delivery_lead_times`, params, options) as unknown as ListResponse<DeliveryLeadTime>\n\t}\n\n\tasync sku_options(skuId: string | Sku, params?: QueryParamsList<SkuOption>, options?: ResourcesConfig): Promise<ListResponse<SkuOption>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<SkuOption>({ type: 'sku_options' }, `skus/${_skuId}/sku_options`, params, options) as unknown as ListResponse<SkuOption>\n\t}\n\n\tasync sku_list_items(skuId: string | Sku, params?: QueryParamsList<SkuListItem>, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<SkuListItem>({ type: 'sku_list_items' }, `skus/${_skuId}/sku_list_items`, params, options) as unknown as ListResponse<SkuListItem>\n\t}\n\n\tasync sku_lists(skuId: string | Sku, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `skus/${_skuId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(skuId: string | Sku, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `skus/${_skuId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync links(skuId: string | Sku, params?: QueryParamsList<Link>, options?: ResourcesConfig): Promise<ListResponse<Link>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Link>({ type: 'links' }, `skus/${_skuId}/links`, params, options) as unknown as ListResponse<Link>\n\t}\n\n\tasync events(skuId: string | Sku, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `skus/${_skuId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(skuId: string | Sku, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `skus/${_skuId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(skuId: string | Sku, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `skus/${_skuId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync jwt_customer(skuId: string | Sku, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `skus/${_skuId}/jwt_customer`, params, options) as unknown as Customer\n\t}\n\n\tasync jwt_markets(skuId: string | Sku, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `skus/${_skuId}/jwt_markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync jwt_stock_locations(skuId: string | Sku, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `skus/${_skuId}/jwt_stock_locations`, params, options) as unknown as ListResponse<StockLocation>\n\t}\n\n\tasync _add_tags(id: string | Sku, triggerValue: string, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.update<SkuUpdate, Sku>({ id: (typeof id === 'string')? id: id.id, type: Skus.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Sku, triggerValue: string, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.update<SkuUpdate, Sku>({ id: (typeof id === 'string')? id: id.id, type: Skus.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisSku(resource: any): resource is Sku {\n\t\treturn resource.type && (resource.type === Skus.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuRel {\n\t\treturn super.relationshipOneToOne<SkuRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuRel[] {\n\t\treturn super.relationshipOneToMany<SkuRel>(...ids)\n\t}\n\n\n\ttype(): SkuType {\n\t\treturn Skus.TYPE\n\t}\n\n}\n\n\nconst instance = new Skus()\nexport default instance\n\nexport type { Sku, SkuCreate, SkuUpdate, SkuType }\n"]}
@@ -1,4 +1,4 @@
1
- export { i1 as Sku, i2 as SkuCreate, i4 as SkuSort, kL as SkuType, i3 as SkuUpdate, br as default } from '../api-CRmSToGa.cjs';
1
+ export { i1 as Sku, i2 as SkuCreate, i4 as SkuSort, kL as SkuType, i3 as SkuUpdate, br as default } from '../api-DmIZO_Np.cjs';
2
2
  import '../client.cjs';
3
3
  import '../interceptor-5MISI1yn.cjs';
4
4
  import '../types.cjs';
@@ -1,4 +1,4 @@
1
- export { i1 as Sku, i2 as SkuCreate, i4 as SkuSort, kL as SkuType, i3 as SkuUpdate, br as default } from '../api-CUXmETkx.js';
1
+ export { i1 as Sku, i2 as SkuCreate, i4 as SkuSort, kL as SkuType, i3 as SkuUpdate, br as default } from '../api-DDgIE2i8.js';
2
2
  import '../client.js';
3
3
  import '../interceptor-5MISI1yn.js';
4
4
  import '../types.js';
@@ -98,3 +98,5 @@ const instance = new Skus();
98
98
  var skus_default = instance;
99
99
 
100
100
  export { skus_default as default };
101
+ //# sourceMappingURL=skus.js.map
102
+ //# sourceMappingURL=skus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/skus.ts"],"names":[],"mappings":";;AA6OA,MAAM,aAAa,WAAiB,CAAA;AAAA,EAEnC,OAAgB,IAAgB,GAAA,MAAA;AAAA,EAEhC,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,EAEA,MAAM,MAAA,CAAO,QAAqB,EAAA,MAAA,EAAmC,OAAyC,EAAA;AAC7G,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAuB,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,IAAK,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC/F,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,IAAA,CAAK,IAAK,EAAA,GAAI,IAAI,OAAO,CAAA;AAAA;AAC5F,EAEA,MAAM,iBAAA,CAAkB,KAAqB,EAAA,MAAA,EAAgD,OAAsD,EAAA;AAClJ,IAAM,MAAA,MAAA,GAAU,MAAc,EAAM,IAAA,KAAA;AACpC,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,KAAA,CAAwB,EAAE,IAAA,EAAM,qBAAsB,EAAA,EAAG,CAAQ,KAAA,EAAA,MAAM,CAAsB,kB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MAAA,CAAuB,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,IAAK,CAAA,IAAA,EAAM,cAAc,YAAa,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AACvJ,EAGA,MAAM,QAAgC,EAAA;AACrC,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,IAAK,CAAA,IAAA;AAAA;AACjD,EAGA,aAAa,EAAwC,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAA6B,EAAE,CAAA;AAAA;AAC7C,EAEA,sBAAsB,GAAyB,EAAA;AAC9C,IAAO,OAAA,KAAA,CAAM,qBAA8B,CAAA,GAAG,GAAG,CAAA;AAAA;AAClD,EAGA,IAAgB,GAAA;AACf,IAAA,OAAO,IAAK,CAAA,IAAA;AAAA;AAGd;AAGA,MAAM,QAAA,GAAW,IAAI,IAAK,EAAA;AAC1B,IAAO,YAAQ,GAAA","file":"skus.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 { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { Price } from './prices'\nimport type { StockItem } from './stock_items'\nimport type { StockReservation } from './stock_reservations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { SkuOption } from './sku_options'\nimport type { SkuListItem } from './sku_list_items'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Link } from './links'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { StockLocation } from './stock_locations'\n\n\ntype SkuType = 'skus'\ntype SkuRel = ResourceRel & { type: SkuType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type SkuSort = Pick<Sku, 'id' | 'code' | 'name' | 'do_not_ship' | 'do_not_track'> & ResourceSort\n// export type SkuFilter = Pick<Sku, 'id' | 'code' | 'name' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track'> & ResourceFilter\n\n\ninterface Sku extends Resource {\n\t\n\treadonly type: SkuType\n\n\t/** \n\t * The SKU code, that uniquely identifies the SKU within the organization.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the SKU.\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the SKU.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The number of pieces that compose the SKU. This is useful to describe sets and bundles.\n\t * @example ```6```\n\t */\n\tpieces_per_pack?: number | null\n\t/** \n\t * The weight of the SKU. If present, it will be used to calculate the shipping rates.\n\t * @example ```300```\n\t */\n\tweight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The Harmonized System Code used by customs to identify the products shipped across international borders.\n\t * @example ```\"4901.91.0020\"```\n\t */\n\ths_tariff_number?: string | null\n\t/** \n\t * Indicates if the SKU doesn't generate shipments.\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the SKU doesn't track the stock inventory.\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * Aggregated information about the SKU's inventory. Returned only when retrieving a single SKU.\n\t * @example ```{\"available\":true,\"quantity\":10,\"levels\":[{\"quantity\":4,\"delivery_lead_times\":[{\"shipping_method\":{\"name\":\"Standard Shipping\",\"reference\":null,\"price_amount_cents\":700,\"free_over_amount_cents\":9900,\"formatted_price_amount\":\"€7,00\",\"formatted_free_over_amount\":\"€99,00\"},\"min\":{\"hours\":72,\"days\":3},\"max\":{\"hours\":120,\"days\":5}},{\"shipping_method\":{\"name\":\"Express Delivery\",\"reference\":null,\"price_amount_cents\":1200,\"free_over_amount_cents\":null,\"formatted_price_amount\":\"€12,00\",\"formatted_free_over_amount\":null},\"min\":{\"hours\":48,\"days\":2},\"max\":{\"hours\":72,\"days\":3}}]},{\"quantity\":6,\"delivery_lead_times\":[{\"shipping_method\":{\"name\":\"Standard Shipping\",\"reference\":null,\"price_amount_cents\":700,\"free_over_amount_cents\":9900,\"formatted_price_amount\":\"€7,00\",\"formatted_free_over_amount\":\"€99,00\"},\"min\":{\"hours\":96,\"days\":4},\"max\":{\"hours\":144,\"days\":6}},{\"shipping_method\":{\"name\":\"Express Delivery\",\"reference\":null,\"price_amount_cents\":1200,\"free_over_amount_cents\":null,\"formatted_price_amount\":\"€12,00\",\"formatted_free_over_amount\":null},\"min\":{\"hours\":72,\"days\":3},\"max\":{\"hours\":96,\"days\":4}}]}]}```\n\t */\n\tinventory?: 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\tshipping_category?: ShippingCategory | null\n\tprices?: Price[] | null\n\tstock_items?: StockItem[] | null\n\tstock_reservations?: StockReservation[] | null\n\tdelivery_lead_times?: DeliveryLeadTime[] | null\n\tsku_options?: SkuOption[] | null\n\tsku_list_items?: SkuListItem[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tlinks?: Link[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | 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 SkuCreate extends ResourceCreate {\n\t\n\t/** \n\t * The SKU code, that uniquely identifies the SKU within the organization.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tcode: string\n\t/** \n\t * The internal name of the SKU.\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname: string\n\t/** \n\t * An internal description of the SKU.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The number of pieces that compose the SKU. This is useful to describe sets and bundles.\n\t * @example ```6```\n\t */\n\tpieces_per_pack?: number | null\n\t/** \n\t * The weight of the SKU. If present, it will be used to calculate the shipping rates.\n\t * @example ```300```\n\t */\n\tweight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The Harmonized System Code used by customs to identify the products shipped across international borders.\n\t * @example ```\"4901.91.0020\"```\n\t */\n\ths_tariff_number?: string | null\n\t/** \n\t * Indicates if the SKU doesn't generate shipments.\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the SKU doesn't track the stock inventory.\n\t */\n\tdo_not_track?: boolean | null\n\n\tshipping_category: ShippingCategoryRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface SkuUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The SKU code, that uniquely identifies the SKU within the organization.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tcode?: string | null\n\t/** \n\t * The internal name of the SKU.\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * An internal description of the SKU.\n\t * @example ```\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\"```\n\t */\n\tdescription?: string | null\n\t/** \n\t * The URL of an image that represents the SKU.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\t/** \n\t * The number of pieces that compose the SKU. This is useful to describe sets and bundles.\n\t * @example ```6```\n\t */\n\tpieces_per_pack?: number | null\n\t/** \n\t * The weight of the SKU. If present, it will be used to calculate the shipping rates.\n\t * @example ```300```\n\t */\n\tweight?: number | null\n\t/** \n\t * The unit of weight. One of 'gr', 'oz', or 'lb'.\n\t * @example ```\"gr\"```\n\t */\n\tunit_of_weight?: 'gr' | 'oz' | 'lb' | null\n\t/** \n\t * The Harmonized System Code used by customs to identify the products shipped across international borders.\n\t * @example ```\"4901.91.0020\"```\n\t */\n\ths_tariff_number?: string | null\n\t/** \n\t * Indicates if the SKU doesn't generate shipments.\n\t */\n\tdo_not_ship?: boolean | null\n\t/** \n\t * Indicates if the SKU doesn't track the stock inventory.\n\t */\n\tdo_not_track?: boolean | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Skus extends ApiResource<Sku> {\n\n\tstatic readonly TYPE: SkuType = 'skus' as const\n\n\tasync create(resource: SkuCreate, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.create<SkuCreate, Sku>({ ...resource, type: Skus.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuUpdate, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.update<SkuUpdate, Sku>({ ...resource, type: Skus.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: Skus.TYPE } : id, options)\n\t}\n\n\tasync shipping_category(skuId: string | Sku, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `skus/${_skuId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync prices(skuId: string | Sku, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `skus/${_skuId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync stock_items(skuId: string | Sku, params?: QueryParamsList<StockItem>, options?: ResourcesConfig): Promise<ListResponse<StockItem>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `skus/${_skuId}/stock_items`, params, options) as unknown as ListResponse<StockItem>\n\t}\n\n\tasync stock_reservations(skuId: string | Sku, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `skus/${_skuId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync delivery_lead_times(skuId: string | Sku, params?: QueryParamsList<DeliveryLeadTime>, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `skus/${_skuId}/delivery_lead_times`, params, options) as unknown as ListResponse<DeliveryLeadTime>\n\t}\n\n\tasync sku_options(skuId: string | Sku, params?: QueryParamsList<SkuOption>, options?: ResourcesConfig): Promise<ListResponse<SkuOption>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<SkuOption>({ type: 'sku_options' }, `skus/${_skuId}/sku_options`, params, options) as unknown as ListResponse<SkuOption>\n\t}\n\n\tasync sku_list_items(skuId: string | Sku, params?: QueryParamsList<SkuListItem>, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<SkuListItem>({ type: 'sku_list_items' }, `skus/${_skuId}/sku_list_items`, params, options) as unknown as ListResponse<SkuListItem>\n\t}\n\n\tasync sku_lists(skuId: string | Sku, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `skus/${_skuId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(skuId: string | Sku, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `skus/${_skuId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync links(skuId: string | Sku, params?: QueryParamsList<Link>, options?: ResourcesConfig): Promise<ListResponse<Link>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Link>({ type: 'links' }, `skus/${_skuId}/links`, params, options) as unknown as ListResponse<Link>\n\t}\n\n\tasync events(skuId: string | Sku, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `skus/${_skuId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(skuId: string | Sku, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `skus/${_skuId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(skuId: string | Sku, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `skus/${_skuId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync jwt_customer(skuId: string | Sku, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `skus/${_skuId}/jwt_customer`, params, options) as unknown as Customer\n\t}\n\n\tasync jwt_markets(skuId: string | Sku, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `skus/${_skuId}/jwt_markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync jwt_stock_locations(skuId: string | Sku, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `skus/${_skuId}/jwt_stock_locations`, params, options) as unknown as ListResponse<StockLocation>\n\t}\n\n\tasync _add_tags(id: string | Sku, triggerValue: string, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.update<SkuUpdate, Sku>({ id: (typeof id === 'string')? id: id.id, type: Skus.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Sku, triggerValue: string, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.update<SkuUpdate, Sku>({ id: (typeof id === 'string')? id: id.id, type: Skus.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\n\tisSku(resource: any): resource is Sku {\n\t\treturn resource.type && (resource.type === Skus.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuRel {\n\t\treturn super.relationshipOneToOne<SkuRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuRel[] {\n\t\treturn super.relationshipOneToMany<SkuRel>(...ids)\n\t}\n\n\n\ttype(): SkuType {\n\t\treturn Skus.TYPE\n\t}\n\n}\n\n\nconst instance = new Skus()\nexport default instance\n\nexport type { Sku, SkuCreate, SkuUpdate, SkuType }\n"]}
@@ -57,5 +57,7 @@ const instance = new StockItems();
57
57
  var stock_items_default = instance;
58
58
 
59
59
  module.exports = stock_items_default;
60
+ //# sourceMappingURL=stock_items.cjs.map
60
61
 
61
62
  module.exports = exports.default;
63
+ //# sourceMappingURL=stock_items.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/stock_items.ts"],"names":["ApiResource"],"mappings":";;;;AA0FA,MAAM,mBAAmBA,oBAAuB,CAAA;AAAA,EAE/C,OAAgB,IAAsB,GAAA,aAAA;AAAA,EAEtC,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAW,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACjH,EAEA,MAAM,MAAA,CAAO,QAA2B,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAO,OAAA,IAAA,CA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EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,UAAW,CAAA,IAAA;AAAA;AACvD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"stock_items.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Sku, SkuType } from './skus'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { StockReservation } from './stock_reservations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockItemType = 'stock_items'\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type StockItemSort = Pick<StockItem, 'id' | 'quantity'> & ResourceSort\n// export type StockItemFilter = Pick<StockItem, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface StockItem extends Resource {\n\t\n\treadonly type: StockItemType\n\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location?: StockLocation | null\n\tsku?: Sku | null\n\treserved_stock?: ReservedStock | null\n\tstock_reservations?: StockReservation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location: StockLocationRel\n\tsku?: SkuRel | null\n\n}\n\n\ninterface StockItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock item quantity.\n\t * @example ```100```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to validate the stock item quantity against the existing reserved stock one, returns an error in case the former is smaller. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_validate?: boolean | null\n\n\tstock_location?: StockLocationRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass StockItems extends ApiResource<StockItem> {\n\n\tstatic readonly TYPE: StockItemType = 'stock_items' as const\n\n\tasync create(resource: StockItemCreate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.create<StockItemCreate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockItemUpdate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockItems.TYPE } : id, options)\n\t}\n\n\tasync stock_location(stockItemId: string | StockItem, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_items/${_stockItemId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync sku(stockItemId: string | StockItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_items/${_stockItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync reserved_stock(stockItemId: string | StockItem, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_items/${_stockItemId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync stock_reservations(stockItemId: string | StockItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `stock_items/${_stockItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync attachments(stockItemId: string | StockItem, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_items/${_stockItemId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockItemId: string | StockItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_items/${_stockItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _validate(id: string | StockItem, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ id: (typeof id === 'string')? id: id.id, type: StockItems.TYPE, _validate: true }, params, options)\n\t}\n\n\n\tisStockItem(resource: any): resource is StockItem {\n\t\treturn resource.type && (resource.type === StockItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockItemRel {\n\t\treturn super.relationshipOneToOne<StockItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockItemRel[] {\n\t\treturn super.relationshipOneToMany<StockItemRel>(...ids)\n\t}\n\n\n\ttype(): StockItemType {\n\t\treturn StockItems.TYPE\n\t}\n\n}\n\n\nconst instance = new StockItems()\nexport default instance\n\nexport type { StockItem, StockItemCreate, StockItemUpdate, StockItemType }\n"]}
@@ -1,4 +1,4 @@
1
- export { i5 as StockItem, i6 as StockItemCreate, i8 as StockItemSort, kK as StockItemType, i7 as StockItemUpdate, bs as default } from '../api-CRmSToGa.cjs';
1
+ export { i5 as StockItem, i6 as StockItemCreate, i8 as StockItemSort, kK as StockItemType, i7 as StockItemUpdate, bs as default } from '../api-DmIZO_Np.cjs';
2
2
  import '../client.cjs';
3
3
  import '../interceptor-5MISI1yn.cjs';
4
4
  import '../types.cjs';
@@ -1,4 +1,4 @@
1
- export { i5 as StockItem, i6 as StockItemCreate, i8 as StockItemSort, kK as StockItemType, i7 as StockItemUpdate, bs as default } from '../api-CUXmETkx.js';
1
+ export { i5 as StockItem, i6 as StockItemCreate, i8 as StockItemSort, kK as StockItemType, i7 as StockItemUpdate, bs as default } from '../api-DDgIE2i8.js';
2
2
  import '../client.js';
3
3
  import '../interceptor-5MISI1yn.js';
4
4
  import '../types.js';
@@ -55,3 +55,5 @@ const instance = new StockItems();
55
55
  var stock_items_default = instance;
56
56
 
57
57
  export { stock_items_default as default };
58
+ //# sourceMappingURL=stock_items.js.map
59
+ //# sourceMappingURL=stock_items.js.map
@@ -0,0 +1 @@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,CAAK,SAAU,CAAA,KAAA,CAAe,EAAE,IAAA,EAAM,UAAW,EAAA,EAAG,CAAe,YAAA,EAAA,YAAY,CAAa,SAAA,CAAA,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AACnH,EAEA,MAAM,SAAA,CAAU,EAAwB,EAAA,MAAA,EAAyC,OAA+C,EAAA;AAC/H,IAAA,OAAO,KAAK,SAAU,CAAA,MAAA,CAAmC,EAAE,EAAK,EAAA,OAAO,OAAO,QAAW,GAAA,EAAA,GAAI,EAAG,CAAA,EAAA,EAAI,MAAM,UAAW,CAAA,IAAA,EAAM,WAAW,IAAK,EAAA,EAAG,QAAQ,OAAO,CAAA;AAAA;AAC9J,EAGA,YAAY,QAAsC,EAAA;AACjD,IAAA,OAAO,QAAS,CAAA,IAAA,IAAS,QAAS,CAAA,IAAA,KAAS,UAAW,CAAA,IAAA;AAAA;AACvD,EAGA,aAAa,EAA8C,EAAA;AAC1D,IAAO,OAAA,KAAA,CAAM,qBAAmC,EAAE,CAAA;AAAA;AACnD,EAEA,sBAAsB,GAA+B,EAAA;AACpD,IAAO,OAAA,KAAA,CAAM,qBAAoC,CAAA,GAAG,GAAG,CAAA;AAAA;AACxD,EAGA,IAAsB,GAAA;AACrB,IAAA,OAAO,UAAW,CAAA,IAAA;AAAA;AAGpB;AAGA,MAAM,QAAA,GAAW,IAAI,UAAW,EAAA;AAChC,IAAO,mBAAQ,GAAA","file":"stock_items.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 { StockLocation, StockLocationType } from './stock_locations'\nimport type { Sku, SkuType } from './skus'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { StockReservation } from './stock_reservations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockItemType = 'stock_items'\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type StockItemSort = Pick<StockItem, 'id' | 'quantity'> & ResourceSort\n// export type StockItemFilter = Pick<StockItem, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface StockItem extends Resource {\n\t\n\treadonly type: StockItemType\n\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location?: StockLocation | null\n\tsku?: Sku | null\n\treserved_stock?: ReservedStock | null\n\tstock_reservations?: StockReservation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock item quantity.\n\t * @example ```100```\n\t */\n\tquantity: number\n\n\tstock_location: StockLocationRel\n\tsku?: SkuRel | null\n\n}\n\n\ninterface StockItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The stock item quantity.\n\t * @example ```100```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to validate the stock item quantity against the existing reserved stock one, returns an error in case the former is smaller. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_validate?: boolean | null\n\n\tstock_location?: StockLocationRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass StockItems extends ApiResource<StockItem> {\n\n\tstatic readonly TYPE: StockItemType = 'stock_items' as const\n\n\tasync create(resource: StockItemCreate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.create<StockItemCreate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockItemUpdate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockItems.TYPE } : id, options)\n\t}\n\n\tasync stock_location(stockItemId: string | StockItem, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_items/${_stockItemId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync sku(stockItemId: string | StockItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_items/${_stockItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync reserved_stock(stockItemId: string | StockItem, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_items/${_stockItemId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync stock_reservations(stockItemId: string | StockItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `stock_items/${_stockItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync attachments(stockItemId: string | StockItem, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_items/${_stockItemId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockItemId: string | StockItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_items/${_stockItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _validate(id: string | StockItem, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ id: (typeof id === 'string')? id: id.id, type: StockItems.TYPE, _validate: true }, params, options)\n\t}\n\n\n\tisStockItem(resource: any): resource is StockItem {\n\t\treturn resource.type && (resource.type === StockItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockItemRel {\n\t\treturn super.relationshipOneToOne<StockItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockItemRel[] {\n\t\treturn super.relationshipOneToMany<StockItemRel>(...ids)\n\t}\n\n\n\ttype(): StockItemType {\n\t\treturn StockItems.TYPE\n\t}\n\n}\n\n\nconst instance = new StockItems()\nexport default instance\n\nexport type { StockItem, StockItemCreate, StockItemUpdate, StockItemType }\n"]}
@@ -63,5 +63,7 @@ const instance = new StockLineItems();
63
63
  var stock_line_items_default = instance;
64
64
 
65
65
  module.exports = stock_line_items_default;
66
+ //# sourceMappingURL=stock_line_items.cjs.map
66
67
 
67
68
  module.exports = exports.default;
69
+ //# sourceMappingURL=stock_line_items.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/resources/stock_line_items.ts"],"names":["ApiResource"],"mappings":";;;;AA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xD,IAAO,OAAA,KAAA,CAAM,qBAAwC,CAAA,GAAG,GAAG,CAAA;AAAA;AAC5D,EAGA,IAA0B,GAAA;AACzB,IAAA,OAAO,cAAe,CAAA,IAAA;AAAA;AAGxB;AAGA,MAAM,QAAA,GAAW,IAAI,cAAe,EAAA;AACpC,IAAO,wBAAQ,GAAA","file":"stock_line_items.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 { Shipment, ShipmentType } from './shipments'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { Sku, SkuType } from './skus'\nimport type { StockReservation } from './stock_reservations'\nimport type { Version } from './versions'\n\n\ntype StockLineItemType = 'stock_line_items'\ntype StockLineItemRel = ResourceRel & { type: StockLineItemType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type StockLineItemSort = Pick<StockLineItem, 'id' | 'quantity'> & ResourceSort\n// export type StockLineItemFilter = Pick<StockLineItem, 'id' | 'sku_code' | 'quantity'> & ResourceFilter\n\n\ninterface StockLineItem extends Resource {\n\t\n\treadonly type: StockLineItemType\n\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The code of the associated bundle.\n\t * @example ```\"BUNDLEMM000000FFFFFFXLXX\"```\n\t */\n\tbundle_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\t/** \n\t * The internal name of the associated line item.\n\t * @example ```\"Men's Black T-shirt with White Logo (XL)\"```\n\t */\n\tname?: string | null\n\t/** \n\t * The image_url of the associated line item.\n\t * @example ```\"https://img.yourdomain.com/skus/xYZkjABcde.png\"```\n\t */\n\timage_url?: string | null\n\n\tshipment?: Shipment | null\n\tline_item?: LineItem | null\n\tstock_item?: StockItem | null\n\tsku?: Sku | null\n\tstock_reservation?: StockReservation | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockLineItemCreate extends ResourceCreate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity: number\n\n\tshipment?: ShipmentRel | null\n\tline_item?: LineItemRel | null\n\tstock_item?: StockItemRel | null\n\tsku?: SkuRel | null\n\n}\n\n\ninterface StockLineItemUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The code of the associated SKU.\n\t * @example ```\"TSHIRTMM000000FFFFFFXLXX\"```\n\t */\n\tsku_code?: string | null\n\t/** \n\t * The line item quantity.\n\t * @example ```4```\n\t */\n\tquantity?: number | null\n\t/** \n\t * Send this attribute if you want to automatically reserve the stock for this stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_reserve_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically destroy the stock reservation for this stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_release_stock?: boolean | null\n\t/** \n\t * Send this attribute if you want to automatically decrement and release the stock this stock line item. Can be done only when fulfillment is in progress. Cannot be passed by sales channels.\n\t * @example ```true```\n\t */\n\t_decrement_stock?: boolean | null\n\n\tshipment?: ShipmentRel | null\n\tline_item?: LineItemRel | null\n\tstock_item?: StockItemRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass StockLineItems extends ApiResource<StockLineItem> {\n\n\tstatic readonly TYPE: StockLineItemType = 'stock_line_items' as const\n\n\tasync create(resource: StockLineItemCreate, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.create<StockLineItemCreate, StockLineItem>({ ...resource, type: StockLineItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockLineItemUpdate, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ ...resource, type: StockLineItems.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: StockLineItems.TYPE } : id, options)\n\t}\n\n\tasync shipment(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `stock_line_items/${_stockLineItemId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync line_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `stock_line_items/${_stockLineItemId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync stock_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_line_items/${_stockLineItemId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync sku(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_line_items/${_stockLineItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync stock_reservation(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `stock_line_items/${_stockLineItemId}/stock_reservation`, params, options) as unknown as StockReservation\n\t}\n\n\tasync versions(stockLineItemId: string | StockLineItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_line_items/${_stockLineItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _reserve_stock(id: string | StockLineItem, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ id: (typeof id === 'string')? id: id.id, type: StockLineItems.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | StockLineItem, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ id: (typeof id === 'string')? id: id.id, type: StockLineItems.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | StockLineItem, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ id: (typeof id === 'string')? id: id.id, type: StockLineItems.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\n\tisStockLineItem(resource: any): resource is StockLineItem {\n\t\treturn resource.type && (resource.type === StockLineItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockLineItemRel {\n\t\treturn super.relationshipOneToOne<StockLineItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockLineItemRel[] {\n\t\treturn super.relationshipOneToMany<StockLineItemRel>(...ids)\n\t}\n\n\n\ttype(): StockLineItemType {\n\t\treturn StockLineItems.TYPE\n\t}\n\n}\n\n\nconst instance = new StockLineItems()\nexport default instance\n\nexport type { StockLineItem, StockLineItemCreate, StockLineItemUpdate, StockLineItemType }\n"]}
@@ -1,4 +1,4 @@
1
- export { i9 as StockLineItem, ia as StockLineItemCreate, ic as StockLineItemSort, jY as StockLineItemType, ib as StockLineItemUpdate, bt as default } from '../api-CRmSToGa.cjs';
1
+ export { i9 as StockLineItem, ia as StockLineItemCreate, ic as StockLineItemSort, jY as StockLineItemType, ib as StockLineItemUpdate, bt as default } from '../api-DmIZO_Np.cjs';
2
2
  import '../client.cjs';
3
3
  import '../interceptor-5MISI1yn.cjs';
4
4
  import '../types.cjs';
@@ -1,4 +1,4 @@
1
- export { i9 as StockLineItem, ia as StockLineItemCreate, ic as StockLineItemSort, jY as StockLineItemType, ib as StockLineItemUpdate, bt as default } from '../api-CUXmETkx.js';
1
+ export { i9 as StockLineItem, ia as StockLineItemCreate, ic as StockLineItemSort, jY as StockLineItemType, ib as StockLineItemUpdate, bt as default } from '../api-DDgIE2i8.js';
2
2
  import '../client.js';
3
3
  import '../interceptor-5MISI1yn.js';
4
4
  import '../types.js';