@commercelayer/sdk 4.2.0 → 4.3.0-beta.4

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 (406) hide show
  1. package/LICENSE +1 -1
  2. package/lib/cjs/api.d.ts +1 -1
  3. package/lib/cjs/client.d.ts +4 -3
  4. package/lib/cjs/commercelayer.js +1 -1
  5. package/lib/cjs/jsonapi.d.ts +1 -1
  6. package/lib/cjs/jsonapi.js +1 -1
  7. package/lib/cjs/model.d.ts +1 -1
  8. package/lib/cjs/resource.d.ts +8 -4
  9. package/lib/cjs/resources/addresses.d.ts +5 -5
  10. package/lib/cjs/resources/addresses.js +1 -1
  11. package/lib/cjs/resources/adjustments.d.ts +4 -4
  12. package/lib/cjs/resources/adjustments.js +1 -1
  13. package/lib/cjs/resources/adyen_gateways.d.ts +5 -5
  14. package/lib/cjs/resources/adyen_gateways.js +1 -1
  15. package/lib/cjs/resources/adyen_payments.d.ts +5 -5
  16. package/lib/cjs/resources/adyen_payments.js +1 -1
  17. package/lib/cjs/resources/application.d.ts +4 -4
  18. package/lib/cjs/resources/application.js +1 -1
  19. package/lib/cjs/resources/attachments.d.ts +34 -34
  20. package/lib/cjs/resources/attachments.js +1 -1
  21. package/lib/cjs/resources/authorizations.d.ts +4 -4
  22. package/lib/cjs/resources/authorizations.js +1 -1
  23. package/lib/cjs/resources/avalara_accounts.d.ts +5 -5
  24. package/lib/cjs/resources/avalara_accounts.js +1 -1
  25. package/lib/cjs/resources/billing_info_validation_rules.d.ts +5 -5
  26. package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
  27. package/lib/cjs/resources/bing_geocoders.d.ts +4 -4
  28. package/lib/cjs/resources/bing_geocoders.js +1 -1
  29. package/lib/cjs/resources/braintree_gateways.d.ts +5 -5
  30. package/lib/cjs/resources/braintree_gateways.js +1 -1
  31. package/lib/cjs/resources/braintree_payments.d.ts +5 -5
  32. package/lib/cjs/resources/braintree_payments.js +1 -1
  33. package/lib/cjs/resources/bundles.d.ts +11 -6
  34. package/lib/cjs/resources/bundles.js +1 -1
  35. package/lib/cjs/resources/captures.d.ts +4 -4
  36. package/lib/cjs/resources/captures.js +1 -1
  37. package/lib/cjs/resources/carrier_accounts.d.ts +4 -4
  38. package/lib/cjs/resources/carrier_accounts.js +1 -1
  39. package/lib/cjs/resources/checkout_com_gateways.d.ts +5 -5
  40. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  41. package/lib/cjs/resources/checkout_com_payments.d.ts +5 -5
  42. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  43. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +11 -11
  44. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
  45. package/lib/cjs/resources/coupon_recipients.d.ts +5 -5
  46. package/lib/cjs/resources/coupon_recipients.js +1 -1
  47. package/lib/cjs/resources/coupons.d.ts +5 -5
  48. package/lib/cjs/resources/coupons.js +1 -1
  49. package/lib/cjs/resources/customer_addresses.d.ts +6 -6
  50. package/lib/cjs/resources/customer_addresses.js +1 -1
  51. package/lib/cjs/resources/customer_groups.d.ts +4 -4
  52. package/lib/cjs/resources/customer_groups.js +1 -1
  53. package/lib/cjs/resources/customer_password_resets.d.ts +4 -4
  54. package/lib/cjs/resources/customer_password_resets.js +1 -1
  55. package/lib/cjs/resources/customer_payment_sources.d.ts +13 -13
  56. package/lib/cjs/resources/customer_payment_sources.js +1 -1
  57. package/lib/cjs/resources/customer_subscriptions.d.ts +4 -4
  58. package/lib/cjs/resources/customer_subscriptions.js +1 -1
  59. package/lib/cjs/resources/customers.d.ts +5 -5
  60. package/lib/cjs/resources/customers.js +1 -1
  61. package/lib/cjs/resources/delivery_lead_times.d.ts +6 -6
  62. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  63. package/lib/cjs/resources/event_callbacks.d.ts +4 -4
  64. package/lib/cjs/resources/event_callbacks.js +1 -1
  65. package/lib/cjs/resources/external_gateways.d.ts +4 -4
  66. package/lib/cjs/resources/external_gateways.js +1 -1
  67. package/lib/cjs/resources/external_payments.d.ts +5 -5
  68. package/lib/cjs/resources/external_payments.js +1 -1
  69. package/lib/cjs/resources/external_promotions.d.ts +12 -9
  70. package/lib/cjs/resources/external_promotions.js +1 -1
  71. package/lib/cjs/resources/external_tax_calculators.d.ts +5 -5
  72. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  73. package/lib/cjs/resources/fixed_amount_promotions.d.ts +12 -9
  74. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  75. package/lib/cjs/resources/fixed_price_promotions.d.ts +13 -10
  76. package/lib/cjs/resources/fixed_price_promotions.js +1 -1
  77. package/lib/cjs/resources/free_gift_promotions.d.ts +13 -10
  78. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  79. package/lib/cjs/resources/free_shipping_promotions.d.ts +12 -9
  80. package/lib/cjs/resources/free_shipping_promotions.js +1 -1
  81. package/lib/cjs/resources/geocoders.d.ts +4 -4
  82. package/lib/cjs/resources/geocoders.js +1 -1
  83. package/lib/cjs/resources/gift_card_recipients.d.ts +5 -5
  84. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  85. package/lib/cjs/resources/gift_cards.d.ts +7 -7
  86. package/lib/cjs/resources/gift_cards.js +1 -1
  87. package/lib/cjs/resources/google_geocoders.d.ts +4 -4
  88. package/lib/cjs/resources/google_geocoders.js +1 -1
  89. package/lib/cjs/resources/imports.d.ts +4 -4
  90. package/lib/cjs/resources/imports.js +1 -1
  91. package/lib/cjs/resources/in_stock_subscriptions.d.ts +7 -7
  92. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  93. package/lib/cjs/resources/inventory_models.d.ts +4 -4
  94. package/lib/cjs/resources/inventory_models.js +1 -1
  95. package/lib/cjs/resources/inventory_return_locations.d.ts +6 -6
  96. package/lib/cjs/resources/inventory_return_locations.js +1 -1
  97. package/lib/cjs/resources/inventory_stock_locations.d.ts +6 -6
  98. package/lib/cjs/resources/inventory_stock_locations.js +1 -1
  99. package/lib/cjs/resources/klarna_gateways.d.ts +5 -5
  100. package/lib/cjs/resources/klarna_gateways.js +1 -1
  101. package/lib/cjs/resources/klarna_payments.d.ts +5 -5
  102. package/lib/cjs/resources/klarna_payments.js +1 -1
  103. package/lib/cjs/resources/line_item_options.d.ts +6 -6
  104. package/lib/cjs/resources/line_item_options.js +1 -1
  105. package/lib/cjs/resources/line_items.d.ts +15 -15
  106. package/lib/cjs/resources/line_items.js +1 -1
  107. package/lib/cjs/resources/manual_gateways.d.ts +4 -4
  108. package/lib/cjs/resources/manual_gateways.js +1 -1
  109. package/lib/cjs/resources/manual_tax_calculators.d.ts +6 -6
  110. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  111. package/lib/cjs/resources/markets.d.ts +9 -9
  112. package/lib/cjs/resources/markets.js +1 -1
  113. package/lib/cjs/resources/merchants.d.ts +5 -5
  114. package/lib/cjs/resources/merchants.js +1 -1
  115. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +10 -10
  116. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
  117. package/lib/cjs/resources/order_copies.d.ts +5 -5
  118. package/lib/cjs/resources/order_copies.js +1 -1
  119. package/lib/cjs/resources/order_subscriptions.d.ts +6 -6
  120. package/lib/cjs/resources/order_subscriptions.js +1 -1
  121. package/lib/cjs/resources/order_validation_rules.d.ts +4 -4
  122. package/lib/cjs/resources/order_validation_rules.js +1 -1
  123. package/lib/cjs/resources/orders.d.ts +16 -16
  124. package/lib/cjs/resources/orders.js +1 -1
  125. package/lib/cjs/resources/organization.d.ts +4 -4
  126. package/lib/cjs/resources/organization.js +1 -1
  127. package/lib/cjs/resources/packages.d.ts +5 -5
  128. package/lib/cjs/resources/packages.js +1 -1
  129. package/lib/cjs/resources/parcel_line_items.d.ts +6 -6
  130. package/lib/cjs/resources/parcel_line_items.js +1 -1
  131. package/lib/cjs/resources/parcels.d.ts +6 -6
  132. package/lib/cjs/resources/parcels.js +1 -1
  133. package/lib/cjs/resources/payment_gateways.d.ts +4 -4
  134. package/lib/cjs/resources/payment_gateways.js +1 -1
  135. package/lib/cjs/resources/payment_methods.d.ts +10 -7
  136. package/lib/cjs/resources/payment_methods.js +1 -1
  137. package/lib/cjs/resources/paypal_gateways.d.ts +4 -4
  138. package/lib/cjs/resources/paypal_gateways.js +1 -1
  139. package/lib/cjs/resources/paypal_payments.d.ts +5 -5
  140. package/lib/cjs/resources/paypal_payments.js +1 -1
  141. package/lib/cjs/resources/percentage_discount_promotions.d.ts +13 -10
  142. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  143. package/lib/cjs/resources/price_lists.d.ts +4 -4
  144. package/lib/cjs/resources/price_lists.js +1 -1
  145. package/lib/cjs/resources/prices.d.ts +6 -6
  146. package/lib/cjs/resources/prices.js +1 -1
  147. package/lib/cjs/resources/promotion_rules.d.ts +4 -4
  148. package/lib/cjs/resources/promotion_rules.js +1 -1
  149. package/lib/cjs/resources/promotions.d.ts +5 -4
  150. package/lib/cjs/resources/promotions.js +1 -1
  151. package/lib/cjs/resources/refunds.d.ts +4 -4
  152. package/lib/cjs/resources/refunds.js +1 -1
  153. package/lib/cjs/resources/return_line_items.d.ts +6 -6
  154. package/lib/cjs/resources/return_line_items.js +1 -1
  155. package/lib/cjs/resources/returns.d.ts +6 -6
  156. package/lib/cjs/resources/returns.js +1 -1
  157. package/lib/cjs/resources/shipments.d.ts +5 -5
  158. package/lib/cjs/resources/shipments.js +1 -1
  159. package/lib/cjs/resources/shipping_categories.d.ts +4 -4
  160. package/lib/cjs/resources/shipping_categories.js +1 -1
  161. package/lib/cjs/resources/shipping_methods.d.ts +11 -9
  162. package/lib/cjs/resources/shipping_methods.js +1 -1
  163. package/lib/cjs/resources/shipping_zones.d.ts +4 -4
  164. package/lib/cjs/resources/shipping_zones.js +1 -1
  165. package/lib/cjs/resources/sku_list_items.d.ts +6 -6
  166. package/lib/cjs/resources/sku_list_items.js +1 -1
  167. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +11 -11
  168. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
  169. package/lib/cjs/resources/sku_lists.d.ts +4 -4
  170. package/lib/cjs/resources/sku_lists.js +1 -1
  171. package/lib/cjs/resources/sku_options.d.ts +8 -5
  172. package/lib/cjs/resources/sku_options.js +1 -1
  173. package/lib/cjs/resources/skus.d.ts +5 -5
  174. package/lib/cjs/resources/skus.js +1 -1
  175. package/lib/cjs/resources/stock_items.d.ts +6 -6
  176. package/lib/cjs/resources/stock_items.js +1 -1
  177. package/lib/cjs/resources/stock_line_items.d.ts +4 -4
  178. package/lib/cjs/resources/stock_line_items.js +1 -1
  179. package/lib/cjs/resources/stock_locations.d.ts +5 -5
  180. package/lib/cjs/resources/stock_locations.js +1 -1
  181. package/lib/cjs/resources/stock_transfers.d.ts +8 -8
  182. package/lib/cjs/resources/stock_transfers.js +1 -1
  183. package/lib/cjs/resources/stripe_gateways.d.ts +4 -4
  184. package/lib/cjs/resources/stripe_gateways.js +1 -1
  185. package/lib/cjs/resources/stripe_payments.d.ts +5 -5
  186. package/lib/cjs/resources/stripe_payments.js +1 -1
  187. package/lib/cjs/resources/tax_calculators.d.ts +4 -4
  188. package/lib/cjs/resources/tax_calculators.js +1 -1
  189. package/lib/cjs/resources/tax_categories.d.ts +9 -9
  190. package/lib/cjs/resources/tax_categories.js +1 -1
  191. package/lib/cjs/resources/tax_rules.d.ts +5 -5
  192. package/lib/cjs/resources/tax_rules.js +1 -1
  193. package/lib/cjs/resources/taxjar_accounts.d.ts +5 -5
  194. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  195. package/lib/cjs/resources/transactions.d.ts +4 -4
  196. package/lib/cjs/resources/transactions.js +1 -1
  197. package/lib/cjs/resources/voids.d.ts +4 -4
  198. package/lib/cjs/resources/voids.js +1 -1
  199. package/lib/cjs/resources/webhooks.d.ts +4 -4
  200. package/lib/cjs/resources/webhooks.js +1 -1
  201. package/lib/cjs/resources/wire_transfers.d.ts +5 -5
  202. package/lib/cjs/resources/wire_transfers.js +1 -1
  203. package/lib/esm/api.d.ts +1 -1
  204. package/lib/esm/client.d.ts +4 -3
  205. package/lib/esm/commercelayer.js +1 -1
  206. package/lib/esm/jsonapi.d.ts +1 -1
  207. package/lib/esm/jsonapi.js +1 -1
  208. package/lib/esm/model.d.ts +1 -1
  209. package/lib/esm/resource.d.ts +8 -4
  210. package/lib/esm/resources/addresses.d.ts +5 -5
  211. package/lib/esm/resources/addresses.js +1 -1
  212. package/lib/esm/resources/adjustments.d.ts +4 -4
  213. package/lib/esm/resources/adjustments.js +1 -1
  214. package/lib/esm/resources/adyen_gateways.d.ts +5 -5
  215. package/lib/esm/resources/adyen_gateways.js +1 -1
  216. package/lib/esm/resources/adyen_payments.d.ts +5 -5
  217. package/lib/esm/resources/adyen_payments.js +1 -1
  218. package/lib/esm/resources/application.d.ts +4 -4
  219. package/lib/esm/resources/application.js +1 -1
  220. package/lib/esm/resources/attachments.d.ts +34 -34
  221. package/lib/esm/resources/attachments.js +1 -1
  222. package/lib/esm/resources/authorizations.d.ts +4 -4
  223. package/lib/esm/resources/authorizations.js +1 -1
  224. package/lib/esm/resources/avalara_accounts.d.ts +5 -5
  225. package/lib/esm/resources/avalara_accounts.js +1 -1
  226. package/lib/esm/resources/billing_info_validation_rules.d.ts +5 -5
  227. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  228. package/lib/esm/resources/bing_geocoders.d.ts +4 -4
  229. package/lib/esm/resources/bing_geocoders.js +1 -1
  230. package/lib/esm/resources/braintree_gateways.d.ts +5 -5
  231. package/lib/esm/resources/braintree_gateways.js +1 -1
  232. package/lib/esm/resources/braintree_payments.d.ts +5 -5
  233. package/lib/esm/resources/braintree_payments.js +1 -1
  234. package/lib/esm/resources/bundles.d.ts +11 -6
  235. package/lib/esm/resources/bundles.js +1 -1
  236. package/lib/esm/resources/captures.d.ts +4 -4
  237. package/lib/esm/resources/captures.js +1 -1
  238. package/lib/esm/resources/carrier_accounts.d.ts +4 -4
  239. package/lib/esm/resources/carrier_accounts.js +1 -1
  240. package/lib/esm/resources/checkout_com_gateways.d.ts +5 -5
  241. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  242. package/lib/esm/resources/checkout_com_payments.d.ts +5 -5
  243. package/lib/esm/resources/checkout_com_payments.js +1 -1
  244. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +11 -11
  245. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  246. package/lib/esm/resources/coupon_recipients.d.ts +5 -5
  247. package/lib/esm/resources/coupon_recipients.js +1 -1
  248. package/lib/esm/resources/coupons.d.ts +5 -5
  249. package/lib/esm/resources/coupons.js +1 -1
  250. package/lib/esm/resources/customer_addresses.d.ts +6 -6
  251. package/lib/esm/resources/customer_addresses.js +1 -1
  252. package/lib/esm/resources/customer_groups.d.ts +4 -4
  253. package/lib/esm/resources/customer_groups.js +1 -1
  254. package/lib/esm/resources/customer_password_resets.d.ts +4 -4
  255. package/lib/esm/resources/customer_password_resets.js +1 -1
  256. package/lib/esm/resources/customer_payment_sources.d.ts +13 -13
  257. package/lib/esm/resources/customer_payment_sources.js +1 -1
  258. package/lib/esm/resources/customer_subscriptions.d.ts +4 -4
  259. package/lib/esm/resources/customer_subscriptions.js +1 -1
  260. package/lib/esm/resources/customers.d.ts +5 -5
  261. package/lib/esm/resources/customers.js +1 -1
  262. package/lib/esm/resources/delivery_lead_times.d.ts +6 -6
  263. package/lib/esm/resources/delivery_lead_times.js +1 -1
  264. package/lib/esm/resources/event_callbacks.d.ts +4 -4
  265. package/lib/esm/resources/event_callbacks.js +1 -1
  266. package/lib/esm/resources/external_gateways.d.ts +4 -4
  267. package/lib/esm/resources/external_gateways.js +1 -1
  268. package/lib/esm/resources/external_payments.d.ts +5 -5
  269. package/lib/esm/resources/external_payments.js +1 -1
  270. package/lib/esm/resources/external_promotions.d.ts +12 -9
  271. package/lib/esm/resources/external_promotions.js +1 -1
  272. package/lib/esm/resources/external_tax_calculators.d.ts +5 -5
  273. package/lib/esm/resources/external_tax_calculators.js +1 -1
  274. package/lib/esm/resources/fixed_amount_promotions.d.ts +12 -9
  275. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  276. package/lib/esm/resources/fixed_price_promotions.d.ts +13 -10
  277. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  278. package/lib/esm/resources/free_gift_promotions.d.ts +13 -10
  279. package/lib/esm/resources/free_gift_promotions.js +1 -1
  280. package/lib/esm/resources/free_shipping_promotions.d.ts +12 -9
  281. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  282. package/lib/esm/resources/geocoders.d.ts +4 -4
  283. package/lib/esm/resources/geocoders.js +1 -1
  284. package/lib/esm/resources/gift_card_recipients.d.ts +5 -5
  285. package/lib/esm/resources/gift_card_recipients.js +1 -1
  286. package/lib/esm/resources/gift_cards.d.ts +7 -7
  287. package/lib/esm/resources/gift_cards.js +1 -1
  288. package/lib/esm/resources/google_geocoders.d.ts +4 -4
  289. package/lib/esm/resources/google_geocoders.js +1 -1
  290. package/lib/esm/resources/imports.d.ts +4 -4
  291. package/lib/esm/resources/imports.js +1 -1
  292. package/lib/esm/resources/in_stock_subscriptions.d.ts +7 -7
  293. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  294. package/lib/esm/resources/inventory_models.d.ts +4 -4
  295. package/lib/esm/resources/inventory_models.js +1 -1
  296. package/lib/esm/resources/inventory_return_locations.d.ts +6 -6
  297. package/lib/esm/resources/inventory_return_locations.js +1 -1
  298. package/lib/esm/resources/inventory_stock_locations.d.ts +6 -6
  299. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  300. package/lib/esm/resources/klarna_gateways.d.ts +5 -5
  301. package/lib/esm/resources/klarna_gateways.js +1 -1
  302. package/lib/esm/resources/klarna_payments.d.ts +5 -5
  303. package/lib/esm/resources/klarna_payments.js +1 -1
  304. package/lib/esm/resources/line_item_options.d.ts +6 -6
  305. package/lib/esm/resources/line_item_options.js +1 -1
  306. package/lib/esm/resources/line_items.d.ts +15 -15
  307. package/lib/esm/resources/line_items.js +1 -1
  308. package/lib/esm/resources/manual_gateways.d.ts +4 -4
  309. package/lib/esm/resources/manual_gateways.js +1 -1
  310. package/lib/esm/resources/manual_tax_calculators.d.ts +6 -6
  311. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  312. package/lib/esm/resources/markets.d.ts +9 -9
  313. package/lib/esm/resources/markets.js +1 -1
  314. package/lib/esm/resources/merchants.d.ts +5 -5
  315. package/lib/esm/resources/merchants.js +1 -1
  316. package/lib/esm/resources/order_amount_promotion_rules.d.ts +10 -10
  317. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  318. package/lib/esm/resources/order_copies.d.ts +5 -5
  319. package/lib/esm/resources/order_copies.js +1 -1
  320. package/lib/esm/resources/order_subscriptions.d.ts +6 -6
  321. package/lib/esm/resources/order_subscriptions.js +1 -1
  322. package/lib/esm/resources/order_validation_rules.d.ts +4 -4
  323. package/lib/esm/resources/order_validation_rules.js +1 -1
  324. package/lib/esm/resources/orders.d.ts +16 -16
  325. package/lib/esm/resources/orders.js +1 -1
  326. package/lib/esm/resources/organization.d.ts +4 -4
  327. package/lib/esm/resources/organization.js +1 -1
  328. package/lib/esm/resources/packages.d.ts +5 -5
  329. package/lib/esm/resources/packages.js +1 -1
  330. package/lib/esm/resources/parcel_line_items.d.ts +6 -6
  331. package/lib/esm/resources/parcel_line_items.js +1 -1
  332. package/lib/esm/resources/parcels.d.ts +6 -6
  333. package/lib/esm/resources/parcels.js +1 -1
  334. package/lib/esm/resources/payment_gateways.d.ts +4 -4
  335. package/lib/esm/resources/payment_gateways.js +1 -1
  336. package/lib/esm/resources/payment_methods.d.ts +10 -7
  337. package/lib/esm/resources/payment_methods.js +1 -1
  338. package/lib/esm/resources/paypal_gateways.d.ts +4 -4
  339. package/lib/esm/resources/paypal_gateways.js +1 -1
  340. package/lib/esm/resources/paypal_payments.d.ts +5 -5
  341. package/lib/esm/resources/paypal_payments.js +1 -1
  342. package/lib/esm/resources/percentage_discount_promotions.d.ts +13 -10
  343. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  344. package/lib/esm/resources/price_lists.d.ts +4 -4
  345. package/lib/esm/resources/price_lists.js +1 -1
  346. package/lib/esm/resources/prices.d.ts +6 -6
  347. package/lib/esm/resources/prices.js +1 -1
  348. package/lib/esm/resources/promotion_rules.d.ts +4 -4
  349. package/lib/esm/resources/promotion_rules.js +1 -1
  350. package/lib/esm/resources/promotions.d.ts +5 -4
  351. package/lib/esm/resources/promotions.js +1 -1
  352. package/lib/esm/resources/refunds.d.ts +4 -4
  353. package/lib/esm/resources/refunds.js +1 -1
  354. package/lib/esm/resources/return_line_items.d.ts +6 -6
  355. package/lib/esm/resources/return_line_items.js +1 -1
  356. package/lib/esm/resources/returns.d.ts +6 -6
  357. package/lib/esm/resources/returns.js +1 -1
  358. package/lib/esm/resources/shipments.d.ts +5 -5
  359. package/lib/esm/resources/shipments.js +1 -1
  360. package/lib/esm/resources/shipping_categories.d.ts +4 -4
  361. package/lib/esm/resources/shipping_categories.js +1 -1
  362. package/lib/esm/resources/shipping_methods.d.ts +11 -9
  363. package/lib/esm/resources/shipping_methods.js +1 -1
  364. package/lib/esm/resources/shipping_zones.d.ts +4 -4
  365. package/lib/esm/resources/shipping_zones.js +1 -1
  366. package/lib/esm/resources/sku_list_items.d.ts +6 -6
  367. package/lib/esm/resources/sku_list_items.js +1 -1
  368. package/lib/esm/resources/sku_list_promotion_rules.d.ts +11 -11
  369. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  370. package/lib/esm/resources/sku_lists.d.ts +4 -4
  371. package/lib/esm/resources/sku_lists.js +1 -1
  372. package/lib/esm/resources/sku_options.d.ts +8 -5
  373. package/lib/esm/resources/sku_options.js +1 -1
  374. package/lib/esm/resources/skus.d.ts +5 -5
  375. package/lib/esm/resources/skus.js +1 -1
  376. package/lib/esm/resources/stock_items.d.ts +6 -6
  377. package/lib/esm/resources/stock_items.js +1 -1
  378. package/lib/esm/resources/stock_line_items.d.ts +4 -4
  379. package/lib/esm/resources/stock_line_items.js +1 -1
  380. package/lib/esm/resources/stock_locations.d.ts +5 -5
  381. package/lib/esm/resources/stock_locations.js +1 -1
  382. package/lib/esm/resources/stock_transfers.d.ts +8 -8
  383. package/lib/esm/resources/stock_transfers.js +1 -1
  384. package/lib/esm/resources/stripe_gateways.d.ts +4 -4
  385. package/lib/esm/resources/stripe_gateways.js +1 -1
  386. package/lib/esm/resources/stripe_payments.d.ts +5 -5
  387. package/lib/esm/resources/stripe_payments.js +1 -1
  388. package/lib/esm/resources/tax_calculators.d.ts +4 -4
  389. package/lib/esm/resources/tax_calculators.js +1 -1
  390. package/lib/esm/resources/tax_categories.d.ts +9 -9
  391. package/lib/esm/resources/tax_categories.js +1 -1
  392. package/lib/esm/resources/tax_rules.d.ts +5 -5
  393. package/lib/esm/resources/tax_rules.js +1 -1
  394. package/lib/esm/resources/taxjar_accounts.d.ts +5 -5
  395. package/lib/esm/resources/taxjar_accounts.js +1 -1
  396. package/lib/esm/resources/transactions.d.ts +4 -4
  397. package/lib/esm/resources/transactions.js +1 -1
  398. package/lib/esm/resources/voids.d.ts +4 -4
  399. package/lib/esm/resources/voids.js +1 -1
  400. package/lib/esm/resources/webhooks.d.ts +4 -4
  401. package/lib/esm/resources/webhooks.js +1 -1
  402. package/lib/esm/resources/wire_transfers.d.ts +5 -5
  403. package/lib/esm/resources/wire_transfers.js +1 -1
  404. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  405. package/lib/tsconfig.tsbuildinfo +1 -1
  406. package/package.json +8 -8
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) [2021] [Commerce Layer]
3
+ Copyright (c) [2022] [Commerce Layer]
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/lib/cjs/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2022 Commerce Layer Inc.
3
- * OpenAPI schema, version 2.8.0
3
+ * OpenAPI schema, version 2.8.1
4
4
  **/
