@commercelayer/sdk 2.3.3-beta.1 → 2.3.3-beta.2

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 (446) hide show
  1. package/lib/{api.d.ts → cjs/api.d.ts} +101 -101
  2. package/lib/cjs/api.js +406 -0
  3. package/lib/{client.d.ts → cjs/client.d.ts} +30 -30
  4. package/lib/cjs/client.js +101 -0
  5. package/lib/{commercelayer.d.ts → cjs/commercelayer.d.ts} +118 -118
  6. package/lib/cjs/commercelayer.js +201 -0
  7. package/lib/{common.d.ts → cjs/common.d.ts} +4 -4
  8. package/lib/cjs/common.js +13 -0
  9. package/lib/{config.d.ts → cjs/config.d.ts} +7 -7
  10. package/lib/cjs/config.js +9 -0
  11. package/lib/{error.d.ts → cjs/error.d.ts} +26 -26
  12. package/lib/cjs/error.js +40 -0
  13. package/lib/{index.d.ts → cjs/index.d.ts} +6 -6
  14. package/lib/cjs/index.js +24 -0
  15. package/lib/{interceptor.d.ts → cjs/interceptor.d.ts} +19 -19
  16. package/lib/cjs/interceptor.js +2 -0
  17. package/lib/{jsonapi.d.ts → cjs/jsonapi.d.ts} +7 -7
  18. package/lib/cjs/jsonapi.js +63 -0
  19. package/lib/{model.d.ts → cjs/model.d.ts} +99 -99
  20. package/lib/cjs/model.js +3 -0
  21. package/lib/{query.d.ts → cjs/query.d.ts} +57 -57
  22. package/lib/cjs/query.js +172 -0
  23. package/lib/{resource.d.ts → cjs/resource.d.ts} +69 -69
  24. package/lib/cjs/resource.js +114 -0
  25. package/lib/{resources → cjs/resources}/addresses.d.ts +91 -91
  26. package/lib/cjs/resources/addresses.js +47 -0
  27. package/lib/{resources → cjs/resources}/adjustments.d.ts +39 -39
  28. package/lib/cjs/resources/adjustments.js +47 -0
  29. package/lib/{resources → cjs/resources}/adyen_gateways.d.ts +49 -49
  30. package/lib/cjs/resources/adyen_gateways.js +47 -0
  31. package/lib/{resources → cjs/resources}/adyen_payments.d.ts +47 -47
  32. package/lib/cjs/resources/adyen_payments.js +47 -0
  33. package/lib/{resources → cjs/resources}/application.d.ts +25 -25
  34. package/lib/cjs/resources/application.js +35 -0
  35. package/lib/{resources → cjs/resources}/attachments.d.ts +160 -160
  36. package/lib/cjs/resources/attachments.js +47 -0
  37. package/lib/{resources → cjs/resources}/authorizations.d.ts +58 -58
  38. package/lib/cjs/resources/authorizations.js +41 -0
  39. package/lib/{resources → cjs/resources}/avalara_accounts.d.ts +53 -53
  40. package/lib/cjs/resources/avalara_accounts.js +47 -0
  41. package/lib/{resources → cjs/resources}/billing_info_validation_rules.d.ts +35 -35
  42. package/lib/cjs/resources/billing_info_validation_rules.js +47 -0
  43. package/lib/{resources → cjs/resources}/bing_geocoders.d.ts +37 -37
  44. package/lib/cjs/resources/bing_geocoders.js +47 -0
  45. package/lib/{resources → cjs/resources}/braintree_gateways.d.ts +58 -58
  46. package/lib/cjs/resources/braintree_gateways.js +47 -0
  47. package/lib/{resources → cjs/resources}/braintree_payments.d.ts +49 -49
  48. package/lib/cjs/resources/braintree_payments.js +47 -0
  49. package/lib/{resources → cjs/resources}/bundles.d.ts +69 -69
  50. package/lib/cjs/resources/bundles.js +47 -0
  51. package/lib/{resources → cjs/resources}/captures.d.ts +49 -49
  52. package/lib/cjs/resources/captures.js +41 -0
  53. package/lib/{resources → cjs/resources}/carrier_accounts.d.ts +28 -28
  54. package/lib/cjs/resources/carrier_accounts.js +38 -0
  55. package/lib/{resources → cjs/resources}/checkout_com_gateways.d.ts +47 -47
  56. package/lib/cjs/resources/checkout_com_gateways.js +47 -0
  57. package/lib/{resources → cjs/resources}/checkout_com_payments.d.ts +53 -53
  58. package/lib/cjs/resources/checkout_com_payments.js +47 -0
  59. package/lib/{resources → cjs/resources}/coupon_codes_promotion_rules.d.ts +62 -62
  60. package/lib/cjs/resources/coupon_codes_promotion_rules.js +47 -0
  61. package/lib/{resources → cjs/resources}/coupon_recipients.d.ts +46 -46
  62. package/lib/cjs/resources/coupon_recipients.js +47 -0
  63. package/lib/{resources → cjs/resources}/coupons.d.ts +45 -45
  64. package/lib/cjs/resources/coupons.js +47 -0
  65. package/lib/{resources → cjs/resources}/customer_addresses.d.ts +43 -43
  66. package/lib/cjs/resources/customer_addresses.js +47 -0
  67. package/lib/{resources → cjs/resources}/customer_groups.d.ts +37 -37
  68. package/lib/cjs/resources/customer_groups.js +47 -0
  69. package/lib/{resources → cjs/resources}/customer_password_resets.d.ts +36 -36
  70. package/lib/cjs/resources/customer_password_resets.js +47 -0
  71. package/lib/{resources → cjs/resources}/customer_payment_sources.d.ts +69 -69
  72. package/lib/cjs/resources/customer_payment_sources.js +47 -0
  73. package/lib/{resources → cjs/resources}/customer_subscriptions.d.ts +31 -31
  74. package/lib/cjs/resources/customer_subscriptions.js +47 -0
  75. package/lib/{resources → cjs/resources}/customers.d.ts +56 -56
  76. package/lib/cjs/resources/customers.js +47 -0
  77. package/lib/{resources → cjs/resources}/delivery_lead_times.d.ts +52 -52
  78. package/lib/cjs/resources/delivery_lead_times.js +47 -0
  79. package/lib/{resources → cjs/resources}/event_callbacks.d.ts +27 -27
  80. package/lib/cjs/resources/event_callbacks.js +38 -0
  81. package/lib/{resources → cjs/resources}/external_gateways.d.ts +48 -48
  82. package/lib/cjs/resources/external_gateways.js +47 -0
  83. package/lib/{resources → cjs/resources}/external_payments.d.ts +42 -42
  84. package/lib/cjs/resources/external_payments.js +47 -0
  85. package/lib/{resources → cjs/resources}/external_promotions.d.ts +82 -82
  86. package/lib/cjs/resources/external_promotions.js +47 -0
  87. package/lib/{resources → cjs/resources}/external_tax_calculators.d.ts +45 -45
  88. package/lib/cjs/resources/external_tax_calculators.js +47 -0
  89. package/lib/{resources → cjs/resources}/fixed_amount_promotions.d.ts +84 -84
  90. package/lib/cjs/resources/fixed_amount_promotions.js +47 -0
  91. package/lib/{resources → cjs/resources}/fixed_price_promotions.d.ts +93 -93
  92. package/lib/cjs/resources/fixed_price_promotions.js +47 -0
  93. package/lib/{resources → cjs/resources}/free_gift_promotions.d.ts +91 -91
  94. package/lib/cjs/resources/free_gift_promotions.js +47 -0
  95. package/lib/{resources → cjs/resources}/free_shipping_promotions.d.ts +79 -79
  96. package/lib/cjs/resources/free_shipping_promotions.js +47 -0
  97. package/lib/{resources → cjs/resources}/geocoders.d.ts +25 -25
  98. package/lib/cjs/resources/geocoders.js +35 -0
  99. package/lib/{resources → cjs/resources}/gift_card_recipients.d.ts +46 -46
  100. package/lib/cjs/resources/gift_card_recipients.js +47 -0
  101. package/lib/{resources → cjs/resources}/gift_cards.d.ts +84 -84
  102. package/lib/cjs/resources/gift_cards.js +47 -0
  103. package/lib/{resources → cjs/resources}/google_geocoders.d.ts +37 -37
  104. package/lib/cjs/resources/google_geocoders.js +47 -0
  105. package/lib/{resources → cjs/resources}/imports.d.ts +44 -44
  106. package/lib/cjs/resources/imports.js +44 -0
  107. package/lib/{resources → cjs/resources}/in_stock_subscriptions.d.ts +60 -60
  108. package/lib/cjs/resources/in_stock_subscriptions.js +47 -0
  109. package/lib/{resources → cjs/resources}/inventory_models.d.ts +43 -43
  110. package/lib/cjs/resources/inventory_models.js +47 -0
  111. package/lib/{resources → cjs/resources}/inventory_return_locations.d.ts +45 -45
  112. package/lib/cjs/resources/inventory_return_locations.js +47 -0
  113. package/lib/{resources → cjs/resources}/inventory_stock_locations.d.ts +48 -48
  114. package/lib/cjs/resources/inventory_stock_locations.js +47 -0
  115. package/lib/{resources → cjs/resources}/line_item_options.d.ts +59 -59
  116. package/lib/cjs/resources/line_item_options.js +47 -0
  117. package/lib/{resources → cjs/resources}/line_items.d.ts +125 -125
  118. package/lib/cjs/resources/line_items.js +47 -0
  119. package/lib/{resources → cjs/resources}/manual_gateways.d.ts +36 -36
  120. package/lib/cjs/resources/manual_gateways.js +47 -0
  121. package/lib/{resources → cjs/resources}/manual_tax_calculators.d.ts +49 -49
  122. package/lib/cjs/resources/manual_tax_calculators.js +47 -0
  123. package/lib/{resources → cjs/resources}/markets.d.ts +79 -79
  124. package/lib/cjs/resources/markets.js +47 -0
  125. package/lib/{resources → cjs/resources}/merchants.d.ts +40 -40
  126. package/lib/cjs/resources/merchants.js +47 -0
  127. package/lib/{resources → cjs/resources}/order_amount_promotion_rules.d.ts +60 -60
  128. package/lib/cjs/resources/order_amount_promotion_rules.js +47 -0
  129. package/lib/{resources → cjs/resources}/order_copies.d.ts +46 -46
  130. package/lib/cjs/resources/order_copies.js +44 -0
  131. package/lib/{resources → cjs/resources}/order_subscriptions.d.ts +66 -66
  132. package/lib/cjs/resources/order_subscriptions.js +47 -0
  133. package/lib/{resources → cjs/resources}/order_validation_rules.d.ts +22 -22
  134. package/lib/cjs/resources/order_validation_rules.js +35 -0
  135. package/lib/{resources → cjs/resources}/orders.d.ts +255 -255
  136. package/lib/cjs/resources/orders.js +47 -0
  137. package/lib/{resources → cjs/resources}/organization.d.ts +34 -34
  138. package/lib/cjs/resources/organization.js +35 -0
  139. package/lib/{resources → cjs/resources}/packages.d.ts +57 -57
  140. package/lib/cjs/resources/packages.js +47 -0
  141. package/lib/{resources → cjs/resources}/parcel_line_items.d.ts +51 -51
  142. package/lib/cjs/resources/parcel_line_items.js +47 -0
  143. package/lib/{resources → cjs/resources}/parcels.d.ts +108 -108
  144. package/lib/cjs/resources/parcels.js +47 -0
  145. package/lib/{resources → cjs/resources}/payment_gateways.d.ts +33 -33
  146. package/lib/cjs/resources/payment_gateways.js +47 -0
  147. package/lib/{resources → cjs/resources}/payment_methods.d.ts +54 -54
  148. package/lib/cjs/resources/payment_methods.js +47 -0
  149. package/lib/{resources → cjs/resources}/paypal_gateways.d.ts +41 -41
  150. package/lib/cjs/resources/paypal_gateways.js +47 -0
  151. package/lib/{resources → cjs/resources}/paypal_payments.d.ts +49 -49
  152. package/lib/cjs/resources/paypal_payments.js +47 -0
  153. package/lib/{resources → cjs/resources}/percentage_discount_promotions.d.ts +91 -91
  154. package/lib/cjs/resources/percentage_discount_promotions.js +47 -0
  155. package/lib/{resources → cjs/resources}/price_lists.d.ts +41 -41
  156. package/lib/cjs/resources/price_lists.js +47 -0
  157. package/lib/{resources → cjs/resources}/prices.d.ts +58 -58
  158. package/lib/cjs/resources/prices.js +47 -0
  159. package/lib/{resources → cjs/resources}/promotion_rules.d.ts +27 -27
  160. package/lib/cjs/resources/promotion_rules.js +35 -0
  161. package/lib/{resources → cjs/resources}/promotions.d.ts +38 -38
  162. package/lib/cjs/resources/promotions.js +35 -0
  163. package/lib/{resources → cjs/resources}/refunds.d.ts +36 -36
  164. package/lib/cjs/resources/refunds.js +38 -0
  165. package/lib/{resources → cjs/resources}/return_line_items.d.ts +51 -51
  166. package/lib/cjs/resources/return_line_items.js +47 -0
  167. package/lib/{resources → cjs/resources}/returns.d.ts +69 -69
  168. package/lib/cjs/resources/returns.js +47 -0
  169. package/lib/{resources → cjs/resources}/shipments.d.ts +80 -80
  170. package/lib/cjs/resources/shipments.js +41 -0
  171. package/lib/{resources → cjs/resources}/shipping_categories.d.ts +35 -35
  172. package/lib/cjs/resources/shipping_categories.js +47 -0
  173. package/lib/{resources → cjs/resources}/shipping_methods.d.ts +71 -71
  174. package/lib/cjs/resources/shipping_methods.js +47 -0
  175. package/lib/{resources → cjs/resources}/shipping_zones.d.ts +51 -51
  176. package/lib/cjs/resources/shipping_zones.js +47 -0
  177. package/lib/{resources → cjs/resources}/sku_list_items.d.ts +46 -46
  178. package/lib/cjs/resources/sku_list_items.js +47 -0
  179. package/lib/{resources → cjs/resources}/sku_list_promotion_rules.d.ts +70 -70
  180. package/lib/cjs/resources/sku_list_promotion_rules.js +47 -0
  181. package/lib/{resources → cjs/resources}/sku_lists.d.ts +50 -50
  182. package/lib/cjs/resources/sku_lists.js +47 -0
  183. package/lib/{resources → cjs/resources}/sku_options.d.ts +55 -55
  184. package/lib/cjs/resources/sku_options.js +47 -0
  185. package/lib/{resources → cjs/resources}/skus.d.ts +76 -76
  186. package/lib/cjs/resources/skus.js +47 -0
  187. package/lib/{resources → cjs/resources}/stock_items.d.ts +50 -50
  188. package/lib/cjs/resources/stock_items.js +47 -0
  189. package/lib/{resources → cjs/resources}/stock_line_items.d.ts +30 -30
  190. package/lib/cjs/resources/stock_line_items.js +38 -0
  191. package/lib/{resources → cjs/resources}/stock_locations.d.ts +55 -55
  192. package/lib/cjs/resources/stock_locations.js +47 -0
  193. package/lib/{resources → cjs/resources}/stock_transfers.d.ts +70 -70
  194. package/lib/cjs/resources/stock_transfers.js +47 -0
  195. package/lib/{resources → cjs/resources}/stripe_gateways.d.ts +40 -40
  196. package/lib/cjs/resources/stripe_gateways.js +47 -0
  197. package/lib/{resources → cjs/resources}/stripe_payments.d.ts +44 -44
  198. package/lib/cjs/resources/stripe_payments.js +47 -0
  199. package/lib/{resources → cjs/resources}/tax_calculators.d.ts +27 -27
  200. package/lib/cjs/resources/tax_calculators.js +35 -0
  201. package/lib/{resources → cjs/resources}/tax_categories.d.ts +61 -61
  202. package/lib/cjs/resources/tax_categories.js +47 -0
  203. package/lib/{resources → cjs/resources}/tax_rules.d.ts +72 -72
  204. package/lib/cjs/resources/tax_rules.js +47 -0
  205. package/lib/{resources → cjs/resources}/taxjar_accounts.d.ts +44 -44
  206. package/lib/cjs/resources/taxjar_accounts.js +47 -0
  207. package/lib/{resources → cjs/resources}/transactions.d.ts +33 -33
  208. package/lib/cjs/resources/transactions.js +35 -0
  209. package/lib/{resources → cjs/resources}/voids.d.ts +36 -36
  210. package/lib/cjs/resources/voids.js +38 -0
  211. package/lib/{resources → cjs/resources}/webhooks.d.ts +45 -45
  212. package/lib/cjs/resources/webhooks.js +47 -0
  213. package/lib/{resources → cjs/resources}/wire_transfers.d.ts +35 -35
  214. package/lib/cjs/resources/wire_transfers.js +47 -0
  215. package/lib/{static.d.ts → cjs/static.d.ts} +6 -6
  216. package/lib/cjs/static.js +36 -0
  217. package/lib/{util.d.ts → cjs/util.d.ts} +3 -3
  218. package/lib/cjs/util.js +7 -0
  219. package/lib/esm/api.d.ts +101 -0
  220. package/lib/esm/api.js +304 -0
  221. package/lib/esm/client.d.ts +30 -0
  222. package/lib/esm/client.js +96 -0
  223. package/lib/esm/commercelayer.d.ts +118 -0
  224. package/lib/esm/commercelayer.js +177 -0
  225. package/lib/esm/common.d.ts +4 -0
  226. package/lib/esm/common.js +9 -0
  227. package/lib/esm/config.d.ts +7 -0
  228. package/lib/esm/config.js +7 -0
  229. package/lib/esm/error.d.ts +26 -0
  230. package/lib/esm/error.js +35 -0
  231. package/lib/esm/index.d.ts +6 -0
  232. package/lib/esm/index.js +6 -0
  233. package/lib/esm/interceptor.d.ts +19 -0
  234. package/lib/esm/interceptor.js +1 -0
  235. package/lib/esm/jsonapi.d.ts +7 -0
  236. package/lib/esm/jsonapi.js +59 -0
  237. package/lib/esm/model.d.ts +99 -0
  238. package/lib/esm/model.js +2 -0
  239. package/lib/esm/query.d.ts +57 -0
  240. package/lib/esm/query.js +168 -0
  241. package/lib/esm/resource.d.ts +69 -0
  242. package/lib/esm/resource.js +108 -0
  243. package/lib/esm/resources/addresses.d.ts +91 -0
  244. package/lib/esm/resources/addresses.js +45 -0
  245. package/lib/esm/resources/adjustments.d.ts +39 -0
  246. package/lib/esm/resources/adjustments.js +45 -0
  247. package/lib/esm/resources/adyen_gateways.d.ts +49 -0
  248. package/lib/esm/resources/adyen_gateways.js +45 -0
  249. package/lib/esm/resources/adyen_payments.d.ts +47 -0
  250. package/lib/esm/resources/adyen_payments.js +45 -0
  251. package/lib/esm/resources/application.d.ts +25 -0
  252. package/lib/esm/resources/application.js +33 -0
  253. package/lib/esm/resources/attachments.d.ts +160 -0
  254. package/lib/esm/resources/attachments.js +45 -0
  255. package/lib/esm/resources/authorizations.d.ts +58 -0
  256. package/lib/esm/resources/authorizations.js +39 -0
  257. package/lib/esm/resources/avalara_accounts.d.ts +53 -0
  258. package/lib/esm/resources/avalara_accounts.js +45 -0
  259. package/lib/esm/resources/billing_info_validation_rules.d.ts +35 -0
  260. package/lib/esm/resources/billing_info_validation_rules.js +45 -0
  261. package/lib/esm/resources/bing_geocoders.d.ts +37 -0
  262. package/lib/esm/resources/bing_geocoders.js +45 -0
  263. package/lib/esm/resources/braintree_gateways.d.ts +58 -0
  264. package/lib/esm/resources/braintree_gateways.js +45 -0
  265. package/lib/esm/resources/braintree_payments.d.ts +49 -0
  266. package/lib/esm/resources/braintree_payments.js +45 -0
  267. package/lib/esm/resources/bundles.d.ts +69 -0
  268. package/lib/esm/resources/bundles.js +45 -0
  269. package/lib/esm/resources/captures.d.ts +49 -0
  270. package/lib/esm/resources/captures.js +39 -0
  271. package/lib/esm/resources/carrier_accounts.d.ts +28 -0
  272. package/lib/esm/resources/carrier_accounts.js +36 -0
  273. package/lib/esm/resources/checkout_com_gateways.d.ts +47 -0
  274. package/lib/esm/resources/checkout_com_gateways.js +45 -0
  275. package/lib/esm/resources/checkout_com_payments.d.ts +53 -0
  276. package/lib/esm/resources/checkout_com_payments.js +45 -0
  277. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +62 -0
  278. package/lib/esm/resources/coupon_codes_promotion_rules.js +45 -0
  279. package/lib/esm/resources/coupon_recipients.d.ts +46 -0
  280. package/lib/esm/resources/coupon_recipients.js +45 -0
  281. package/lib/esm/resources/coupons.d.ts +45 -0
  282. package/lib/esm/resources/coupons.js +45 -0
  283. package/lib/esm/resources/customer_addresses.d.ts +43 -0
  284. package/lib/esm/resources/customer_addresses.js +45 -0
  285. package/lib/esm/resources/customer_groups.d.ts +37 -0
  286. package/lib/esm/resources/customer_groups.js +45 -0
  287. package/lib/esm/resources/customer_password_resets.d.ts +36 -0
  288. package/lib/esm/resources/customer_password_resets.js +45 -0
  289. package/lib/esm/resources/customer_payment_sources.d.ts +69 -0
  290. package/lib/esm/resources/customer_payment_sources.js +45 -0
  291. package/lib/esm/resources/customer_subscriptions.d.ts +31 -0
  292. package/lib/esm/resources/customer_subscriptions.js +45 -0
  293. package/lib/esm/resources/customers.d.ts +56 -0
  294. package/lib/esm/resources/customers.js +45 -0
  295. package/lib/esm/resources/delivery_lead_times.d.ts +52 -0
  296. package/lib/esm/resources/delivery_lead_times.js +45 -0
  297. package/lib/esm/resources/event_callbacks.d.ts +27 -0
  298. package/lib/esm/resources/event_callbacks.js +36 -0
  299. package/lib/esm/resources/external_gateways.d.ts +48 -0
  300. package/lib/esm/resources/external_gateways.js +45 -0
  301. package/lib/esm/resources/external_payments.d.ts +42 -0
  302. package/lib/esm/resources/external_payments.js +45 -0
  303. package/lib/esm/resources/external_promotions.d.ts +82 -0
  304. package/lib/esm/resources/external_promotions.js +45 -0
  305. package/lib/esm/resources/external_tax_calculators.d.ts +45 -0
  306. package/lib/esm/resources/external_tax_calculators.js +45 -0
  307. package/lib/esm/resources/fixed_amount_promotions.d.ts +84 -0
  308. package/lib/esm/resources/fixed_amount_promotions.js +45 -0
  309. package/lib/esm/resources/fixed_price_promotions.d.ts +93 -0
  310. package/lib/esm/resources/fixed_price_promotions.js +45 -0
  311. package/lib/esm/resources/free_gift_promotions.d.ts +91 -0
  312. package/lib/esm/resources/free_gift_promotions.js +45 -0
  313. package/lib/esm/resources/free_shipping_promotions.d.ts +79 -0
  314. package/lib/esm/resources/free_shipping_promotions.js +45 -0
  315. package/lib/esm/resources/geocoders.d.ts +25 -0
  316. package/lib/esm/resources/geocoders.js +33 -0
  317. package/lib/esm/resources/gift_card_recipients.d.ts +46 -0
  318. package/lib/esm/resources/gift_card_recipients.js +45 -0
  319. package/lib/esm/resources/gift_cards.d.ts +84 -0
  320. package/lib/esm/resources/gift_cards.js +45 -0
  321. package/lib/esm/resources/google_geocoders.d.ts +37 -0
  322. package/lib/esm/resources/google_geocoders.js +45 -0
  323. package/lib/esm/resources/imports.d.ts +44 -0
  324. package/lib/esm/resources/imports.js +42 -0
  325. package/lib/esm/resources/in_stock_subscriptions.d.ts +60 -0
  326. package/lib/esm/resources/in_stock_subscriptions.js +45 -0
  327. package/lib/esm/resources/inventory_models.d.ts +43 -0
  328. package/lib/esm/resources/inventory_models.js +45 -0
  329. package/lib/esm/resources/inventory_return_locations.d.ts +45 -0
  330. package/lib/esm/resources/inventory_return_locations.js +45 -0
  331. package/lib/esm/resources/inventory_stock_locations.d.ts +48 -0
  332. package/lib/esm/resources/inventory_stock_locations.js +45 -0
  333. package/lib/esm/resources/line_item_options.d.ts +59 -0
  334. package/lib/esm/resources/line_item_options.js +45 -0
  335. package/lib/esm/resources/line_items.d.ts +125 -0
  336. package/lib/esm/resources/line_items.js +45 -0
  337. package/lib/esm/resources/manual_gateways.d.ts +36 -0
  338. package/lib/esm/resources/manual_gateways.js +45 -0
  339. package/lib/esm/resources/manual_tax_calculators.d.ts +49 -0
  340. package/lib/esm/resources/manual_tax_calculators.js +45 -0
  341. package/lib/esm/resources/markets.d.ts +79 -0
  342. package/lib/esm/resources/markets.js +45 -0
  343. package/lib/esm/resources/merchants.d.ts +40 -0
  344. package/lib/esm/resources/merchants.js +45 -0
  345. package/lib/esm/resources/order_amount_promotion_rules.d.ts +60 -0
  346. package/lib/esm/resources/order_amount_promotion_rules.js +45 -0
  347. package/lib/esm/resources/order_copies.d.ts +46 -0
  348. package/lib/esm/resources/order_copies.js +42 -0
  349. package/lib/esm/resources/order_subscriptions.d.ts +66 -0
  350. package/lib/esm/resources/order_subscriptions.js +45 -0
  351. package/lib/esm/resources/order_validation_rules.d.ts +22 -0
  352. package/lib/esm/resources/order_validation_rules.js +33 -0
  353. package/lib/esm/resources/orders.d.ts +255 -0
  354. package/lib/esm/resources/orders.js +45 -0
  355. package/lib/esm/resources/organization.d.ts +34 -0
  356. package/lib/esm/resources/organization.js +33 -0
  357. package/lib/esm/resources/packages.d.ts +57 -0
  358. package/lib/esm/resources/packages.js +45 -0
  359. package/lib/esm/resources/parcel_line_items.d.ts +51 -0
  360. package/lib/esm/resources/parcel_line_items.js +45 -0
  361. package/lib/esm/resources/parcels.d.ts +108 -0
  362. package/lib/esm/resources/parcels.js +45 -0
  363. package/lib/esm/resources/payment_gateways.d.ts +33 -0
  364. package/lib/esm/resources/payment_gateways.js +45 -0
  365. package/lib/esm/resources/payment_methods.d.ts +54 -0
  366. package/lib/esm/resources/payment_methods.js +45 -0
  367. package/lib/esm/resources/paypal_gateways.d.ts +41 -0
  368. package/lib/esm/resources/paypal_gateways.js +45 -0
  369. package/lib/esm/resources/paypal_payments.d.ts +49 -0
  370. package/lib/esm/resources/paypal_payments.js +45 -0
  371. package/lib/esm/resources/percentage_discount_promotions.d.ts +91 -0
  372. package/lib/esm/resources/percentage_discount_promotions.js +45 -0
  373. package/lib/esm/resources/price_lists.d.ts +41 -0
  374. package/lib/esm/resources/price_lists.js +45 -0
  375. package/lib/esm/resources/prices.d.ts +58 -0
  376. package/lib/esm/resources/prices.js +45 -0
  377. package/lib/esm/resources/promotion_rules.d.ts +27 -0
  378. package/lib/esm/resources/promotion_rules.js +33 -0
  379. package/lib/esm/resources/promotions.d.ts +38 -0
  380. package/lib/esm/resources/promotions.js +33 -0
  381. package/lib/esm/resources/refunds.d.ts +36 -0
  382. package/lib/esm/resources/refunds.js +36 -0
  383. package/lib/esm/resources/return_line_items.d.ts +51 -0
  384. package/lib/esm/resources/return_line_items.js +45 -0
  385. package/lib/esm/resources/returns.d.ts +69 -0
  386. package/lib/esm/resources/returns.js +45 -0
  387. package/lib/esm/resources/shipments.d.ts +80 -0
  388. package/lib/esm/resources/shipments.js +39 -0
  389. package/lib/esm/resources/shipping_categories.d.ts +35 -0
  390. package/lib/esm/resources/shipping_categories.js +45 -0
  391. package/lib/esm/resources/shipping_methods.d.ts +71 -0
  392. package/lib/esm/resources/shipping_methods.js +45 -0
  393. package/lib/esm/resources/shipping_zones.d.ts +51 -0
  394. package/lib/esm/resources/shipping_zones.js +45 -0
  395. package/lib/esm/resources/sku_list_items.d.ts +46 -0
  396. package/lib/esm/resources/sku_list_items.js +45 -0
  397. package/lib/esm/resources/sku_list_promotion_rules.d.ts +70 -0
  398. package/lib/esm/resources/sku_list_promotion_rules.js +45 -0
  399. package/lib/esm/resources/sku_lists.d.ts +50 -0
  400. package/lib/esm/resources/sku_lists.js +45 -0
  401. package/lib/esm/resources/sku_options.d.ts +55 -0
  402. package/lib/esm/resources/sku_options.js +45 -0
  403. package/lib/esm/resources/skus.d.ts +76 -0
  404. package/lib/esm/resources/skus.js +45 -0
  405. package/lib/esm/resources/stock_items.d.ts +50 -0
  406. package/lib/esm/resources/stock_items.js +45 -0
  407. package/lib/esm/resources/stock_line_items.d.ts +30 -0
  408. package/lib/esm/resources/stock_line_items.js +36 -0
  409. package/lib/esm/resources/stock_locations.d.ts +55 -0
  410. package/lib/esm/resources/stock_locations.js +45 -0
  411. package/lib/esm/resources/stock_transfers.d.ts +70 -0
  412. package/lib/esm/resources/stock_transfers.js +45 -0
  413. package/lib/esm/resources/stripe_gateways.d.ts +40 -0
  414. package/lib/esm/resources/stripe_gateways.js +45 -0
  415. package/lib/esm/resources/stripe_payments.d.ts +44 -0
  416. package/lib/esm/resources/stripe_payments.js +45 -0
  417. package/lib/esm/resources/tax_calculators.d.ts +27 -0
  418. package/lib/esm/resources/tax_calculators.js +33 -0
  419. package/lib/esm/resources/tax_categories.d.ts +61 -0
  420. package/lib/esm/resources/tax_categories.js +45 -0
  421. package/lib/esm/resources/tax_rules.d.ts +72 -0
  422. package/lib/esm/resources/tax_rules.js +45 -0
  423. package/lib/esm/resources/taxjar_accounts.d.ts +44 -0
  424. package/lib/esm/resources/taxjar_accounts.js +45 -0
  425. package/lib/esm/resources/transactions.d.ts +33 -0
  426. package/lib/esm/resources/transactions.js +33 -0
  427. package/lib/esm/resources/voids.d.ts +36 -0
  428. package/lib/esm/resources/voids.js +36 -0
  429. package/lib/esm/resources/webhooks.d.ts +45 -0
  430. package/lib/esm/resources/webhooks.js +45 -0
  431. package/lib/esm/resources/wire_transfers.d.ts +35 -0
  432. package/lib/esm/resources/wire_transfers.js +45 -0
  433. package/lib/esm/static.d.ts +6 -0
  434. package/lib/esm/static.js +14 -0
  435. package/lib/esm/util.d.ts +3 -0
  436. package/lib/esm/util.js +4 -0
  437. package/lib/tsconfig.esm.tsbuildinfo +1 -0
  438. package/lib/tsconfig.tsbuildinfo +1 -0
  439. package/package.json +70 -57
  440. package/lib/index.js +0 -8
  441. package/lib/sdk.cjs.development.js +0 -17158
  442. package/lib/sdk.cjs.development.js.map +0 -1
  443. package/lib/sdk.cjs.production.min.js +0 -2
  444. package/lib/sdk.cjs.production.min.js.map +0 -1
  445. package/lib/sdk.esm.js +0 -17152
  446. package/lib/sdk.esm.js.map +0 -1
