@commercelayer/sdk 2.3.8 → 2.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/lib/cjs/api.d.ts +1 -1
  2. package/lib/cjs/api.js +1 -1
  3. package/lib/cjs/client.js +1 -1
  4. package/lib/cjs/commercelayer.js +1 -1
  5. package/lib/cjs/common.js +1 -1
  6. package/lib/cjs/config.d.ts +7 -3
  7. package/lib/cjs/config.js +1 -1
  8. package/lib/cjs/error.js +1 -1
  9. package/lib/cjs/index.js +1 -1
  10. package/lib/cjs/interceptor.js +1 -1
  11. package/lib/cjs/jsonapi.js +1 -1
  12. package/lib/cjs/model.d.ts +1 -1
  13. package/lib/cjs/model.js +1 -1
  14. package/lib/cjs/query.d.ts +0 -35
  15. package/lib/cjs/query.js +1 -1
  16. package/lib/cjs/resource.js +1 -1
  17. package/lib/cjs/resources/addresses.d.ts +1 -1
  18. package/lib/cjs/resources/addresses.js +1 -1
  19. package/lib/cjs/resources/adjustments.d.ts +1 -1
  20. package/lib/cjs/resources/adjustments.js +1 -1
  21. package/lib/cjs/resources/adyen_gateways.d.ts +1 -1
  22. package/lib/cjs/resources/adyen_gateways.js +1 -1
  23. package/lib/cjs/resources/adyen_payments.d.ts +1 -1
  24. package/lib/cjs/resources/adyen_payments.js +1 -1
  25. package/lib/cjs/resources/application.d.ts +1 -1
  26. package/lib/cjs/resources/application.js +1 -1
  27. package/lib/cjs/resources/attachments.d.ts +1 -1
  28. package/lib/cjs/resources/attachments.js +1 -1
  29. package/lib/cjs/resources/authorizations.d.ts +1 -1
  30. package/lib/cjs/resources/authorizations.js +1 -1
  31. package/lib/cjs/resources/avalara_accounts.d.ts +1 -1
  32. package/lib/cjs/resources/avalara_accounts.js +1 -1
  33. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -1
  34. package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
  35. package/lib/cjs/resources/bing_geocoders.d.ts +1 -1
  36. package/lib/cjs/resources/bing_geocoders.js +1 -1
  37. package/lib/cjs/resources/braintree_gateways.d.ts +1 -1
  38. package/lib/cjs/resources/braintree_gateways.js +1 -1
  39. package/lib/cjs/resources/braintree_payments.d.ts +1 -1
  40. package/lib/cjs/resources/braintree_payments.js +1 -1
  41. package/lib/cjs/resources/bundles.d.ts +1 -1
  42. package/lib/cjs/resources/bundles.js +1 -1
  43. package/lib/cjs/resources/captures.d.ts +1 -1
  44. package/lib/cjs/resources/captures.js +1 -1
  45. package/lib/cjs/resources/carrier_accounts.d.ts +1 -1
  46. package/lib/cjs/resources/carrier_accounts.js +1 -1
  47. package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -1
  48. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  49. package/lib/cjs/resources/checkout_com_payments.d.ts +1 -1
  50. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  51. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -1
  52. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
  53. package/lib/cjs/resources/coupon_recipients.d.ts +1 -1
  54. package/lib/cjs/resources/coupon_recipients.js +1 -1
  55. package/lib/cjs/resources/coupons.d.ts +1 -1
  56. package/lib/cjs/resources/coupons.js +1 -1
  57. package/lib/cjs/resources/customer_addresses.d.ts +1 -1
  58. package/lib/cjs/resources/customer_addresses.js +1 -1
  59. package/lib/cjs/resources/customer_groups.d.ts +1 -1
  60. package/lib/cjs/resources/customer_groups.js +1 -1
  61. package/lib/cjs/resources/customer_password_resets.d.ts +1 -1
  62. package/lib/cjs/resources/customer_password_resets.js +1 -1
  63. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -1
  64. package/lib/cjs/resources/customer_payment_sources.js +1 -1
  65. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -1
  66. package/lib/cjs/resources/customer_subscriptions.js +1 -1
  67. package/lib/cjs/resources/customers.d.ts +1 -1
  68. package/lib/cjs/resources/customers.js +1 -1
  69. package/lib/cjs/resources/delivery_lead_times.d.ts +1 -1
  70. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  71. package/lib/cjs/resources/event_callbacks.d.ts +1 -1
  72. package/lib/cjs/resources/event_callbacks.js +1 -1
  73. package/lib/cjs/resources/external_gateways.d.ts +1 -1
  74. package/lib/cjs/resources/external_gateways.js +1 -1
  75. package/lib/cjs/resources/external_payments.d.ts +1 -1
  76. package/lib/cjs/resources/external_payments.js +1 -1
  77. package/lib/cjs/resources/external_promotions.d.ts +1 -1
  78. package/lib/cjs/resources/external_promotions.js +1 -1
  79. package/lib/cjs/resources/external_tax_calculators.d.ts +1 -1
  80. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  81. package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -1
  82. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  83. package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -1
  84. package/lib/cjs/resources/fixed_price_promotions.js +1 -1
  85. package/lib/cjs/resources/free_gift_promotions.d.ts +1 -1
  86. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  87. package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -1
  88. package/lib/cjs/resources/free_shipping_promotions.js +1 -1
  89. package/lib/cjs/resources/geocoders.d.ts +1 -1
  90. package/lib/cjs/resources/geocoders.js +1 -1
  91. package/lib/cjs/resources/gift_card_recipients.d.ts +1 -1
  92. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  93. package/lib/cjs/resources/gift_cards.d.ts +1 -2
  94. package/lib/cjs/resources/gift_cards.js +1 -1
  95. package/lib/cjs/resources/google_geocoders.d.ts +1 -1
  96. package/lib/cjs/resources/google_geocoders.js +1 -1
  97. package/lib/cjs/resources/imports.d.ts +1 -1
  98. package/lib/cjs/resources/imports.js +1 -1
  99. package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -1
  100. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  101. package/lib/cjs/resources/inventory_models.d.ts +1 -1
  102. package/lib/cjs/resources/inventory_models.js +1 -1
  103. package/lib/cjs/resources/inventory_return_locations.d.ts +1 -1
  104. package/lib/cjs/resources/inventory_return_locations.js +1 -1
  105. package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -1
  106. package/lib/cjs/resources/inventory_stock_locations.js +1 -1
  107. package/lib/cjs/resources/line_item_options.d.ts +1 -1
  108. package/lib/cjs/resources/line_item_options.js +1 -1
  109. package/lib/cjs/resources/line_items.d.ts +1 -1
  110. package/lib/cjs/resources/line_items.js +1 -1
  111. package/lib/cjs/resources/manual_gateways.d.ts +1 -1
  112. package/lib/cjs/resources/manual_gateways.js +1 -1
  113. package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -1
  114. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  115. package/lib/cjs/resources/markets.d.ts +1 -1
  116. package/lib/cjs/resources/markets.js +1 -1
  117. package/lib/cjs/resources/merchants.d.ts +1 -1
  118. package/lib/cjs/resources/merchants.js +1 -1
  119. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -1
  120. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
  121. package/lib/cjs/resources/order_copies.d.ts +1 -1
  122. package/lib/cjs/resources/order_copies.js +1 -1
  123. package/lib/cjs/resources/order_subscriptions.d.ts +2 -2
  124. package/lib/cjs/resources/order_subscriptions.js +1 -1
  125. package/lib/cjs/resources/order_validation_rules.d.ts +1 -1
  126. package/lib/cjs/resources/order_validation_rules.js +1 -1
  127. package/lib/cjs/resources/orders.d.ts +1 -1
  128. package/lib/cjs/resources/orders.js +1 -1
  129. package/lib/cjs/resources/organization.d.ts +3 -1
  130. package/lib/cjs/resources/organization.js +1 -1
  131. package/lib/cjs/resources/packages.d.ts +6 -6
  132. package/lib/cjs/resources/packages.js +1 -1
  133. package/lib/cjs/resources/parcel_line_items.d.ts +1 -1
  134. package/lib/cjs/resources/parcel_line_items.js +1 -1
  135. package/lib/cjs/resources/parcels.d.ts +1 -1
  136. package/lib/cjs/resources/parcels.js +1 -1
  137. package/lib/cjs/resources/payment_gateways.d.ts +1 -1
  138. package/lib/cjs/resources/payment_gateways.js +1 -1
  139. package/lib/cjs/resources/payment_methods.d.ts +1 -1
  140. package/lib/cjs/resources/payment_methods.js +1 -1
  141. package/lib/cjs/resources/paypal_gateways.d.ts +1 -1
  142. package/lib/cjs/resources/paypal_gateways.js +1 -1
  143. package/lib/cjs/resources/paypal_payments.d.ts +1 -1
  144. package/lib/cjs/resources/paypal_payments.js +1 -1
  145. package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -1
  146. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  147. package/lib/cjs/resources/price_lists.d.ts +1 -1
  148. package/lib/cjs/resources/price_lists.js +1 -1
  149. package/lib/cjs/resources/prices.d.ts +1 -1
  150. package/lib/cjs/resources/prices.js +1 -1
  151. package/lib/cjs/resources/promotion_rules.d.ts +1 -1
  152. package/lib/cjs/resources/promotion_rules.js +1 -1
  153. package/lib/cjs/resources/promotions.d.ts +1 -1
  154. package/lib/cjs/resources/promotions.js +1 -1
  155. package/lib/cjs/resources/refunds.d.ts +1 -1
  156. package/lib/cjs/resources/refunds.js +1 -1
  157. package/lib/cjs/resources/return_line_items.d.ts +1 -1
  158. package/lib/cjs/resources/return_line_items.js +1 -1
  159. package/lib/cjs/resources/returns.d.ts +1 -1
  160. package/lib/cjs/resources/returns.js +1 -1
  161. package/lib/cjs/resources/shipments.d.ts +1 -1
  162. package/lib/cjs/resources/shipments.js +1 -1
  163. package/lib/cjs/resources/shipping_categories.d.ts +1 -1
  164. package/lib/cjs/resources/shipping_categories.js +1 -1
  165. package/lib/cjs/resources/shipping_methods.d.ts +1 -1
  166. package/lib/cjs/resources/shipping_methods.js +1 -1
  167. package/lib/cjs/resources/shipping_zones.d.ts +1 -1
  168. package/lib/cjs/resources/shipping_zones.js +1 -1
  169. package/lib/cjs/resources/sku_list_items.d.ts +1 -1
  170. package/lib/cjs/resources/sku_list_items.js +1 -1
  171. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -1
  172. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
  173. package/lib/cjs/resources/sku_lists.d.ts +1 -1
  174. package/lib/cjs/resources/sku_lists.js +1 -1
  175. package/lib/cjs/resources/sku_options.d.ts +1 -1
  176. package/lib/cjs/resources/sku_options.js +1 -1
  177. package/lib/cjs/resources/skus.d.ts +1 -1
  178. package/lib/cjs/resources/skus.js +1 -1
  179. package/lib/cjs/resources/stock_items.d.ts +1 -1
  180. package/lib/cjs/resources/stock_items.js +1 -1
  181. package/lib/cjs/resources/stock_line_items.d.ts +1 -1
  182. package/lib/cjs/resources/stock_line_items.js +1 -1
  183. package/lib/cjs/resources/stock_locations.d.ts +1 -1
  184. package/lib/cjs/resources/stock_locations.js +1 -1
  185. package/lib/cjs/resources/stock_transfers.d.ts +1 -1
  186. package/lib/cjs/resources/stock_transfers.js +1 -1
  187. package/lib/cjs/resources/stripe_gateways.d.ts +1 -1
  188. package/lib/cjs/resources/stripe_gateways.js +1 -1
  189. package/lib/cjs/resources/stripe_payments.d.ts +1 -1
  190. package/lib/cjs/resources/stripe_payments.js +1 -1
  191. package/lib/cjs/resources/tax_calculators.d.ts +1 -1
  192. package/lib/cjs/resources/tax_calculators.js +1 -1
  193. package/lib/cjs/resources/tax_categories.d.ts +1 -1
  194. package/lib/cjs/resources/tax_categories.js +1 -1
  195. package/lib/cjs/resources/tax_rules.d.ts +1 -1
  196. package/lib/cjs/resources/tax_rules.js +1 -1
  197. package/lib/cjs/resources/taxjar_accounts.d.ts +1 -1
  198. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  199. package/lib/cjs/resources/transactions.d.ts +1 -1
  200. package/lib/cjs/resources/transactions.js +1 -1
  201. package/lib/cjs/resources/voids.d.ts +1 -1
  202. package/lib/cjs/resources/voids.js +1 -1
  203. package/lib/cjs/resources/webhooks.d.ts +1 -1
  204. package/lib/cjs/resources/webhooks.js +1 -1
  205. package/lib/cjs/resources/wire_transfers.d.ts +1 -1
  206. package/lib/cjs/resources/wire_transfers.js +1 -1
  207. package/lib/cjs/static.js +1 -1
  208. package/lib/cjs/util.js +1 -1
  209. package/lib/esm/api.d.ts +1 -1
  210. package/lib/esm/client.js +1 -1
  211. package/lib/esm/commercelayer.js +1 -1
  212. package/lib/esm/common.js +1 -1
  213. package/lib/esm/config.d.ts +7 -3
  214. package/lib/esm/config.js +1 -1
  215. package/lib/esm/error.js +1 -1
  216. package/lib/esm/jsonapi.js +1 -1
  217. package/lib/esm/model.d.ts +1 -1
  218. package/lib/esm/query.d.ts +0 -35
  219. package/lib/esm/query.js +1 -1
  220. package/lib/esm/resource.js +1 -1
  221. package/lib/esm/resources/addresses.d.ts +1 -1
  222. package/lib/esm/resources/addresses.js +1 -1
  223. package/lib/esm/resources/adjustments.d.ts +1 -1
  224. package/lib/esm/resources/adjustments.js +1 -1
  225. package/lib/esm/resources/adyen_gateways.d.ts +1 -1
  226. package/lib/esm/resources/adyen_gateways.js +1 -1
  227. package/lib/esm/resources/adyen_payments.d.ts +1 -1
  228. package/lib/esm/resources/adyen_payments.js +1 -1
  229. package/lib/esm/resources/application.d.ts +1 -1
  230. package/lib/esm/resources/application.js +1 -1
  231. package/lib/esm/resources/attachments.d.ts +1 -1
  232. package/lib/esm/resources/attachments.js +1 -1
  233. package/lib/esm/resources/authorizations.d.ts +1 -1
  234. package/lib/esm/resources/authorizations.js +1 -1
  235. package/lib/esm/resources/avalara_accounts.d.ts +1 -1
  236. package/lib/esm/resources/avalara_accounts.js +1 -1
  237. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -1
  238. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  239. package/lib/esm/resources/bing_geocoders.d.ts +1 -1
  240. package/lib/esm/resources/bing_geocoders.js +1 -1
  241. package/lib/esm/resources/braintree_gateways.d.ts +1 -1
  242. package/lib/esm/resources/braintree_gateways.js +1 -1
  243. package/lib/esm/resources/braintree_payments.d.ts +1 -1
  244. package/lib/esm/resources/braintree_payments.js +1 -1
  245. package/lib/esm/resources/bundles.d.ts +1 -1
  246. package/lib/esm/resources/bundles.js +1 -1
  247. package/lib/esm/resources/captures.d.ts +1 -1
  248. package/lib/esm/resources/captures.js +1 -1
  249. package/lib/esm/resources/carrier_accounts.d.ts +1 -1
  250. package/lib/esm/resources/carrier_accounts.js +1 -1
  251. package/lib/esm/resources/checkout_com_gateways.d.ts +1 -1
  252. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  253. package/lib/esm/resources/checkout_com_payments.d.ts +1 -1
  254. package/lib/esm/resources/checkout_com_payments.js +1 -1
  255. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -1
  256. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  257. package/lib/esm/resources/coupon_recipients.d.ts +1 -1
  258. package/lib/esm/resources/coupon_recipients.js +1 -1
  259. package/lib/esm/resources/coupons.d.ts +1 -1
  260. package/lib/esm/resources/coupons.js +1 -1
  261. package/lib/esm/resources/customer_addresses.d.ts +1 -1
  262. package/lib/esm/resources/customer_addresses.js +1 -1
  263. package/lib/esm/resources/customer_groups.d.ts +1 -1
  264. package/lib/esm/resources/customer_groups.js +1 -1
  265. package/lib/esm/resources/customer_password_resets.d.ts +1 -1
  266. package/lib/esm/resources/customer_password_resets.js +1 -1
  267. package/lib/esm/resources/customer_payment_sources.d.ts +1 -1
  268. package/lib/esm/resources/customer_payment_sources.js +1 -1
  269. package/lib/esm/resources/customer_subscriptions.d.ts +1 -1
  270. package/lib/esm/resources/customer_subscriptions.js +1 -1
  271. package/lib/esm/resources/customers.d.ts +1 -1
  272. package/lib/esm/resources/customers.js +1 -1
  273. package/lib/esm/resources/delivery_lead_times.d.ts +1 -1
  274. package/lib/esm/resources/delivery_lead_times.js +1 -1
  275. package/lib/esm/resources/event_callbacks.d.ts +1 -1
  276. package/lib/esm/resources/event_callbacks.js +1 -1
  277. package/lib/esm/resources/external_gateways.d.ts +1 -1
  278. package/lib/esm/resources/external_gateways.js +1 -1
  279. package/lib/esm/resources/external_payments.d.ts +1 -1
  280. package/lib/esm/resources/external_payments.js +1 -1
  281. package/lib/esm/resources/external_promotions.d.ts +1 -1
  282. package/lib/esm/resources/external_promotions.js +1 -1
  283. package/lib/esm/resources/external_tax_calculators.d.ts +1 -1
  284. package/lib/esm/resources/external_tax_calculators.js +1 -1
  285. package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -1
  286. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  287. package/lib/esm/resources/fixed_price_promotions.d.ts +1 -1
  288. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  289. package/lib/esm/resources/free_gift_promotions.d.ts +1 -1
  290. package/lib/esm/resources/free_gift_promotions.js +1 -1
  291. package/lib/esm/resources/free_shipping_promotions.d.ts +1 -1
  292. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  293. package/lib/esm/resources/geocoders.d.ts +1 -1
  294. package/lib/esm/resources/geocoders.js +1 -1
  295. package/lib/esm/resources/gift_card_recipients.d.ts +1 -1
  296. package/lib/esm/resources/gift_card_recipients.js +1 -1
  297. package/lib/esm/resources/gift_cards.d.ts +1 -2
  298. package/lib/esm/resources/gift_cards.js +1 -1
  299. package/lib/esm/resources/google_geocoders.d.ts +1 -1
  300. package/lib/esm/resources/google_geocoders.js +1 -1
  301. package/lib/esm/resources/imports.d.ts +1 -1
  302. package/lib/esm/resources/imports.js +1 -1
  303. package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -1
  304. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  305. package/lib/esm/resources/inventory_models.d.ts +1 -1
  306. package/lib/esm/resources/inventory_models.js +1 -1
  307. package/lib/esm/resources/inventory_return_locations.d.ts +1 -1
  308. package/lib/esm/resources/inventory_return_locations.js +1 -1
  309. package/lib/esm/resources/inventory_stock_locations.d.ts +1 -1
  310. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  311. package/lib/esm/resources/line_item_options.d.ts +1 -1
  312. package/lib/esm/resources/line_item_options.js +1 -1
  313. package/lib/esm/resources/line_items.d.ts +1 -1
  314. package/lib/esm/resources/line_items.js +1 -1
  315. package/lib/esm/resources/manual_gateways.d.ts +1 -1
  316. package/lib/esm/resources/manual_gateways.js +1 -1
  317. package/lib/esm/resources/manual_tax_calculators.d.ts +1 -1
  318. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  319. package/lib/esm/resources/markets.d.ts +1 -1
  320. package/lib/esm/resources/markets.js +1 -1
  321. package/lib/esm/resources/merchants.d.ts +1 -1
  322. package/lib/esm/resources/merchants.js +1 -1
  323. package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -1
  324. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  325. package/lib/esm/resources/order_copies.d.ts +1 -1
  326. package/lib/esm/resources/order_copies.js +1 -1
  327. package/lib/esm/resources/order_subscriptions.d.ts +2 -2
  328. package/lib/esm/resources/order_subscriptions.js +1 -1
  329. package/lib/esm/resources/order_validation_rules.d.ts +1 -1
  330. package/lib/esm/resources/order_validation_rules.js +1 -1
  331. package/lib/esm/resources/orders.d.ts +1 -1
  332. package/lib/esm/resources/orders.js +1 -1
  333. package/lib/esm/resources/organization.d.ts +3 -1
  334. package/lib/esm/resources/organization.js +1 -1
  335. package/lib/esm/resources/packages.d.ts +6 -6
  336. package/lib/esm/resources/packages.js +1 -1
  337. package/lib/esm/resources/parcel_line_items.d.ts +1 -1
  338. package/lib/esm/resources/parcel_line_items.js +1 -1
  339. package/lib/esm/resources/parcels.d.ts +1 -1
  340. package/lib/esm/resources/parcels.js +1 -1
  341. package/lib/esm/resources/payment_gateways.d.ts +1 -1
  342. package/lib/esm/resources/payment_gateways.js +1 -1
  343. package/lib/esm/resources/payment_methods.d.ts +1 -1
  344. package/lib/esm/resources/payment_methods.js +1 -1
  345. package/lib/esm/resources/paypal_gateways.d.ts +1 -1
  346. package/lib/esm/resources/paypal_gateways.js +1 -1
  347. package/lib/esm/resources/paypal_payments.d.ts +1 -1
  348. package/lib/esm/resources/paypal_payments.js +1 -1
  349. package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -1
  350. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  351. package/lib/esm/resources/price_lists.d.ts +1 -1
  352. package/lib/esm/resources/price_lists.js +1 -1
  353. package/lib/esm/resources/prices.d.ts +1 -1
  354. package/lib/esm/resources/prices.js +1 -1
  355. package/lib/esm/resources/promotion_rules.d.ts +1 -1
  356. package/lib/esm/resources/promotion_rules.js +1 -1
  357. package/lib/esm/resources/promotions.d.ts +1 -1
  358. package/lib/esm/resources/promotions.js +1 -1
  359. package/lib/esm/resources/refunds.d.ts +1 -1
  360. package/lib/esm/resources/refunds.js +1 -1
  361. package/lib/esm/resources/return_line_items.d.ts +1 -1
  362. package/lib/esm/resources/return_line_items.js +1 -1
  363. package/lib/esm/resources/returns.d.ts +1 -1
  364. package/lib/esm/resources/returns.js +1 -1
  365. package/lib/esm/resources/shipments.d.ts +1 -1
  366. package/lib/esm/resources/shipments.js +1 -1
  367. package/lib/esm/resources/shipping_categories.d.ts +1 -1
  368. package/lib/esm/resources/shipping_categories.js +1 -1
  369. package/lib/esm/resources/shipping_methods.d.ts +1 -1
  370. package/lib/esm/resources/shipping_methods.js +1 -1
  371. package/lib/esm/resources/shipping_zones.d.ts +1 -1
  372. package/lib/esm/resources/shipping_zones.js +1 -1
  373. package/lib/esm/resources/sku_list_items.d.ts +1 -1
  374. package/lib/esm/resources/sku_list_items.js +1 -1
  375. package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -1
  376. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  377. package/lib/esm/resources/sku_lists.d.ts +1 -1
  378. package/lib/esm/resources/sku_lists.js +1 -1
  379. package/lib/esm/resources/sku_options.d.ts +1 -1
  380. package/lib/esm/resources/sku_options.js +1 -1
  381. package/lib/esm/resources/skus.d.ts +1 -1
  382. package/lib/esm/resources/skus.js +1 -1
  383. package/lib/esm/resources/stock_items.d.ts +1 -1
  384. package/lib/esm/resources/stock_items.js +1 -1
  385. package/lib/esm/resources/stock_line_items.d.ts +1 -1
  386. package/lib/esm/resources/stock_line_items.js +1 -1
  387. package/lib/esm/resources/stock_locations.d.ts +1 -1
  388. package/lib/esm/resources/stock_locations.js +1 -1
  389. package/lib/esm/resources/stock_transfers.d.ts +1 -1
  390. package/lib/esm/resources/stock_transfers.js +1 -1
  391. package/lib/esm/resources/stripe_gateways.d.ts +1 -1
  392. package/lib/esm/resources/stripe_gateways.js +1 -1
  393. package/lib/esm/resources/stripe_payments.d.ts +1 -1
  394. package/lib/esm/resources/stripe_payments.js +1 -1
  395. package/lib/esm/resources/tax_calculators.d.ts +1 -1
  396. package/lib/esm/resources/tax_calculators.js +1 -1
  397. package/lib/esm/resources/tax_categories.d.ts +1 -1
  398. package/lib/esm/resources/tax_categories.js +1 -1
  399. package/lib/esm/resources/tax_rules.d.ts +1 -1
  400. package/lib/esm/resources/tax_rules.js +1 -1
  401. package/lib/esm/resources/taxjar_accounts.d.ts +1 -1
  402. package/lib/esm/resources/taxjar_accounts.js +1 -1
  403. package/lib/esm/resources/transactions.d.ts +1 -1
  404. package/lib/esm/resources/transactions.js +1 -1
  405. package/lib/esm/resources/voids.d.ts +1 -1
  406. package/lib/esm/resources/voids.js +1 -1
  407. package/lib/esm/resources/webhooks.d.ts +1 -1
  408. package/lib/esm/resources/webhooks.js +1 -1
  409. package/lib/esm/resources/wire_transfers.d.ts +1 -1
  410. package/lib/esm/resources/wire_transfers.js +1 -1
  411. package/lib/esm/static.js +1 -1
  412. package/lib/esm/util.js +1 -1
  413. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  414. package/lib/tsconfig.tsbuildinfo +1 -1
  415. package/package.json +7 -3
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class Shipments extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Shipments.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:Shipments.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:Shipments.TYPE}),t,s)}isShipment(e){return e.type&&e.type===Shipments.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Shipments.TYPE}:{id:e.id,type:Shipments.TYPE}}type(){return Shipments.TYPE}}Shipments.TYPE="shipments";exports.default=Shipments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Shipments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Shipments.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Shipments.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Shipments.TYPE}),r,t)}isShipment(e){return e.type&&e.type===Shipments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Shipments.TYPE}:{id:e.id,type:Shipments.TYPE}}type(){return Shipments.TYPE}}Shipments.TYPE="shipments",exports.default=Shipments;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class ShippingCategories extends resource_1.ApiResource{async list(e,i){return this.resources.list({type:ShippingCategories.TYPE},e,i)}async create(e,i,t){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),i,t)}async retrieve(e,i,t){return this.resources.retrieve({type:ShippingCategories.TYPE,id:e},i,t)}async update(e,i,t){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),i,t)}async delete(e,i){await this.resources.delete({type:ShippingCategories.TYPE,id:e},i)}isShippingCategory(e){return e.type&&e.type===ShippingCategories.TYPE}relationship(e){return typeof e==="string"?{id:e,type:ShippingCategories.TYPE}:{id:e.id,type:ShippingCategories.TYPE}}type(){return ShippingCategories.TYPE}}ShippingCategories.TYPE="shipping_categories";exports.default=ShippingCategories;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingCategories.TYPE,id:e},t)}isShippingCategory(e){return e.type&&e.type===ShippingCategories.TYPE}relationship(e){return typeof e=="string"?{id:e,type:ShippingCategories.TYPE}:{id:e.id,type:ShippingCategories.TYPE}}type(){return ShippingCategories.TYPE}}ShippingCategories.TYPE="shipping_categories",exports.default=ShippingCategories;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingMethods.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingMethods.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingMethods.TYPE,id:e},t)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return typeof e==="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods";exports.default=ShippingMethods;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:ShippingMethods.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:ShippingMethods.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:ShippingMethods.TYPE,id:e},r)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods",exports.default=ShippingMethods;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class ShippingZones extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:ShippingZones.TYPE},e,s)}async create(e,s,i){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),s,i)}async retrieve(e,s,i){return this.resources.retrieve({type:ShippingZones.TYPE,id:e},s,i)}async update(e,s,i){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),s,i)}async delete(e,s){await this.resources.delete({type:ShippingZones.TYPE,id:e},s)}isShippingZone(e){return e.type&&e.type===ShippingZones.TYPE}relationship(e){return typeof e==="string"?{id:e,type:ShippingZones.TYPE}:{id:e.id,type:ShippingZones.TYPE}}type(){return ShippingZones.TYPE}}ShippingZones.TYPE="shipping_zones";exports.default=ShippingZones;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingZones extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingZones.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ShippingZones.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ShippingZones.TYPE,id:e},t)}isShippingZone(e){return e.type&&e.type===ShippingZones.TYPE}relationship(e){return typeof e=="string"?{id:e,type:ShippingZones.TYPE}:{id:e.id,type:ShippingZones.TYPE}}type(){return ShippingZones.TYPE}}ShippingZones.TYPE="shipping_zones",exports.default=ShippingZones;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class SkuListItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:SkuListItems.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:SkuListItems.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:SkuListItems.TYPE,id:e},t)}isSkuListItem(e){return e.type&&e.type===SkuListItems.TYPE}relationship(e){return typeof e==="string"?{id:e,type:SkuListItems.TYPE}:{id:e.id,type:SkuListItems.TYPE}}type(){return SkuListItems.TYPE}}SkuListItems.TYPE="sku_list_items";exports.default=SkuListItems;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuListItems.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuListItems.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuListItems.TYPE,id:e},r)}isSkuListItem(e){return e.type&&e.type===SkuListItems.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuListItems.TYPE}:{id:e.id,type:SkuListItems.TYPE}}type(){return SkuListItems.TYPE}}SkuListItems.TYPE="sku_list_items",exports.default=SkuListItems;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class SkuListPromotionRules extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:SkuListPromotionRules.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:SkuListPromotionRules.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:SkuListPromotionRules.TYPE,id:e},t)}isSkuListPromotionRule(e){return e.type&&e.type===SkuListPromotionRules.TYPE}relationship(e){return typeof e==="string"?{id:e,type:SkuListPromotionRules.TYPE}:{id:e.id,type:SkuListPromotionRules.TYPE}}type(){return SkuListPromotionRules.TYPE}}SkuListPromotionRules.TYPE="sku_list_promotion_rules";exports.default=SkuListPromotionRules;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListPromotionRules extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuListPromotionRules.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuListPromotionRules.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuListPromotionRules.TYPE,id:e},r)}isSkuListPromotionRule(e){return e.type&&e.type===SkuListPromotionRules.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuListPromotionRules.TYPE}:{id:e.id,type:SkuListPromotionRules.TYPE}}type(){return SkuListPromotionRules.TYPE}}SkuListPromotionRules.TYPE="sku_list_promotion_rules",exports.default=SkuListPromotionRules;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:SkuLists.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:SkuLists.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:SkuLists.TYPE,id:e},s)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return typeof e==="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists";exports.default=SkuLists;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuLists.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuLists.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuLists.TYPE,id:e},r)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists",exports.default=SkuLists;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:SkuOptions.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:SkuOptions.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:SkuOptions.TYPE,id:e},t)}isSkuOption(e){return e.type&&e.type===SkuOptions.TYPE}relationship(e){return typeof e==="string"?{id:e,type:SkuOptions.TYPE}:{id:e.id,type:SkuOptions.TYPE}}type(){return SkuOptions.TYPE}}SkuOptions.TYPE="sku_options";exports.default=SkuOptions;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuOptions.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuOptions.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuOptions.TYPE,id:e},r)}isSkuOption(e){return e.type&&e.type===SkuOptions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuOptions.TYPE}:{id:e.id,type:SkuOptions.TYPE}}type(){return SkuOptions.TYPE}}SkuOptions.TYPE="sku_options",exports.default=SkuOptions;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class Skus extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:Skus.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Skus.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:Skus.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Skus.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:Skus.TYPE,id:e},s)}isSku(e){return e.type&&e.type===Skus.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Skus.TYPE}:{id:e.id,type:Skus.TYPE}}type(){return Skus.TYPE}}Skus.TYPE="skus";exports.default=Skus;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Skus extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Skus.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Skus.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Skus.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Skus.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Skus.TYPE,id:e},t)}isSku(e){return e.type&&e.type===Skus.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Skus.TYPE}:{id:e.id,type:Skus.TYPE}}type(){return Skus.TYPE}}Skus.TYPE="skus",exports.default=Skus;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class StockItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockItems.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockItems.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockItems.TYPE,id:e},t)}isStockItem(e){return e.type&&e.type===StockItems.TYPE}relationship(e){return typeof e==="string"?{id:e,type:StockItems.TYPE}:{id:e.id,type:StockItems.TYPE}}type(){return StockItems.TYPE}}StockItems.TYPE="stock_items";exports.default=StockItems;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:StockItems.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:StockItems.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:StockItems.TYPE,id:e},r)}isStockItem(e){return e.type&&e.type===StockItems.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StockItems.TYPE}:{id:e.id,type:StockItems.TYPE}}type(){return StockItems.TYPE}}StockItems.TYPE="stock_items",exports.default=StockItems;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class StockLineItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockLineItems.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:StockLineItems.TYPE,id:e},t,s)}isStockLineItem(e){return e.type&&e.type===StockLineItems.TYPE}relationship(e){return typeof e==="string"?{id:e,type:StockLineItems.TYPE}:{id:e.id,type:StockLineItems.TYPE}}type(){return StockLineItems.TYPE}}StockLineItems.TYPE="stock_line_items";exports.default=StockLineItems;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLineItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:StockLineItems.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:StockLineItems.TYPE,id:e},r,t)}isStockLineItem(e){return e.type&&e.type===StockLineItems.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StockLineItems.TYPE}:{id:e.id,type:StockLineItems.TYPE}}type(){return StockLineItems.TYPE}}StockLineItems.TYPE="stock_line_items",exports.default=StockLineItems;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class StockLocations extends resource_1.ApiResource{async list(t,e){return this.resources.list({type:StockLocations.TYPE},t,e)}async create(t,e,s){return this.resources.create(Object.assign(Object.assign({},t),{type:StockLocations.TYPE}),e,s)}async retrieve(t,e,s){return this.resources.retrieve({type:StockLocations.TYPE,id:t},e,s)}async update(t,e,s){return this.resources.update(Object.assign(Object.assign({},t),{type:StockLocations.TYPE}),e,s)}async delete(t,e){await this.resources.delete({type:StockLocations.TYPE,id:t},e)}isStockLocation(t){return t.type&&t.type===StockLocations.TYPE}relationship(t){return typeof t==="string"?{id:t,type:StockLocations.TYPE}:{id:t.id,type:StockLocations.TYPE}}type(){return StockLocations.TYPE}}StockLocations.TYPE="stock_locations";exports.default=StockLocations;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLocations extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:StockLocations.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:StockLocations.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:StockLocations.TYPE,id:e},r)}isStockLocation(e){return e.type&&e.type===StockLocations.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StockLocations.TYPE}:{id:e.id,type:StockLocations.TYPE}}type(){return StockLocations.TYPE}}StockLocations.TYPE="stock_locations",exports.default=StockLocations;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class StockTransfers extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:StockTransfers.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:StockTransfers.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:StockTransfers.TYPE,id:e},r)}isStockTransfer(e){return e.type&&e.type===StockTransfers.TYPE}relationship(e){return typeof e==="string"?{id:e,type:StockTransfers.TYPE}:{id:e.id,type:StockTransfers.TYPE}}type(){return StockTransfers.TYPE}}StockTransfers.TYPE="stock_transfers";exports.default=StockTransfers;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockTransfers.TYPE,id:e},t)}isStockTransfer(e){return e.type&&e.type===StockTransfers.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StockTransfers.TYPE}:{id:e.id,type:StockTransfers.TYPE}}type(){return StockTransfers.TYPE}}StockTransfers.TYPE="stock_transfers",exports.default=StockTransfers;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StripeGateways.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:StripeGateways.TYPE,id:e},t)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return typeof e==="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways";exports.default=StripeGateways;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripeGateways.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:StripeGateways.TYPE,id:e},s)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways",exports.default=StripeGateways;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StripePayments.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:StripePayments.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:StripePayments.TYPE,id:e},t)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return typeof e==="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments";exports.default=StripePayments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripePayments.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:StripePayments.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:StripePayments.TYPE,id:e},s)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments",exports.default=StripePayments;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:TaxCalculators.TYPE},e,r)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return typeof e==="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators";exports.default=TaxCalculators;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return typeof e=="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators",exports.default=TaxCalculators;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class TaxCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCategories.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCategories.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxCategories.TYPE,id:e},t)}isTaxCategory(e){return e.type&&e.type===TaxCategories.TYPE}relationship(e){return typeof e==="string"?{id:e,type:TaxCategories.TYPE}:{id:e.id,type:TaxCategories.TYPE}}type(){return TaxCategories.TYPE}}TaxCategories.TYPE="tax_categories";exports.default=TaxCategories;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCategories.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCategories.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxCategories.TYPE,id:e},t)}isTaxCategory(e){return e.type&&e.type===TaxCategories.TYPE}relationship(e){return typeof e=="string"?{id:e,type:TaxCategories.TYPE}:{id:e.id,type:TaxCategories.TYPE}}type(){return TaxCategories.TYPE}}TaxCategories.TYPE="tax_categories",exports.default=TaxCategories;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class TaxRules extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:TaxRules.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:TaxRules.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:TaxRules.TYPE,id:e},s)}isTaxRule(e){return e.type&&e.type===TaxRules.TYPE}relationship(e){return typeof e==="string"?{id:e,type:TaxRules.TYPE}:{id:e.id,type:TaxRules.TYPE}}type(){return TaxRules.TYPE}}TaxRules.TYPE="tax_rules";exports.default=TaxRules;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxRules extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxRules.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxRules.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxRules.TYPE,id:e},t)}isTaxRule(e){return e.type&&e.type===TaxRules.TYPE}relationship(e){return typeof e=="string"?{id:e,type:TaxRules.TYPE}:{id:e.id,type:TaxRules.TYPE}}type(){return TaxRules.TYPE}}TaxRules.TYPE="tax_rules",exports.default=TaxRules;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}isTaxjarAccount(e){return e.type&&e.type===TaxjarAccounts.TYPE}relationship(e){return typeof e==="string"?{id:e,type:TaxjarAccounts.TYPE}:{id:e.id,type:TaxjarAccounts.TYPE}}type(){return TaxjarAccounts.TYPE}}TaxjarAccounts.TYPE="taxjar_accounts";exports.default=TaxjarAccounts;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}isTaxjarAccount(e){return e.type&&e.type===TaxjarAccounts.TYPE}relationship(e){return typeof e=="string"?{id:e,type:TaxjarAccounts.TYPE}:{id:e.id,type:TaxjarAccounts.TYPE}}type(){return TaxjarAccounts.TYPE}}TaxjarAccounts.TYPE="taxjar_accounts",exports.default=TaxjarAccounts;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(s,e){return this.resources.list({type:Transactions.TYPE},s,e)}isTransaction(s){return s.type&&s.type===Transactions.TYPE}relationship(s){return typeof s==="string"?{id:s,type:Transactions.TYPE}:{id:s.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions";exports.default=Transactions;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Transactions.TYPE},e,t)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class Voids extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:Voids.TYPE},e,s)}async retrieve(e,s,r){return this.resources.retrieve({type:Voids.TYPE,id:e},s,r)}isVoid(e){return e.type&&e.type===Voids.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Voids.TYPE}:{id:e.id,type:Voids.TYPE}}type(){return Voids.TYPE}}Voids.TYPE="voids";exports.default=Voids;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Voids extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Voids.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Voids.TYPE,id:e},r,t)}isVoid(e){return e.type&&e.type===Voids.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Voids.TYPE}:{id:e.id,type:Voids.TYPE}}type(){return Voids.TYPE}}Voids.TYPE="voids",exports.default=Voids;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class Webhooks extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:Webhooks.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:Webhooks.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:Webhooks.TYPE,id:e},s)}isWebhook(e){return e.type&&e.type===Webhooks.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Webhooks.TYPE}:{id:e.id,type:Webhooks.TYPE}}type(){return Webhooks.TYPE}}Webhooks.TYPE="webhooks";exports.default=Webhooks;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Webhooks extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Webhooks.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Webhooks.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Webhooks.TYPE,id:e},t)}isWebhook(e){return e.type&&e.type===Webhooks.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Webhooks.TYPE}:{id:e.id,type:Webhooks.TYPE}}type(){return Webhooks.TYPE}}Webhooks.TYPE="webhooks",exports.default=Webhooks;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:WireTransfers.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:WireTransfers.TYPE,id:e},r)}isWireTransfer(e){return e.type&&e.type===WireTransfers.TYPE}relationship(e){return typeof e==="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers";exports.default=WireTransfers;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:WireTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:WireTransfers.TYPE,id:e},t)}isWireTransfer(e){return e.type&&e.type===WireTransfers.TYPE}relationship(e){return typeof e=="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers",exports.default=WireTransfers;
package/lib/cjs/static.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){if(i===undefined)i=t;Object.defineProperty(e,i,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,i){if(i===undefined)i=t;e[i]=r[t]});var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))__createBinding(r,e,t);__setModuleDefault(r,e);return r};Object.defineProperty(exports,"__esModule",{value:true});exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api"));const error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:e=>error_1.SdkError.isSdkError(e),isApiError:e=>error_1.ApiError.isApiError(e)};
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t),Object.defineProperty(r,i,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),__importStar=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&__createBinding(e,r,t);return __setModuleDefault(e,r),e};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api")),error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:r=>error_1.SdkError.isSdkError(r),isApiError:r=>error_1.ApiError.isApiError(r)};
package/lib/cjs/util.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.sleep=void 0;const sleep=async e=>new Promise((s=>setTimeout(s,e)));exports.sleep=sleep;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sleep=void 0;const sleep=async e=>new Promise(s=>setTimeout(s,e));exports.sleep=sleep;
package/lib/esm/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  export { default as Addresses } from './resources/addresses';
6
6
  export { default as Adjustments } from './resources/adjustments';