5
5
  export { default as Addresses } from './resources/addresses';
6
6
  export { default as Adjustments } from './resources/adjustments';
@@ -1,9 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  import { AxiosProxyConfig, Method } from 'axios';
3
- import type { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
3
+ import type { DocWithData, ResourceObject } from 'jsonapi-typescript';
4
4
  import type { InterceptorManager } from './interceptor';
5
5
  import type { Agent as HttpAgent } from 'http';
6
6
  import type { Agent as HttpsAgent } from 'https';
7
+ declare type ProxyConfig = AxiosProxyConfig | false;
7
8
  declare type RequestConfig = {
8
9
  timeout?: number;
9
10
  params?: {
@@ -11,7 +12,7 @@ declare type RequestConfig = {
11
12
  };
12
13
  httpAgent?: HttpAgent;
13
14
  httpsAgent?: HttpsAgent;
14
- proxy?: AxiosProxyConfig | false;
15
+ proxy?: ProxyConfig;
15
16
  };
16
17
  declare type ApiClientInitConfig = {
17
18
  organization: string;
@@ -26,7 +27,7 @@ declare class ApiClient {
26
27
  interceptors: InterceptorManager;
27
28
  private constructor();
28
29
  config(config: ApiClientConfig): void;
29
- request(method: Method, path: string, body?: JSONApiResource, options?: ApiClientConfig): Promise<JSONApiDocument>;
30
+ request(method: Method, path: string, body?: ResourceObject, options?: ApiClientConfig): Promise<DocWithData>;
30
31
  }
31
32
  export default ApiClient;
32
33
  export { ApiClientInitConfig, ApiClientConfig, RequestConfig };
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,i){i===void 0&&(i=s),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,s,i){if(s==="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 s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_CommerceLayerClient_adapter,_CommerceLayerClient_organization;Object.defineProperty(exports,"__esModule",{value:!0});const api=__importStar(require("./api")),static_1=require("./static"),resource_1=__importDefault(require("./resource")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)(),OPEN_API_SCHEMA_VERSION="2.8.0";class CommerceLayerClient{constructor(t){_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),debug("new commercelayer instance %O",t),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(t),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.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.klarna_gateways=new api.KlarnaGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.klarna_payments=new api.KlarnaPayments(__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"))}static get openApiSchemaVersion(){return OPEN_API_SCHEMA_VERSION}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}localConfig(t){t.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f")}config(t){debug("config %o",t),this.localConfig(t),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(t)}resources(){return static_1.CommerceLayerStatic.resources()}isApiError(t){return static_1.CommerceLayerStatic.isApiError(t)}addRequestInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(t,s)}addResponseInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(t,s)}removeInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[t].eject(s)}addRawResponseReader(){const t={id:void 0,rawResponse:void 0};function s(n){return t.rawResponse=n==null?void 0:n.data,n}const i=this.addResponseInterceptor(s);return t.id=i,t}removeRawResponseReader(t){const s=typeof t=="number"?t:t.id;if(s)return this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);exports.default=CommerceLayer;
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,i){i===void 0&&(i=s),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,s,i){if(s==="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 s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_CommerceLayerClient_adapter,_CommerceLayerClient_organization;Object.defineProperty(exports,"__esModule",{value:!0});const api=__importStar(require("./api")),static_1=require("./static"),resource_1=__importDefault(require("./resource")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)(),OPEN_API_SCHEMA_VERSION="2.8.1";class CommerceLayerClient{constructor(t){_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),debug("new commercelayer instance %O",t),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(t),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.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.klarna_gateways=new api.KlarnaGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.klarna_payments=new api.KlarnaPayments(__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"))}static get openApiSchemaVersion(){return OPEN_API_SCHEMA_VERSION}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}localConfig(t){t.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f")}config(t){debug("config %o",t),this.localConfig(t),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(t)}resources(){return static_1.CommerceLayerStatic.resources()}isApiError(t){return static_1.CommerceLayerStatic.isApiError(t)}addRequestInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(t,s)}addResponseInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(t,s)}removeInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[t].eject(s)}addRawResponseReader(){const t={id:void 0,rawResponse:void 0};function s(n){return t.rawResponse=n==null?void 0:n.data,n}const i=this.addResponseInterceptor(s);return t.id=i,t}removeRawResponseReader(t){const s=typeof t=="number"?t:t.id;if(s)return this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);exports.default=CommerceLayer;
@@ -1,4 +1,4 @@
1
- import { DocWithData, ResourceObject } from 'jsonapi-typescript';
1
+ import type { DocWithData, ResourceObject } from 'jsonapi-typescript';
2
2
  import type { ResourceCreate, ResourceUpdate, ResourceId, ResourceType, Resource } from './resource';
3
3
  declare const denormalize: <R extends Resource>(response: DocWithData) => R | R[];
4
4
  declare const normalize: (resource: (ResourceCreate & ResourceType) | (ResourceUpdate & ResourceId)) => ResourceObject;
@@ -1 +1 @@
1
- "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalize=exports.denormalize=void 0;const common_1=require("./common"),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)(),denormalize=e=>{let t;e.links&&delete e.links;const o=e.data,s=e.included;return Array.isArray(o)?t=o.map(i=>denormalizeResource(i,s)):t=denormalizeResource(o,s),t};exports.denormalize=denormalize;const findIncluded=(e,t=[])=>t.find(o=>e.id===o.id&&e.type===o.type)||e,denormalizeResource=(e,t)=>{debug("denormalize resource: %O, %o",e,t||{});const o=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(s=>{const i=e.relationships[s].data;i?Array.isArray(i)?o[s]=i.map(r=>denormalizeResource(findIncluded(r,t),t)):o[s]=denormalizeResource(findIncluded(i,t),t):i===null&&(o[s]=null)}),debug("denormalized resource: %O",o),o},normalize=e=>{debug("normalize resource: %O",e);const t={},o={};for(const i in e){if(["type","id"].includes(i))continue;const r=e[i];r&&((0,common_1.isResourceId)(r)||Array.isArray(r)&&(0,common_1.isResourceId)(r[0]))?o[i]={data:r}:t[i]=r}const s={type:e.type,attributes:t,relationships:o};return(0,common_1.isResourceId)(e)&&(s.id=e.id),debug("normalized resource: %O",s),s};exports.normalize=normalize;
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalize=exports.denormalize=void 0;const common_1=require("./common"),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)(),denormalize=e=>{let t;e.links&&delete e.links;const r=e.data,s=e.included;return Array.isArray(r)?t=r.map(i=>denormalizeResource(i,s)):t=denormalizeResource(r,s),t};exports.denormalize=denormalize;const findIncluded=(e,t=[])=>t.find(r=>e.id===r.id&&e.type===r.type)||e,denormalizeResource=(e,t)=>{debug("denormalize resource: %O, %o",e,t||{});const r=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(s=>{const i=e.relationships[s].data;i?Array.isArray(i)?r[s]=i.map(o=>denormalizeResource(findIncluded(o,t),t)):r[s]=denormalizeResource(findIncluded(i,t),t):i===null&&(r[s]=null)}),debug("denormalized resource: %O",r),r},normalize=e=>{debug("normalize resource: %O",e);const t={},r={};for(const i in e){if(["type","id"].includes(i))continue;const o=e[i];o&&(0,common_1.isResourceType)(o)&&o.id===null?r[i]={data:null}:o&&((0,common_1.isResourceId)(o)||Array.isArray(o)&&(0,common_1.isResourceId)(o[0]))?r[i]={data:o}:t[i]=o}const s={type:e.type,attributes:t,relationships:r};return(0,common_1.isResourceId)(e)&&(s.id=e.id),debug("normalized resource: %O",s),s};exports.normalize=normalize;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2022 Commerce Layer Inc.
3
- * OpenAPI schema, version 2.8.0
3
+ * OpenAPI schema, version 2.8.1
4
4
  **/
