@commercelayer/sdk 5.0.0-alpha.4 → 5.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (720) hide show
  1. package/README.md +201 -123
  2. package/lib/cjs/api.d.ts +113 -0
  3. package/lib/cjs/api.js +355 -0
  4. package/lib/cjs/client.d.ts +33 -0
  5. package/lib/cjs/client.js +123 -0
  6. package/lib/cjs/commercelayer.d.ts +139 -0
  7. package/lib/cjs/commercelayer.js +230 -0
  8. package/lib/cjs/common.d.ts +4 -0
  9. package/lib/cjs/common.js +14 -0
  10. package/lib/cjs/config.d.ts +11 -0
  11. package/lib/cjs/config.js +13 -0
  12. package/lib/cjs/debug.d.ts +3 -0
  13. package/lib/cjs/debug.js +42 -0
  14. package/lib/cjs/error.d.ts +28 -0
  15. package/lib/cjs/error.js +43 -0
  16. package/lib/cjs/index.d.ts +7 -0
  17. package/lib/cjs/index.js +29 -0
  18. package/lib/cjs/interceptor.d.ts +25 -0
  19. package/lib/cjs/interceptor.js +2 -0
  20. package/lib/cjs/jsonapi.d.ts +5 -0
  21. package/lib/cjs/jsonapi.js +82 -0
  22. package/lib/cjs/model.d.ts +111 -0
  23. package/lib/cjs/model.js +3 -0
  24. package/lib/cjs/query.d.ts +24 -0
  25. package/lib/cjs/query.js +51 -0
  26. package/lib/cjs/resource.d.ts +90 -0
  27. package/lib/cjs/resource.js +167 -0
  28. package/lib/cjs/resources/addresses.d.ts +89 -0
  29. package/lib/cjs/resources/addresses.js +33 -0
  30. package/lib/cjs/resources/adjustments.d.ts +36 -0
  31. package/lib/cjs/resources/adjustments.js +29 -0
  32. package/lib/cjs/resources/adyen_gateways.d.ts +57 -0
  33. package/lib/cjs/resources/adyen_gateways.js +37 -0
  34. package/lib/cjs/resources/adyen_payments.d.ts +47 -0
  35. package/lib/cjs/resources/adyen_payments.js +37 -0
  36. package/lib/cjs/resources/application.d.ts +21 -0
  37. package/lib/cjs/resources/application.js +17 -0
  38. package/lib/cjs/resources/attachments.d.ts +157 -0
  39. package/lib/cjs/resources/attachments.js +29 -0
  40. package/lib/cjs/resources/authorizations.d.ts +61 -0
  41. package/lib/cjs/resources/authorizations.js +39 -0
  42. package/lib/cjs/resources/avalara_accounts.d.ts +56 -0
  43. package/lib/cjs/resources/avalara_accounts.js +41 -0
  44. package/lib/cjs/resources/axerve_gateways.d.ts +44 -0
  45. package/lib/cjs/resources/axerve_gateways.js +37 -0
  46. package/lib/cjs/resources/axerve_payments.d.ts +47 -0
  47. package/lib/cjs/resources/axerve_payments.js +37 -0
  48. package/lib/cjs/resources/billing_info_validation_rules.d.ts +36 -0
  49. package/lib/cjs/resources/billing_info_validation_rules.js +37 -0
  50. package/lib/cjs/resources/bing_geocoders.d.ts +36 -0
  51. package/lib/cjs/resources/bing_geocoders.js +37 -0
  52. package/lib/cjs/resources/braintree_gateways.d.ts +57 -0
  53. package/lib/cjs/resources/braintree_gateways.js +37 -0
  54. package/lib/cjs/resources/braintree_payments.d.ts +49 -0
  55. package/lib/cjs/resources/braintree_payments.js +37 -0
  56. package/lib/cjs/resources/bundles.d.ts +77 -0
  57. package/lib/cjs/resources/bundles.js +45 -0
  58. package/lib/cjs/resources/captures.d.ts +52 -0
  59. package/lib/cjs/resources/captures.js +39 -0
  60. package/lib/cjs/resources/carrier_accounts.d.ts +27 -0
  61. package/lib/cjs/resources/carrier_accounts.js +28 -0
  62. package/lib/cjs/resources/checkout_com_gateways.d.ts +46 -0
  63. package/lib/cjs/resources/checkout_com_gateways.js +37 -0
  64. package/lib/cjs/resources/checkout_com_payments.d.ts +60 -0
  65. package/lib/cjs/resources/checkout_com_payments.js +37 -0
  66. package/lib/cjs/resources/cleanups.d.ts +37 -0
  67. package/lib/cjs/resources/cleanups.js +30 -0
  68. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +60 -0
  69. package/lib/cjs/resources/coupon_codes_promotion_rules.js +33 -0
  70. package/lib/cjs/resources/coupon_recipients.d.ts +45 -0
  71. package/lib/cjs/resources/coupon_recipients.js +37 -0
  72. package/lib/cjs/resources/coupons.d.ts +46 -0
  73. package/lib/cjs/resources/coupons.js +33 -0
  74. package/lib/cjs/resources/customer_addresses.d.ts +45 -0
  75. package/lib/cjs/resources/customer_addresses.js +41 -0
  76. package/lib/cjs/resources/customer_groups.d.ts +37 -0
  77. package/lib/cjs/resources/customer_groups.js +41 -0
  78. package/lib/cjs/resources/customer_password_resets.d.ts +37 -0
  79. package/lib/cjs/resources/customer_password_resets.js +37 -0
  80. package/lib/cjs/resources/customer_payment_sources.d.ts +79 -0
  81. package/lib/cjs/resources/customer_payment_sources.js +33 -0
  82. package/lib/cjs/resources/customer_subscriptions.d.ts +32 -0
  83. package/lib/cjs/resources/customer_subscriptions.js +37 -0
  84. package/lib/cjs/resources/customers.d.ts +67 -0
  85. package/lib/cjs/resources/customers.js +69 -0
  86. package/lib/cjs/resources/delivery_lead_times.d.ts +52 -0
  87. package/lib/cjs/resources/delivery_lead_times.js +41 -0
  88. package/lib/cjs/resources/event_callbacks.d.ts +25 -0
  89. package/lib/cjs/resources/event_callbacks.js +24 -0
  90. package/lib/cjs/resources/events.d.ts +25 -0
  91. package/lib/cjs/resources/events.js +28 -0
  92. package/lib/cjs/resources/exports.d.ts +41 -0
  93. package/lib/cjs/resources/exports.js +30 -0
  94. package/lib/cjs/resources/external_gateways.d.ts +50 -0
  95. package/lib/cjs/resources/external_gateways.js +37 -0
  96. package/lib/cjs/resources/external_payments.d.ts +45 -0
  97. package/lib/cjs/resources/external_payments.js +41 -0
  98. package/lib/cjs/resources/external_promotions.d.ts +91 -0
  99. package/lib/cjs/resources/external_promotions.js +53 -0
  100. package/lib/cjs/resources/external_tax_calculators.d.ts +38 -0
  101. package/lib/cjs/resources/external_tax_calculators.js +37 -0
  102. package/lib/cjs/resources/fixed_amount_promotions.d.ts +92 -0
  103. package/lib/cjs/resources/fixed_amount_promotions.js +53 -0
  104. package/lib/cjs/resources/fixed_price_promotions.d.ts +103 -0
  105. package/lib/cjs/resources/fixed_price_promotions.js +61 -0
  106. package/lib/cjs/resources/free_gift_promotions.d.ts +101 -0
  107. package/lib/cjs/resources/free_gift_promotions.js +61 -0
  108. package/lib/cjs/resources/free_shipping_promotions.d.ts +84 -0
  109. package/lib/cjs/resources/free_shipping_promotions.js +49 -0
  110. package/lib/cjs/resources/geocoders.d.ts +25 -0
  111. package/lib/cjs/resources/geocoders.js +28 -0
  112. package/lib/cjs/resources/gift_card_recipients.d.ts +45 -0
  113. package/lib/cjs/resources/gift_card_recipients.js +37 -0
  114. package/lib/cjs/resources/gift_cards.d.ts +86 -0
  115. package/lib/cjs/resources/gift_cards.js +45 -0
  116. package/lib/cjs/resources/google_geocoders.d.ts +36 -0
  117. package/lib/cjs/resources/google_geocoders.js +37 -0
  118. package/lib/cjs/resources/imports.d.ts +46 -0
  119. package/lib/cjs/resources/imports.js +30 -0
  120. package/lib/cjs/resources/in_stock_subscriptions.d.ts +63 -0
  121. package/lib/cjs/resources/in_stock_subscriptions.js +45 -0
  122. package/lib/cjs/resources/inventory_models.d.ts +43 -0
  123. package/lib/cjs/resources/inventory_models.js +41 -0
  124. package/lib/cjs/resources/inventory_return_locations.d.ts +44 -0
  125. package/lib/cjs/resources/inventory_return_locations.js +37 -0
  126. package/lib/cjs/resources/inventory_stock_locations.d.ts +47 -0
  127. package/lib/cjs/resources/inventory_stock_locations.js +37 -0
  128. package/lib/cjs/resources/klarna_gateways.d.ts +45 -0
  129. package/lib/cjs/resources/klarna_gateways.js +37 -0
  130. package/lib/cjs/resources/klarna_payments.d.ts +47 -0
  131. package/lib/cjs/resources/klarna_payments.js +37 -0
  132. package/lib/cjs/resources/line_item_options.d.ts +58 -0
  133. package/lib/cjs/resources/line_item_options.js +37 -0
  134. package/lib/cjs/resources/line_items.d.ts +127 -0
  135. package/lib/cjs/resources/line_items.js +45 -0
  136. package/lib/cjs/resources/manual_gateways.d.ts +31 -0
  137. package/lib/cjs/resources/manual_gateways.js +33 -0
  138. package/lib/cjs/resources/manual_tax_calculators.d.ts +42 -0
  139. package/lib/cjs/resources/manual_tax_calculators.js +41 -0
  140. package/lib/cjs/resources/markets.d.ts +89 -0
  141. package/lib/cjs/resources/markets.js +53 -0
  142. package/lib/cjs/resources/merchants.d.ts +39 -0
  143. package/lib/cjs/resources/merchants.js +37 -0
  144. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +57 -0
  145. package/lib/cjs/resources/order_amount_promotion_rules.js +29 -0
  146. package/lib/cjs/resources/order_copies.d.ts +49 -0
  147. package/lib/cjs/resources/order_copies.js +42 -0
  148. package/lib/cjs/resources/order_subscriptions.d.ts +71 -0
  149. package/lib/cjs/resources/order_subscriptions.js +53 -0
  150. package/lib/cjs/resources/order_validation_rules.d.ts +24 -0
  151. package/lib/cjs/resources/order_validation_rules.js +28 -0
  152. package/lib/cjs/resources/orders.d.ts +297 -0
  153. package/lib/cjs/resources/orders.js +109 -0
  154. package/lib/cjs/resources/organization.d.ts +32 -0
  155. package/lib/cjs/resources/organization.js +17 -0
  156. package/lib/cjs/resources/packages.d.ts +57 -0
  157. package/lib/cjs/resources/packages.js +41 -0
  158. package/lib/cjs/resources/parcel_line_items.d.ts +52 -0
  159. package/lib/cjs/resources/parcel_line_items.js +37 -0
  160. package/lib/cjs/resources/parcels.d.ts +120 -0
  161. package/lib/cjs/resources/parcels.js +49 -0
  162. package/lib/cjs/resources/payment_gateways.d.ts +22 -0
  163. package/lib/cjs/resources/payment_gateways.js +24 -0
  164. package/lib/cjs/resources/payment_methods.d.ts +73 -0
  165. package/lib/cjs/resources/payment_methods.js +41 -0
  166. package/lib/cjs/resources/paypal_gateways.d.ts +38 -0
  167. package/lib/cjs/resources/paypal_gateways.js +37 -0
  168. package/lib/cjs/resources/paypal_payments.d.ts +53 -0
  169. package/lib/cjs/resources/paypal_payments.js +37 -0
  170. package/lib/cjs/resources/percentage_discount_promotions.d.ts +101 -0
  171. package/lib/cjs/resources/percentage_discount_promotions.js +61 -0
  172. package/lib/cjs/resources/price_lists.d.ts +40 -0
  173. package/lib/cjs/resources/price_lists.js +37 -0
  174. package/lib/cjs/resources/price_tiers.d.ts +29 -0
  175. package/lib/cjs/resources/price_tiers.js +28 -0
  176. package/lib/cjs/resources/price_volume_tiers.d.ts +47 -0
  177. package/lib/cjs/resources/price_volume_tiers.js +37 -0
  178. package/lib/cjs/resources/prices.d.ts +69 -0
  179. package/lib/cjs/resources/prices.js +49 -0
  180. package/lib/cjs/resources/promotion_rules.d.ts +25 -0
  181. package/lib/cjs/resources/promotion_rules.js +20 -0
  182. package/lib/cjs/resources/promotions.d.ts +42 -0
  183. package/lib/cjs/resources/promotions.js +40 -0
  184. package/lib/cjs/resources/refunds.d.ts +38 -0
  185. package/lib/cjs/resources/refunds.js +32 -0
  186. package/lib/cjs/resources/return_line_items.d.ts +50 -0
  187. package/lib/cjs/resources/return_line_items.js +37 -0
  188. package/lib/cjs/resources/returns.d.ts +76 -0
  189. package/lib/cjs/resources/returns.js +61 -0
  190. package/lib/cjs/resources/satispay_gateways.d.ts +40 -0
  191. package/lib/cjs/resources/satispay_gateways.js +37 -0
  192. package/lib/cjs/resources/satispay_payments.d.ts +44 -0
  193. package/lib/cjs/resources/satispay_payments.js +37 -0
  194. package/lib/cjs/resources/shipments.d.ts +94 -0
  195. package/lib/cjs/resources/shipments.js +79 -0
  196. package/lib/cjs/resources/shipping_categories.d.ts +34 -0
  197. package/lib/cjs/resources/shipping_categories.js +37 -0
  198. package/lib/cjs/resources/shipping_method_tiers.d.ts +29 -0
  199. package/lib/cjs/resources/shipping_method_tiers.js +28 -0
  200. package/lib/cjs/resources/shipping_methods.d.ts +108 -0
  201. package/lib/cjs/resources/shipping_methods.js +61 -0
  202. package/lib/cjs/resources/shipping_weight_tiers.d.ts +47 -0
  203. package/lib/cjs/resources/shipping_weight_tiers.js +37 -0
  204. package/lib/cjs/resources/shipping_zones.d.ts +49 -0
  205. package/lib/cjs/resources/shipping_zones.js +33 -0
  206. package/lib/cjs/resources/sku_list_items.d.ts +48 -0
  207. package/lib/cjs/resources/sku_list_items.js +37 -0
  208. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +69 -0
  209. package/lib/cjs/resources/sku_list_promotion_rules.js +37 -0
  210. package/lib/cjs/resources/sku_lists.d.ts +61 -0
  211. package/lib/cjs/resources/sku_lists.js +49 -0
  212. package/lib/cjs/resources/sku_options.d.ts +57 -0
  213. package/lib/cjs/resources/sku_options.js +37 -0
  214. package/lib/cjs/resources/skus.d.ts +79 -0
  215. package/lib/cjs/resources/skus.js +53 -0
  216. package/lib/cjs/resources/stock_items.d.ts +50 -0
  217. package/lib/cjs/resources/stock_items.js +41 -0
  218. package/lib/cjs/resources/stock_line_items.d.ts +30 -0
  219. package/lib/cjs/resources/stock_line_items.js +32 -0
  220. package/lib/cjs/resources/stock_locations.d.ts +58 -0
  221. package/lib/cjs/resources/stock_locations.js +53 -0
  222. package/lib/cjs/resources/stock_transfers.d.ts +75 -0
  223. package/lib/cjs/resources/stock_transfers.js +53 -0
  224. package/lib/cjs/resources/stripe_gateways.d.ts +42 -0
  225. package/lib/cjs/resources/stripe_gateways.js +37 -0
  226. package/lib/cjs/resources/stripe_payments.d.ts +48 -0
  227. package/lib/cjs/resources/stripe_payments.js +37 -0
  228. package/lib/cjs/resources/tax_calculators.d.ts +25 -0
  229. package/lib/cjs/resources/tax_calculators.js +28 -0
  230. package/lib/cjs/resources/tax_categories.d.ts +60 -0
  231. package/lib/cjs/resources/tax_categories.js +37 -0
  232. package/lib/cjs/resources/tax_rules.d.ts +70 -0
  233. package/lib/cjs/resources/tax_rules.js +33 -0
  234. package/lib/cjs/resources/taxjar_accounts.d.ts +44 -0
  235. package/lib/cjs/resources/taxjar_accounts.js +41 -0
  236. package/lib/cjs/resources/transactions.d.ts +32 -0
  237. package/lib/cjs/resources/transactions.js +24 -0
  238. package/lib/cjs/resources/voids.d.ts +38 -0
  239. package/lib/cjs/resources/voids.js +32 -0
  240. package/lib/cjs/resources/webhooks.d.ts +44 -0
  241. package/lib/cjs/resources/webhooks.js +33 -0
  242. package/lib/cjs/resources/wire_transfers.d.ts +34 -0
  243. package/lib/cjs/resources/wire_transfers.js +33 -0
  244. package/lib/cjs/static.d.ts +9 -0
  245. package/lib/cjs/static.js +45 -0
  246. package/lib/cjs/util.d.ts +10 -0
  247. package/lib/cjs/util.js +15 -0
  248. package/lib/esm/api.d.ts +113 -0
  249. package/lib/esm/api.js +239 -0
  250. package/lib/esm/client.d.ts +33 -0
  251. package/lib/esm/client.js +118 -0
  252. package/lib/esm/commercelayer.d.ts +139 -0
  253. package/lib/esm/commercelayer.js +201 -0
  254. package/lib/esm/common.d.ts +4 -0
  255. package/lib/esm/common.js +10 -0
  256. package/lib/esm/config.d.ts +11 -0
  257. package/lib/esm/config.js +11 -0
  258. package/lib/esm/debug.d.ts +3 -0
  259. package/lib/esm/debug.js +40 -0
  260. package/lib/esm/error.d.ts +28 -0
  261. package/lib/esm/error.js +38 -0
  262. package/lib/esm/index.d.ts +7 -0
  263. package/lib/esm/index.js +6 -0
  264. package/lib/esm/interceptor.d.ts +25 -0
  265. package/lib/esm/interceptor.js +1 -0
  266. package/lib/esm/jsonapi.d.ts +5 -0
  267. package/lib/esm/jsonapi.js +75 -0
  268. package/lib/esm/model.d.ts +111 -0
  269. package/lib/esm/model.js +2 -0
  270. package/lib/esm/query.d.ts +24 -0
  271. package/lib/esm/query.js +45 -0
  272. package/lib/esm/resource.d.ts +90 -0
  273. package/lib/esm/resource.js +160 -0
  274. package/lib/esm/resources/addresses.d.ts +89 -0
  275. package/lib/esm/resources/addresses.js +31 -0
  276. package/lib/esm/resources/adjustments.d.ts +36 -0
  277. package/lib/esm/resources/adjustments.js +27 -0
  278. package/lib/esm/resources/adyen_gateways.d.ts +57 -0
  279. package/lib/esm/resources/adyen_gateways.js +35 -0
  280. package/lib/esm/resources/adyen_payments.d.ts +47 -0
  281. package/lib/esm/resources/adyen_payments.js +35 -0
  282. package/lib/esm/resources/application.d.ts +21 -0
  283. package/lib/esm/resources/application.js +15 -0
  284. package/lib/esm/resources/attachments.d.ts +157 -0
  285. package/lib/esm/resources/attachments.js +27 -0
  286. package/lib/esm/resources/authorizations.d.ts +61 -0
  287. package/lib/esm/resources/authorizations.js +37 -0
  288. package/lib/esm/resources/avalara_accounts.d.ts +56 -0
  289. package/lib/esm/resources/avalara_accounts.js +39 -0
  290. package/lib/esm/resources/axerve_gateways.d.ts +44 -0
  291. package/lib/esm/resources/axerve_gateways.js +35 -0
  292. package/lib/esm/resources/axerve_payments.d.ts +47 -0
  293. package/lib/esm/resources/axerve_payments.js +35 -0
  294. package/lib/esm/resources/billing_info_validation_rules.d.ts +36 -0
  295. package/lib/esm/resources/billing_info_validation_rules.js +35 -0
  296. package/lib/esm/resources/bing_geocoders.d.ts +36 -0
  297. package/lib/esm/resources/bing_geocoders.js +35 -0
  298. package/lib/esm/resources/braintree_gateways.d.ts +57 -0
  299. package/lib/esm/resources/braintree_gateways.js +35 -0
  300. package/lib/esm/resources/braintree_payments.d.ts +49 -0
  301. package/lib/esm/resources/braintree_payments.js +35 -0
  302. package/lib/esm/resources/bundles.d.ts +77 -0
  303. package/lib/esm/resources/bundles.js +43 -0
  304. package/lib/esm/resources/captures.d.ts +52 -0
  305. package/lib/esm/resources/captures.js +37 -0
  306. package/lib/esm/resources/carrier_accounts.d.ts +27 -0
  307. package/lib/esm/resources/carrier_accounts.js +26 -0
  308. package/lib/esm/resources/checkout_com_gateways.d.ts +46 -0
  309. package/lib/esm/resources/checkout_com_gateways.js +35 -0
  310. package/lib/esm/resources/checkout_com_payments.d.ts +60 -0
  311. package/lib/esm/resources/checkout_com_payments.js +35 -0
  312. package/lib/esm/resources/cleanups.d.ts +37 -0
  313. package/lib/esm/resources/cleanups.js +28 -0
  314. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +60 -0
  315. package/lib/esm/resources/coupon_codes_promotion_rules.js +31 -0
  316. package/lib/esm/resources/coupon_recipients.d.ts +45 -0
  317. package/lib/esm/resources/coupon_recipients.js +35 -0
  318. package/lib/esm/resources/coupons.d.ts +46 -0
  319. package/lib/esm/resources/coupons.js +31 -0
  320. package/lib/esm/resources/customer_addresses.d.ts +45 -0
  321. package/lib/esm/resources/customer_addresses.js +39 -0
  322. package/lib/esm/resources/customer_groups.d.ts +37 -0
  323. package/lib/esm/resources/customer_groups.js +39 -0
  324. package/lib/esm/resources/customer_password_resets.d.ts +37 -0
  325. package/lib/esm/resources/customer_password_resets.js +35 -0
  326. package/lib/esm/resources/customer_payment_sources.d.ts +79 -0
  327. package/lib/esm/resources/customer_payment_sources.js +31 -0
  328. package/lib/esm/resources/customer_subscriptions.d.ts +32 -0
  329. package/lib/esm/resources/customer_subscriptions.js +35 -0
  330. package/lib/esm/resources/customers.d.ts +67 -0
  331. package/lib/esm/resources/customers.js +67 -0
  332. package/lib/esm/resources/delivery_lead_times.d.ts +52 -0
  333. package/lib/esm/resources/delivery_lead_times.js +39 -0
  334. package/lib/esm/resources/event_callbacks.d.ts +25 -0
  335. package/lib/esm/resources/event_callbacks.js +22 -0
  336. package/lib/esm/resources/events.d.ts +25 -0
  337. package/lib/esm/resources/events.js +26 -0
  338. package/lib/esm/resources/exports.d.ts +41 -0
  339. package/lib/esm/resources/exports.js +28 -0
  340. package/lib/esm/resources/external_gateways.d.ts +50 -0
  341. package/lib/esm/resources/external_gateways.js +35 -0
  342. package/lib/esm/resources/external_payments.d.ts +45 -0
  343. package/lib/esm/resources/external_payments.js +39 -0
  344. package/lib/esm/resources/external_promotions.d.ts +91 -0
  345. package/lib/esm/resources/external_promotions.js +51 -0
  346. package/lib/esm/resources/external_tax_calculators.d.ts +38 -0
  347. package/lib/esm/resources/external_tax_calculators.js +35 -0
  348. package/lib/esm/resources/fixed_amount_promotions.d.ts +92 -0
  349. package/lib/esm/resources/fixed_amount_promotions.js +51 -0
  350. package/lib/esm/resources/fixed_price_promotions.d.ts +103 -0
  351. package/lib/esm/resources/fixed_price_promotions.js +59 -0
  352. package/lib/esm/resources/free_gift_promotions.d.ts +101 -0
  353. package/lib/esm/resources/free_gift_promotions.js +59 -0
  354. package/lib/esm/resources/free_shipping_promotions.d.ts +84 -0
  355. package/lib/esm/resources/free_shipping_promotions.js +47 -0
  356. package/lib/esm/resources/geocoders.d.ts +25 -0
  357. package/lib/esm/resources/geocoders.js +26 -0
  358. package/lib/esm/resources/gift_card_recipients.d.ts +45 -0
  359. package/lib/esm/resources/gift_card_recipients.js +35 -0
  360. package/lib/esm/resources/gift_cards.d.ts +86 -0
  361. package/lib/esm/resources/gift_cards.js +43 -0
  362. package/lib/esm/resources/google_geocoders.d.ts +36 -0
  363. package/lib/esm/resources/google_geocoders.js +35 -0
  364. package/lib/esm/resources/imports.d.ts +46 -0
  365. package/lib/esm/resources/imports.js +28 -0
  366. package/lib/esm/resources/in_stock_subscriptions.d.ts +63 -0
  367. package/lib/esm/resources/in_stock_subscriptions.js +43 -0
  368. package/lib/esm/resources/inventory_models.d.ts +43 -0
  369. package/lib/esm/resources/inventory_models.js +39 -0
  370. package/lib/esm/resources/inventory_return_locations.d.ts +44 -0
  371. package/lib/esm/resources/inventory_return_locations.js +35 -0
  372. package/lib/esm/resources/inventory_stock_locations.d.ts +47 -0
  373. package/lib/esm/resources/inventory_stock_locations.js +35 -0
  374. package/lib/esm/resources/klarna_gateways.d.ts +45 -0
  375. package/lib/esm/resources/klarna_gateways.js +35 -0
  376. package/lib/esm/resources/klarna_payments.d.ts +47 -0
  377. package/lib/esm/resources/klarna_payments.js +35 -0
  378. package/lib/esm/resources/line_item_options.d.ts +58 -0
  379. package/lib/esm/resources/line_item_options.js +35 -0
  380. package/lib/esm/resources/line_items.d.ts +127 -0
  381. package/lib/esm/resources/line_items.js +43 -0
  382. package/lib/esm/resources/manual_gateways.d.ts +31 -0
  383. package/lib/esm/resources/manual_gateways.js +31 -0
  384. package/lib/esm/resources/manual_tax_calculators.d.ts +42 -0
  385. package/lib/esm/resources/manual_tax_calculators.js +39 -0
  386. package/lib/esm/resources/markets.d.ts +89 -0
  387. package/lib/esm/resources/markets.js +51 -0
  388. package/lib/esm/resources/merchants.d.ts +39 -0
  389. package/lib/esm/resources/merchants.js +35 -0
  390. package/lib/esm/resources/order_amount_promotion_rules.d.ts +57 -0
  391. package/lib/esm/resources/order_amount_promotion_rules.js +27 -0
  392. package/lib/esm/resources/order_copies.d.ts +49 -0
  393. package/lib/esm/resources/order_copies.js +40 -0
  394. package/lib/esm/resources/order_subscriptions.d.ts +71 -0
  395. package/lib/esm/resources/order_subscriptions.js +51 -0
  396. package/lib/esm/resources/order_validation_rules.d.ts +24 -0
  397. package/lib/esm/resources/order_validation_rules.js +26 -0
  398. package/lib/esm/resources/orders.d.ts +297 -0
  399. package/lib/esm/resources/orders.js +107 -0
  400. package/lib/esm/resources/organization.d.ts +32 -0
  401. package/lib/esm/resources/organization.js +15 -0
  402. package/lib/esm/resources/packages.d.ts +57 -0
  403. package/lib/esm/resources/packages.js +39 -0
  404. package/lib/esm/resources/parcel_line_items.d.ts +52 -0
  405. package/lib/esm/resources/parcel_line_items.js +35 -0
  406. package/lib/esm/resources/parcels.d.ts +120 -0
  407. package/lib/esm/resources/parcels.js +47 -0
  408. package/lib/esm/resources/payment_gateways.d.ts +22 -0
  409. package/lib/esm/resources/payment_gateways.js +22 -0
  410. package/lib/esm/resources/payment_methods.d.ts +73 -0
  411. package/lib/esm/resources/payment_methods.js +39 -0
  412. package/lib/esm/resources/paypal_gateways.d.ts +38 -0
  413. package/lib/esm/resources/paypal_gateways.js +35 -0
  414. package/lib/esm/resources/paypal_payments.d.ts +53 -0
  415. package/lib/esm/resources/paypal_payments.js +35 -0
  416. package/lib/esm/resources/percentage_discount_promotions.d.ts +101 -0
  417. package/lib/esm/resources/percentage_discount_promotions.js +59 -0
  418. package/lib/esm/resources/price_lists.d.ts +40 -0
  419. package/lib/esm/resources/price_lists.js +35 -0
  420. package/lib/esm/resources/price_tiers.d.ts +29 -0
  421. package/lib/esm/resources/price_tiers.js +26 -0
  422. package/lib/esm/resources/price_volume_tiers.d.ts +47 -0
  423. package/lib/esm/resources/price_volume_tiers.js +35 -0
  424. package/lib/esm/resources/prices.d.ts +69 -0
  425. package/lib/esm/resources/prices.js +47 -0
  426. package/lib/esm/resources/promotion_rules.d.ts +25 -0
  427. package/lib/esm/resources/promotion_rules.js +18 -0
  428. package/lib/esm/resources/promotions.d.ts +42 -0
  429. package/lib/esm/resources/promotions.js +38 -0
  430. package/lib/esm/resources/refunds.d.ts +38 -0
  431. package/lib/esm/resources/refunds.js +30 -0
  432. package/lib/esm/resources/return_line_items.d.ts +50 -0
  433. package/lib/esm/resources/return_line_items.js +35 -0
  434. package/lib/esm/resources/returns.d.ts +76 -0
  435. package/lib/esm/resources/returns.js +59 -0
  436. package/lib/esm/resources/satispay_gateways.d.ts +40 -0
  437. package/lib/esm/resources/satispay_gateways.js +35 -0
  438. package/lib/esm/resources/satispay_payments.d.ts +44 -0
  439. package/lib/esm/resources/satispay_payments.js +35 -0
  440. package/lib/esm/resources/shipments.d.ts +94 -0
  441. package/lib/esm/resources/shipments.js +77 -0
  442. package/lib/esm/resources/shipping_categories.d.ts +34 -0
  443. package/lib/esm/resources/shipping_categories.js +35 -0
  444. package/lib/esm/resources/shipping_method_tiers.d.ts +29 -0
  445. package/lib/esm/resources/shipping_method_tiers.js +26 -0
  446. package/lib/esm/resources/shipping_methods.d.ts +108 -0
  447. package/lib/esm/resources/shipping_methods.js +59 -0
  448. package/lib/esm/resources/shipping_weight_tiers.d.ts +47 -0
  449. package/lib/esm/resources/shipping_weight_tiers.js +35 -0
  450. package/lib/esm/resources/shipping_zones.d.ts +49 -0
  451. package/lib/esm/resources/shipping_zones.js +31 -0
  452. package/lib/esm/resources/sku_list_items.d.ts +48 -0
  453. package/lib/esm/resources/sku_list_items.js +35 -0
  454. package/lib/esm/resources/sku_list_promotion_rules.d.ts +69 -0
  455. package/lib/esm/resources/sku_list_promotion_rules.js +35 -0
  456. package/lib/esm/resources/sku_lists.d.ts +61 -0
  457. package/lib/esm/resources/sku_lists.js +47 -0
  458. package/lib/esm/resources/sku_options.d.ts +57 -0
  459. package/lib/esm/resources/sku_options.js +35 -0
  460. package/lib/esm/resources/skus.d.ts +79 -0
  461. package/lib/esm/resources/skus.js +51 -0
  462. package/lib/esm/resources/stock_items.d.ts +50 -0
  463. package/lib/esm/resources/stock_items.js +39 -0
  464. package/lib/esm/resources/stock_line_items.d.ts +30 -0
  465. package/lib/esm/resources/stock_line_items.js +30 -0
  466. package/lib/esm/resources/stock_locations.d.ts +58 -0
  467. package/lib/esm/resources/stock_locations.js +51 -0
  468. package/lib/esm/resources/stock_transfers.d.ts +75 -0
  469. package/lib/esm/resources/stock_transfers.js +51 -0
  470. package/lib/esm/resources/stripe_gateways.d.ts +42 -0
  471. package/lib/esm/resources/stripe_gateways.js +35 -0
  472. package/lib/esm/resources/stripe_payments.d.ts +48 -0
  473. package/lib/esm/resources/stripe_payments.js +35 -0
  474. package/lib/esm/resources/tax_calculators.d.ts +25 -0
  475. package/lib/esm/resources/tax_calculators.js +26 -0
  476. package/lib/esm/resources/tax_categories.d.ts +60 -0
  477. package/lib/esm/resources/tax_categories.js +35 -0
  478. package/lib/esm/resources/tax_rules.d.ts +70 -0
  479. package/lib/esm/resources/tax_rules.js +31 -0
  480. package/lib/esm/resources/taxjar_accounts.d.ts +44 -0
  481. package/lib/esm/resources/taxjar_accounts.js +39 -0
  482. package/lib/esm/resources/transactions.d.ts +32 -0
  483. package/lib/esm/resources/transactions.js +22 -0
  484. package/lib/esm/resources/voids.d.ts +38 -0
  485. package/lib/esm/resources/voids.js +30 -0
  486. package/lib/esm/resources/webhooks.d.ts +44 -0
  487. package/lib/esm/resources/webhooks.js +31 -0
  488. package/lib/esm/resources/wire_transfers.d.ts +34 -0
  489. package/lib/esm/resources/wire_transfers.js +31 -0
  490. package/lib/esm/static.d.ts +9 -0
  491. package/lib/esm/static.js +19 -0
  492. package/lib/esm/util.d.ts +10 -0
  493. package/lib/esm/util.js +11 -0
  494. package/lib/tsconfig.esm.tsbuildinfo +1 -0
  495. package/lib/tsconfig.tsbuildinfo +1 -0
  496. package/package.json +28 -37
  497. package/lib/api.d.ts +0 -1
  498. package/lib/api.js +0 -1
  499. package/lib/client.d.ts +0 -2
  500. package/lib/client.js +0 -1
  501. package/lib/commercelayer.d.ts +0 -1
  502. package/lib/commercelayer.js +0 -1
  503. package/lib/common.d.ts +0 -1
  504. package/lib/common.js +0 -1
  505. package/lib/config.d.ts +0 -1
  506. package/lib/config.js +0 -1
  507. package/lib/debug.d.ts +0 -1
  508. package/lib/debug.js +0 -1
  509. package/lib/error.d.ts +0 -1
  510. package/lib/error.js +0 -1
  511. package/lib/index.d.ts +0 -1
  512. package/lib/index.js +0 -1
  513. package/lib/interceptor.d.ts +0 -1
  514. package/lib/interceptor.js +0 -1
  515. package/lib/jsonapi.d.ts +0 -1
  516. package/lib/jsonapi.js +0 -1
  517. package/lib/model.d.ts +0 -1
  518. package/lib/model.js +0 -1
  519. package/lib/query.d.ts +0 -1
  520. package/lib/query.js +0 -1
  521. package/lib/resource.d.ts +0 -1
  522. package/lib/resource.js +0 -1
  523. package/lib/resources/addresses.d.ts +0 -1
  524. package/lib/resources/addresses.js +0 -1
  525. package/lib/resources/adjustments.d.ts +0 -1
  526. package/lib/resources/adjustments.js +0 -1
  527. package/lib/resources/adyen_gateways.d.ts +0 -1
  528. package/lib/resources/adyen_gateways.js +0 -1
  529. package/lib/resources/adyen_payments.d.ts +0 -1
  530. package/lib/resources/adyen_payments.js +0 -1
  531. package/lib/resources/application.d.ts +0 -1
  532. package/lib/resources/application.js +0 -1
  533. package/lib/resources/attachments.d.ts +0 -1
  534. package/lib/resources/attachments.js +0 -1
  535. package/lib/resources/authorizations.d.ts +0 -1
  536. package/lib/resources/authorizations.js +0 -1
  537. package/lib/resources/avalara_accounts.d.ts +0 -1
  538. package/lib/resources/avalara_accounts.js +0 -1
  539. package/lib/resources/billing_info_validation_rules.d.ts +0 -1
  540. package/lib/resources/billing_info_validation_rules.js +0 -1
  541. package/lib/resources/bing_geocoders.d.ts +0 -1
  542. package/lib/resources/bing_geocoders.js +0 -1
  543. package/lib/resources/braintree_gateways.d.ts +0 -1
  544. package/lib/resources/braintree_gateways.js +0 -1
  545. package/lib/resources/braintree_payments.d.ts +0 -1
  546. package/lib/resources/braintree_payments.js +0 -1
  547. package/lib/resources/bundles.d.ts +0 -1
  548. package/lib/resources/bundles.js +0 -1
  549. package/lib/resources/captures.d.ts +0 -1
  550. package/lib/resources/captures.js +0 -1
  551. package/lib/resources/carrier_accounts.d.ts +0 -1
  552. package/lib/resources/carrier_accounts.js +0 -1
  553. package/lib/resources/checkout_com_gateways.d.ts +0 -1
  554. package/lib/resources/checkout_com_gateways.js +0 -1
  555. package/lib/resources/checkout_com_payments.d.ts +0 -1
  556. package/lib/resources/checkout_com_payments.js +0 -1
  557. package/lib/resources/coupon_codes_promotion_rules.d.ts +0 -1
  558. package/lib/resources/coupon_codes_promotion_rules.js +0 -1
  559. package/lib/resources/coupon_recipients.d.ts +0 -1
  560. package/lib/resources/coupon_recipients.js +0 -1
  561. package/lib/resources/coupons.d.ts +0 -1
  562. package/lib/resources/coupons.js +0 -1
  563. package/lib/resources/customer_addresses.d.ts +0 -1
  564. package/lib/resources/customer_addresses.js +0 -1
  565. package/lib/resources/customer_groups.d.ts +0 -1
  566. package/lib/resources/customer_groups.js +0 -1
  567. package/lib/resources/customer_password_resets.d.ts +0 -1
  568. package/lib/resources/customer_password_resets.js +0 -1
  569. package/lib/resources/customer_payment_sources.d.ts +0 -1
  570. package/lib/resources/customer_payment_sources.js +0 -1
  571. package/lib/resources/customer_subscriptions.d.ts +0 -1
  572. package/lib/resources/customer_subscriptions.js +0 -1
  573. package/lib/resources/customers.d.ts +0 -1
  574. package/lib/resources/customers.js +0 -1
  575. package/lib/resources/delivery_lead_times.d.ts +0 -1
  576. package/lib/resources/delivery_lead_times.js +0 -1
  577. package/lib/resources/event_callbacks.d.ts +0 -1
  578. package/lib/resources/event_callbacks.js +0 -1
  579. package/lib/resources/external_gateways.d.ts +0 -1
  580. package/lib/resources/external_gateways.js +0 -1
  581. package/lib/resources/external_payments.d.ts +0 -1
  582. package/lib/resources/external_payments.js +0 -1
  583. package/lib/resources/external_promotions.d.ts +0 -1
  584. package/lib/resources/external_promotions.js +0 -1
  585. package/lib/resources/external_tax_calculators.d.ts +0 -1
  586. package/lib/resources/external_tax_calculators.js +0 -1
  587. package/lib/resources/fixed_amount_promotions.d.ts +0 -1
  588. package/lib/resources/fixed_amount_promotions.js +0 -1
  589. package/lib/resources/fixed_price_promotions.d.ts +0 -1
  590. package/lib/resources/fixed_price_promotions.js +0 -1
  591. package/lib/resources/free_gift_promotions.d.ts +0 -1
  592. package/lib/resources/free_gift_promotions.js +0 -1
  593. package/lib/resources/free_shipping_promotions.d.ts +0 -1
  594. package/lib/resources/free_shipping_promotions.js +0 -1
  595. package/lib/resources/geocoders.d.ts +0 -1
  596. package/lib/resources/geocoders.js +0 -1
  597. package/lib/resources/gift_card_recipients.d.ts +0 -1
  598. package/lib/resources/gift_card_recipients.js +0 -1
  599. package/lib/resources/gift_cards.d.ts +0 -1
  600. package/lib/resources/gift_cards.js +0 -1
  601. package/lib/resources/google_geocoders.d.ts +0 -1
  602. package/lib/resources/google_geocoders.js +0 -1
  603. package/lib/resources/imports.d.ts +0 -1
  604. package/lib/resources/imports.js +0 -1
  605. package/lib/resources/in_stock_subscriptions.d.ts +0 -1
  606. package/lib/resources/in_stock_subscriptions.js +0 -1
  607. package/lib/resources/inventory_models.d.ts +0 -1
  608. package/lib/resources/inventory_models.js +0 -1
  609. package/lib/resources/inventory_return_locations.d.ts +0 -1
  610. package/lib/resources/inventory_return_locations.js +0 -1
  611. package/lib/resources/inventory_stock_locations.d.ts +0 -1
  612. package/lib/resources/inventory_stock_locations.js +0 -1
  613. package/lib/resources/klarna_gateways.d.ts +0 -1
  614. package/lib/resources/klarna_gateways.js +0 -1
  615. package/lib/resources/klarna_payments.d.ts +0 -1
  616. package/lib/resources/klarna_payments.js +0 -1
  617. package/lib/resources/line_item_options.d.ts +0 -1
  618. package/lib/resources/line_item_options.js +0 -1
  619. package/lib/resources/line_items.d.ts +0 -1
  620. package/lib/resources/line_items.js +0 -1
  621. package/lib/resources/manual_gateways.d.ts +0 -1
  622. package/lib/resources/manual_gateways.js +0 -1
  623. package/lib/resources/manual_tax_calculators.d.ts +0 -1
  624. package/lib/resources/manual_tax_calculators.js +0 -1
  625. package/lib/resources/markets.d.ts +0 -1
  626. package/lib/resources/markets.js +0 -1
  627. package/lib/resources/merchants.d.ts +0 -1
  628. package/lib/resources/merchants.js +0 -1
  629. package/lib/resources/order_amount_promotion_rules.d.ts +0 -1
  630. package/lib/resources/order_amount_promotion_rules.js +0 -1
  631. package/lib/resources/order_copies.d.ts +0 -1
  632. package/lib/resources/order_copies.js +0 -1
  633. package/lib/resources/order_subscriptions.d.ts +0 -1
  634. package/lib/resources/order_subscriptions.js +0 -1
  635. package/lib/resources/order_validation_rules.d.ts +0 -1
  636. package/lib/resources/order_validation_rules.js +0 -1
  637. package/lib/resources/orders.d.ts +0 -1
  638. package/lib/resources/orders.js +0 -1
  639. package/lib/resources/organization.d.ts +0 -1
  640. package/lib/resources/organization.js +0 -1
  641. package/lib/resources/packages.d.ts +0 -1
  642. package/lib/resources/packages.js +0 -1
  643. package/lib/resources/parcel_line_items.d.ts +0 -1
  644. package/lib/resources/parcel_line_items.js +0 -1
  645. package/lib/resources/parcels.d.ts +0 -1
  646. package/lib/resources/parcels.js +0 -1
  647. package/lib/resources/payment_gateways.d.ts +0 -1
  648. package/lib/resources/payment_gateways.js +0 -1
  649. package/lib/resources/payment_methods.d.ts +0 -1
  650. package/lib/resources/payment_methods.js +0 -1
  651. package/lib/resources/paypal_gateways.d.ts +0 -1
  652. package/lib/resources/paypal_gateways.js +0 -1
  653. package/lib/resources/paypal_payments.d.ts +0 -1
  654. package/lib/resources/paypal_payments.js +0 -1
  655. package/lib/resources/percentage_discount_promotions.d.ts +0 -1
  656. package/lib/resources/percentage_discount_promotions.js +0 -1
  657. package/lib/resources/price_lists.d.ts +0 -1
  658. package/lib/resources/price_lists.js +0 -1
  659. package/lib/resources/prices.d.ts +0 -1
  660. package/lib/resources/prices.js +0 -1
  661. package/lib/resources/promotion_rules.d.ts +0 -1
  662. package/lib/resources/promotion_rules.js +0 -1
  663. package/lib/resources/promotions.d.ts +0 -1
  664. package/lib/resources/promotions.js +0 -1
  665. package/lib/resources/refunds.d.ts +0 -1
  666. package/lib/resources/refunds.js +0 -1
  667. package/lib/resources/return_line_items.d.ts +0 -1
  668. package/lib/resources/return_line_items.js +0 -1
  669. package/lib/resources/returns.d.ts +0 -1
  670. package/lib/resources/returns.js +0 -1
  671. package/lib/resources/shipments.d.ts +0 -1
  672. package/lib/resources/shipments.js +0 -1
  673. package/lib/resources/shipping_categories.d.ts +0 -1
  674. package/lib/resources/shipping_categories.js +0 -1
  675. package/lib/resources/shipping_methods.d.ts +0 -1
  676. package/lib/resources/shipping_methods.js +0 -1
  677. package/lib/resources/shipping_zones.d.ts +0 -1
  678. package/lib/resources/shipping_zones.js +0 -1
  679. package/lib/resources/sku_list_items.d.ts +0 -1
  680. package/lib/resources/sku_list_items.js +0 -1
  681. package/lib/resources/sku_list_promotion_rules.d.ts +0 -1
  682. package/lib/resources/sku_list_promotion_rules.js +0 -1
  683. package/lib/resources/sku_lists.d.ts +0 -1
  684. package/lib/resources/sku_lists.js +0 -1
  685. package/lib/resources/sku_options.d.ts +0 -1
  686. package/lib/resources/sku_options.js +0 -1
  687. package/lib/resources/skus.d.ts +0 -1
  688. package/lib/resources/skus.js +0 -1
  689. package/lib/resources/stock_items.d.ts +0 -1
  690. package/lib/resources/stock_items.js +0 -1
  691. package/lib/resources/stock_line_items.d.ts +0 -1
  692. package/lib/resources/stock_line_items.js +0 -1
  693. package/lib/resources/stock_locations.d.ts +0 -1
  694. package/lib/resources/stock_locations.js +0 -1
  695. package/lib/resources/stock_transfers.d.ts +0 -1
  696. package/lib/resources/stock_transfers.js +0 -1
  697. package/lib/resources/stripe_gateways.d.ts +0 -1
  698. package/lib/resources/stripe_gateways.js +0 -1
  699. package/lib/resources/stripe_payments.d.ts +0 -1
  700. package/lib/resources/stripe_payments.js +0 -1
  701. package/lib/resources/tax_calculators.d.ts +0 -1
  702. package/lib/resources/tax_calculators.js +0 -1
  703. package/lib/resources/tax_categories.d.ts +0 -1
  704. package/lib/resources/tax_categories.js +0 -1
  705. package/lib/resources/tax_rules.d.ts +0 -1
  706. package/lib/resources/tax_rules.js +0 -1
  707. package/lib/resources/taxjar_accounts.d.ts +0 -1
  708. package/lib/resources/taxjar_accounts.js +0 -1
  709. package/lib/resources/transactions.d.ts +0 -1
  710. package/lib/resources/transactions.js +0 -1
  711. package/lib/resources/voids.d.ts +0 -1
  712. package/lib/resources/voids.js +0 -1
  713. package/lib/resources/webhooks.d.ts +0 -1
  714. package/lib/resources/webhooks.js +0 -1
  715. package/lib/resources/wire_transfers.d.ts +0 -1
  716. package/lib/resources/wire_transfers.js +0 -1
  717. package/lib/static.d.ts +0 -1
  718. package/lib/static.js +0 -1
  719. package/lib/util.d.ts +0 -2
  720. package/lib/util.js +0 -1