package/lib/esm/client.js CHANGED
@@ -1 +1 @@
1
- var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,i,r,s){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?s.call(e,i):s?s.value=i:t.set(e,i),i};var __classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,i,r){if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?r:i==="a"?r.call(e):r?r.value:t.get(e)};var _ApiClient_accessToken,_ApiClient_client;import axios from"axios";import{SdkError,ApiError,ErrorType}from"./error";const baseURL=(e,t)=>`https://${e.toLowerCase()}.${t?t:"commercelayer.io"}/api`;const handleError=e=>{let t=new SdkError({message:e.message,type:ErrorType.GENERIC});if(axios.isAxiosError(e)){if(e.response){const i=new ApiError(t);i.type=ErrorType.RESPONSE;i.status=e.response.status;i.code=String(i.status);i.errors=e.response.data.errors;t=i}else if(e.request){t.type=ErrorType.REQUEST;t.request=e.request}else{t.type=ErrorType.CLIENT}}else if(axios.isCancel(e))t.type=ErrorType.CANCEL;else t.source=e;throw t};class ApiClient{constructor(e){_ApiClient_accessToken.set(this,void 0);_ApiClient_client.set(this,void 0);this.baseUrl=baseURL(e.organization,e.domain);__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f");const t={timeout:e.timeout||3e3};__classPrivateFieldSet(this,_ApiClient_client,axios.create(Object.assign({baseURL:this.baseUrl,timeout:3e3,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f")}},t)),"f");this.interceptors=__classPrivateFieldGet(this,_ApiClient_client,"f").interceptors}static create(e){if(!(e===null||e===void 0?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e===null||e===void 0?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new ApiClient(e)}config(e){const t=__classPrivateFieldGet(this,_ApiClient_client,"f").defaults;if(e.timeout)t.timeout=e.timeout;if(e.organization)this.baseUrl=baseURL(e.organization,e.domain);if(e.accessToken)__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f")}async request(e,t,i,r){const s=i?{data:i}:undefined;const a=t;const o=(r===null||r===void 0?void 0:r.organization)?baseURL(r.organization,r.domain):undefined;const n=(r===null||r===void 0?void 0:r.accessToken)?{Authorization:"Bearer "+r.accessToken}:undefined;return __classPrivateFieldGet(this,_ApiClient_client,"f").request(Object.assign({method:e,baseURL:o,url:a,data:s,headers:n},r)).then((e=>e.data)).catch((e=>handleError(e)))}}_ApiClient_accessToken=new WeakMap,_ApiClient_client=new WeakMap;export default ApiClient;
1
+ var h=this&&this.__classPrivateFieldSet||function(t,e,o,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,o):i?i.value=o:e.set(t,o),o},c=this&&this.__classPrivateFieldGet||function(t,e,o,r){if(o==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?r:o==="a"?r.call(t):r?r.value:e.get(t)},a,s;import u from"axios";import{SdkError as g,ApiError as T,ErrorType as n}from"./error";import l from"./config";const p=(t,e)=>`https://${t.toLowerCase()}.${e||l.default.domain}/api`,y=t=>{let e=new g({message:t.message,type:n.GENERIC});if(u.isAxiosError(t))if(t.response){const o=new T(e);o.type=n.RESPONSE,o.status=t.response.status,o.code=String(o.status),o.errors=t.response.data.errors,e=o}else t.request?(e.type=n.REQUEST,e.request=t.request):e.type=n.CLIENT;else u.isCancel(t)?e.type=n.CANCEL:e.source=t;throw e};class f{constructor(e){a.set(this,void 0),s.set(this,void 0),this.baseUrl=p(e.organization,e.domain),h(this,a,e.accessToken,"f");const o={timeout:e.timeout||l.client.timeout};h(this,s,u.create(Object.assign({baseURL:this.baseUrl,timeout:l.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+c(this,a,"f")}},o)),"f"),this.interceptors=c(this,s,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new f(e)}config(e){const o=c(this,s,"f").defaults;e.timeout&&(o.timeout=e.timeout),e.organization&&(this.baseUrl=p(e.organization,e.domain)),e.accessToken&&h(this,a,e.accessToken,"f")}async request(e,o,r,i){const m=r?{data:r}:void 0,w=o,v=(i==null?void 0:i.organization)?p(i.organization,i.domain):void 0,E=(i==null?void 0:i.accessToken)?{Authorization:"Bearer "+i.accessToken}:void 0;return c(this,s,"f").request(Object.assign({method:e,baseURL:v,url:w,data:m,headers:E},i)).then(d=>d.data).catch(d=>y(d))}}a=new WeakMap,s=new WeakMap;export default f;
@@ -1 +1 @@
1
- var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,a,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,a):r?r.value=a:t.set(e,a),a};var __classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,a,i){if(a==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?i:a==="a"?i.call(e):i?i.value:t.get(e)};var _CommerceLayerClient_adapter,_CommerceLayerClient_organization;import*as api from"./api";import{CommerceLayerStatic}from"./static";import ResourceAdapter from"./resource";class CommerceLayerClient{constructor(e){_CommerceLayerClient_adapter.set(this,void 0);_CommerceLayerClient_organization.set(this,void 0);__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new ResourceAdapter(e),"f");__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.organization,"f");this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.coupon_codes_promotion_rules=new api.CouponCodesPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.coupon_recipients=new api.CouponRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.coupons=new api.Coupons(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.customer_addresses=new api.CustomerAddresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.customer_groups=new api.CustomerGroups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.customer_password_resets=new api.CustomerPasswordResets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.customer_payment_sources=new api.CustomerPaymentSources(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.customer_subscriptions=new api.CustomerSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.customers=new api.Customers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.delivery_lead_times=new api.DeliveryLeadTimes(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.event_callbacks=new api.EventCallbacks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.external_gateways=new api.ExternalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.external_payments=new api.ExternalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.external_promotions=new api.ExternalPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.external_tax_calculators=new api.ExternalTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.fixed_amount_promotions=new api.FixedAmountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.fixed_price_promotions=new api.FixedPricePromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.free_gift_promotions=new api.FreeGiftPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.free_shipping_promotions=new api.FreeShippingPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.geocoders=new api.Geocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.gift_card_recipients=new api.GiftCardRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.gift_cards=new api.GiftCards(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.google_geocoders=new api.GoogleGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.imports=new api.Imports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.in_stock_subscriptions=new api.InStockSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.inventory_models=new api.InventoryModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.inventory_return_locations=new api.InventoryReturnLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.inventory_stock_locations=new api.InventoryStockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.line_item_options=new api.LineItemOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.line_items=new api.LineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.manual_gateways=new api.ManualGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.manual_tax_calculators=new api.ManualTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.markets=new api.Markets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.merchants=new api.Merchants(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.order_amount_promotion_rules=new api.OrderAmountPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.order_copies=new api.OrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.order_subscriptions=new api.OrderSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.order_validation_rules=new api.OrderValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.orders=new api.Orders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.organization=new api.Organizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.packages=new api.Packages(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.parcel_line_items=new api.ParcelLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.parcels=new api.Parcels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.payment_gateways=new api.PaymentGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.payment_methods=new api.PaymentMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.paypal_gateways=new api.PaypalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.paypal_payments=new api.PaypalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.percentage_discount_promotions=new api.PercentageDiscountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.price_lists=new api.PriceLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.prices=new api.Prices(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.promotion_rules=new api.PromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.promotions=new api.Promotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.refunds=new api.Refunds(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.return_line_items=new api.ReturnLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.returns=new api.Returns(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.shipments=new api.Shipments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.shipping_categories=new api.ShippingCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.shipping_zones=new api.ShippingZones(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.sku_list_items=new api.SkuListItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.sku_list_promotion_rules=new api.SkuListPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.sku_lists=new api.SkuLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.sku_options=new api.SkuOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.skus=new api.Skus(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.stock_items=new api.StockItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.stock_line_items=new api.StockLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.stock_locations=new api.StockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.stock_transfers=new api.StockTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.stripe_gateways=new api.StripeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.stripe_payments=new api.StripePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.tax_calculators=new api.TaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.tax_categories=new api.TaxCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.tax_rules=new api.TaxRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.taxjar_accounts=new api.TaxjarAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.transactions=new api.Transactions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.voids=new api.Voids(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.webhooks=new api.Webhooks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"));this.wire_transfers=new api.WireTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"))}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}config(e){if(!e)return;if(e.organization)__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.organization,"f");__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(e)}resources(){return CommerceLayerStatic.resources()}isApiError(e){return CommerceLayerStatic.isApiError(e)}addRequestInterceptor(e,t){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(e,t)}addResponseInterceptor(e,t){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(e,t)}removeInterceptor(e,t){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[e].eject(t)}addRawResponseReader(){const e={id:undefined,rawResponse:undefined};function t(t){e.rawResponse=t===null||t===void 0?void 0:t.data;return t}const a=this.addResponseInterceptor(t);e.id=a;return e}removeRawResponseReader(e){const t=typeof e==="number"?e:e.id;if(t)return this.removeInterceptor("response",t)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);export default CommerceLayer;
1
+ var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import w from"./resource";class u{constructor(i){t.set(this,void 0),h.set(this,void 0),c(this,t,new w(i),"f"),c(this,h,i.organization,"f"),this.addresses=new e.Addresses(s(this,t,"f")),this.adjustments=new e.Adjustments(s(this,t,"f")),this.adyen_gateways=new e.AdyenGateways(s(this,t,"f")),this.adyen_payments=new e.AdyenPayments(s(this,t,"f")),this.application=new e.Applications(s(this,t,"f")),this.attachments=new e.Attachments(s(this,t,"f")),this.authorizations=new e.Authorizations(s(this,t,"f")),this.avalara_accounts=new e.AvalaraAccounts(s(this,t,"f")),this.billing_info_validation_rules=new e.BillingInfoValidationRules(s(this,t,"f")),this.bing_geocoders=new e.BingGeocoders(s(this,t,"f")),this.braintree_gateways=new e.BraintreeGateways(s(this,t,"f")),this.braintree_payments=new e.BraintreePayments(s(this,t,"f")),this.bundles=new e.Bundles(s(this,t,"f")),this.captures=new e.Captures(s(this,t,"f")),this.carrier_accounts=new e.CarrierAccounts(s(this,t,"f")),this.checkout_com_gateways=new e.CheckoutComGateways(s(this,t,"f")),this.checkout_com_payments=new e.CheckoutComPayments(s(this,t,"f")),this.coupon_codes_promotion_rules=new e.CouponCodesPromotionRules(s(this,t,"f")),this.coupon_recipients=new e.CouponRecipients(s(this,t,"f")),this.coupons=new e.Coupons(s(this,t,"f")),this.customer_addresses=new e.CustomerAddresses(s(this,t,"f")),this.customer_groups=new e.CustomerGroups(s(this,t,"f")),this.customer_password_resets=new e.CustomerPasswordResets(s(this,t,"f")),this.customer_payment_sources=new e.CustomerPaymentSources(s(this,t,"f")),this.customer_subscriptions=new e.CustomerSubscriptions(s(this,t,"f")),this.customers=new e.Customers(s(this,t,"f")),this.delivery_lead_times=new e.DeliveryLeadTimes(s(this,t,"f")),this.event_callbacks=new e.EventCallbacks(s(this,t,"f")),this.external_gateways=new e.ExternalGateways(s(this,t,"f")),this.external_payments=new e.ExternalPayments(s(this,t,"f")),this.external_promotions=new e.ExternalPromotions(s(this,t,"f")),this.external_tax_calculators=new e.ExternalTaxCalculators(s(this,t,"f")),this.fixed_amount_promotions=new e.FixedAmountPromotions(s(this,t,"f")),this.fixed_price_promotions=new e.FixedPricePromotions(s(this,t,"f")),this.free_gift_promotions=new e.FreeGiftPromotions(s(this,t,"f")),this.free_shipping_promotions=new e.FreeShippingPromotions(s(this,t,"f")),this.geocoders=new e.Geocoders(s(this,t,"f")),this.gift_card_recipients=new e.GiftCardRecipients(s(this,t,"f")),this.gift_cards=new e.GiftCards(s(this,t,"f")),this.google_geocoders=new e.GoogleGeocoders(s(this,t,"f")),this.imports=new e.Imports(s(this,t,"f")),this.in_stock_subscriptions=new e.InStockSubscriptions(s(this,t,"f")),this.inventory_models=new e.InventoryModels(s(this,t,"f")),this.inventory_return_locations=new e.InventoryReturnLocations(s(this,t,"f")),this.inventory_stock_locations=new e.InventoryStockLocations(s(this,t,"f")),this.line_item_options=new e.LineItemOptions(s(this,t,"f")),this.line_items=new e.LineItems(s(this,t,"f")),this.manual_gateways=new e.ManualGateways(s(this,t,"f")),this.manual_tax_calculators=new e.ManualTaxCalculators(s(this,t,"f")),this.markets=new e.Markets(s(this,t,"f")),this.merchants=new e.Merchants(s(this,t,"f")),this.order_amount_promotion_rules=new e.OrderAmountPromotionRules(s(this,t,"f")),this.order_copies=new e.OrderCopies(s(this,t,"f")),this.order_subscriptions=new e.OrderSubscriptions(s(this,t,"f")),this.order_validation_rules=new e.OrderValidationRules(s(this,t,"f")),this.orders=new e.Orders(s(this,t,"f")),this.organization=new e.Organizations(s(this,t,"f")),this.packages=new e.Packages(s(this,t,"f")),this.parcel_line_items=new e.ParcelLineItems(s(this,t,"f")),this.parcels=new e.Parcels(s(this,t,"f")),this.payment_gateways=new e.PaymentGateways(s(this,t,"f")),this.payment_methods=new e.PaymentMethods(s(this,t,"f")),this.paypal_gateways=new e.PaypalGateways(s(this,t,"f")),this.paypal_payments=new e.PaypalPayments(s(this,t,"f")),this.percentage_discount_promotions=new e.PercentageDiscountPromotions(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.prices=new e.Prices(s(this,t,"f")),this.promotion_rules=new e.PromotionRules(s(this,t,"f")),this.promotions=new e.Promotions(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.return_line_items=new e.ReturnLineItems(s(this,t,"f")),this.returns=new e.Returns(s(this,t,"f")),this.shipments=new e.Shipments(s(this,t,"f")),this.shipping_categories=new e.ShippingCategories(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_zones=new e.ShippingZones(s(this,t,"f")),this.sku_list_items=new e.SkuListItems(s(this,t,"f")),this.sku_list_promotion_rules=new e.SkuListPromotionRules(s(this,t,"f")),this.sku_lists=new e.SkuLists(s(this,t,"f")),this.sku_options=new e.SkuOptions(s(this,t,"f")),this.skus=new e.Skus(s(this,t,"f")),this.stock_items=new e.StockItems(s(this,t,"f")),this.stock_line_items=new e.StockLineItems(s(this,t,"f")),this.stock_locations=new e.StockLocations(s(this,t,"f")),this.stock_transfers=new e.StockTransfers(s(this,t,"f")),this.stripe_gateways=new e.StripeGateways(s(this,t,"f")),this.stripe_payments=new e.StripePayments(s(this,t,"f")),this.tax_calculators=new e.TaxCalculators(s(this,t,"f")),this.tax_categories=new e.TaxCategories(s(this,t,"f")),this.tax_rules=new e.TaxRules(s(this,t,"f")),this.taxjar_accounts=new e.TaxjarAccounts(s(this,t,"f")),this.transactions=new e.Transactions(s(this,t,"f")),this.voids=new e.Voids(s(this,t,"f")),this.webhooks=new e.Webhooks(s(this,t,"f")),this.wire_transfers=new e.WireTransfers(s(this,t,"f"))}get currentOrganization(){return s(this,h,"f")}config(i){!i||(i.organization&&c(this,h,i.organization,"f"),s(this,t,"f").config(i))}resources(){return f.resources()}isApiError(i){return f.isApiError(i)}addRequestInterceptor(i,n){return s(this,t,"f").interceptors.request.use(i,n)}addResponseInterceptor(i,n){return s(this,t,"f").interceptors.response.use(i,n)}removeInterceptor(i,n){return s(this,t,"f").interceptors[i].eject(n)}addRawResponseReader(){const i={id:void 0,rawResponse:void 0};function n(a){return i.rawResponse=a==null?void 0:a.data,a}const r=this.addResponseInterceptor(n);return i.id=r,i}removeRawResponseReader(i){const n=typeof i=="number"?i:i.id;if(n)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const p=o=>new u(o);export default p;
package/lib/esm/common.js CHANGED
@@ -1 +1 @@
1
- const isResourceId=e=>e&&e.type&&e.id;const isResourceType=e=>e&&typeof e.type!=="undefined"&&e.type;export{isResourceId,isResourceType};
1
+ import{resourceList as p}from"./api";const i=e=>e&&e.type&&e.id&&p.includes(e.type),t=e=>e&&typeof e.type!="undefined"&&e.type&&p.includes(e.type);export{i as isResourceId,t as isResourceType};
@@ -1,7 +1,11 @@
1
1
  declare const config: {
2
- default: {
3
- pageNumber: number;
4
- pageSize: number;
2
+ readonly default: {
3
+ readonly domain: "commercelayer.io";
4
+ readonly pageNumber: 1;
5
+ readonly pageSize: 10;
6
+ };
7
+ readonly client: {
8
+ readonly timeout: 3000;
5
9
  };
6
10
  };
7
11
  export default config;
package/lib/esm/config.js CHANGED
@@ -1 +1 @@
1
- const config={default:{pageNumber:1,pageSize:10}};export default config;
1
+ const e={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:3e3}};export default e;
package/lib/esm/error.js CHANGED
@@ -1 +1 @@
1
- var ErrorType;(function(r){r["CLIENT"]="client";r["REQUEST"]="request";r["RESPONSE"]="response";r["GENERIC"]="generic";r["CANCEL"]="cancel"})(ErrorType||(ErrorType={}));class SdkError extends Error{constructor(r){super(r.message);this.name=this.constructor.name;this.type=r.type||ErrorType.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(ErrorType).includes(r.type)}}class ApiError extends SdkError{constructor(r){super(Object.assign(Object.assign({},r),{type:ErrorType.RESPONSE}));this.errors=[];this.name=this.constructor.name}static isApiError(r){return SdkError.isSdkError(r)&&r.name==="ApiError"&&r.type===ErrorType.RESPONSE}first(){return this.errors.length>0?this.errors[0]:undefined}}export{SdkError,ApiError,ErrorType};
1
+ var s;(function(e){e.CLIENT="client",e.REQUEST="request",e.RESPONSE="response",e.GENERIC="generic",e.CANCEL="cancel"})(s||(s={}));class t extends Error{constructor(r){super(r.message);this.name=this.constructor.name,this.type=r.type||s.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(s).includes(r.type)}}class i extends t{constructor(r){super(Object.assign(Object.assign({},r),{type:s.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(r){return t.isSdkError(r)&&r.name==="ApiError"&&r.type===s.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}export{t as SdkError,i as ApiError,s as ErrorType};
@@ -1 +1 @@
1
- import{isResourceId}from"./common";const denormalize=e=>{let i;if(e.links)delete e.links;const s=e.data;const n=e.included;if(Array.isArray(s))i=s.map((e=>denormalizeResource(e,n)));else i=denormalizeResource(s,n);return i};const findIncluded=(e,i=[])=>{const s=i.find((i=>e.id===i.id&&e.type===i.type));return s||e};const denormalizeResource=(e,i)=>{const s=Object.assign({id:e.id,type:e.type},e.attributes);if(e.relationships)Object.keys(e.relationships).forEach((n=>{const r=e.relationships[n].data;if(r){if(Array.isArray(r))s[n]=r.map((e=>denormalizeResource(findIncluded(e,i),i)));else s[n]=denormalizeResource(findIncluded(r,i),i)}else if(r===null)s[n]=null}));return s};const normalize=e=>{const i={};const s={};for(const n in e){if(["type","id"].includes(n))continue;const r=e[n];if(r&&(isResourceId(r)||Array.isArray(r)&&isResourceId(r[0]))){s[n]={data:r}}else i[n]=r}const n={type:e.type,attributes:i,relationships:s};if(isResourceId(e))n.id=e.id;return n};export{denormalize,normalize};
1
+ import{isResourceId as t}from"./common";const c=i=>{let e;i.links&&delete i.links;const s=i.data,a=i.included;return Array.isArray(s)?e=s.map(r=>o(r,a)):e=o(s,a),e},d=(i,e=[])=>e.find(s=>i.id===s.id&&i.type===s.type)||i,o=(i,e)=>{const s=Object.assign({id:i.id,type:i.type},i.attributes);return i.relationships&&Object.keys(i.relationships).forEach(a=>{const r=i.relationships[a].data;r?Array.isArray(r)?s[a]=r.map(n=>o(d(n,e),e)):s[a]=o(d(r,e),e):r===null&&(s[a]=null)}),s},l=i=>{const e={},s={};for(const r in i){if(["type","id"].includes(r))continue;const n=i[r];n&&(t(n)||Array.isArray(n)&&t(n[0]))?s[r]={data:n}:e[r]=n}const a={type:i.type,attributes:e,relationships:s};return t(i)&&(a.id=i.id),a};export{c as denormalize,l as normalize};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
4
  **/
5
5
  export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
6
6
  export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';