5
5
  export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
6
6
  export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';
@@ -2,9 +2,13 @@ import { ApiClientInitConfig } from './client';
2
2
  import { QueryParamsRetrieve, QueryParamsList } from './query';
3
3
  import { ResourceTypeLock } from './api';
4
4
  import { InterceptorManager } from './interceptor';
5
- import { Value as JSONValue } from 'json-typescript';
5
+ import type { Value } from 'json-typescript';
6
+ declare type ResourceNull = {
7
+ id: null;
8
+ } & ResourceType;
9
+ declare type ResourceRel = ResourceId | ResourceNull;
6
10
  declare type Metadata = {
7
- [key: string]: JSONValue;
11
+ [key: string]: Value;
8
12
  };
9
13
  interface ResourceType {
10
14
  readonly type: ResourceTypeLock;
@@ -43,7 +47,7 @@ declare class ListResponse<R> extends Array<R> {
43
47
  last(): R | undefined;
44
48
  get(index: number): R | undefined;
45
49
  }
46
- export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse };
50
+ export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ResourceRel };
47
51
  declare type ResourceAdapterConfig = {};
48
52
  declare type ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig;
49
53
  declare type ResourcesConfig = Partial<ResourcesInitConfig>;
@@ -64,7 +68,7 @@ declare abstract class ApiResource {
64
68
  static readonly TYPE: ResourceTypeLock;
65
69
  protected resources: ResourceAdapter;
66
70
  constructor(adapter: ResourceAdapter);
67
- abstract relationship(id: string | ResourceId): ResourceId;
71
+ abstract relationship(id: string | ResourceId | null): ResourceRel;
68
72
  abstract type(): string;
69
73
  }