package/lib/api.js DELETED
@@ -1 +0,0 @@
1
- export{default as Addresses}from"./resources/addresses";export{default as Adjustments}from"./resources/adjustments";export{default as AdyenGateways}from"./resources/adyen_gateways";export{default as AdyenPayments}from"./resources/adyen_payments";export{default as Applications}from"./resources/application";export{default as Attachments}from"./resources/attachments";export{default as Authorizations}from"./resources/authorizations";export{default as AvalaraAccounts}from"./resources/avalara_accounts";export{default as BillingInfoValidationRules}from"./resources/billing_info_validation_rules";export{default as BingGeocoders}from"./resources/bing_geocoders";export{default as BraintreeGateways}from"./resources/braintree_gateways";export{default as BraintreePayments}from"./resources/braintree_payments";export{default as Bundles}from"./resources/bundles";export{default as Captures}from"./resources/captures";export{default as CarrierAccounts}from"./resources/carrier_accounts";export{default as CheckoutComGateways}from"./resources/checkout_com_gateways";export{default as CheckoutComPayments}from"./resources/checkout_com_payments";export{default as CouponCodesPromotionRules}from"./resources/coupon_codes_promotion_rules";export{default as CouponRecipients}from"./resources/coupon_recipients";export{default as Coupons}from"./resources/coupons";export{default as CustomerAddresses}from"./resources/customer_addresses";export{default as CustomerGroups}from"./resources/customer_groups";export{default as CustomerPasswordResets}from"./resources/customer_password_resets";export{default as CustomerPaymentSources}from"./resources/customer_payment_sources";export{default as CustomerSubscriptions}from"./resources/customer_subscriptions";export{default as Customers}from"./resources/customers";export{default as DeliveryLeadTimes}from"./resources/delivery_lead_times";export{default as EventCallbacks}from"./resources/event_callbacks";export{default as ExternalGateways}from"./resources/external_gateways";export{default as ExternalPayments}from"./resources/external_payments";export{default as ExternalPromotions}from"./resources/external_promotions";export{default as ExternalTaxCalculators}from"./resources/external_tax_calculators";export{default as FixedAmountPromotions}from"./resources/fixed_amount_promotions";export{default as FixedPricePromotions}from"./resources/fixed_price_promotions";export{default as FreeGiftPromotions}from"./resources/free_gift_promotions";export{default as FreeShippingPromotions}from"./resources/free_shipping_promotions";export{default as Geocoders}from"./resources/geocoders";export{default as GiftCardRecipients}from"./resources/gift_card_recipients";export{default as GiftCards}from"./resources/gift_cards";export{default as GoogleGeocoders}from"./resources/google_geocoders";export{default as Imports}from"./resources/imports";export{default as InStockSubscriptions}from"./resources/in_stock_subscriptions";export{default as InventoryModels}from"./resources/inventory_models";export{default as InventoryReturnLocations}from"./resources/inventory_return_locations";export{default as InventoryStockLocations}from"./resources/inventory_stock_locations";export{default as KlarnaGateways}from"./resources/klarna_gateways";export{default as KlarnaPayments}from"./resources/klarna_payments";export{default as LineItemOptions}from"./resources/line_item_options";export{default as LineItems}from"./resources/line_items";export{default as ManualGateways}from"./resources/manual_gateways";export{default as ManualTaxCalculators}from"./resources/manual_tax_calculators";export{default as Markets}from"./resources/markets";export{default as Merchants}from"./resources/merchants";export{default as OrderAmountPromotionRules}from"./resources/order_amount_promotion_rules";export{default as OrderCopies}from"./resources/order_copies";export{default as OrderSubscriptions}from"./resources/order_subscriptions";export{default as OrderValidationRules}from"./resources/order_validation_rules";export{default as Orders}from"./resources/orders";export{default as Organizations}from"./resources/organization";export{default as Packages}from"./resources/packages";export{default as ParcelLineItems}from"./resources/parcel_line_items";export{default as Parcels}from"./resources/parcels";export{default as PaymentGateways}from"./resources/payment_gateways";export{default as PaymentMethods}from"./resources/payment_methods";export{default as PaypalGateways}from"./resources/paypal_gateways";export{default as PaypalPayments}from"./resources/paypal_payments";export{default as PercentageDiscountPromotions}from"./resources/percentage_discount_promotions";export{default as PriceLists}from"./resources/price_lists";export{default as Prices}from"./resources/prices";export{default as PromotionRules}from"./resources/promotion_rules";export{default as Promotions}from"./resources/promotions";export{default as Refunds}from"./resources/refunds";export{default as ReturnLineItems}from"./resources/return_line_items";export{default as Returns}from"./resources/returns";export{default as Shipments}from"./resources/shipments";export{default as ShippingCategories}from"./resources/shipping_categories";export{default as ShippingMethods}from"./resources/shipping_methods";export{default as ShippingZones}from"./resources/shipping_zones";export{default as SkuListItems}from"./resources/sku_list_items";export{default as SkuListPromotionRules}from"./resources/sku_list_promotion_rules";export{default as SkuLists}from"./resources/sku_lists";export{default as SkuOptions}from"./resources/sku_options";export{default as Skus}from"./resources/skus";export{default as StockItems}from"./resources/stock_items";export{default as StockLineItems}from"./resources/stock_line_items";export{default as StockLocations}from"./resources/stock_locations";export{default as StockTransfers}from"./resources/stock_transfers";export{default as StripeGateways}from"./resources/stripe_gateways";export{default as StripePayments}from"./resources/stripe_payments";export{default as TaxCalculators}from"./resources/tax_calculators";export{default as TaxCategories}from"./resources/tax_categories";export{default as TaxRules}from"./resources/tax_rules";export{default as TaxjarAccounts}from"./resources/taxjar_accounts";export{default as Transactions}from"./resources/transactions";export{default as Voids}from"./resources/voids";export{default as Webhooks}from"./resources/webhooks";export{default as WireTransfers}from"./resources/wire_transfers";export const resourceList=["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_methods","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
package/lib/client.d.ts DELETED
@@ -1,2 +0,0 @@
1
- /// <reference types="node" />
2
- import{AxiosProxyConfig,Method}from'axios';import type{InterceptorManager}from'./interceptor';import type{Agent as HttpAgent}from'http';import type{Agent as HttpsAgent}from'https';declare type ProxyConfig=AxiosProxyConfig|false;declare type RequestConfig={timeout?:number;params?:{[key:string]:string|number|boolean;};httpAgent?:HttpAgent;httpsAgent?:HttpsAgent;proxy?:ProxyConfig;};declare type ApiClientInitConfig={organization:string;domain?:string;accessToken:string;}&RequestConfig;declare type ApiClientConfig=Partial<ApiClientInitConfig>;declare class ApiClient{#private;static create(options:ApiClientInitConfig):ApiClient;baseUrl:string;interceptors:InterceptorManager;private constructor();config(config:ApiClientConfig):void;request(method:Method,path:string,body?:any,options?:ApiClientConfig):Promise<any>;}export default ApiClient;export{ApiClientInitConfig,ApiClientConfig,RequestConfig};
package/lib/client.js DELETED
@@ -1 +0,0 @@
1
- import p from"axios";import{SdkError as E,ApiError as y,ErrorType as i}from"./error";import c from"./config";import w from"./debug";const n=w("client"),h=(r,e)=>`https://${r.toLowerCase()}.${e||c.default.domain}/api`,T=r=>{let e=new E({message:r.message,type:i.GENERIC});if(p.isAxiosError(r))if(r.response){const t=new y(e);t.type=i.RESPONSE,t.status=r.response.status,t.code=String(t.status),t.errors=r.response.data.errors,e=t}else r.request?(e.type=i.REQUEST,e.request=r.request):e.type=i.CLIENT;else p.isCancel(r)?e.type=i.CANCEL:e.source=r;throw e};class m{static create(e){if(!e?.organization)throw new Error("Undefined 'organization' parameter");if(!e?.accessToken)throw new Error("Undefined 'accessToken' parameter");return new m(e)}baseUrl;#e;#t;interceptors;constructor(e){n("new client instance %O",e),this.baseUrl=h(e.organization,e.domain),this.#e=e.accessToken;const t={timeout:e.timeout||c.client.timeout,proxy:e.proxy,httpAgent:e.httpAgent,httpsAgent:e.httpsAgent},s={baseURL:this.baseUrl,timeout:c.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+this.#e},...t};n("axios options: %O",s),this.#t=p.create(s),this.interceptors=this.#t.interceptors}config(e){n("config %o",e);const t=this.#t.defaults;e.timeout&&(t.timeout=e.timeout),e.proxy&&(t.proxy=e.proxy),e.httpAgent&&(t.httpAgent=e.httpAgent),e.httpsAgent&&(t.httpsAgent=e.httpsAgent),e.organization&&(this.baseUrl=h(e.organization,e.domain)),e.accessToken&&(this.#e=e.accessToken,t.headers.common.Authorization="Bearer "+this.#e)}async request(e,t,s,o){n("request %s %s, %O, %O",e,t,s||{},o||{});const g=s?{data:s}:void 0,l=t,A=o?.organization?h(o.organization,o.domain):void 0,u=o?.accessToken||this.#e,f=u?{Authorization:"Bearer "+u}:void 0,d={method:e,baseURL:A,url:l,data:g,headers:f,...o};return n("request params: %O",d),this.#t.request(d).then(a=>a.data).catch(a=>T(a))}}export default m;
@@ -1 +0,0 @@
1
- import*as api from'./api';import{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{ResourcesInitConfig}from'./resource';declare type SdkConfig={};declare type CommerceLayerInitConfig=SdkConfig&ResourcesInitConfig;declare type CommerceLayerConfig=Partial<CommerceLayerInitConfig>;declare class CommerceLayerClient{#private;static get openApiSchemaVersion():string;addresses:api.Addresses;adjustments:api.Adjustments;adyen_gateways:api.AdyenGateways;adyen_payments:api.AdyenPayments;application:api.Applications;attachments:api.Attachments;authorizations:api.Authorizations;avalara_accounts:api.AvalaraAccounts;billing_info_validation_rules:api.BillingInfoValidationRules;bing_geocoders:api.BingGeocoders;braintree_gateways:api.BraintreeGateways;braintree_payments:api.BraintreePayments;bundles:api.Bundles;captures:api.Captures;carrier_accounts:api.CarrierAccounts;checkout_com_gateways:api.CheckoutComGateways;checkout_com_payments:api.CheckoutComPayments;coupon_codes_promotion_rules:api.CouponCodesPromotionRules;coupon_recipients:api.CouponRecipients;coupons:api.Coupons;customer_addresses:api.CustomerAddresses;customer_groups:api.CustomerGroups;customer_password_resets:api.CustomerPasswordResets;customer_payment_sources:api.CustomerPaymentSources;customer_subscriptions:api.CustomerSubscriptions;customers:api.Customers;delivery_lead_times:api.DeliveryLeadTimes;event_callbacks:api.EventCallbacks;external_gateways:api.ExternalGateways;external_payments:api.ExternalPayments;external_promotions:api.ExternalPromotions;external_tax_calculators:api.ExternalTaxCalculators;fixed_amount_promotions:api.FixedAmountPromotions;fixed_price_promotions:api.FixedPricePromotions;free_gift_promotions:api.FreeGiftPromotions;free_shipping_promotions:api.FreeShippingPromotions;geocoders:api.Geocoders;gift_card_recipients:api.GiftCardRecipients;gift_cards:api.GiftCards;google_geocoders:api.GoogleGeocoders;imports:api.Imports;in_stock_subscriptions:api.InStockSubscriptions;inventory_models:api.InventoryModels;inventory_return_locations:api.InventoryReturnLocations;inventory_stock_locations:api.InventoryStockLocations;klarna_gateways:api.KlarnaGateways;klarna_payments:api.KlarnaPayments;line_item_options:api.LineItemOptions;line_items:api.LineItems;manual_gateways:api.ManualGateways;manual_tax_calculators:api.ManualTaxCalculators;markets:api.Markets;merchants:api.Merchants;order_amount_promotion_rules:api.OrderAmountPromotionRules;order_copies:api.OrderCopies;order_subscriptions:api.OrderSubscriptions;order_validation_rules:api.OrderValidationRules;orders:api.Orders;organization:api.Organizations;packages:api.Packages;parcel_line_items:api.ParcelLineItems;parcels:api.Parcels;payment_gateways:api.PaymentGateways;payment_methods:api.PaymentMethods;paypal_gateways:api.PaypalGateways;paypal_payments:api.PaypalPayments;percentage_discount_promotions:api.PercentageDiscountPromotions;price_lists:api.PriceLists;prices:api.Prices;promotion_rules:api.PromotionRules;promotions:api.Promotions;refunds:api.Refunds;return_line_items:api.ReturnLineItems;returns:api.Returns;shipments:api.Shipments;shipping_categories:api.ShippingCategories;shipping_methods:api.ShippingMethods;shipping_zones:api.ShippingZones;sku_list_items:api.SkuListItems;sku_list_promotion_rules:api.SkuListPromotionRules;sku_lists:api.SkuLists;sku_options:api.SkuOptions;skus:api.Skus;stock_items:api.StockItems;stock_line_items:api.StockLineItems;stock_locations:api.StockLocations;stock_transfers:api.StockTransfers;stripe_gateways:api.StripeGateways;stripe_payments:api.StripePayments;tax_calculators:api.TaxCalculators;tax_categories:api.TaxCategories;tax_rules:api.TaxRules;taxjar_accounts:api.TaxjarAccounts;transactions:api.Transactions;voids:api.Voids;webhooks:api.Webhooks;wire_transfers:api.WireTransfers;constructor(config:CommerceLayerInitConfig);get currentOrganization():string;private localConfig;config(config:CommerceLayerConfig):void;resources():readonly string[];isApiError(error:any):error is ApiError;addRequestInterceptor(onFulfilled?:RequestInterceptor,onRejected?:ErrorInterceptor):number;addResponseInterceptor(onFulfilled?:ResponseInterceptor,onRejected?:ErrorInterceptor):number;removeInterceptor(type:InterceptorType,id:number):void;addRawResponseReader():RawResponseReader;removeRawResponseReader(reader:number|RawResponseReader):void;}declare const CommerceLayer:(config:CommerceLayerInitConfig)=>CommerceLayerClient;export default CommerceLayer;export type{CommerceLayerClient,CommerceLayerConfig,CommerceLayerInitConfig};
@@ -1 +0,0 @@
1
- import*as s from"./api";import{CommerceLayerStatic as o}from"./static";import h from"./resource";import c from"./debug";const r=c("commercelayer"),_="2.9.1";class p{static get openApiSchemaVersion(){return _}#s;#t;addresses;adjustments;adyen_gateways;adyen_payments;application;attachments;authorizations;avalara_accounts;billing_info_validation_rules;bing_geocoders;braintree_gateways;braintree_payments;bundles;captures;carrier_accounts;checkout_com_gateways;checkout_com_payments;coupon_codes_promotion_rules;coupon_recipients;coupons;customer_addresses;customer_groups;customer_password_resets;customer_payment_sources;customer_subscriptions;customers;delivery_lead_times;event_callbacks;external_gateways;external_payments;external_promotions;external_tax_calculators;fixed_amount_promotions;fixed_price_promotions;free_gift_promotions;free_shipping_promotions;geocoders;gift_card_recipients;gift_cards;google_geocoders;imports;in_stock_subscriptions;inventory_models;inventory_return_locations;inventory_stock_locations;klarna_gateways;klarna_payments;line_item_options;line_items;manual_gateways;manual_tax_calculators;markets;merchants;order_amount_promotion_rules;order_copies;order_subscriptions;order_validation_rules;orders;organization;packages;parcel_line_items;parcels;payment_gateways;payment_methods;paypal_gateways;paypal_payments;percentage_discount_promotions;price_lists;prices;promotion_rules;promotions;refunds;return_line_items;returns;shipments;shipping_categories;shipping_methods;shipping_zones;sku_list_items;sku_list_promotion_rules;sku_lists;sku_options;skus;stock_items;stock_line_items;stock_locations;stock_transfers;stripe_gateways;stripe_payments;tax_calculators;tax_categories;tax_rules;taxjar_accounts;transactions;voids;webhooks;wire_transfers;constructor(t){r("new commercelayer instance %O",t),this.#s=new h(t),this.#t=t.organization,this.addresses=new s.Addresses(this.#s),this.adjustments=new s.Adjustments(this.#s),this.adyen_gateways=new s.AdyenGateways(this.#s),this.adyen_payments=new s.AdyenPayments(this.#s),this.application=new s.Applications(this.#s),this.attachments=new s.Attachments(this.#s),this.authorizations=new s.Authorizations(this.#s),this.avalara_accounts=new s.AvalaraAccounts(this.#s),this.billing_info_validation_rules=new s.BillingInfoValidationRules(this.#s),this.bing_geocoders=new s.BingGeocoders(this.#s),this.braintree_gateways=new s.BraintreeGateways(this.#s),this.braintree_payments=new s.BraintreePayments(this.#s),this.bundles=new s.Bundles(this.#s),this.captures=new s.Captures(this.#s),this.carrier_accounts=new s.CarrierAccounts(this.#s),this.checkout_com_gateways=new s.CheckoutComGateways(this.#s),this.checkout_com_payments=new s.CheckoutComPayments(this.#s),this.coupon_codes_promotion_rules=new s.CouponCodesPromotionRules(this.#s),this.coupon_recipients=new s.CouponRecipients(this.#s),this.coupons=new s.Coupons(this.#s),this.customer_addresses=new s.CustomerAddresses(this.#s),this.customer_groups=new s.CustomerGroups(this.#s),this.customer_password_resets=new s.CustomerPasswordResets(this.#s),this.customer_payment_sources=new s.CustomerPaymentSources(this.#s),this.customer_subscriptions=new s.CustomerSubscriptions(this.#s),this.customers=new s.Customers(this.#s),this.delivery_lead_times=new s.DeliveryLeadTimes(this.#s),this.event_callbacks=new s.EventCallbacks(this.#s),this.external_gateways=new s.ExternalGateways(this.#s),this.external_payments=new s.ExternalPayments(this.#s),this.external_promotions=new s.ExternalPromotions(this.#s),this.external_tax_calculators=new s.ExternalTaxCalculators(this.#s),this.fixed_amount_promotions=new s.FixedAmountPromotions(this.#s),this.fixed_price_promotions=new s.FixedPricePromotions(this.#s),this.free_gift_promotions=new s.FreeGiftPromotions(this.#s),this.free_shipping_promotions=new s.FreeShippingPromotions(this.#s),this.geocoders=new s.Geocoders(this.#s),this.gift_card_recipients=new s.GiftCardRecipients(this.#s),this.gift_cards=new s.GiftCards(this.#s),this.google_geocoders=new s.GoogleGeocoders(this.#s),this.imports=new s.Imports(this.#s),this.in_stock_subscriptions=new s.InStockSubscriptions(this.#s),this.inventory_models=new s.InventoryModels(this.#s),this.inventory_return_locations=new s.InventoryReturnLocations(this.#s),this.inventory_stock_locations=new s.InventoryStockLocations(this.#s),this.klarna_gateways=new s.KlarnaGateways(this.#s),this.klarna_payments=new s.KlarnaPayments(this.#s),this.line_item_options=new s.LineItemOptions(this.#s),this.line_items=new s.LineItems(this.#s),this.manual_gateways=new s.ManualGateways(this.#s),this.manual_tax_calculators=new s.ManualTaxCalculators(this.#s),this.markets=new s.Markets(this.#s),this.merchants=new s.Merchants(this.#s),this.order_amount_promotion_rules=new s.OrderAmountPromotionRules(this.#s),this.order_copies=new s.OrderCopies(this.#s),this.order_subscriptions=new s.OrderSubscriptions(this.#s),this.order_validation_rules=new s.OrderValidationRules(this.#s),this.orders=new s.Orders(this.#s),this.organization=new s.Organizations(this.#s),this.packages=new s.Packages(this.#s),this.parcel_line_items=new s.ParcelLineItems(this.#s),this.parcels=new s.Parcels(this.#s),this.payment_gateways=new s.PaymentGateways(this.#s),this.payment_methods=new s.PaymentMethods(this.#s),this.paypal_gateways=new s.PaypalGateways(this.#s),this.paypal_payments=new s.PaypalPayments(this.#s),this.percentage_discount_promotions=new s.PercentageDiscountPromotions(this.#s),this.price_lists=new s.PriceLists(this.#s),this.prices=new s.Prices(this.#s),this.promotion_rules=new s.PromotionRules(this.#s),this.promotions=new s.Promotions(this.#s),this.refunds=new s.Refunds(this.#s),this.return_line_items=new s.ReturnLineItems(this.#s),this.returns=new s.Returns(this.#s),this.shipments=new s.Shipments(this.#s),this.shipping_categories=new s.ShippingCategories(this.#s),this.shipping_methods=new s.ShippingMethods(this.#s),this.shipping_zones=new s.ShippingZones(this.#s),this.sku_list_items=new s.SkuListItems(this.#s),this.sku_list_promotion_rules=new s.SkuListPromotionRules(this.#s),this.sku_lists=new s.SkuLists(this.#s),this.sku_options=new s.SkuOptions(this.#s),this.skus=new s.Skus(this.#s),this.stock_items=new s.StockItems(this.#s),this.stock_line_items=new s.StockLineItems(this.#s),this.stock_locations=new s.StockLocations(this.#s),this.stock_transfers=new s.StockTransfers(this.#s),this.stripe_gateways=new s.StripeGateways(this.#s),this.stripe_payments=new s.StripePayments(this.#s),this.tax_calculators=new s.TaxCalculators(this.#s),this.tax_categories=new s.TaxCategories(this.#s),this.tax_rules=new s.TaxRules(this.#s),this.taxjar_accounts=new s.TaxjarAccounts(this.#s),this.transactions=new s.Transactions(this.#s),this.voids=new s.Voids(this.#s),this.webhooks=new s.Webhooks(this.#s),this.wire_transfers=new s.WireTransfers(this.#s)}get currentOrganization(){return this.#t}localConfig(t){t.organization&&(this.#t=t.organization)}config(t){r("config %o",t),this.localConfig(t),this.#s.config(t)}resources(){return o.resources()}isApiError(t){return o.isApiError(t)}addRequestInterceptor(t,e){return this.#s.interceptors.request.use(t,e)}addResponseInterceptor(t,e){return this.#s.interceptors.response.use(t,e)}removeInterceptor(t,e){return this.#s.interceptors[t].eject(e)}addRawResponseReader(){const t={id:void 0,rawResponse:void 0};function e(n){return t.rawResponse=n?.data,n}const a=this.addResponseInterceptor(e);return t.id=a,t}removeRawResponseReader(t){const e=typeof t=="number"?t:t.id;if(e)return this.removeInterceptor("response",e)}}const u=i=>new p(i);export default u;
package/lib/common.d.ts DELETED
@@ -1 +0,0 @@
1
- import type{ResourceId,ResourceType}from'./resource';declare const isResourceId:(resource:any)=>resource is ResourceId;declare const isResourceType:(resource:any)=>resource is ResourceType;export{isResourceId,isResourceType};
package/lib/common.js DELETED
@@ -1 +0,0 @@
1
- import{resourceList as e}from"./api";const p=s=>s&&s.type&&s.id&&e.includes(s.type),t=s=>s&&typeof s.type<"u"&&s.type&&e.includes(s.type);export{p as isResourceId,t as isResourceType};
package/lib/config.d.ts DELETED
@@ -1 +0,0 @@
1
- declare const config:{readonly default:{readonly domain:"commercelayer.io";readonly pageNumber:1;readonly pageSize:10;};readonly client:{readonly timeout:15000;};};export default config;
package/lib/config.js DELETED
@@ -1 +0,0 @@
1
- const e={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3}};export default e;
package/lib/debug.d.ts DELETED
@@ -1 +0,0 @@
1
- declare type Debugger=(pattern:string,...args:any[])=>void;declare const debug:(namespace:string)=>Debugger;export default debug;
package/lib/debug.js DELETED
@@ -1 +0,0 @@
1
- const e=(t,...r)=>{};let c=t=>e;try{const t=require("debug");t&&typeof t=="function"&&(c=t)}catch{}const o="clsdk",n=t=>c(`${o}:${t}`);export default n;
package/lib/error.d.ts DELETED
@@ -1 +0,0 @@
1
- declare enum ErrorType{CLIENT="client",REQUEST="request",RESPONSE="response",GENERIC="generic",CANCEL="cancel"}declare class SdkError extends Error{static isSdkError(error:any):error is ApiError;type:string;code?:string;source?:Error;request?:any;constructor(error:{message:string;type?:ErrorType;});}declare class ApiError extends SdkError{static isApiError(error:any):error is ApiError;errors:any[];status?:number;constructor(error:SdkError);first():any;}export{SdkError,ApiError,ErrorType};
package/lib/error.js DELETED
@@ -1 +0,0 @@
1
- var e;(function(s){s.CLIENT="client",s.REQUEST="request",s.RESPONSE="response",s.GENERIC="generic",s.CANCEL="cancel"})(e||(e={}));class t extends Error{static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(e).includes(r.type)}type;code;source;request;constructor(r){super(r.message);this.name=this.constructor.name,this.type=r.type||e.GENERIC}}class o extends t{static isApiError(r){return t.isSdkError(r)&&r.name==="ApiError"&&r.type===e.RESPONSE}errors=[];status;constructor(r){super({...r,type:e.RESPONSE});this.name=this.constructor.name}first(){return this.errors?.length>0?this.errors[0]:void 0}}export{t as SdkError,o as ApiError,e as ErrorType};
package/lib/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export{default}from'./commercelayer';export type{CommerceLayerClient}from'./commercelayer';export{CommerceLayerStatic}from'./static';export type{QueryParamsRetrieve,QueryParamsList,QueryParams}from'./query';export*from'./model';export type{RequestObj,ResponseObj,ErrorObj}from'./interceptor';export type{SdkError,ApiError,ErrorType}from'./error';
package/lib/index.js DELETED
@@ -1 +0,0 @@
1
- export{default}from"./commercelayer";export{CommerceLayerStatic}from"./static";export*from"./model";
@@ -1 +0,0 @@
1
- import{AxiosError,AxiosInterceptorManager,AxiosRequestConfig,AxiosResponse}from"axios";declare type InterceptorManager={request:AxiosInterceptorManager<AxiosRequestConfig>;response:AxiosInterceptorManager<any>;};declare type RequestObj=AxiosRequestConfig;declare type RequestInterceptor=(request:RequestObj)=>RequestObj|Promise<RequestObj>;declare type ResponseObj=AxiosResponse;declare type ResponseInterceptor=(response:ResponseObj)=>ResponseObj;declare type ErrorObj=AxiosError;declare type ErrorInterceptor=(error:ErrorObj)=>ErrorObj;declare type InterceptorType='request'|'response';export type{InterceptorManager,RequestInterceptor,ResponseInterceptor,ErrorInterceptor,InterceptorType};export type{RequestObj,ResponseObj,ErrorObj};declare type RawResponseReader={id:number|undefined;rawResponse:ResponseObj|undefined;};export type{RawResponseReader};
@@ -1 +0,0 @@
1
- export{};
package/lib/jsonapi.d.ts DELETED
@@ -1 +0,0 @@
1
- import type{DocWithData,ResourceObject as JSONAPIObject}from'jsonapi-typescript';import type{ResourceCreate,ResourceUpdate,ResourceId,ResourceType,Resource}from'./resource';declare const denormalize:<R extends Resource>(response:DocWithData)=>R|R[];declare const normalize:(resource:(ResourceCreate&ResourceType)|(ResourceUpdate&ResourceId))=>JSONAPIObject;export{denormalize,normalize};
package/lib/jsonapi.js DELETED
@@ -1 +0,0 @@
1
- import{isResourceId as l,isResourceType as c}from"./common";import u from"./debug";const o=u("jsonapi"),p=e=>{let s;e.links&&delete e.links;const i=e.data,n=e.included;return i?Array.isArray(i)?s=i.map(t=>r(t,n)):s=r(i,n):s=i,s},d=(e,s=[])=>s.find(i=>e.id===i.id&&e.type===i.type)||e,r=(e,s)=>{if(o("denormalize resource: %O, %o",e,s||{}),!e)return e;const i={id:e.id,type:e.type,...e.attributes};return e.relationships&&Object.keys(e.relationships).forEach(n=>{const t=e.relationships[n].data;t?Array.isArray(t)?i[n]=t.map(a=>r(d(a,s),s)):i[n]=r(d(t,s),s):t===null&&(i[n]=null)}),o("denormalized resource: %O",i),i},y=e=>{o("normalize resource: %O",e);const s={},i={};for(const t in e){if(["type","id"].includes(t))continue;const a=e[t];a&&c(a)&&a.id===null?i[t]={data:null}:a&&(l(a)||Array.isArray(a)&&l(a[0]))?i[t]={data:a}:s[t]=a}const n={type:e.type,attributes:s,relationships:i};return l(e)&&(n.id=e.id),o("normalized resource: %O",n),n};export{p as denormalize,y as normalize};
package/lib/model.d.ts DELETED
@@ -1 +0,0 @@
1
- export type{Address,AddressCreate,AddressUpdate}from'./resources/addresses';export type{Adjustment,AdjustmentCreate,AdjustmentUpdate}from'./resources/adjustments';export type{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate}from'./resources/adyen_gateways';export type{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate}from'./resources/adyen_payments';export type{Application}from'./resources/application';export type{Attachment,AttachmentCreate,AttachmentUpdate}from'./resources/attachments';export type{Authorization,AuthorizationUpdate}from'./resources/authorizations';export type{AvalaraAccount,AvalaraAccountCreate,AvalaraAccountUpdate}from'./resources/avalara_accounts';export type{BillingInfoValidationRule,BillingInfoValidationRuleCreate,BillingInfoValidationRuleUpdate}from'./resources/billing_info_validation_rules';export type{BingGeocoder,BingGeocoderCreate,BingGeocoderUpdate}from'./resources/bing_geocoders';export type{BraintreeGateway,BraintreeGatewayCreate,BraintreeGatewayUpdate}from'./resources/braintree_gateways';export type{BraintreePayment,BraintreePaymentCreate,BraintreePaymentUpdate}from'./resources/braintree_payments';export type{Bundle,BundleCreate,BundleUpdate}from'./resources/bundles';export type{Capture,CaptureUpdate}from'./resources/captures';export type{CarrierAccount}from'./resources/carrier_accounts';export type{CheckoutComGateway,CheckoutComGatewayCreate,CheckoutComGatewayUpdate}from'./resources/checkout_com_gateways';export type{CheckoutComPayment,CheckoutComPaymentCreate,CheckoutComPaymentUpdate}from'./resources/checkout_com_payments';export type{CouponCodesPromotionRule,CouponCodesPromotionRuleCreate,CouponCodesPromotionRuleUpdate}from'./resources/coupon_codes_promotion_rules';export type{CouponRecipient,CouponRecipientCreate,CouponRecipientUpdate}from'./resources/coupon_recipients';export type{Coupon,CouponCreate,CouponUpdate}from'./resources/coupons';export type{CustomerAddress,CustomerAddressCreate,CustomerAddressUpdate}from'./resources/customer_addresses';export type{CustomerGroup,CustomerGroupCreate,CustomerGroupUpdate}from'./resources/customer_groups';export type{CustomerPasswordReset,CustomerPasswordResetCreate,CustomerPasswordResetUpdate}from'./resources/customer_password_resets';export type{CustomerPaymentSource,CustomerPaymentSourceCreate,CustomerPaymentSourceUpdate}from'./resources/customer_payment_sources';export type{CustomerSubscription,CustomerSubscriptionCreate,CustomerSubscriptionUpdate}from'./resources/customer_subscriptions';export type{Customer,CustomerCreate,CustomerUpdate}from'./resources/customers';export type{DeliveryLeadTime,DeliveryLeadTimeCreate,DeliveryLeadTimeUpdate}from'./resources/delivery_lead_times';export type{EventCallback}from'./resources/event_callbacks';export type{ExternalGateway,ExternalGatewayCreate,ExternalGatewayUpdate}from'./resources/external_gateways';export type{ExternalPayment,ExternalPaymentCreate,ExternalPaymentUpdate}from'./resources/external_payments';export type{ExternalPromotion,ExternalPromotionCreate,ExternalPromotionUpdate}from'./resources/external_promotions';export type{ExternalTaxCalculator,ExternalTaxCalculatorCreate,ExternalTaxCalculatorUpdate}from'./resources/external_tax_calculators';export type{FixedAmountPromotion,FixedAmountPromotionCreate,FixedAmountPromotionUpdate}from'./resources/fixed_amount_promotions';export type{FixedPricePromotion,FixedPricePromotionCreate,FixedPricePromotionUpdate}from'./resources/fixed_price_promotions';export type{FreeGiftPromotion,FreeGiftPromotionCreate,FreeGiftPromotionUpdate}from'./resources/free_gift_promotions';export type{FreeShippingPromotion,FreeShippingPromotionCreate,FreeShippingPromotionUpdate}from'./resources/free_shipping_promotions';export type{Geocoder}from'./resources/geocoders';export type{GiftCardRecipient,GiftCardRecipientCreate,GiftCardRecipientUpdate}from'./resources/gift_card_recipients';export type{GiftCard,GiftCardCreate,GiftCardUpdate}from'./resources/gift_cards';export type{GoogleGeocoder,GoogleGeocoderCreate,GoogleGeocoderUpdate}from'./resources/google_geocoders';export type{Import,ImportCreate}from'./resources/imports';export type{InStockSubscription,InStockSubscriptionCreate,InStockSubscriptionUpdate}from'./resources/in_stock_subscriptions';export type{InventoryModel,InventoryModelCreate,InventoryModelUpdate}from'./resources/inventory_models';export type{InventoryReturnLocation,InventoryReturnLocationCreate,InventoryReturnLocationUpdate}from'./resources/inventory_return_locations';export type{InventoryStockLocation,InventoryStockLocationCreate,InventoryStockLocationUpdate}from'./resources/inventory_stock_locations';export type{KlarnaGateway,KlarnaGatewayCreate,KlarnaGatewayUpdate}from'./resources/klarna_gateways';export type{KlarnaPayment,KlarnaPaymentCreate,KlarnaPaymentUpdate}from'./resources/klarna_payments';export type{LineItemOption,LineItemOptionCreate,LineItemOptionUpdate}from'./resources/line_item_options';export type{LineItem,LineItemCreate,LineItemUpdate}from'./resources/line_items';export type{ManualGateway,ManualGatewayCreate,ManualGatewayUpdate}from'./resources/manual_gateways';export type{ManualTaxCalculator,ManualTaxCalculatorCreate,ManualTaxCalculatorUpdate}from'./resources/manual_tax_calculators';export type{Market,MarketCreate,MarketUpdate}from'./resources/markets';export type{Merchant,MerchantCreate,MerchantUpdate}from'./resources/merchants';export type{OrderAmountPromotionRule,OrderAmountPromotionRuleCreate,OrderAmountPromotionRuleUpdate}from'./resources/order_amount_promotion_rules';export type{OrderCopy,OrderCopyCreate}from'./resources/order_copies';export type{OrderSubscription,OrderSubscriptionCreate,OrderSubscriptionUpdate}from'./resources/order_subscriptions';export type{OrderValidationRule}from'./resources/order_validation_rules';export type{Order,OrderCreate,OrderUpdate}from'./resources/orders';export type{Organization}from'./resources/organization';export type{Package,PackageCreate,PackageUpdate}from'./resources/packages';export type{ParcelLineItem,ParcelLineItemCreate,ParcelLineItemUpdate}from'./resources/parcel_line_items';export type{Parcel,ParcelCreate,ParcelUpdate}from'./resources/parcels';export type{PaymentGateway}from'./resources/payment_gateways';export type{PaymentMethod,PaymentMethodCreate,PaymentMethodUpdate}from'./resources/payment_methods';export type{PaypalGateway,PaypalGatewayCreate,PaypalGatewayUpdate}from'./resources/paypal_gateways';export type{PaypalPayment,PaypalPaymentCreate,PaypalPaymentUpdate}from'./resources/paypal_payments';export type{PercentageDiscountPromotion,PercentageDiscountPromotionCreate,PercentageDiscountPromotionUpdate}from'./resources/percentage_discount_promotions';export type{PriceList,PriceListCreate,PriceListUpdate}from'./resources/price_lists';export type{Price,PriceCreate,PriceUpdate}from'./resources/prices';export type{PromotionRule}from'./resources/promotion_rules';export type{Promotion}from'./resources/promotions';export type{Refund}from'./resources/refunds';export type{ReturnLineItem,ReturnLineItemCreate,ReturnLineItemUpdate}from'./resources/return_line_items';export type{Return,ReturnCreate,ReturnUpdate}from'./resources/returns';export type{Shipment,ShipmentUpdate}from'./resources/shipments';export type{ShippingCategory,ShippingCategoryCreate,ShippingCategoryUpdate}from'./resources/shipping_categories';export type{ShippingMethod,ShippingMethodCreate,ShippingMethodUpdate}from'./resources/shipping_methods';export type{ShippingZone,ShippingZoneCreate,ShippingZoneUpdate}from'./resources/shipping_zones';export type{SkuListItem,SkuListItemCreate,SkuListItemUpdate}from'./resources/sku_list_items';export type{SkuListPromotionRule,SkuListPromotionRuleCreate,SkuListPromotionRuleUpdate}from'./resources/sku_list_promotion_rules';export type{SkuList,SkuListCreate,SkuListUpdate}from'./resources/sku_lists';export type{SkuOption,SkuOptionCreate,SkuOptionUpdate}from'./resources/sku_options';export type{Sku,SkuCreate,SkuUpdate}from'./resources/skus';export type{StockItem,StockItemCreate,StockItemUpdate}from'./resources/stock_items';export type{StockLineItem}from'./resources/stock_line_items';export type{StockLocation,StockLocationCreate,StockLocationUpdate}from'./resources/stock_locations';export type{StockTransfer,StockTransferCreate,StockTransferUpdate}from'./resources/stock_transfers';export type{StripeGateway,StripeGatewayCreate,StripeGatewayUpdate}from'./resources/stripe_gateways';export type{StripePayment,StripePaymentCreate,StripePaymentUpdate}from'./resources/stripe_payments';export type{TaxCalculator}from'./resources/tax_calculators';export type{TaxCategory,TaxCategoryCreate,TaxCategoryUpdate}from'./resources/tax_categories';export type{TaxRule,TaxRuleCreate,TaxRuleUpdate}from'./resources/tax_rules';export type{TaxjarAccount,TaxjarAccountCreate,TaxjarAccountUpdate}from'./resources/taxjar_accounts';export type{Transaction}from'./resources/transactions';export type{Void}from'./resources/voids';export type{Webhook,WebhookCreate,WebhookUpdate}from'./resources/webhooks';export type{WireTransfer,WireTransferCreate,WireTransferUpdate}from'./resources/wire_transfers';
package/lib/model.js DELETED
@@ -1 +0,0 @@
1
- export{};
package/lib/query.d.ts DELETED
@@ -1 +0,0 @@
1
- import{ResourceType}from"./resource";interface QueryParamsRetrieve{include?:string[];fields?:string[]|{[key:string]:string[];};}interface QueryParamsList extends QueryParamsRetrieve{sort?:string[]|{[key:string]:'asc'|'desc';};filters?:{[key:string]:string|number|boolean;};pageNumber?:number;pageSize?:number;}declare type QueryParams=QueryParamsRetrieve|QueryParamsList;export{QueryParamsRetrieve,QueryParamsList,QueryParams};declare const generateQueryStringParams:(params:QueryParamsRetrieve|QueryParamsList|undefined,res:string|ResourceType)=>{[key:string]:string;};export{generateQueryStringParams};
package/lib/query.js DELETED
@@ -1 +0,0 @@
1
- import n from"./debug";const a=n("query"),o=e=>e.filters||e.pageNumber||e.pageSize||e.sort,g=(e,r)=>{a("generate query string params: %O, %O",e,r);const i={};return e&&(e.include&&(i.include=e.include.join(",")),e.fields&&(Array.isArray(e.fields)&&(e.fields={[r.type||r]:e.fields}),Object.entries(e.fields).forEach(([s,t])=>{i[`fields[${s}]`]=t.join(",")})),o(e)&&(e.sort&&(Array.isArray(e.sort)?i.sort=e.sort.join(","):i.sort=Object.entries(e.sort).map(([s,t])=>`${t==="desc"?"-":""}${s}`).join(",")),e.pageNumber&&(i["page[number]"]=String(e.pageNumber)),e.pageSize&&(i["page[size]"]=String(e.pageSize)),e.filters&&Object.entries(e.filters).forEach(([s,t])=>{i[`filter[q][${s}]`]=String(t)})),a("query string params: %O",i)),i};export{g as generateQueryStringParams};
package/lib/resource.d.ts DELETED
@@ -1 +0,0 @@
1
- import{ApiClientInitConfig}from'./client';import{QueryParamsRetrieve,QueryParamsList}from'./query';import{ResourceTypeLock}from'./api';import{InterceptorManager}from'./interceptor';import{QueryParams}from'.';declare type ResourceNull={id:null;}&ResourceType;declare type ResourceRel=ResourceId|ResourceNull;declare type Metadata={[key:string]:any;};interface ResourceType{readonly type:ResourceTypeLock;}interface ResourceId extends ResourceType{readonly id:string;}interface Resource extends ResourceId{reference?:string;reference_origin?:string;metadata?:Metadata;readonly created_at:string;readonly updated_at:string;}interface ResourceCreate{reference?:string;reference_origin?:string;metadata?:Metadata;}interface ResourceUpdate{readonly id:string;reference?:string;reference_origin?:string;metadata?:Metadata;}declare type ListMeta={readonly pageCount:number;readonly recordCount:number;readonly currentPage:number;readonly recordsPerPage:number;};declare class ListResponse<R>extends Array<R>{readonly meta:ListMeta;constructor(meta:ListMeta,data:Array<R>);first():R|undefined;last():R|undefined;get(index:number):R|undefined;}export type{Metadata,ResourceType,ResourceId,Resource,ResourceCreate,ResourceUpdate,ListResponse,ResourceRel};declare type ResourceAdapterConfig={};declare type ResourcesInitConfig=ResourceAdapterConfig&ApiClientInitConfig;declare type ResourcesConfig=Partial<ResourcesInitConfig>;declare class ResourceAdapter{#private;constructor(config:ResourcesInitConfig);get interceptors():InterceptorManager;private localConfig;config(config:ResourcesConfig):void;singleton<R extends Resource>(resource:ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;retrieve<R extends Resource>(resource:ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;list<R extends Resource>(resource:ResourceType,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<R>>;create<C extends ResourceCreate,R extends Resource>(resource:C&ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;update<U extends ResourceUpdate,R extends Resource>(resource:U&ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;delete(resource:ResourceId,options?:ResourcesConfig):Promise<void>;fetch<R extends Resource>(resource:string|ResourceType,path:string,params?:QueryParams,options?:ResourcesConfig):Promise<R|ListResponse<R>>;}declare abstract class ApiResource{static readonly TYPE:ResourceTypeLock;protected resources:ResourceAdapter;constructor(adapter:ResourceAdapter);abstract relationship(id:string|ResourceId|null):ResourceRel;abstract type():string;}export default ResourceAdapter;export{ApiResource,ResourcesConfig,ResourcesInitConfig};
package/lib/resource.js DELETED
@@ -1 +0,0 @@
1
- import f from"./client";import{denormalize as n,normalize as d}from"./jsonapi";import{generateQueryStringParams as c}from"./query";import p from"./config";import O from"./debug";const i=O("resource");class h extends Array{meta;constructor(e,r){super(...r||[]);this.meta=e}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]:void 0}}class y{#e;#t={};constructor(e){this.#e=f.create(e),this.localConfig(e)}get interceptors(){return this.#e.interceptors}localConfig(e){}config(e){i("config %o",e),this.localConfig(e),this.#e.config(e)}async singleton(e,r,t){i("singleton: %o, %O, %O",e,r||{},t||{});const a=c(r,e);t?.params&&Object.assign(a,t?.params);const s=await this.#e.request("get",`${e.type}`,void 0,{...t,params:a});return n(s)}async retrieve(e,r,t){i("retrieve: %o, %O, %O",e,r||{},t||{});const a=c(r,e);t?.params&&Object.assign(a,t?.params);const s=await this.#e.request("get",`${e.type}/${e.id}`,void 0,{...t,params:a});return n(s)}async list(e,r,t){i("list: %o, %O, %O",e,r||{},t||{});const a=c(r,e);t?.params&&Object.assign(a,t?.params);const s=await this.#e.request("get",`${e.type}`,void 0,{...t,params:a}),o=n(s),u={pageCount:Number(s.meta?.page_count),recordCount:Number(s.meta?.record_count),currentPage:r?.pageNumber||p.default.pageNumber,recordsPerPage:r?.pageSize||p.default.pageSize};return new h(u,o)}async create(e,r,t){i("create: %o, %O, %O",e,r||{},t||{});const a=c(r,e);t?.params&&Object.assign(a,t?.params);const s=d(e),o=await this.#e.request("post",e.type,s,{...t,params:a});return n(o)}async update(e,r,t){i("update: %o, %O, %O",e,r||{},t||{});const a=c(r,e);t?.params&&Object.assign(a,t?.params);const s=d(e),o=await this.#e.request("patch",`${e.type}/${e.id}`,s,{...t,params:a});return n(o)}async delete(e,r){i("delete: %o, %O",e,r||{}),await this.#e.request("delete",`${e.type}/${e.id}`,void 0,r)}async fetch(e,r,t,a){i("fetch: %o, %O, %O",r,t||{},a||{});const s=c(t,e);a?.params&&Object.assign(s,a?.params);const o=await this.#e.request("get",r,void 0,{...a,params:s}),u=n(o);if(Array.isArray(u)){const g=t,l={pageCount:Number(o.meta?.page_count),recordCount:Number(o.meta?.record_count),currentPage:g?.pageNumber||p.default.pageNumber,recordsPerPage:g?.pageSize||p.default.pageSize};return new h(l,u)}else return u}}class b{static TYPE;resources;constructor(e){i("new resource instance: %s",this.type()),this.resources=e}}export default y;export{b as ApiResource};
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Geocoder}from'./geocoders';declare type AddressRel=ResourceRel&{type:typeof Addresses.TYPE;};declare type GeocoderRel=ResourceRel&{type:'geocoders';};interface Address extends Resource{business?:boolean;first_name?:string;last_name?:string;company?:string;full_name?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;full_address?:string;name?:string;email?:string;notes?:string;lat?:number;lng?:number;is_localized?:boolean;is_geocoded?:boolean;provider_name?:string;map_url?:string;static_map_url?:string;billing_info?:string;geocoder?:Geocoder;}interface AddressCreate extends ResourceCreate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1:string;line_2?:string;city:string;zip_code?:string;state_code:string;country_code:string;phone:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}interface AddressUpdate extends ResourceUpdate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}declare class Addresses extends ApiResource{static readonly TYPE:'addresses';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;create(resource:AddressCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;update(resource:AddressUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;delete(id:string,options?:ResourcesConfig):Promise<void>;geocoder(addressId:string|Address,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Geocoder>;isAddress(resource:any):resource is Address;relationship(id:string|ResourceId|null):AddressRel;type():string;}export default Addresses;export{Address,AddressCreate,AddressUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="addresses";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async geocoder(e,t,s){const i=e.id||e;return this.resources.fetch({type:"geocoders"},`addresses/${i}/geocoder`,t,s)}isAddress(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';declare type AdjustmentRel=ResourceRel&{type:typeof Adjustments.TYPE;};interface Adjustment extends Resource{name?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;}interface AdjustmentCreate extends ResourceCreate{name:string;currency_code:string;amount_cents:number;}interface AdjustmentUpdate extends ResourceUpdate{name?:string;currency_code?:string;amount_cents?:number;}declare class Adjustments extends ApiResource{static readonly TYPE:'adjustments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Adjustment>>;create(resource:AdjustmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;update(resource:AdjustmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAdjustment(resource:any):resource is Adjustment;relationship(id:string|ResourceId|null):AdjustmentRel;type():string;}export default Adjustments;export{Adjustment,AdjustmentCreate,AdjustmentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class t extends i{static TYPE="adjustments";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAdjustment(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{AdyenPayment}from'./adyen_payments';declare type AdyenGatewayRel=ResourceRel&{type:typeof AdyenGateways.TYPE;};declare type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};interface AdyenGateway extends Resource{name?:string;live_url_prefix?:string;payment_methods?:PaymentMethod[];adyen_payments?:AdyenPayment[];}interface AdyenGatewayCreate extends ResourceCreate{name:string;merchant_account:string;api_key:string;public_key?:string;live_url_prefix:string;adyen_payments?:AdyenPaymentRel[];}interface AdyenGatewayUpdate extends ResourceUpdate{name?:string;merchant_account?:string;api_key?:string;public_key?:string;live_url_prefix?:string;adyen_payments?:AdyenPaymentRel[];}declare class AdyenGateways extends ApiResource{static readonly TYPE:'adyen_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenGateway>>;create(resource:AdyenGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;update(resource:AdyenGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;adyen_payments(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;isAdyenGateway(resource:any):resource is AdyenGateway;relationship(id:string|ResourceId|null):AdyenGatewayRel;type():string;}export default AdyenGateways;export{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as y}from"../resource";class r extends y{static TYPE="adyen_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${a}/payment_methods`,t,s)}async adyen_payments(e,t,s){const a=e.id||e;return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${a}/adyen_payments`,t,s)}isAdyenGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type AdyenPaymentRel=ResourceRel&{type:typeof AdyenPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface AdyenPayment extends Resource{public_key?:string;payment_methods?:object;payment_request_data?:object;payment_request_details?:object;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface AdyenPaymentCreate extends ResourceCreate{order:OrderRel;}interface AdyenPaymentUpdate extends ResourceUpdate{payment_request_data?:object;payment_request_details?:object;payment_response?:object;_details?:boolean;order?:OrderRel;}declare class AdyenPayments extends ApiResource{static readonly TYPE:'adyen_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;create(resource:AdyenPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;update(resource:AdyenPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isAdyenPayment(resource:any):resource is AdyenPayment;relationship(id:string|ResourceId|null):AdyenPaymentRel;type():string;}export default AdyenPayments;export{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as y}from"../resource";class r extends y{static TYPE="adyen_payments";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){const a=e.id||e;return this.resources.fetch({type:"orders"},`adyen_payments/${a}/order`,t,s)}async payment_gateway(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${a}/payment_gateway`,t,s)}isAdyenPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';declare type ApplicationRel=ResourceRel&{type:typeof Applications.TYPE;};interface Application extends Resource{name?:string;kind?:string;public_access?:string;redirect_uri?:string;scopes?:string;}declare class Applications extends ApiResource{static readonly TYPE:'application';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Application>;isApplication(resource:any):resource is Application;relationship(id:string|ResourceId|null):ApplicationRel;type():string;}export default Applications;export{Application};
@@ -1 +0,0 @@
1
- import{ApiResource as r}from"../resource";class t extends r{static TYPE="application";async retrieve(e,i){return this.resources.singleton({type:t.TYPE},e,i)}isApplication(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Bundle}from'./bundles';import type{CarrierAccount}from'./carrier_accounts';import type{CustomerGroup}from'./customer_groups';import type{Customer}from'./customers';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Geocoder}from'./geocoders';import type{GiftCardRecipient}from'./gift_card_recipients';import type{GiftCard}from'./gift_cards';import type{InventoryModel}from'./inventory_models';import type{Market}from'./markets';import type{Merchant}from'./merchants';import type{BillingInfoValidationRule}from'./billing_info_validation_rules';import type{Order}from'./orders';import type{Package}from'./packages';import type{Parcel}from'./parcels';import type{PaymentMethod}from'./payment_methods';import type{PriceList}from'./price_lists';import type{Price}from'./prices';import type{Promotion}from'./promotions';import type{Return}from'./returns';import type{Shipment}from'./shipments';import type{ShippingCategory}from'./shipping_categories';import type{ShippingMethod}from'./shipping_methods';import type{ShippingZone}from'./shipping_zones';import type{SkuOption}from'./sku_options';import type{Sku}from'./skus';import type{StockItem}from'./stock_items';import type{StockLocation}from'./stock_locations';import type{TaxCalculator}from'./tax_calculators';import type{TaxCategory}from'./tax_categories';declare type AttachmentRel=ResourceRel&{type:typeof Attachments.TYPE;};declare type BundleRel=ResourceRel&{type:'bundles';};declare type CarrierAccountRel=ResourceRel&{type:'carrier_accounts';};declare type CustomerGroupRel=ResourceRel&{type:'customer_groups';};declare type CustomerRel=ResourceRel&{type:'customers';};declare type DeliveryLeadTimeRel=ResourceRel&{type:'delivery_lead_times';};declare type GeocoderRel=ResourceRel&{type:'geocoders';};declare type GiftCardRecipientRel=ResourceRel&{type:'gift_card_recipients';};declare type GiftCardRel=ResourceRel&{type:'gift_cards';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};declare type MarketRel=ResourceRel&{type:'markets';};declare type MerchantRel=ResourceRel&{type:'merchants';};declare type BillingInfoValidationRuleRel=ResourceRel&{type:'billing_info_validation_rules';};declare type OrderRel=ResourceRel&{type:'orders';};declare type PackageRel=ResourceRel&{type:'packages';};declare type ParcelRel=ResourceRel&{type:'parcels';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type PriceRel=ResourceRel&{type:'prices';};declare type PromotionRel=ResourceRel&{type:'promotions';};declare type ReturnRel=ResourceRel&{type:'returns';};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};declare type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};declare type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};declare type SkuOptionRel=ResourceRel&{type:'sku_options';};declare type SkuRel=ResourceRel&{type:'skus';};declare type StockItemRel=ResourceRel&{type:'stock_items';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface Attachment extends Resource{name?:string;description?:string;url?:string;attachable?:Bundle|CarrierAccount|CustomerGroup|Customer|DeliveryLeadTime|Geocoder|GiftCardRecipient|GiftCard|InventoryModel|Market|Merchant|BillingInfoValidationRule|Order|Package|Parcel|PaymentMethod|PriceList|Price|Promotion|Return|Shipment|ShippingCategory|ShippingMethod|ShippingZone|SkuOption|Sku|StockItem|StockLocation|TaxCalculator|TaxCategory;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string;url?:string;attachable:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string;description?:string;url?:string;attachable?:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}declare class Attachments extends ApiResource{static readonly TYPE:'attachments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():string;}export default Attachments;export{Attachment,AttachmentCreate,AttachmentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class t extends i{static TYPE="attachments";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...e,type:t.TYPE},r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAttachment(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';import type{Void}from'./voids';declare type AuthorizationRel=ResourceRel&{type:typeof Authorizations.TYPE;};interface Authorization extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;cvv_code?:string;cvv_message?:string;avs_code?:string;avs_message?:string;fraud_review?:string;capture_amount_cents?:number;capture_amount_float?:number;formatted_capture_amount?:string;capture_balance_cents?:number;capture_balance_float?:number;formatted_capture_balance?:string;void_balance_cents?:number;void_balance_float?:number;formatted_void_balance?:string;order?:Order;captures?:Capture[];voids?:Void[];}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean;_capture_amount_cents?:number;_void?:boolean;}declare class Authorizations extends ApiResource{static readonly TYPE:'authorizations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():string;}export default Authorizations;export{Authorization,AuthorizationUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as o}from"../resource";class s extends o{static TYPE="authorizations";async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update({...e,type:s.TYPE},r,t)}async order(e,r,t){const i=e.id||e;return this.resources.fetch({type:"orders"},`authorizations/${i}/order`,r,t)}async captures(e,r,t){const i=e.id||e;return this.resources.fetch({type:"captures"},`authorizations/${i}/captures`,r,t)}async voids(e,r,t){const i=e.id||e;return this.resources.fetch({type:"voids"},`authorizations/${i}/voids`,r,t)}isAuthorization(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{TaxCategory}from'./tax_categories';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type AvalaraAccountRel=ResourceRel&{type:typeof AvalaraAccounts.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface AvalaraAccount extends Resource{name?:string;username?:string;company_code?:string;ddp?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}interface AvalaraAccountCreate extends ResourceCreate{name:string;username:string;password:string;company_code:string;ddp?:string;tax_categories?:TaxCategoryRel[];}interface AvalaraAccountUpdate extends ResourceUpdate{name?:string;username?:string;password?:string;company_code?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}declare class AvalaraAccounts extends ApiResource{static readonly TYPE:'avalara_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AvalaraAccount>>;create(resource:AvalaraAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;update(resource:AvalaraAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isAvalaraAccount(resource:any):resource is AvalaraAccount;relationship(id:string|ResourceId|null):AvalaraAccountRel;type():string;}export default AvalaraAccounts;export{AvalaraAccount,AvalaraAccountCreate,AvalaraAccountUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class a extends c{static TYPE="avalara_accounts";async list(e,t){return this.resources.list({type:a.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:a.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:a.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:a.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:a.TYPE,id:e},t)}async tax_categories(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${r}/tax_categories`,t,s)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${r}/markets`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${r}/attachments`,t,s)}isAvalaraAccount(e){return e.type&&e.type===a.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:a.TYPE}:{id:e.id,type:a.TYPE}}type(){return a.TYPE}}export default a;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';declare type BillingInfoValidationRuleRel=ResourceRel&{type:typeof BillingInfoValidationRules.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};interface BillingInfoValidationRule extends Resource{market?:Market;}interface BillingInfoValidationRuleCreate extends ResourceCreate{market:MarketRel;}interface BillingInfoValidationRuleUpdate extends ResourceUpdate{market?:MarketRel;}declare class BillingInfoValidationRules extends ApiResource{static readonly TYPE:'billing_info_validation_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BillingInfoValidationRule>>;create(resource:BillingInfoValidationRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;update(resource:BillingInfoValidationRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(billingInfoValidationRuleId:string|BillingInfoValidationRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;isBillingInfoValidationRule(resource:any):resource is BillingInfoValidationRule;relationship(id:string|ResourceId|null):BillingInfoValidationRuleRel;type():string;}export default BillingInfoValidationRules;export{BillingInfoValidationRule,BillingInfoValidationRuleCreate,BillingInfoValidationRuleUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="billing_info_validation_rules";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,i){return this.resources.create({...e,type:r.TYPE},t,i)}async retrieve(e,t,i){return this.resources.retrieve({type:r.TYPE,id:e},t,i)}async update(e,t,i){return this.resources.update({...e,type:r.TYPE},t,i)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async market(e,t,i){const s=e.id||e;return this.resources.fetch({type:"markets"},`billing_info_validation_rules/${s}/market`,t,i)}isBillingInfoValidationRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';declare type BingGeocoderRel=ResourceRel&{type:typeof BingGeocoders.TYPE;};interface BingGeocoder extends Resource{name?:string;addresses?:Address[];attachments?:Attachment[];}interface BingGeocoderCreate extends ResourceCreate{name:string;key:string;}interface BingGeocoderUpdate extends ResourceUpdate{name?:string;key?:string;}declare class BingGeocoders extends ApiResource{static readonly TYPE:'bing_geocoders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BingGeocoder>>;create(resource:BingGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;update(resource:BingGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;delete(id:string,options?:ResourcesConfig):Promise<void>;addresses(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBingGeocoder(resource:any):resource is BingGeocoder;relationship(id:string|ResourceId|null):BingGeocoderRel;type():string;}export default BingGeocoders;export{BingGeocoder,BingGeocoderCreate,BingGeocoderUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class s extends i{static TYPE="bing_geocoders";async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async addresses(e,t,r){const c=e.id||e;return this.resources.fetch({type:"addresses"},`bing_geocoders/${c}/addresses`,t,r)}async attachments(e,t,r){const c=e.id||e;return this.resources.fetch({type:"attachments"},`bing_geocoders/${c}/attachments`,t,r)}isBingGeocoder(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{BraintreePayment}from'./braintree_payments';declare type BraintreeGatewayRel=ResourceRel&{type:typeof BraintreeGateways.TYPE;};declare type BraintreePaymentRel=ResourceRel&{type:'braintree_payments';};interface BraintreeGateway extends Resource{name?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];braintree_payments?:BraintreePayment[];}interface BraintreeGatewayCreate extends ResourceCreate{name:string;merchant_account_id:string;merchant_id:string;public_key:string;private_key:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}interface BraintreeGatewayUpdate extends ResourceUpdate{name?:string;merchant_account_id?:string;merchant_id?:string;public_key?:string;private_key?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}declare class BraintreeGateways extends ApiResource{static readonly TYPE:'braintree_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreeGateway>>;create(resource:BraintreeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;update(resource:BraintreeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;braintree_payments(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreePayment>>;isBraintreeGateway(resource:any):resource is BraintreeGateway;relationship(id:string|ResourceId|null):BraintreeGatewayRel;type():string;}export default BraintreeGateways;export{BraintreeGateway,BraintreeGatewayCreate,BraintreeGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="braintree_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_methods"},`braintree_gateways/${a}/payment_methods`,t,s)}async braintree_payments(e,t,s){const a=e.id||e;return this.resources.fetch({type:"braintree_payments"},`braintree_gateways/${a}/braintree_payments`,t,s)}isBraintreeGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type BraintreePaymentRel=ResourceRel&{type:typeof BraintreePayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface BraintreePayment extends Resource{client_token?:string;payment_method_nonce?:string;payment_id?:string;local?:boolean;options?:object;order?:Order;payment_gateway?:PaymentGateway;}interface BraintreePaymentCreate extends ResourceCreate{payment_id?:string;local?:boolean;options?:object;order:OrderRel;}interface BraintreePaymentUpdate extends ResourceUpdate{payment_method_nonce?:string;payment_id?:string;local?:boolean;options?:object;order?:OrderRel;}declare class BraintreePayments extends ApiResource{static readonly TYPE:'braintree_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreePayment>>;create(resource:BraintreePaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;update(resource:BraintreePaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(braintreePaymentId:string|BraintreePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(braintreePaymentId:string|BraintreePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isBraintreePayment(resource:any):resource is BraintreePayment;relationship(id:string|ResourceId|null):BraintreePaymentRel;type():string;}export default BraintreePayments;export{BraintreePayment,BraintreePaymentCreate,BraintreePaymentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="braintree_payments";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){const a=e.id||e;return this.resources.fetch({type:"orders"},`braintree_payments/${a}/order`,t,s)}async payment_gateway(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`braintree_payments/${a}/payment_gateway`,t,s)}isBraintreePayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';import type{Attachment}from'./attachments';declare type BundleRel=ResourceRel&{type:typeof Bundles.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type SkuListRel=ResourceRel&{type:'sku_lists';};interface Bundle extends Resource{code?:string;name?:string;currency_code?:string;description?:string;image_url?:string;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;compare_at_amount_cents?:number;compare_at_amount_float?:number;formatted_compare_at_amount?:string;skus_count?:number;market?:Market;sku_list?:SkuList;skus?:Sku[];attachments?:Attachment[];}interface BundleCreate extends ResourceCreate{code:string;name:string;currency_code?:string;description?:string;image_url?:string;price_amount_cents:number;compare_at_amount_cents:number;_compute_price_amount?:boolean;_compute_compare_at_amount?:boolean;market?:MarketRel;sku_list:SkuListRel;}interface BundleUpdate extends ResourceUpdate{code?:string;name?:string;currency_code?:string;description?:string;image_url?:string;price_amount_cents?:number;compare_at_amount_cents?:number;_compute_price_amount?:boolean;_compute_compare_at_amount?:boolean;}declare class Bundles extends ApiResource{static readonly TYPE:'bundles';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;create(resource:BundleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;update(resource:BundleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(bundleId:string|Bundle,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;sku_list(bundleId:string|Bundle,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(bundleId:string|Bundle,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;attachments(bundleId:string|Bundle,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBundle(resource:any):resource is Bundle;relationship(id:string|ResourceId|null):BundleRel;type():string;}export default Bundles;export{Bundle,BundleCreate,BundleUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="bundles";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async market(e,t,s){const c=e.id||e;return this.resources.fetch({type:"markets"},`bundles/${c}/market`,t,s)}async sku_list(e,t,s){const c=e.id||e;return this.resources.fetch({type:"sku_lists"},`bundles/${c}/sku_list`,t,s)}async skus(e,t,s){const c=e.id||e;return this.resources.fetch({type:"skus"},`bundles/${c}/skus`,t,s)}async attachments(e,t,s){const c=e.id||e;return this.resources.fetch({type:"attachments"},`bundles/${c}/attachments`,t,s)}isBundle(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Authorization}from'./authorizations';import type{Refund}from'./refunds';declare type CaptureRel=ResourceRel&{type:typeof Captures.TYPE;};interface Capture extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;refund_amount_cents?:number;refund_amount_float?:number;formatted_refund_amount?:string;refund_balance_cents?:number;refund_balance_float?:number;formatted_refund_balance?:string;order?:Order;reference_authorization?:Authorization;refunds?:Refund[];}interface CaptureUpdate extends ResourceUpdate{_refund?:boolean;_refund_amount_cents?:number;}declare class Captures extends ApiResource{static readonly TYPE:'captures';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;update(resource:CaptureUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;order(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_authorization(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;refunds(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;isCapture(resource:any):resource is Capture;relationship(id:string|ResourceId|null):CaptureRel;type():string;}export default Captures;export{Capture,CaptureUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as u}from"../resource";class s extends u{static TYPE="captures";async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update({...e,type:s.TYPE},r,t)}async order(e,r,t){const n=e.id||e;return this.resources.fetch({type:"orders"},`captures/${n}/order`,r,t)}async reference_authorization(e,r,t){const n=e.id||e;return this.resources.fetch({type:"authorizations"},`captures/${n}/reference_authorization`,r,t)}async refunds(e,r,t){const n=e.id||e;return this.resources.fetch({type:"refunds"},`captures/${n}/refunds`,r,t)}isCapture(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type CarrierAccountRel=ResourceRel&{type:typeof CarrierAccounts.TYPE;};interface CarrierAccount extends Resource{name?:string;easypost_type?:string;easypost_id?:string;market?:Market;attachments?:Attachment[];}declare class CarrierAccounts extends ApiResource{static readonly TYPE:'carrier_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CarrierAccount>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CarrierAccount>;market(carrierAccountId:string|CarrierAccount,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;attachments(carrierAccountId:string|CarrierAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCarrierAccount(resource:any):resource is CarrierAccount;relationship(id:string|ResourceId|null):CarrierAccountRel;type():string;}export default CarrierAccounts;export{CarrierAccount};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class t extends a{static TYPE="carrier_accounts";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async market(e,r,s){const c=e.id||e;return this.resources.fetch({type:"markets"},`carrier_accounts/${c}/market`,r,s)}async attachments(e,r,s){const c=e.id||e;return this.resources.fetch({type:"attachments"},`carrier_accounts/${c}/attachments`,r,s)}isCarrierAccount(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{CheckoutComPayment}from'./checkout_com_payments';declare type CheckoutComGatewayRel=ResourceRel&{type:typeof CheckoutComGateways.TYPE;};declare type CheckoutComPaymentRel=ResourceRel&{type:'checkout_com_payments';};interface CheckoutComGateway extends Resource{name?:string;webhook_endpoint_id?:string;webhook_endpoint_secret?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];checkout_com_payments?:CheckoutComPayment[];}interface CheckoutComGatewayCreate extends ResourceCreate{name:string;secret_key:string;public_key:string;checkout_com_payments?:CheckoutComPaymentRel[];}interface CheckoutComGatewayUpdate extends ResourceUpdate{name?:string;secret_key?:string;public_key?:string;checkout_com_payments?:CheckoutComPaymentRel[];}declare class CheckoutComGateways extends ApiResource{static readonly TYPE:'checkout_com_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComGateway>>;create(resource:CheckoutComGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;update(resource:CheckoutComGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(checkoutComGatewayId:string|CheckoutComGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;checkout_com_payments(checkoutComGatewayId:string|CheckoutComGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComPayment>>;isCheckoutComGateway(resource:any):resource is CheckoutComGateway;relationship(id:string|ResourceId|null):CheckoutComGatewayRel;type():string;}export default CheckoutComGateways;export{CheckoutComGateway,CheckoutComGatewayCreate,CheckoutComGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class r extends a{static TYPE="checkout_com_gateways";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,c){return this.resources.create({...e,type:r.TYPE},t,c)}async retrieve(e,t,c){return this.resources.retrieve({type:r.TYPE,id:e},t,c)}async update(e,t,c){return this.resources.update({...e,type:r.TYPE},t,c)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,c){const s=e.id||e;return this.resources.fetch({type:"payment_methods"},`checkout_com_gateways/${s}/payment_methods`,t,c)}async checkout_com_payments(e,t,c){const s=e.id||e;return this.resources.fetch({type:"checkout_com_payments"},`checkout_com_gateways/${s}/checkout_com_payments`,t,c)}isCheckoutComGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type CheckoutComPaymentRel=ResourceRel&{type:typeof CheckoutComPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface CheckoutComPayment extends Resource{public_key?:string;payment_type?:string;token?:string;session_id?:string;success_url?:string;failure_url?:string;source_id?:string;customer_token?:string;redirect_uri?:string;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface CheckoutComPaymentCreate extends ResourceCreate{payment_type:string;token:string;session_id?:string;success_url?:string;failure_url?:string;order:OrderRel;}interface CheckoutComPaymentUpdate extends ResourceUpdate{payment_type?:string;token?:string;session_id?:string;success_url?:string;failure_url?:string;_details?:boolean;_refresh?:boolean;order?:OrderRel;}declare class CheckoutComPayments extends ApiResource{static readonly TYPE:'checkout_com_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComPayment>>;create(resource:CheckoutComPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;update(resource:CheckoutComPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(checkoutComPaymentId:string|CheckoutComPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(checkoutComPaymentId:string|CheckoutComPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isCheckoutComPayment(resource:any):resource is CheckoutComPayment;relationship(id:string|ResourceId|null):CheckoutComPaymentRel;type():string;}export default CheckoutComPayments;export{CheckoutComPayment,CheckoutComPaymentCreate,CheckoutComPaymentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class r extends a{static TYPE="checkout_com_payments";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){const c=e.id||e;return this.resources.fetch({type:"orders"},`checkout_com_payments/${c}/order`,t,s)}async payment_gateway(e,t,s){const c=e.id||e;return this.resources.fetch({type:"payment_gateways"},`checkout_com_payments/${c}/payment_gateway`,t,s)}isCheckoutComPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';import type{Coupon}from'./coupons';declare type CouponCodesPromotionRuleRel=ResourceRel&{type:typeof CouponCodesPromotionRules.TYPE;};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeGiftPromotionRel=ResourceRel&{type:'free_gift_promotions';};declare type FixedPricePromotionRel=ResourceRel&{type:'fixed_price_promotions';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};declare type CouponRel=ResourceRel&{type:'coupons';};interface CouponCodesPromotionRule extends Resource{promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;coupons?:Coupon[];}interface CouponCodesPromotionRuleCreate extends ResourceCreate{promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;coupons?:CouponRel[];}interface CouponCodesPromotionRuleUpdate extends ResourceUpdate{promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;coupons?:CouponRel[];}declare class CouponCodesPromotionRules extends ApiResource{static readonly TYPE:'coupon_codes_promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CouponCodesPromotionRule>>;create(resource:CouponCodesPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;update(resource:CouponCodesPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;coupons(couponCodesPromotionRuleId:string|CouponCodesPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;isCouponCodesPromotionRule(resource:any):resource is CouponCodesPromotionRule;relationship(id:string|ResourceId|null):CouponCodesPromotionRuleRel;type():string;}export default CouponCodesPromotionRules;export{CouponCodesPromotionRule,CouponCodesPromotionRuleCreate,CouponCodesPromotionRuleUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{static TYPE="coupon_codes_promotion_rules";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,o){return this.resources.create({...e,type:r.TYPE},t,o)}async retrieve(e,t,o){return this.resources.retrieve({type:r.TYPE,id:e},t,o)}async update(e,t,o){return this.resources.update({...e,type:r.TYPE},t,o)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async coupons(e,t,o){const s=e.id||e;return this.resources.fetch({type:"coupons"},`coupon_codes_promotion_rules/${s}/coupons`,t,o)}isCouponCodesPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{Attachment}from'./attachments';declare type CouponRecipientRel=ResourceRel&{type:typeof CouponRecipients.TYPE;};declare type CustomerRel=ResourceRel&{type:'customers';};interface CouponRecipient extends Resource{email?:string;first_name?:string;last_name?:string;customer?:Customer;attachments?:Attachment[];}interface CouponRecipientCreate extends ResourceCreate{email:string;first_name?:string;last_name?:string;customer?:CustomerRel;}interface CouponRecipientUpdate extends ResourceUpdate{email?:string;first_name?:string;last_name?:string;customer?:CustomerRel;}declare class CouponRecipients extends ApiResource{static readonly TYPE:'coupon_recipients';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CouponRecipient>>;create(resource:CouponRecipientCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;update(resource:CouponRecipientUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(couponRecipientId:string|CouponRecipient,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;attachments(couponRecipientId:string|CouponRecipient,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCouponRecipient(resource:any):resource is CouponRecipient;relationship(id:string|ResourceId|null):CouponRecipientRel;type():string;}export default CouponRecipients;export{CouponRecipient,CouponRecipientCreate,CouponRecipientUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class r extends i{static TYPE="coupon_recipients";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async customer(e,t,s){const c=e.id||e;return this.resources.fetch({type:"customers"},`coupon_recipients/${c}/customer`,t,s)}async attachments(e,t,s){const c=e.id||e;return this.resources.fetch({type:"attachments"},`coupon_recipients/${c}/attachments`,t,s)}isCouponRecipient(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';declare type CouponRel=ResourceRel&{type:typeof Coupons.TYPE;};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};interface Coupon extends Resource{code?:string;customer_single_use?:boolean;usage_limit?:number;usage_count?:number;recipient_email?:string;promotion_rule?:CouponCodesPromotionRule;}interface CouponCreate extends ResourceCreate{code:string;customer_single_use?:boolean;usage_limit:number;recipient_email?:string;promotion_rule:CouponCodesPromotionRuleRel;}interface CouponUpdate extends ResourceUpdate{code?:string;customer_single_use?:boolean;usage_limit?:number;recipient_email?:string;promotion_rule?:CouponCodesPromotionRuleRel;}declare class Coupons extends ApiResource{static readonly TYPE:'coupons';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;create(resource:CouponCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;update(resource:CouponUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;delete(id:string,options?:ResourcesConfig):Promise<void>;promotion_rule(couponId:string|Coupon,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;isCoupon(resource:any):resource is Coupon;relationship(id:string|ResourceId|null):CouponRel;type():string;}export default Coupons;export{Coupon,CouponCreate,CouponUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class r extends i{static TYPE="coupons";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,o){return this.resources.create({...e,type:r.TYPE},t,o)}async retrieve(e,t,o){return this.resources.retrieve({type:r.TYPE,id:e},t,o)}async update(e,t,o){return this.resources.update({...e,type:r.TYPE},t,o)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async promotion_rule(e,t,o){const s=e.id||e;return this.resources.fetch({type:"coupon_codes_promotion_rules"},`coupons/${s}/promotion_rule`,t,o)}isCoupon(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{Address}from'./addresses';declare type CustomerAddressRel=ResourceRel&{type:typeof CustomerAddresses.TYPE;};declare type CustomerRel=ResourceRel&{type:'customers';};declare type AddressRel=ResourceRel&{type:'addresses';};interface CustomerAddress extends Resource{name?:string;customer?:Customer;address?:Address;}interface CustomerAddressCreate extends ResourceCreate{customer:CustomerRel;address:AddressRel;}interface CustomerAddressUpdate extends ResourceUpdate{customer?:CustomerRel;address?:AddressRel;}declare class CustomerAddresses extends ApiResource{static readonly TYPE:'customer_addresses';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerAddress>>;create(resource:CustomerAddressCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerAddress>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerAddress>;update(resource:CustomerAddressUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerAddress>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(customerAddressId:string|CustomerAddress,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;address(customerAddressId:string|CustomerAddress,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;isCustomerAddress(resource:any):resource is CustomerAddress;relationship(id:string|ResourceId|null):CustomerAddressRel;type():string;}export default CustomerAddresses;export{CustomerAddress,CustomerAddressCreate,CustomerAddressUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as u}from"../resource";class r extends u{static TYPE="customer_addresses";async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create({...e,type:r.TYPE},s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update({...e,type:r.TYPE},s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async customer(e,s,t){const c=e.id||e;return this.resources.fetch({type:"customers"},`customer_addresses/${c}/customer`,s,t)}async address(e,s,t){const c=e.id||e;return this.resources.fetch({type:"addresses"},`customer_addresses/${c}/address`,s,t)}isCustomerAddress(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type CustomerGroupRel=ResourceRel&{type:typeof CustomerGroups.TYPE;};interface CustomerGroup extends Resource{name?:string;customers?:Customer[];markets?:Market[];attachments?:Attachment[];}interface CustomerGroupCreate extends ResourceCreate{name:string;}interface CustomerGroupUpdate extends ResourceUpdate{name?:string;}declare class CustomerGroups extends ApiResource{static readonly TYPE:'customer_groups';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerGroup>>;create(resource:CustomerGroupCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerGroup>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerGroup>;update(resource:CustomerGroupUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerGroup>;delete(id:string,options?:ResourcesConfig):Promise<void>;customers(customerGroupId:string|CustomerGroup,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Customer>>;markets(customerGroupId:string|CustomerGroup,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(customerGroupId:string|CustomerGroup,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCustomerGroup(resource:any):resource is CustomerGroup;relationship(id:string|ResourceId|null):CustomerGroupRel;type():string;}export default CustomerGroups;export{CustomerGroup,CustomerGroupCreate,CustomerGroupUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as u}from"../resource";class r extends u{static TYPE="customer_groups";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async customers(e,t,s){const c=e.id||e;return this.resources.fetch({type:"customers"},`customer_groups/${c}/customers`,t,s)}async markets(e,t,s){const c=e.id||e;return this.resources.fetch({type:"markets"},`customer_groups/${c}/markets`,t,s)}async attachments(e,t,s){const c=e.id||e;return this.resources.fetch({type:"attachments"},`customer_groups/${c}/attachments`,t,s)}isCustomerGroup(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';declare type CustomerPasswordResetRel=ResourceRel&{type:typeof CustomerPasswordResets.TYPE;};interface CustomerPasswordReset extends Resource{customer_email?:string;reset_password_token?:string;reset_password_at?:string;customer?:Customer;}interface CustomerPasswordResetCreate extends ResourceCreate{customer_email:string;}interface CustomerPasswordResetUpdate extends ResourceUpdate{customer_password?:string;_reset_password_token?:string;}declare class CustomerPasswordResets extends ApiResource{static readonly TYPE:'customer_password_resets';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerPasswordReset>>;create(resource:CustomerPasswordResetCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPasswordReset>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPasswordReset>;update(resource:CustomerPasswordResetUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPasswordReset>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(customerPasswordResetId:string|CustomerPasswordReset,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;isCustomerPasswordReset(resource:any):resource is CustomerPasswordReset;relationship(id:string|ResourceId|null):CustomerPasswordResetRel;type():string;}export default CustomerPasswordResets;export{CustomerPasswordReset,CustomerPasswordResetCreate,CustomerPasswordResetUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="customer_password_resets";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async customer(e,t,s){const u=e.id||e;return this.resources.fetch({type:"customers"},`customer_password_resets/${u}/customer`,t,s)}isCustomerPasswordReset(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{AdyenPayment}from'./adyen_payments';import type{BraintreePayment}from'./braintree_payments';import type{CheckoutComPayment}from'./checkout_com_payments';import type{ExternalPayment}from'./external_payments';import type{KlarnaPayment}from'./klarna_payments';import type{PaypalPayment}from'./paypal_payments';import type{StripePayment}from'./stripe_payments';import type{WireTransfer}from'./wire_transfers';declare type CustomerPaymentSourceRel=ResourceRel&{type:typeof CustomerPaymentSources.TYPE;};declare type CustomerRel=ResourceRel&{type:'customers';};declare type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};declare type BraintreePaymentRel=ResourceRel&{type:'braintree_payments';};declare type CheckoutComPaymentRel=ResourceRel&{type:'checkout_com_payments';};declare type ExternalPaymentRel=ResourceRel&{type:'external_payments';};declare type KlarnaPaymentRel=ResourceRel&{type:'klarna_payments';};declare type PaypalPaymentRel=ResourceRel&{type:'paypal_payments';};declare type StripePaymentRel=ResourceRel&{type:'stripe_payments';};declare type WireTransferRel=ResourceRel&{type:'wire_transfers';};interface CustomerPaymentSource extends Resource{name?:string;customer_token?:string;payment_source_token?:string;customer?:Customer;payment_source?:AdyenPayment|BraintreePayment|CheckoutComPayment|ExternalPayment|KlarnaPayment|PaypalPayment|StripePayment|WireTransfer;}interface CustomerPaymentSourceCreate extends ResourceCreate{customer:CustomerRel;payment_source:AdyenPaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|StripePaymentRel|WireTransferRel;}interface CustomerPaymentSourceUpdate extends ResourceUpdate{customer?:CustomerRel;payment_source?:AdyenPaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|StripePaymentRel|WireTransferRel;}declare class CustomerPaymentSources extends ApiResource{static readonly TYPE:'customer_payment_sources';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerPaymentSource>>;create(resource:CustomerPaymentSourceCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPaymentSource>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPaymentSource>;update(resource:CustomerPaymentSourceUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPaymentSource>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(customerPaymentSourceId:string|CustomerPaymentSource,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;isCustomerPaymentSource(resource:any):resource is CustomerPaymentSource;relationship(id:string|ResourceId|null):CustomerPaymentSourceRel;type():string;}export default CustomerPaymentSources;export{CustomerPaymentSource,CustomerPaymentSourceCreate,CustomerPaymentSourceUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="customer_payment_sources";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async customer(e,t,s){const u=e.id||e;return this.resources.fetch({type:"customers"},`customer_payment_sources/${u}/customer`,t,s)}isCustomerPaymentSource(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';declare type CustomerSubscriptionRel=ResourceRel&{type:typeof CustomerSubscriptions.TYPE;};interface CustomerSubscription extends Resource{customer_email?:string;customer?:Customer;}interface CustomerSubscriptionCreate extends ResourceCreate{customer_email:string;}declare type CustomerSubscriptionUpdate=ResourceUpdate;declare class CustomerSubscriptions extends ApiResource{static readonly TYPE:'customer_subscriptions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerSubscription>>;create(resource:CustomerSubscriptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerSubscription>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerSubscription>;update(resource:CustomerSubscriptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerSubscription>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(customerSubscriptionId:string|CustomerSubscription,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;isCustomerSubscription(resource:any):resource is CustomerSubscription;relationship(id:string|ResourceId|null):CustomerSubscriptionRel;type():string;}export default CustomerSubscriptions;export{CustomerSubscription,CustomerSubscriptionCreate,CustomerSubscriptionUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="customer_subscriptions";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async customer(e,t,s){const i=e.id||e;return this.resources.fetch({type:"customers"},`customer_subscriptions/${i}/customer`,t,s)}isCustomerSubscription(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{CustomerGroup}from'./customer_groups';import type{CustomerAddress}from'./customer_addresses';import type{CustomerPaymentSource}from'./customer_payment_sources';import type{CustomerSubscription}from'./customer_subscriptions';import type{Order}from'./orders';import type{OrderSubscription}from'./order_subscriptions';import type{Return}from'./returns';import type{Attachment}from'./attachments';declare type CustomerRel=ResourceRel&{type:typeof Customers.TYPE;};declare type CustomerGroupRel=ResourceRel&{type:'customer_groups';};interface Customer extends Resource{email?:string;status?:string;has_password?:boolean;customer_group?:CustomerGroup;customer_addresses?:CustomerAddress[];customer_payment_sources?:CustomerPaymentSource[];customer_subscriptions?:CustomerSubscription[];orders?:Order[];order_subscriptions?:OrderSubscription[];returns?:Return[];attachments?:Attachment[];}interface CustomerCreate extends ResourceCreate{email:string;password?:string;customer_group?:CustomerGroupRel;}interface CustomerUpdate extends ResourceUpdate{email?:string;password?:string;customer_group?:CustomerGroupRel;}declare class Customers extends ApiResource{static readonly TYPE:'customers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Customer>>;create(resource:CustomerCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;update(resource:CustomerUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer_group(customerId:string|Customer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerGroup>;customer_addresses(customerId:string|Customer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerAddress>>;customer_payment_sources(customerId:string|Customer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerPaymentSource>>;customer_subscriptions(customerId:string|Customer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerSubscription>>;orders(customerId:string|Customer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Order>>;order_subscriptions(customerId:string|Customer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;returns(customerId:string|Customer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Return>>;attachments(customerId:string|Customer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCustomer(resource:any):resource is Customer;relationship(id:string|ResourceId|null):CustomerRel;type():string;}export default Customers;export{Customer,CustomerCreate,CustomerUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as u}from"../resource";class c extends u{static TYPE="customers";async list(e,s){return this.resources.list({type:c.TYPE},e,s)}async create(e,s,t){return this.resources.create({...e,type:c.TYPE},s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:c.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update({...e,type:c.TYPE},s,t)}async delete(e,s){await this.resources.delete({type:c.TYPE,id:e},s)}async customer_group(e,s,t){const r=e.id||e;return this.resources.fetch({type:"customer_groups"},`customers/${r}/customer_group`,s,t)}async customer_addresses(e,s,t){const r=e.id||e;return this.resources.fetch({type:"customer_addresses"},`customers/${r}/customer_addresses`,s,t)}async customer_payment_sources(e,s,t){const r=e.id||e;return this.resources.fetch({type:"customer_payment_sources"},`customers/${r}/customer_payment_sources`,s,t)}async customer_subscriptions(e,s,t){const r=e.id||e;return this.resources.fetch({type:"customer_subscriptions"},`customers/${r}/customer_subscriptions`,s,t)}async orders(e,s,t){const r=e.id||e;return this.resources.fetch({type:"orders"},`customers/${r}/orders`,s,t)}async order_subscriptions(e,s,t){const r=e.id||e;return this.resources.fetch({type:"order_subscriptions"},`customers/${r}/order_subscriptions`,s,t)}async returns(e,s,t){const r=e.id||e;return this.resources.fetch({type:"returns"},`customers/${r}/returns`,s,t)}async attachments(e,s,t){const r=e.id||e;return this.resources.fetch({type:"attachments"},`customers/${r}/attachments`,s,t)}isCustomer(e){return e.type&&e.type===c.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:c.TYPE}:{id:e.id,type:c.TYPE}}type(){return c.TYPE}}export default c;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{StockLocation}from'./stock_locations';import type{ShippingMethod}from'./shipping_methods';import type{Attachment}from'./attachments';declare type DeliveryLeadTimeRel=ResourceRel&{type:typeof DeliveryLeadTimes.TYPE;};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};interface DeliveryLeadTime extends Resource{min_hours?:number;max_hours?:number;min_days?:number;max_days?:number;stock_location?:StockLocation;shipping_method?:ShippingMethod;attachments?:Attachment[];}interface DeliveryLeadTimeCreate extends ResourceCreate{min_hours:number;max_hours:number;stock_location:StockLocationRel;shipping_method:ShippingMethodRel;}interface DeliveryLeadTimeUpdate extends ResourceUpdate{min_hours?:number;max_hours?:number;stock_location?:StockLocationRel;shipping_method?:ShippingMethodRel;}declare class DeliveryLeadTimes extends ApiResource{static readonly TYPE:'delivery_lead_times';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<DeliveryLeadTime>>;create(resource:DeliveryLeadTimeCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;update(resource:DeliveryLeadTimeUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(deliveryLeadTimeId:string|DeliveryLeadTime,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;shipping_method(deliveryLeadTimeId:string|DeliveryLeadTime,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;attachments(deliveryLeadTimeId:string|DeliveryLeadTime,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isDeliveryLeadTime(resource:any):resource is DeliveryLeadTime;relationship(id:string|ResourceId|null):DeliveryLeadTimeRel;type():string;}export default DeliveryLeadTimes;export{DeliveryLeadTime,DeliveryLeadTimeCreate,DeliveryLeadTimeUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class r extends c{static TYPE="delivery_lead_times";async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...e,type:r.TYPE},t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async stock_location(e,t,s){const i=e.id||e;return this.resources.fetch({type:"stock_locations"},`delivery_lead_times/${i}/stock_location`,t,s)}async shipping_method(e,t,s){const i=e.id||e;return this.resources.fetch({type:"shipping_methods"},`delivery_lead_times/${i}/shipping_method`,t,s)}async attachments(e,t,s){const i=e.id||e;return this.resources.fetch({type:"attachments"},`delivery_lead_times/${i}/attachments`,t,s)}isDeliveryLeadTime(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Webhook}from'./webhooks';declare type EventCallbackRel=ResourceRel&{type:typeof EventCallbacks.TYPE;};interface EventCallback extends Resource{callback_url?:string;payload?:object;response_code?:string;response_message?:string;webhook?:Webhook;}declare class EventCallbacks extends ApiResource{static readonly TYPE:'event_callbacks';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<EventCallback>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<EventCallback>;webhook(eventCallbackId:string|EventCallback,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;isEventCallback(resource:any):resource is EventCallback;relationship(id:string|ResourceId|null):EventCallbackRel;type():string;}export default EventCallbacks;export{EventCallback};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class t extends n{static TYPE="event_callbacks";async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async webhook(e,r,s){const i=e.id||e;return this.resources.fetch({type:"webhooks"},`event_callbacks/${i}/webhook`,r,s)}isEventCallback(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}export default t;