@@ -0,0 +1,79 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
+ import { Merchant } from './merchants';
8
+ import { PriceList } from './price_lists';
9
+ import { InventoryModel } from './inventory_models';
10
+ import { TaxCalculator } from './tax_calculators';
11
+ import { CustomerGroup } from './customer_groups';
12
+ import { Attachment } from './attachments';
13
+ declare type MarketRel = ResourceId & {
14
+ type: typeof Markets.TYPE;
15
+ };
16
+ declare type MerchantRel = ResourceId & {
17
+ type: 'merchants';
18
+ };
19
+ declare type PriceListRel = ResourceId & {
20
+ type: 'price_lists';
21
+ };
22
+ declare type InventoryModelRel = ResourceId & {
23
+ type: 'inventory_models';
24
+ };
25
+ declare type TaxCalculatorRel = ResourceId & {
26
+ type: 'tax_calculators';
27
+ };
28
+ declare type CustomerGroupRel = ResourceId & {
29
+ type: 'customer_groups';
30
+ };
31
+ interface Market extends Resource {
32
+ number?: number;
33
+ name?: string;
34
+ facebook_pixel_id?: string;
35
+ checkout_url?: string;
36
+ external_prices_url?: string;
37
+ private?: boolean;
38
+ merchant?: Merchant;
39
+ price_list?: PriceList;
40
+ inventory_model?: InventoryModel;
41
+ tax_calculator?: TaxCalculator;
42
+ customer_group?: CustomerGroup;
43
+ attachments?: Attachment[];
44
+ }
45
+ interface MarketCreate extends ResourceCreate {
46
+ name: string;
47
+ facebook_pixel_id?: string;
48
+ checkout_url?: string;
49
+ external_prices_url?: string;
50
+ merchant?: MerchantRel;
51
+ price_list?: PriceListRel;
52
+ inventory_model?: InventoryModelRel;
53
+ tax_calculator?: TaxCalculatorRel;
54
+ customer_group?: CustomerGroupRel;
55
+ }
56
+ interface MarketUpdate extends ResourceUpdate {
57
+ name?: string;
58
+ facebook_pixel_id?: string;
59
+ checkout_url?: string;
60
+ external_prices_url?: string;
61
+ merchant?: MerchantRel;
62
+ price_list?: PriceListRel;
63
+ inventory_model?: InventoryModelRel;
64
+ tax_calculator?: TaxCalculatorRel;
65
+ customer_group?: CustomerGroupRel;
66
+ }
67
+ declare class Markets extends ApiResource {
68
+ static readonly TYPE: 'markets';
69
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
70
+ create(resource: MarketCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
71
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
72
+ update(resource: MarketUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
73
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
74
+ isMarket(resource: any): resource is Market;
75
+ relationship(id: string | ResourceId): MarketRel;
76
+ type(): string;
77
+ }
78
+ export default Markets;
79
+ export { Market, MarketCreate, MarketUpdate };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource } from '../resource';
6
+ class Markets extends ApiResource {
7
+ // static readonly PATH = 'markets'
8
+ async list(params, options) {
9
+ return this.resources.list({ type: Markets.TYPE }, params, options);
10
+ }
11
+ async create(resource, params, options) {
12
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: Markets.TYPE }), params, options);
13
+ }
14
+ async retrieve(id, params, options) {
15
+ return this.resources.retrieve({ type: Markets.TYPE, id }, params, options);
16
+ }
17
+ async update(resource, params, options) {
18
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: Markets.TYPE }), params, options);
19
+ }
20
+ async delete(id, options) {
21
+ await this.resources.delete({ type: Markets.TYPE, id }, options);
22
+ }
23
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
+ isMarket(resource) {
25
+ return resource.type && (resource.type === Markets.TYPE);
26
+ }
27
+ /*
28
+ filter(): QueryBuilderRetrieve {
29
+ return new QueryBuilderRetrieve(Markets.TYPE)
30
+ }
31
+ */
32
+ /*
33
+ filterList(): QueryBuilderList {
34
+ return new QueryBuilderList(Markets.TYPE)
35
+ }
36
+ */
37
+ relationship(id) {
38
+ return (typeof id === 'string') ? { id, type: Markets.TYPE } : { id: id.id, type: Markets.TYPE };
39
+ }
40
+ type() {
41
+ return Markets.TYPE;
42
+ }
43
+ }
44
+ Markets.TYPE = 'markets';
45
+ export default Markets;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
+ import { Address } from './addresses';
8
+ import { Attachment } from './attachments';
9
+ declare type MerchantRel = ResourceId & {
10
+ type: typeof Merchants.TYPE;
11
+ };
12
+ declare type AddressRel = ResourceId & {
13
+ type: 'addresses';
14
+ };
15
+ interface Merchant extends Resource {
16
+ name?: string;
17
+ address?: Address;
18
+ attachments?: Attachment[];
19
+ }
20
+ interface MerchantCreate extends ResourceCreate {
21
+ name: string;
22
+ address?: AddressRel;
23
+ }
24
+ interface MerchantUpdate extends ResourceUpdate {
25
+ name?: string;
26
+ address?: AddressRel;
27
+ }
28
+ declare class Merchants extends ApiResource {
29
+ static readonly TYPE: 'merchants';
30
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Merchant>>;
31
+ create(resource: MerchantCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
32
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
33
+ update(resource: MerchantUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
34
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
35
+ isMerchant(resource: any): resource is Merchant;
36
+ relationship(id: string | ResourceId): MerchantRel;
37
+ type(): string;
38
+ }
39
+ export default Merchants;
40
+ export { Merchant, MerchantCreate, MerchantUpdate };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource } from '../resource';
6
+ class Merchants extends ApiResource {
7
+ // static readonly PATH = 'merchants'
8
+ async list(params, options) {
9
+ return this.resources.list({ type: Merchants.TYPE }, params, options);
10
+ }
11
+ async create(resource, params, options) {
12
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: Merchants.TYPE }), params, options);
13
+ }
14
+ async retrieve(id, params, options) {
15
+ return this.resources.retrieve({ type: Merchants.TYPE, id }, params, options);
16
+ }
17
+ async update(resource, params, options) {
18
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: Merchants.TYPE }), params, options);
19
+ }
20
+ async delete(id, options) {
21
+ await this.resources.delete({ type: Merchants.TYPE, id }, options);
22
+ }
23
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
+ isMerchant(resource) {
25
+ return resource.type && (resource.type === Merchants.TYPE);
26
+ }
27
+ /*
28
+ filter(): QueryBuilderRetrieve {
29
+ return new QueryBuilderRetrieve(Merchants.TYPE)
30
+ }
31
+ */
32
+ /*
33
+ filterList(): QueryBuilderList {
34
+ return new QueryBuilderList(Merchants.TYPE)
35
+ }
36
+ */
37
+ relationship(id) {
38
+ return (typeof id === 'string') ? { id, type: Merchants.TYPE } : { id: id.id, type: Merchants.TYPE };
39
+ }
40
+ type() {
41
+ return Merchants.TYPE;
42
+ }
43
+ }
44
+ Merchants.TYPE = 'merchants';
45
+ export default Merchants;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
+ import { PercentageDiscountPromotion } from './percentage_discount_promotions';
8
+ import { FreeShippingPromotion } from './free_shipping_promotions';
9
+ import { FixedAmountPromotion } from './fixed_amount_promotions';
10
+ import { FreeGiftPromotion } from './free_gift_promotions';
11
+ import { FixedPricePromotion } from './fixed_price_promotions';
12
+ import { ExternalPromotion } from './external_promotions';
13
+ declare type OrderAmountPromotionRuleRel = ResourceId & {
14
+ type: typeof OrderAmountPromotionRules.TYPE;
15
+ };
16
+ declare type PercentageDiscountPromotionRel = ResourceId & {
17
+ type: 'percentage_discount_promotions';
18
+ };
19
+ declare type FreeShippingPromotionRel = ResourceId & {
20
+ type: 'free_shipping_promotions';
21
+ };
22
+ declare type FixedAmountPromotionRel = ResourceId & {
23
+ type: 'fixed_amount_promotions';
24
+ };
25
+ declare type FreeGiftPromotionRel = ResourceId & {
26
+ type: 'free_gift_promotions';
27
+ };
28
+ declare type FixedPricePromotionRel = ResourceId & {
29
+ type: 'fixed_price_promotions';
30
+ };
31
+ declare type ExternalPromotionRel = ResourceId & {
32
+ type: 'external_promotions';
33
+ };
34
+ interface OrderAmountPromotionRule extends Resource {
35
+ order_amount_cents?: number;
36
+ order_amount_float?: number;
37
+ formatted_order_amount?: string;
38
+ promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion;
39
+ }
40
+ interface OrderAmountPromotionRuleCreate extends ResourceCreate {
41
+ order_amount_cents?: number;
42
+ promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
43
+ }
44
+ interface OrderAmountPromotionRuleUpdate extends ResourceUpdate {
45
+ order_amount_cents?: number;
46
+ promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
47
+ }
48
+ declare class OrderAmountPromotionRules extends ApiResource {
49
+ static readonly TYPE: 'order_amount_promotion_rules';
50
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderAmountPromotionRule>>;
51
+ create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
52
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
53
+ update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
54
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
55
+ isOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule;
56
+ relationship(id: string | ResourceId): OrderAmountPromotionRuleRel;
57
+ type(): string;
58
+ }
59
+ export default OrderAmountPromotionRules;
60
+ export { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource } from '../resource';
6
+ class OrderAmountPromotionRules extends ApiResource {
7
+ // static readonly PATH = 'order_amount_promotion_rules'
8
+ async list(params, options) {
9
+ return this.resources.list({ type: OrderAmountPromotionRules.TYPE }, params, options);
10
+ }
11
+ async create(resource, params, options) {
12
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderAmountPromotionRules.TYPE }), params, options);
13
+ }
14
+ async retrieve(id, params, options) {
15
+ return this.resources.retrieve({ type: OrderAmountPromotionRules.TYPE, id }, params, options);
16
+ }
17
+ async update(resource, params, options) {
18
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: OrderAmountPromotionRules.TYPE }), params, options);
19
+ }
20
+ async delete(id, options) {
21
+ await this.resources.delete({ type: OrderAmountPromotionRules.TYPE, id }, options);
22
+ }
23
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
+ isOrderAmountPromotionRule(resource) {
25
+ return resource.type && (resource.type === OrderAmountPromotionRules.TYPE);
26
+ }
27
+ /*
28
+ filter(): QueryBuilderRetrieve {
29
+ return new QueryBuilderRetrieve(OrderAmountPromotionRules.TYPE)
30
+ }
31
+ */
32
+ /*
33
+ filterList(): QueryBuilderList {
34
+ return new QueryBuilderList(OrderAmountPromotionRules.TYPE)
35
+ }
36
+ */
37
+ relationship(id) {
38
+ return (typeof id === 'string') ? { id, type: OrderAmountPromotionRules.TYPE } : { id: id.id, type: OrderAmountPromotionRules.TYPE };
39
+ }
40
+ type() {
41
+ return OrderAmountPromotionRules.TYPE;
42
+ }
43
+ }
44
+ OrderAmountPromotionRules.TYPE = 'order_amount_promotion_rules';
45
+ export default OrderAmountPromotionRules;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource, Resource, ResourceCreate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
+ import { Order } from './orders';
8
+ import { OrderSubscription } from './order_subscriptions';
9
+ declare type OrderCopyRel = ResourceId & {
10
+ type: typeof OrderCopies.TYPE;
11
+ };
12
+ declare type OrderRel = ResourceId & {
13
+ type: 'orders';
14
+ };
15
+ interface OrderCopy extends Resource {
16
+ status?: string;
17
+ started_at?: string;
18
+ completed_at?: string;
19
+ failed_at?: string;
20
+ place_target_order?: boolean;
21
+ cancel_source_order?: boolean;
22
+ reuse_wallet?: boolean;
23
+ errors_log?: object;
24
+ errors_count?: number;
25
+ source_order?: Order;
26
+ target_order?: Order;
27
+ order_subscription?: OrderSubscription;
28
+ }
29
+ interface OrderCopyCreate extends ResourceCreate {
30
+ place_target_order?: boolean;
31
+ cancel_source_order?: boolean;
32
+ reuse_wallet?: boolean;
33
+ source_order?: OrderRel;
34
+ }
35
+ declare class OrderCopies extends ApiResource {
36
+ static readonly TYPE: 'order_copies';
37
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderCopy>>;
38
+ create(resource: OrderCopyCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderCopy>;
39
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderCopy>;
40
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
41
+ isOrderCopy(resource: any): resource is OrderCopy;
42
+ relationship(id: string | ResourceId): OrderCopyRel;
43
+ type(): string;
44
+ }
45
+ export default OrderCopies;
46
+ export { OrderCopy, OrderCopyCreate };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource } from '../resource';
6
+ class OrderCopies extends ApiResource {
7
+ // static readonly PATH = 'order_copies'
8
+ async list(params, options) {
9
+ return this.resources.list({ type: OrderCopies.TYPE }, params, options);
10
+ }
11
+ async create(resource, params, options) {
12
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderCopies.TYPE }), params, options);
13
+ }
14
+ async retrieve(id, params, options) {
15
+ return this.resources.retrieve({ type: OrderCopies.TYPE, id }, params, options);
16
+ }
17
+ async delete(id, options) {
18
+ await this.resources.delete({ type: OrderCopies.TYPE, id }, options);
19
+ }
20
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
21
+ isOrderCopy(resource) {
22
+ return resource.type && (resource.type === OrderCopies.TYPE);
23
+ }
24
+ /*
25
+ filter(): QueryBuilderRetrieve {
26
+ return new QueryBuilderRetrieve(OrderCopies.TYPE)
27
+ }
28
+ */
29
+ /*
30
+ filterList(): QueryBuilderList {
31
+ return new QueryBuilderList(OrderCopies.TYPE)
32
+ }
33
+ */
34
+ relationship(id) {
35
+ return (typeof id === 'string') ? { id, type: OrderCopies.TYPE } : { id: id.id, type: OrderCopies.TYPE };
36
+ }
37
+ type() {
38
+ return OrderCopies.TYPE;
39
+ }
40
+ }
41
+ OrderCopies.TYPE = 'order_copies';
42
+ export default OrderCopies;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
+ import { Market } from './markets';
8
+ import { Order } from './orders';
9
+ import { Customer } from './customers';
10
+ import { OrderCopy } from './order_copies';
11
+ declare type OrderSubscriptionRel = ResourceId & {
12
+ type: typeof OrderSubscriptions.TYPE;
13
+ };
14
+ declare type MarketRel = ResourceId & {
15
+ type: 'markets';
16
+ };
17
+ declare type OrderRel = ResourceId & {
18
+ type: 'orders';
19
+ };
20
+ interface OrderSubscription extends Resource {
21
+ number?: string;
22
+ status?: string;
23
+ frequency?: string;
24
+ activate_by_source_order?: boolean;
25
+ customer_email?: string;
26
+ starts_at?: string;
27
+ expires_at?: string;
28
+ next_run_at?: string;
29
+ occurrencies?: number;
30
+ errors_count?: number;
31
+ succeeded_on_last_run?: boolean;
32
+ options?: object;
33
+ market?: Market;
34
+ source_order?: Order;
35
+ customer?: Customer;
36
+ order_copies?: OrderCopy[];
37
+ orders?: Order[];
38
+ }
39
+ interface OrderSubscriptionCreate extends ResourceCreate {
40
+ frequency?: string;
41
+ activate_by_source_order?: boolean;
42
+ starts_at?: string;
43
+ expires_at?: string;
44
+ options?: object;
45
+ market?: MarketRel;
46
+ source_order?: OrderRel;
47
+ }
48
+ interface OrderSubscriptionUpdate extends ResourceUpdate {
49
+ expires_at?: string;
50
+ _activate?: boolean;
51
+ _deactivate?: boolean;
52
+ _cancel?: boolean;
53
+ }
54
+ declare class OrderSubscriptions extends ApiResource {
55
+ static readonly TYPE: 'order_subscriptions';
56
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>>;
57
+ create(resource: OrderSubscriptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
58
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
59
+ update(resource: OrderSubscriptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderSubscription>;
60
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
61
+ isOrderSubscription(resource: any): resource is OrderSubscription;
62
+ relationship(id: string | ResourceId): OrderSubscriptionRel;
63
+ type(): string;
64
+ }
65
+ export default OrderSubscriptions;
66
+ export { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource } from '../resource';
6
+ class OrderSubscriptions extends ApiResource {
7
+ // static readonly PATH = 'order_subscriptions'
8
+ async list(params, options) {
9
+ return this.resources.list({ type: OrderSubscriptions.TYPE }, params, options);
10
+ }
11
+ async create(resource, params, options) {
12
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: OrderSubscriptions.TYPE }), params, options);
13
+ }
14
+ async retrieve(id, params, options) {
15
+ return this.resources.retrieve({ type: OrderSubscriptions.TYPE, id }, params, options);
16
+ }
17
+ async update(resource, params, options) {
18
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: OrderSubscriptions.TYPE }), params, options);
19
+ }
20
+ async delete(id, options) {
21
+ await this.resources.delete({ type: OrderSubscriptions.TYPE, id }, options);
22
+ }
23
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
24
+ isOrderSubscription(resource) {
25
+ return resource.type && (resource.type === OrderSubscriptions.TYPE);
26
+ }
27
+ /*
28
+ filter(): QueryBuilderRetrieve {
29
+ return new QueryBuilderRetrieve(OrderSubscriptions.TYPE)
30
+ }
31
+ */
32
+ /*
33
+ filterList(): QueryBuilderList {
34
+ return new QueryBuilderList(OrderSubscriptions.TYPE)
35
+ }
36
+ */
37
+ relationship(id) {
38
+ return (typeof id === 'string') ? { id, type: OrderSubscriptions.TYPE } : { id: id.id, type: OrderSubscriptions.TYPE };
39
+ }
40
+ type() {
41
+ return OrderSubscriptions.TYPE;
42
+ }
43
+ }
44
+ OrderSubscriptions.TYPE = 'order_subscriptions';
45
+ export default OrderSubscriptions;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
7
+ import { Market } from './markets';
8
+ declare type OrderValidationRuleRel = ResourceId & {
9
+ type: typeof OrderValidationRules.TYPE;
10
+ };
11
+ interface OrderValidationRule extends Resource {
12
+ market?: Market;
13
+ }
14
+ declare class OrderValidationRules extends ApiResource {
15
+ static readonly TYPE: 'order_validation_rules';
16
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderValidationRule>>;
17
+ isOrderValidationRule(resource: any): resource is OrderValidationRule;
18
+ relationship(id: string | ResourceId): OrderValidationRuleRel;
19
+ type(): string;
20
+ }
21
+ export default OrderValidationRules;
22
+ export { OrderValidationRule };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * ©2021 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
+ **/
5
+ import { ApiResource } from '../resource';
6
+ class OrderValidationRules extends ApiResource {
7
+ // static readonly PATH = 'order_validation_rules'
8
+ async list(params, options) {
9
+ return this.resources.list({ type: OrderValidationRules.TYPE }, params, options);
10
+ }
11
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
12
+ isOrderValidationRule(resource) {
13
+ return resource.type && (resource.type === OrderValidationRules.TYPE);
14
+ }
15
+ /*
16
+ filter(): QueryBuilderRetrieve {
17
+ return new QueryBuilderRetrieve(OrderValidationRules.TYPE)
18
+ }
19
+ */
20
+ /*
21
+ filterList(): QueryBuilderList {
22
+ return new QueryBuilderList(OrderValidationRules.TYPE)
23
+ }
24
+ */
25
+ relationship(id) {
26
+ return (typeof id === 'string') ? { id, type: OrderValidationRules.TYPE } : { id: id.id, type: OrderValidationRules.TYPE };
27
+ }
28
+ type() {
29
+ return OrderValidationRules.TYPE;
30
+ }
31
+ }
32
+ OrderValidationRules.TYPE = 'order_validation_rules';
33
+ export default OrderValidationRules;