70
74
  export default ResourceAdapter;
@@ -1,10 +1,10 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Geocoder } from './geocoders';
4
- declare type AddressRel = ResourceId & {
4
+ declare type AddressRel = ResourceRel & {
5
5
  type: typeof Addresses.TYPE;
6
6
  };
7
- declare type GeocoderRel = ResourceId & {
7
+ declare type GeocoderRel = ResourceRel & {
8
8
  type: 'geocoders';
9
9
  };
10
10
  interface Address extends Resource {
@@ -80,7 +80,7 @@ declare class Addresses extends ApiResource {
80
80
  update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
81
81
  delete(id: string, options?: ResourcesConfig): Promise<void>;
82
82
  isAddress(resource: any): resource is Address;
83
- relationship(id: string | ResourceId): AddressRel;
83
+ relationship(id: string | ResourceId | null): AddressRel;
84
84
  type(): string;
85
85
  }
86
86
  export default Addresses;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Addresses extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Addresses.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Addresses.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Addresses.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Addresses.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Addresses.TYPE,id:e},t)}isAddress(e){return e.type&&e.type===Addresses.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Addresses.TYPE}:{id:e.id,type:Addresses.TYPE}}type(){return Addresses.TYPE}}Addresses.TYPE="addresses",exports.default=Addresses;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Addresses extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Addresses.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Addresses.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Addresses.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Addresses.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Addresses.TYPE,id:e},t)}isAddress(e){return e.type&&e.type===Addresses.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Addresses.TYPE}:{id:e.id,type:Addresses.TYPE}}type(){return Addresses.TYPE}}Addresses.TYPE="addresses",exports.default=Addresses;
@@ -1,6 +1,6 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
3
- declare type AdjustmentRel = ResourceId & {
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ declare type AdjustmentRel = ResourceRel & {
4
4
  type: typeof Adjustments.TYPE;
5
5
  };
6
6
  interface Adjustment extends Resource {
@@ -28,7 +28,7 @@ declare class Adjustments extends ApiResource {
28
28
  update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
29
29
  delete(id: string, options?: ResourcesConfig): Promise<void>;
30
30
  isAdjustment(resource: any): resource is Adjustment;
31
- relationship(id: string | ResourceId): AdjustmentRel;
31
+ relationship(id: string | ResourceId | null): AdjustmentRel;
32
32
  type(): string;
33
33
  }
34
34
  export default Adjustments;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Adjustments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Adjustments.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Adjustments.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:Adjustments.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Adjustments.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:Adjustments.TYPE,id:e},r)}isAdjustment(e){return e.type&&e.type===Adjustments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Adjustments.TYPE}:{id:e.id,type:Adjustments.TYPE}}type(){return Adjustments.TYPE}}Adjustments.TYPE="adjustments",exports.default=Adjustments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Adjustments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Adjustments.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Adjustments.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:Adjustments.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Adjustments.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:Adjustments.TYPE,id:e},r)}isAdjustment(e){return e.type&&e.type===Adjustments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Adjustments.TYPE}:{id:e.id,type:Adjustments.TYPE}}type(){return Adjustments.TYPE}}Adjustments.TYPE="adjustments",exports.default=Adjustments;
@@ -1,11 +1,11 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { PaymentMethod } from './payment_methods';
4
4
  import { AdyenPayment } from './adyen_payments';
5
- declare type AdyenGatewayRel = ResourceId & {
5
+ declare type AdyenGatewayRel = ResourceRel & {
6
6
  type: typeof AdyenGateways.TYPE;
7
7
  };
8
- declare type AdyenPaymentRel = ResourceId & {
8
+ declare type AdyenPaymentRel = ResourceRel & {
9
9
  type: 'adyen_payments';
10
10
  };
11
11
  interface AdyenGateway extends Resource {
@@ -38,7 +38,7 @@ declare class AdyenGateways extends ApiResource {
38
38
  update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
39
39
  delete(id: string, options?: ResourcesConfig): Promise<void>;
40
40
  isAdyenGateway(resource: any): resource is AdyenGateway;
41
- relationship(id: string | ResourceId): AdyenGatewayRel;
41
+ relationship(id: string | ResourceId | null): AdyenGatewayRel;
42
42
  type(): string;
43
43
  }
44
44
  export default AdyenGateways;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AdyenGateways extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:AdyenGateways.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:AdyenGateways.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:AdyenGateways.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:AdyenGateways.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:AdyenGateways.TYPE,id:e},r)}isAdyenGateway(e){return e.type&&e.type===AdyenGateways.TYPE}relationship(e){return typeof e=="string"?{id:e,type:AdyenGateways.TYPE}:{id:e.id,type:AdyenGateways.TYPE}}type(){return AdyenGateways.TYPE}}AdyenGateways.TYPE="adyen_gateways",exports.default=AdyenGateways;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AdyenGateways extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:AdyenGateways.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:AdyenGateways.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:AdyenGateways.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:AdyenGateways.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:AdyenGateways.TYPE,id:e},r)}isAdyenGateway(e){return e.type&&e.type===AdyenGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:AdyenGateways.TYPE}:{id:e.id,type:AdyenGateways.TYPE}}type(){return AdyenGateways.TYPE}}AdyenGateways.TYPE="adyen_gateways",exports.default=AdyenGateways;
@@ -1,11 +1,11 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Order } from './orders';
4
4
  import { PaymentGateway } from './payment_gateways';
5
- declare type AdyenPaymentRel = ResourceId & {
5
+ declare type AdyenPaymentRel = ResourceRel & {
6
6
  type: typeof AdyenPayments.TYPE;
7
7
  };
8
- declare type OrderRel = ResourceId & {
8
+ declare type OrderRel = ResourceRel & {
9
9
  type: 'orders';
10
10
  };
11
11
  interface AdyenPayment extends Resource {
@@ -35,7 +35,7 @@ declare class AdyenPayments extends ApiResource {
35
35
  update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
36
36
  delete(id: string, options?: ResourcesConfig): Promise<void>;
37
37
  isAdyenPayment(resource: any): resource is AdyenPayment;
38
- relationship(id: string | ResourceId): AdyenPaymentRel;
38
+ relationship(id: string | ResourceId | null): AdyenPaymentRel;
39
39
  type(): string;
40
40
  }
41
41
  export default AdyenPayments;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AdyenPayments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:AdyenPayments.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:AdyenPayments.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:AdyenPayments.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:AdyenPayments.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:AdyenPayments.TYPE,id:e},r)}isAdyenPayment(e){return e.type&&e.type===AdyenPayments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:AdyenPayments.TYPE}:{id:e.id,type:AdyenPayments.TYPE}}type(){return AdyenPayments.TYPE}}AdyenPayments.TYPE="adyen_payments",exports.default=AdyenPayments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AdyenPayments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:AdyenPayments.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:AdyenPayments.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:AdyenPayments.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:AdyenPayments.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:AdyenPayments.TYPE,id:e},r)}isAdyenPayment(e){return e.type&&e.type===AdyenPayments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:AdyenPayments.TYPE}:{id:e.id,type:AdyenPayments.TYPE}}type(){return AdyenPayments.TYPE}}AdyenPayments.TYPE="adyen_payments",exports.default=AdyenPayments;
@@ -1,6 +1,6 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsRetrieve } from '../query';
3
- declare type ApplicationRel = ResourceId & {
1
+ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel } from '../resource';
2
+ import { QueryParamsRetrieve } from '../query';
3
+ declare type ApplicationRel = ResourceRel & {
4
4
  type: typeof Applications.TYPE;
5
5
  };
6
6
  interface Application extends Resource {
@@ -14,7 +14,7 @@ declare class Applications extends ApiResource {
14
14
  static readonly TYPE: 'application';
15
15
  retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Application>;
16
16
  isApplication(resource: any): resource is Application;
17
- relationship(id: string | ResourceId): ApplicationRel;
17
+ relationship(id: string | ResourceId | null): ApplicationRel;
18
18
  type(): string;
19
19
  }
20
20
  export default Applications;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Applications extends resource_1.ApiResource{async retrieve(e,r){return this.resources.singleton({type:Applications.TYPE},e,r)}isApplication(e){return e.type&&e.type===Applications.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Applications.TYPE}:{id:e.id,type:Applications.TYPE}}type(){return Applications.TYPE}}Applications.TYPE="application",exports.default=Applications;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Applications extends resource_1.ApiResource{async retrieve(e,r){return this.resources.singleton({type:Applications.TYPE},e,r)}isApplication(e){return e.type&&e.type===Applications.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Applications.TYPE}:{id:e.id,type:Applications.TYPE}}type(){return Applications.TYPE}}Applications.TYPE="application",exports.default=Applications;
@@ -1,5 +1,5 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Bundle } from './bundles';
4
4
  import { CarrierAccount } from './carrier_accounts';
5
5
  import { CustomerGroup } from './customer_groups';
@@ -30,97 +30,97 @@ import { StockItem } from './stock_items';
30
30
  import { StockLocation } from './stock_locations';
31
31
  import { TaxCalculator } from './tax_calculators';
32
32
  import { TaxCategory } from './tax_categories';
33
- declare type AttachmentRel = ResourceId & {
33
+ declare type AttachmentRel = ResourceRel & {
34
34
  type: typeof Attachments.TYPE;
35
35
  };
36
- declare type BundleRel = ResourceId & {
36
+ declare type BundleRel = ResourceRel & {
37
37
  type: 'bundles';
38
38
  };
39
- declare type CarrierAccountRel = ResourceId & {
39
+ declare type CarrierAccountRel = ResourceRel & {
40
40
  type: 'carrier_accounts';
41
41
  };
42
- declare type CustomerGroupRel = ResourceId & {
42
+ declare type CustomerGroupRel = ResourceRel & {
43
43
  type: 'customer_groups';
44
44
  };
45
- declare type CustomerRel = ResourceId & {
45
+ declare type CustomerRel = ResourceRel & {
46
46
  type: 'customers';
47
47
  };
48
- declare type DeliveryLeadTimeRel = ResourceId & {
48
+ declare type DeliveryLeadTimeRel = ResourceRel & {
49
49
  type: 'delivery_lead_times';
50
50
  };
51
- declare type GeocoderRel = ResourceId & {
51
+ declare type GeocoderRel = ResourceRel & {
52
52
  type: 'geocoders';
53
53
  };
54
- declare type GiftCardRecipientRel = ResourceId & {
54
+ declare type GiftCardRecipientRel = ResourceRel & {
55
55
  type: 'gift_card_recipients';
56
56
  };
57
- declare type GiftCardRel = ResourceId & {
57
+ declare type GiftCardRel = ResourceRel & {
58
58
  type: 'gift_cards';
59
59
  };
60
- declare type InventoryModelRel = ResourceId & {
60
+ declare type InventoryModelRel = ResourceRel & {
61
61
  type: 'inventory_models';
62
62
  };
63
- declare type MarketRel = ResourceId & {
63
+ declare type MarketRel = ResourceRel & {
64
64
  type: 'markets';
65
65
  };
66
- declare type MerchantRel = ResourceId & {
66
+ declare type MerchantRel = ResourceRel & {
67
67
  type: 'merchants';
68
68
  };
69
- declare type BillingInfoValidationRuleRel = ResourceId & {
69
+ declare type BillingInfoValidationRuleRel = ResourceRel & {
70
70
  type: 'billing_info_validation_rules';
71
71
  };
72
- declare type OrderRel = ResourceId & {
72
+ declare type OrderRel = ResourceRel & {
73
73
  type: 'orders';
74
74
  };
75
- declare type PackageRel = ResourceId & {
75
+ declare type PackageRel = ResourceRel & {
76
76
  type: 'packages';
77
77
  };
78
- declare type ParcelRel = ResourceId & {
78
+ declare type ParcelRel = ResourceRel & {
79
79
  type: 'parcels';
80
80
  };
81
- declare type PaymentMethodRel = ResourceId & {
81
+ declare type PaymentMethodRel = ResourceRel & {
82
82
  type: 'payment_methods';
83
83
  };
84
- declare type PriceListRel = ResourceId & {
84
+ declare type PriceListRel = ResourceRel & {
85
85
  type: 'price_lists';
86
86
  };
87
- declare type PriceRel = ResourceId & {
87
+ declare type PriceRel = ResourceRel & {
88
88
  type: 'prices';
89
89
  };
90
- declare type PromotionRel = ResourceId & {
90
+ declare type PromotionRel = ResourceRel & {
91
91
  type: 'promotions';
92
92
  };
93
- declare type ReturnRel = ResourceId & {
93
+ declare type ReturnRel = ResourceRel & {
94
94
  type: 'returns';
95
95
  };
96
- declare type ShipmentRel = ResourceId & {
96
+ declare type ShipmentRel = ResourceRel & {
97
97
  type: 'shipments';
98
98
  };
99
- declare type ShippingCategoryRel = ResourceId & {
99
+ declare type ShippingCategoryRel = ResourceRel & {
100
100
  type: 'shipping_categories';
101
101
  };
102
- declare type ShippingMethodRel = ResourceId & {
102
+ declare type ShippingMethodRel = ResourceRel & {
103
103
  type: 'shipping_methods';
104
104
  };
105
- declare type ShippingZoneRel = ResourceId & {
105
+ declare type ShippingZoneRel = ResourceRel & {
106
106
  type: 'shipping_zones';
107
107
  };
108
- declare type SkuOptionRel = ResourceId & {
108
+ declare type SkuOptionRel = ResourceRel & {
109
109
  type: 'sku_options';
110
110
  };
111
- declare type SkuRel = ResourceId & {
111
+ declare type SkuRel = ResourceRel & {
112
112
  type: 'skus';
113
113
  };
114
- declare type StockItemRel = ResourceId & {
114
+ declare type StockItemRel = ResourceRel & {
115
115
  type: 'stock_items';
116
116
  };
117
- declare type StockLocationRel = ResourceId & {
117
+ declare type StockLocationRel = ResourceRel & {
118
118
  type: 'stock_locations';
119
119
  };
120
- declare type TaxCalculatorRel = ResourceId & {
120
+ declare type TaxCalculatorRel = ResourceRel & {
121
121
  type: 'tax_calculators';
122
122
  };
123
- declare type TaxCategoryRel = ResourceId & {
123
+ declare type TaxCategoryRel = ResourceRel & {
124
124
  type: 'tax_categories';
125
125
  };
126
126
  interface Attachment extends Resource {
@@ -149,7 +149,7 @@ declare class Attachments extends ApiResource {
149
149
  update(resource: AttachmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
150
150
  delete(id: string, options?: ResourcesConfig): Promise<void>;
151
151
  isAttachment(resource: any): resource is Attachment;
152
- relationship(id: string | ResourceId): AttachmentRel;
152
+ relationship(id: string | ResourceId | null): AttachmentRel;
153
153
  type(): string;
154
154
  }
155
155
  export default Attachments;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Attachments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Attachments.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:Attachments.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:Attachments.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:Attachments.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:Attachments.TYPE,id:e},r)}isAttachment(e){return e.type&&e.type===Attachments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Attachments.TYPE}:{id:e.id,type:Attachments.TYPE}}type(){return Attachments.TYPE}}Attachments.TYPE="attachments",exports.default=Attachments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Attachments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Attachments.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:Attachments.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:Attachments.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:Attachments.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:Attachments.TYPE,id:e},r)}isAttachment(e){return e.type&&e.type===Attachments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Attachments.TYPE}:{id:e.id,type:Attachments.TYPE}}type(){return Attachments.TYPE}}Attachments.TYPE="attachments",exports.default=Attachments;
@@ -1,9 +1,9 @@
1
- import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Order } from './orders';
4
4
  import { Capture } from './captures';
5
5
  import { Void } from './voids';
6
- declare type AuthorizationRel = ResourceId & {
6
+ declare type AuthorizationRel = ResourceRel & {
7
7
  type: typeof Authorizations.TYPE;
8
8
  };
9
9
  interface Authorization extends Resource {
@@ -47,7 +47,7 @@ declare class Authorizations extends ApiResource {
47
47
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
48
48
  update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
49
49
  isAuthorization(resource: any): resource is Authorization;
50
- relationship(id: string | ResourceId): AuthorizationRel;
50
+ relationship(id: string | ResourceId | null): AuthorizationRel;
51
51
  type(): string;
52
52
  }
53
53
  export default Authorizations;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Authorizations extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Authorizations.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Authorizations.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Authorizations.TYPE}),r,t)}isAuthorization(e){return e.type&&e.type===Authorizations.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Authorizations.TYPE}:{id:e.id,type:Authorizations.TYPE}}type(){return Authorizations.TYPE}}Authorizations.TYPE="authorizations",exports.default=Authorizations;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Authorizations extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Authorizations.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Authorizations.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Authorizations.TYPE}),r,t)}isAuthorization(e){return e.type&&e.type===Authorizations.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Authorizations.TYPE}:{id:e.id,type:Authorizations.TYPE}}type(){return Authorizations.TYPE}}Authorizations.TYPE="authorizations",exports.default=Authorizations;
@@ -1,12 +1,12 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { TaxCategory } from './tax_categories';
4
4
  import { Market } from './markets';
5
5
  import { Attachment } from './attachments';
6
- declare type AvalaraAccountRel = ResourceId & {
6
+ declare type AvalaraAccountRel = ResourceRel & {
7
7
  type: typeof AvalaraAccounts.TYPE;
8
8
  };
9
- declare type TaxCategoryRel = ResourceId & {
9
+ declare type TaxCategoryRel = ResourceRel & {
10
10
  type: 'tax_categories';
11
11
  };
12
12
  interface AvalaraAccount extends Resource {
@@ -42,7 +42,7 @@ declare class AvalaraAccounts extends ApiResource {
42
42
  update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
43
43
  delete(id: string, options?: ResourcesConfig): Promise<void>;
44
44
  isAvalaraAccount(resource: any): resource is AvalaraAccount;
45
- relationship(id: string | ResourceId): AvalaraAccountRel;
45
+ relationship(id: string | ResourceId | null): AvalaraAccountRel;
46
46
  type(): string;
47
47
  }
48
48
  export default AvalaraAccounts;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AvalaraAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:AvalaraAccounts.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:AvalaraAccounts.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:AvalaraAccounts.TYPE,id:e},t)}isAvalaraAccount(e){return e.type&&e.type===AvalaraAccounts.TYPE}relationship(e){return typeof e=="string"?{id:e,type:AvalaraAccounts.TYPE}:{id:e.id,type:AvalaraAccounts.TYPE}}type(){return AvalaraAccounts.TYPE}}AvalaraAccounts.TYPE="avalara_accounts",exports.default=AvalaraAccounts;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class AvalaraAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:AvalaraAccounts.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:AvalaraAccounts.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:AvalaraAccounts.TYPE,id:e},t)}isAvalaraAccount(e){return e.type&&e.type===AvalaraAccounts.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:AvalaraAccounts.TYPE}:{id:e.id,type:AvalaraAccounts.TYPE}}type(){return AvalaraAccounts.TYPE}}AvalaraAccounts.TYPE="avalara_accounts",exports.default=AvalaraAccounts;
@@ -1,10 +1,10 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Market } from './markets';
4
- declare type BillingInfoValidationRuleRel = ResourceId & {
4
+ declare type BillingInfoValidationRuleRel = ResourceRel & {
5
5
  type: typeof BillingInfoValidationRules.TYPE;
6
6
  };
7
- declare type MarketRel = ResourceId & {
7
+ declare type MarketRel = ResourceRel & {
8
8
  type: 'markets';
9
9
  };
10
10
  interface BillingInfoValidationRule extends Resource {
@@ -24,7 +24,7 @@ declare class BillingInfoValidationRules extends ApiResource {
24
24
  update(resource: BillingInfoValidationRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
25
25
  delete(id: string, options?: ResourcesConfig): Promise<void>;
26
26
  isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
27
- relationship(id: string | ResourceId): BillingInfoValidationRuleRel;
27
+ relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
28
28
  type(): string;
29
29
  }
30
30
  export default BillingInfoValidationRules;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BillingInfoValidationRules extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:BillingInfoValidationRules.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:BillingInfoValidationRules.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:BillingInfoValidationRules.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:BillingInfoValidationRules.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:BillingInfoValidationRules.TYPE,id:e},r)}isBillingInfoValidationRule(e){return e.type&&e.type===BillingInfoValidationRules.TYPE}relationship(e){return typeof e=="string"?{id:e,type:BillingInfoValidationRules.TYPE}:{id:e.id,type:BillingInfoValidationRules.TYPE}}type(){return BillingInfoValidationRules.TYPE}}BillingInfoValidationRules.TYPE="billing_info_validation_rules",exports.default=BillingInfoValidationRules;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BillingInfoValidationRules extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:BillingInfoValidationRules.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:BillingInfoValidationRules.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:BillingInfoValidationRules.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:BillingInfoValidationRules.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:BillingInfoValidationRules.TYPE,id:e},r)}isBillingInfoValidationRule(e){return e.type&&e.type===BillingInfoValidationRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:BillingInfoValidationRules.TYPE}:{id:e.id,type:BillingInfoValidationRules.TYPE}}type(){return BillingInfoValidationRules.TYPE}}BillingInfoValidationRules.TYPE="billing_info_validation_rules",exports.default=BillingInfoValidationRules;
@@ -1,8 +1,8 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Address } from './addresses';
4
4
  import { Attachment } from './attachments';
5
- declare type BingGeocoderRel = ResourceId & {
5
+ declare type BingGeocoderRel = ResourceRel & {
6
6
  type: typeof BingGeocoders.TYPE;
7
7
  };
8
8
  interface BingGeocoder extends Resource {
@@ -26,7 +26,7 @@ declare class BingGeocoders extends ApiResource {
26
26
  update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BingGeocoder>;
27
27
  delete(id: string, options?: ResourcesConfig): Promise<void>;
28
28
  isBingGeocoder(resource: any): resource is BingGeocoder;
29
- relationship(id: string | ResourceId): BingGeocoderRel;
29
+ relationship(id: string | ResourceId | null): BingGeocoderRel;
30
30
  type(): string;
31
31
  }
32
32
  export default BingGeocoders;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BingGeocoders extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:BingGeocoders.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:BingGeocoders.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:BingGeocoders.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:BingGeocoders.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:BingGeocoders.TYPE,id:e},t)}isBingGeocoder(e){return e.type&&e.type===BingGeocoders.TYPE}relationship(e){return typeof e=="string"?{id:e,type:BingGeocoders.TYPE}:{id:e.id,type:BingGeocoders.TYPE}}type(){return BingGeocoders.TYPE}}BingGeocoders.TYPE="bing_geocoders",exports.default=BingGeocoders;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BingGeocoders extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:BingGeocoders.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:BingGeocoders.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:BingGeocoders.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:BingGeocoders.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:BingGeocoders.TYPE,id:e},t)}isBingGeocoder(e){return e.type&&e.type===BingGeocoders.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:BingGeocoders.TYPE}:{id:e.id,type:BingGeocoders.TYPE}}type(){return BingGeocoders.TYPE}}BingGeocoders.TYPE="bing_geocoders",exports.default=BingGeocoders;