@commercelayer/sdk 3.3.0 → 3.5.0

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 (398) hide show
  1. package/lib/cjs/client.js +1 -1
  2. package/lib/cjs/jsonapi.js +1 -1
  3. package/lib/cjs/resource.d.ts +6 -2
  4. package/lib/cjs/resources/addresses.d.ts +5 -5
  5. package/lib/cjs/resources/addresses.js +1 -1
  6. package/lib/cjs/resources/adjustments.d.ts +4 -4
  7. package/lib/cjs/resources/adjustments.js +1 -1
  8. package/lib/cjs/resources/adyen_gateways.d.ts +5 -5
  9. package/lib/cjs/resources/adyen_gateways.js +1 -1
  10. package/lib/cjs/resources/adyen_payments.d.ts +5 -5
  11. package/lib/cjs/resources/adyen_payments.js +1 -1
  12. package/lib/cjs/resources/application.d.ts +4 -4
  13. package/lib/cjs/resources/application.js +1 -1
  14. package/lib/cjs/resources/attachments.d.ts +34 -34
  15. package/lib/cjs/resources/attachments.js +1 -1
  16. package/lib/cjs/resources/authorizations.d.ts +4 -4
  17. package/lib/cjs/resources/authorizations.js +1 -1
  18. package/lib/cjs/resources/avalara_accounts.d.ts +5 -5
  19. package/lib/cjs/resources/avalara_accounts.js +1 -1
  20. package/lib/cjs/resources/billing_info_validation_rules.d.ts +5 -5
  21. package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
  22. package/lib/cjs/resources/bing_geocoders.d.ts +4 -4
  23. package/lib/cjs/resources/bing_geocoders.js +1 -1
  24. package/lib/cjs/resources/braintree_gateways.d.ts +5 -5
  25. package/lib/cjs/resources/braintree_gateways.js +1 -1
  26. package/lib/cjs/resources/braintree_payments.d.ts +5 -5
  27. package/lib/cjs/resources/braintree_payments.js +1 -1
  28. package/lib/cjs/resources/bundles.d.ts +6 -6
  29. package/lib/cjs/resources/bundles.js +1 -1
  30. package/lib/cjs/resources/captures.d.ts +4 -4
  31. package/lib/cjs/resources/captures.js +1 -1
  32. package/lib/cjs/resources/carrier_accounts.d.ts +4 -4
  33. package/lib/cjs/resources/carrier_accounts.js +1 -1
  34. package/lib/cjs/resources/checkout_com_gateways.d.ts +5 -5
  35. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  36. package/lib/cjs/resources/checkout_com_payments.d.ts +5 -5
  37. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  38. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +11 -11
  39. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
  40. package/lib/cjs/resources/coupon_recipients.d.ts +5 -5
  41. package/lib/cjs/resources/coupon_recipients.js +1 -1
  42. package/lib/cjs/resources/coupons.d.ts +5 -5
  43. package/lib/cjs/resources/coupons.js +1 -1
  44. package/lib/cjs/resources/customer_addresses.d.ts +6 -6
  45. package/lib/cjs/resources/customer_addresses.js +1 -1
  46. package/lib/cjs/resources/customer_groups.d.ts +4 -4
  47. package/lib/cjs/resources/customer_groups.js +1 -1
  48. package/lib/cjs/resources/customer_password_resets.d.ts +4 -4
  49. package/lib/cjs/resources/customer_password_resets.js +1 -1
  50. package/lib/cjs/resources/customer_payment_sources.d.ts +13 -13
  51. package/lib/cjs/resources/customer_payment_sources.js +1 -1
  52. package/lib/cjs/resources/customer_subscriptions.d.ts +4 -4
  53. package/lib/cjs/resources/customer_subscriptions.js +1 -1
  54. package/lib/cjs/resources/customers.d.ts +5 -5
  55. package/lib/cjs/resources/customers.js +1 -1
  56. package/lib/cjs/resources/delivery_lead_times.d.ts +6 -6
  57. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  58. package/lib/cjs/resources/event_callbacks.d.ts +4 -4
  59. package/lib/cjs/resources/event_callbacks.js +1 -1
  60. package/lib/cjs/resources/external_gateways.d.ts +4 -4
  61. package/lib/cjs/resources/external_gateways.js +1 -1
  62. package/lib/cjs/resources/external_payments.d.ts +5 -5
  63. package/lib/cjs/resources/external_payments.js +1 -1
  64. package/lib/cjs/resources/external_promotions.d.ts +9 -9
  65. package/lib/cjs/resources/external_promotions.js +1 -1
  66. package/lib/cjs/resources/external_tax_calculators.d.ts +5 -5
  67. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  68. package/lib/cjs/resources/fixed_amount_promotions.d.ts +9 -9
  69. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  70. package/lib/cjs/resources/fixed_price_promotions.d.ts +10 -10
  71. package/lib/cjs/resources/fixed_price_promotions.js +1 -1
  72. package/lib/cjs/resources/free_gift_promotions.d.ts +10 -10
  73. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  74. package/lib/cjs/resources/free_shipping_promotions.d.ts +9 -9
  75. package/lib/cjs/resources/free_shipping_promotions.js +1 -1
  76. package/lib/cjs/resources/geocoders.d.ts +4 -4
  77. package/lib/cjs/resources/geocoders.js +1 -1
  78. package/lib/cjs/resources/gift_card_recipients.d.ts +5 -5
  79. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  80. package/lib/cjs/resources/gift_cards.d.ts +6 -6
  81. package/lib/cjs/resources/gift_cards.js +1 -1
  82. package/lib/cjs/resources/google_geocoders.d.ts +4 -4
  83. package/lib/cjs/resources/google_geocoders.js +1 -1
  84. package/lib/cjs/resources/imports.d.ts +4 -4
  85. package/lib/cjs/resources/imports.js +1 -1
  86. package/lib/cjs/resources/in_stock_subscriptions.d.ts +7 -7
  87. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  88. package/lib/cjs/resources/inventory_models.d.ts +4 -4
  89. package/lib/cjs/resources/inventory_models.js +1 -1
  90. package/lib/cjs/resources/inventory_return_locations.d.ts +6 -6
  91. package/lib/cjs/resources/inventory_return_locations.js +1 -1
  92. package/lib/cjs/resources/inventory_stock_locations.d.ts +6 -6
  93. package/lib/cjs/resources/inventory_stock_locations.js +1 -1
  94. package/lib/cjs/resources/klarna_gateways.d.ts +5 -5
  95. package/lib/cjs/resources/klarna_gateways.js +1 -1
  96. package/lib/cjs/resources/klarna_payments.d.ts +5 -5
  97. package/lib/cjs/resources/klarna_payments.js +1 -1
  98. package/lib/cjs/resources/line_item_options.d.ts +6 -6
  99. package/lib/cjs/resources/line_item_options.js +1 -1
  100. package/lib/cjs/resources/line_items.d.ts +15 -15
  101. package/lib/cjs/resources/line_items.js +1 -1
  102. package/lib/cjs/resources/manual_gateways.d.ts +4 -4
  103. package/lib/cjs/resources/manual_gateways.js +1 -1
  104. package/lib/cjs/resources/manual_tax_calculators.d.ts +6 -6
  105. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  106. package/lib/cjs/resources/markets.d.ts +9 -9
  107. package/lib/cjs/resources/markets.js +1 -1
  108. package/lib/cjs/resources/merchants.d.ts +5 -5
  109. package/lib/cjs/resources/merchants.js +1 -1
  110. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +10 -10
  111. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
  112. package/lib/cjs/resources/order_copies.d.ts +5 -5
  113. package/lib/cjs/resources/order_copies.js +1 -1
  114. package/lib/cjs/resources/order_subscriptions.d.ts +6 -6
  115. package/lib/cjs/resources/order_subscriptions.js +1 -1
  116. package/lib/cjs/resources/order_validation_rules.d.ts +4 -4
  117. package/lib/cjs/resources/order_validation_rules.js +1 -1
  118. package/lib/cjs/resources/orders.d.ts +16 -16
  119. package/lib/cjs/resources/orders.js +1 -1
  120. package/lib/cjs/resources/organization.d.ts +4 -4
  121. package/lib/cjs/resources/organization.js +1 -1
  122. package/lib/cjs/resources/packages.d.ts +5 -5
  123. package/lib/cjs/resources/packages.js +1 -1
  124. package/lib/cjs/resources/parcel_line_items.d.ts +6 -6
  125. package/lib/cjs/resources/parcel_line_items.js +1 -1
  126. package/lib/cjs/resources/parcels.d.ts +6 -6
  127. package/lib/cjs/resources/parcels.js +1 -1
  128. package/lib/cjs/resources/payment_gateways.d.ts +4 -4
  129. package/lib/cjs/resources/payment_gateways.js +1 -1
  130. package/lib/cjs/resources/payment_methods.d.ts +6 -6
  131. package/lib/cjs/resources/payment_methods.js +1 -1
  132. package/lib/cjs/resources/paypal_gateways.d.ts +4 -4
  133. package/lib/cjs/resources/paypal_gateways.js +1 -1
  134. package/lib/cjs/resources/paypal_payments.d.ts +5 -5
  135. package/lib/cjs/resources/paypal_payments.js +1 -1
  136. package/lib/cjs/resources/percentage_discount_promotions.d.ts +10 -10
  137. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  138. package/lib/cjs/resources/price_lists.d.ts +4 -4
  139. package/lib/cjs/resources/price_lists.js +1 -1
  140. package/lib/cjs/resources/prices.d.ts +6 -6
  141. package/lib/cjs/resources/prices.js +1 -1
  142. package/lib/cjs/resources/promotion_rules.d.ts +4 -4
  143. package/lib/cjs/resources/promotion_rules.js +1 -1
  144. package/lib/cjs/resources/promotions.d.ts +4 -4
  145. package/lib/cjs/resources/promotions.js +1 -1
  146. package/lib/cjs/resources/refunds.d.ts +4 -4
  147. package/lib/cjs/resources/refunds.js +1 -1
  148. package/lib/cjs/resources/return_line_items.d.ts +6 -6
  149. package/lib/cjs/resources/return_line_items.js +1 -1
  150. package/lib/cjs/resources/returns.d.ts +6 -6
  151. package/lib/cjs/resources/returns.js +1 -1
  152. package/lib/cjs/resources/shipments.d.ts +5 -5
  153. package/lib/cjs/resources/shipments.js +1 -1
  154. package/lib/cjs/resources/shipping_categories.d.ts +4 -4
  155. package/lib/cjs/resources/shipping_categories.js +1 -1
  156. package/lib/cjs/resources/shipping_methods.d.ts +7 -7
  157. package/lib/cjs/resources/shipping_methods.js +1 -1
  158. package/lib/cjs/resources/shipping_zones.d.ts +4 -4
  159. package/lib/cjs/resources/shipping_zones.js +1 -1
  160. package/lib/cjs/resources/sku_list_items.d.ts +6 -6
  161. package/lib/cjs/resources/sku_list_items.js +1 -1
  162. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +11 -11
  163. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
  164. package/lib/cjs/resources/sku_lists.d.ts +4 -4
  165. package/lib/cjs/resources/sku_lists.js +1 -1
  166. package/lib/cjs/resources/sku_options.d.ts +5 -5
  167. package/lib/cjs/resources/sku_options.js +1 -1
  168. package/lib/cjs/resources/skus.d.ts +5 -5
  169. package/lib/cjs/resources/skus.js +1 -1
  170. package/lib/cjs/resources/stock_items.d.ts +6 -6
  171. package/lib/cjs/resources/stock_items.js +1 -1
  172. package/lib/cjs/resources/stock_line_items.d.ts +4 -4
  173. package/lib/cjs/resources/stock_line_items.js +1 -1
  174. package/lib/cjs/resources/stock_locations.d.ts +5 -5
  175. package/lib/cjs/resources/stock_locations.js +1 -1
  176. package/lib/cjs/resources/stock_transfers.d.ts +8 -8
  177. package/lib/cjs/resources/stock_transfers.js +1 -1
  178. package/lib/cjs/resources/stripe_gateways.d.ts +4 -4
  179. package/lib/cjs/resources/stripe_gateways.js +1 -1
  180. package/lib/cjs/resources/stripe_payments.d.ts +5 -5
  181. package/lib/cjs/resources/stripe_payments.js +1 -1
  182. package/lib/cjs/resources/tax_calculators.d.ts +4 -4
  183. package/lib/cjs/resources/tax_calculators.js +1 -1
  184. package/lib/cjs/resources/tax_categories.d.ts +9 -9
  185. package/lib/cjs/resources/tax_categories.js +1 -1
  186. package/lib/cjs/resources/tax_rules.d.ts +5 -5
  187. package/lib/cjs/resources/tax_rules.js +1 -1
  188. package/lib/cjs/resources/taxjar_accounts.d.ts +5 -5
  189. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  190. package/lib/cjs/resources/transactions.d.ts +4 -4
  191. package/lib/cjs/resources/transactions.js +1 -1
  192. package/lib/cjs/resources/voids.d.ts +4 -4
  193. package/lib/cjs/resources/voids.js +1 -1
  194. package/lib/cjs/resources/webhooks.d.ts +4 -4
  195. package/lib/cjs/resources/webhooks.js +1 -1
  196. package/lib/cjs/resources/wire_transfers.d.ts +5 -5
  197. package/lib/cjs/resources/wire_transfers.js +1 -1
  198. package/lib/esm/client.js +1 -1
  199. package/lib/esm/error.js +1 -1
  200. package/lib/esm/jsonapi.js +1 -1
  201. package/lib/esm/resource.d.ts +6 -2
  202. package/lib/esm/resources/addresses.d.ts +5 -5
  203. package/lib/esm/resources/addresses.js +1 -1
  204. package/lib/esm/resources/adjustments.d.ts +4 -4
  205. package/lib/esm/resources/adjustments.js +1 -1
  206. package/lib/esm/resources/adyen_gateways.d.ts +5 -5
  207. package/lib/esm/resources/adyen_gateways.js +1 -1
  208. package/lib/esm/resources/adyen_payments.d.ts +5 -5
  209. package/lib/esm/resources/adyen_payments.js +1 -1
  210. package/lib/esm/resources/application.d.ts +4 -4
  211. package/lib/esm/resources/application.js +1 -1
  212. package/lib/esm/resources/attachments.d.ts +34 -34
  213. package/lib/esm/resources/attachments.js +1 -1
  214. package/lib/esm/resources/authorizations.d.ts +4 -4
  215. package/lib/esm/resources/authorizations.js +1 -1
  216. package/lib/esm/resources/avalara_accounts.d.ts +5 -5
  217. package/lib/esm/resources/avalara_accounts.js +1 -1
  218. package/lib/esm/resources/billing_info_validation_rules.d.ts +5 -5
  219. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  220. package/lib/esm/resources/bing_geocoders.d.ts +4 -4
  221. package/lib/esm/resources/bing_geocoders.js +1 -1
  222. package/lib/esm/resources/braintree_gateways.d.ts +5 -5
  223. package/lib/esm/resources/braintree_gateways.js +1 -1
  224. package/lib/esm/resources/braintree_payments.d.ts +5 -5
  225. package/lib/esm/resources/braintree_payments.js +1 -1
  226. package/lib/esm/resources/bundles.d.ts +6 -6
  227. package/lib/esm/resources/bundles.js +1 -1
  228. package/lib/esm/resources/captures.d.ts +4 -4
  229. package/lib/esm/resources/captures.js +1 -1
  230. package/lib/esm/resources/carrier_accounts.d.ts +4 -4
  231. package/lib/esm/resources/carrier_accounts.js +1 -1
  232. package/lib/esm/resources/checkout_com_gateways.d.ts +5 -5
  233. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  234. package/lib/esm/resources/checkout_com_payments.d.ts +5 -5
  235. package/lib/esm/resources/checkout_com_payments.js +1 -1
  236. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +11 -11
  237. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  238. package/lib/esm/resources/coupon_recipients.d.ts +5 -5
  239. package/lib/esm/resources/coupon_recipients.js +1 -1
  240. package/lib/esm/resources/coupons.d.ts +5 -5
  241. package/lib/esm/resources/coupons.js +1 -1
  242. package/lib/esm/resources/customer_addresses.d.ts +6 -6
  243. package/lib/esm/resources/customer_addresses.js +1 -1
  244. package/lib/esm/resources/customer_groups.d.ts +4 -4
  245. package/lib/esm/resources/customer_groups.js +1 -1
  246. package/lib/esm/resources/customer_password_resets.d.ts +4 -4
  247. package/lib/esm/resources/customer_password_resets.js +1 -1
  248. package/lib/esm/resources/customer_payment_sources.d.ts +13 -13
  249. package/lib/esm/resources/customer_payment_sources.js +1 -1
  250. package/lib/esm/resources/customer_subscriptions.d.ts +4 -4
  251. package/lib/esm/resources/customer_subscriptions.js +1 -1
  252. package/lib/esm/resources/customers.d.ts +5 -5
  253. package/lib/esm/resources/customers.js +1 -1
  254. package/lib/esm/resources/delivery_lead_times.d.ts +6 -6
  255. package/lib/esm/resources/delivery_lead_times.js +1 -1
  256. package/lib/esm/resources/event_callbacks.d.ts +4 -4
  257. package/lib/esm/resources/event_callbacks.js +1 -1
  258. package/lib/esm/resources/external_gateways.d.ts +4 -4
  259. package/lib/esm/resources/external_gateways.js +1 -1
  260. package/lib/esm/resources/external_payments.d.ts +5 -5
  261. package/lib/esm/resources/external_payments.js +1 -1
  262. package/lib/esm/resources/external_promotions.d.ts +9 -9
  263. package/lib/esm/resources/external_promotions.js +1 -1
  264. package/lib/esm/resources/external_tax_calculators.d.ts +5 -5
  265. package/lib/esm/resources/external_tax_calculators.js +1 -1
  266. package/lib/esm/resources/fixed_amount_promotions.d.ts +9 -9
  267. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  268. package/lib/esm/resources/fixed_price_promotions.d.ts +10 -10
  269. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  270. package/lib/esm/resources/free_gift_promotions.d.ts +10 -10
  271. package/lib/esm/resources/free_gift_promotions.js +1 -1
  272. package/lib/esm/resources/free_shipping_promotions.d.ts +9 -9
  273. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  274. package/lib/esm/resources/geocoders.d.ts +4 -4
  275. package/lib/esm/resources/geocoders.js +1 -1
  276. package/lib/esm/resources/gift_card_recipients.d.ts +5 -5
  277. package/lib/esm/resources/gift_card_recipients.js +1 -1
  278. package/lib/esm/resources/gift_cards.d.ts +6 -6
  279. package/lib/esm/resources/gift_cards.js +1 -1
  280. package/lib/esm/resources/google_geocoders.d.ts +4 -4
  281. package/lib/esm/resources/google_geocoders.js +1 -1
  282. package/lib/esm/resources/imports.d.ts +4 -4
  283. package/lib/esm/resources/imports.js +1 -1
  284. package/lib/esm/resources/in_stock_subscriptions.d.ts +7 -7
  285. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  286. package/lib/esm/resources/inventory_models.d.ts +4 -4
  287. package/lib/esm/resources/inventory_models.js +1 -1
  288. package/lib/esm/resources/inventory_return_locations.d.ts +6 -6
  289. package/lib/esm/resources/inventory_return_locations.js +1 -1
  290. package/lib/esm/resources/inventory_stock_locations.d.ts +6 -6
  291. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  292. package/lib/esm/resources/klarna_gateways.d.ts +5 -5
  293. package/lib/esm/resources/klarna_gateways.js +1 -1
  294. package/lib/esm/resources/klarna_payments.d.ts +5 -5
  295. package/lib/esm/resources/klarna_payments.js +1 -1
  296. package/lib/esm/resources/line_item_options.d.ts +6 -6
  297. package/lib/esm/resources/line_item_options.js +1 -1
  298. package/lib/esm/resources/line_items.d.ts +15 -15
  299. package/lib/esm/resources/line_items.js +1 -1
  300. package/lib/esm/resources/manual_gateways.d.ts +4 -4
  301. package/lib/esm/resources/manual_gateways.js +1 -1
  302. package/lib/esm/resources/manual_tax_calculators.d.ts +6 -6
  303. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  304. package/lib/esm/resources/markets.d.ts +9 -9
  305. package/lib/esm/resources/markets.js +1 -1
  306. package/lib/esm/resources/merchants.d.ts +5 -5
  307. package/lib/esm/resources/merchants.js +1 -1
  308. package/lib/esm/resources/order_amount_promotion_rules.d.ts +10 -10
  309. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  310. package/lib/esm/resources/order_copies.d.ts +5 -5
  311. package/lib/esm/resources/order_copies.js +1 -1
  312. package/lib/esm/resources/order_subscriptions.d.ts +6 -6
  313. package/lib/esm/resources/order_subscriptions.js +1 -1
  314. package/lib/esm/resources/order_validation_rules.d.ts +4 -4
  315. package/lib/esm/resources/order_validation_rules.js +1 -1
  316. package/lib/esm/resources/orders.d.ts +16 -16
  317. package/lib/esm/resources/orders.js +1 -1
  318. package/lib/esm/resources/organization.d.ts +4 -4
  319. package/lib/esm/resources/organization.js +1 -1
  320. package/lib/esm/resources/packages.d.ts +5 -5
  321. package/lib/esm/resources/packages.js +1 -1
  322. package/lib/esm/resources/parcel_line_items.d.ts +6 -6
  323. package/lib/esm/resources/parcel_line_items.js +1 -1
  324. package/lib/esm/resources/parcels.d.ts +6 -6
  325. package/lib/esm/resources/parcels.js +1 -1
  326. package/lib/esm/resources/payment_gateways.d.ts +4 -4
  327. package/lib/esm/resources/payment_gateways.js +1 -1
  328. package/lib/esm/resources/payment_methods.d.ts +6 -6
  329. package/lib/esm/resources/payment_methods.js +1 -1
  330. package/lib/esm/resources/paypal_gateways.d.ts +4 -4
  331. package/lib/esm/resources/paypal_gateways.js +1 -1
  332. package/lib/esm/resources/paypal_payments.d.ts +5 -5
  333. package/lib/esm/resources/paypal_payments.js +1 -1
  334. package/lib/esm/resources/percentage_discount_promotions.d.ts +10 -10
  335. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  336. package/lib/esm/resources/price_lists.d.ts +4 -4
  337. package/lib/esm/resources/price_lists.js +1 -1
  338. package/lib/esm/resources/prices.d.ts +6 -6
  339. package/lib/esm/resources/prices.js +1 -1
  340. package/lib/esm/resources/promotion_rules.d.ts +4 -4
  341. package/lib/esm/resources/promotion_rules.js +1 -1
  342. package/lib/esm/resources/promotions.d.ts +4 -4
  343. package/lib/esm/resources/promotions.js +1 -1
  344. package/lib/esm/resources/refunds.d.ts +4 -4
  345. package/lib/esm/resources/refunds.js +1 -1
  346. package/lib/esm/resources/return_line_items.d.ts +6 -6
  347. package/lib/esm/resources/return_line_items.js +1 -1
  348. package/lib/esm/resources/returns.d.ts +6 -6
  349. package/lib/esm/resources/returns.js +1 -1
  350. package/lib/esm/resources/shipments.d.ts +5 -5
  351. package/lib/esm/resources/shipments.js +1 -1
  352. package/lib/esm/resources/shipping_categories.d.ts +4 -4
  353. package/lib/esm/resources/shipping_categories.js +1 -1
  354. package/lib/esm/resources/shipping_methods.d.ts +7 -7
  355. package/lib/esm/resources/shipping_methods.js +1 -1
  356. package/lib/esm/resources/shipping_zones.d.ts +4 -4
  357. package/lib/esm/resources/shipping_zones.js +1 -1
  358. package/lib/esm/resources/sku_list_items.d.ts +6 -6
  359. package/lib/esm/resources/sku_list_items.js +1 -1
  360. package/lib/esm/resources/sku_list_promotion_rules.d.ts +11 -11
  361. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  362. package/lib/esm/resources/sku_lists.d.ts +4 -4
  363. package/lib/esm/resources/sku_lists.js +1 -1
  364. package/lib/esm/resources/sku_options.d.ts +5 -5
  365. package/lib/esm/resources/sku_options.js +1 -1
  366. package/lib/esm/resources/skus.d.ts +5 -5
  367. package/lib/esm/resources/skus.js +1 -1
  368. package/lib/esm/resources/stock_items.d.ts +6 -6
  369. package/lib/esm/resources/stock_items.js +1 -1
  370. package/lib/esm/resources/stock_line_items.d.ts +4 -4
  371. package/lib/esm/resources/stock_line_items.js +1 -1
  372. package/lib/esm/resources/stock_locations.d.ts +5 -5
  373. package/lib/esm/resources/stock_locations.js +1 -1
  374. package/lib/esm/resources/stock_transfers.d.ts +8 -8
  375. package/lib/esm/resources/stock_transfers.js +1 -1
  376. package/lib/esm/resources/stripe_gateways.d.ts +4 -4
  377. package/lib/esm/resources/stripe_gateways.js +1 -1
  378. package/lib/esm/resources/stripe_payments.d.ts +5 -5
  379. package/lib/esm/resources/stripe_payments.js +1 -1
  380. package/lib/esm/resources/tax_calculators.d.ts +4 -4
  381. package/lib/esm/resources/tax_calculators.js +1 -1
  382. package/lib/esm/resources/tax_categories.d.ts +9 -9
  383. package/lib/esm/resources/tax_categories.js +1 -1
  384. package/lib/esm/resources/tax_rules.d.ts +5 -5
  385. package/lib/esm/resources/tax_rules.js +1 -1
  386. package/lib/esm/resources/taxjar_accounts.d.ts +5 -5
  387. package/lib/esm/resources/taxjar_accounts.js +1 -1
  388. package/lib/esm/resources/transactions.d.ts +4 -4
  389. package/lib/esm/resources/transactions.js +1 -1
  390. package/lib/esm/resources/voids.d.ts +4 -4
  391. package/lib/esm/resources/voids.js +1 -1
  392. package/lib/esm/resources/webhooks.d.ts +4 -4
  393. package/lib/esm/resources/webhooks.js +1 -1
  394. package/lib/esm/resources/wire_transfers.d.ts +5 -5
  395. package/lib/esm/resources/wire_transfers.js +1 -1
  396. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  397. package/lib/tsconfig.tsbuildinfo +1 -1
  398. package/package.json +1 -1
package/lib/cjs/client.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,r,i,o){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(t):i?i.value:e.get(t)},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_ApiClient_accessToken,_ApiClient_client;Object.defineProperty(exports,"__esModule",{value:!0});const axios_1=__importDefault(require("axios")),error_1=require("./error"),config_1=__importDefault(require("./config")),baseURL=(t,e)=>`https://${t.toLowerCase()}.${e||config_1.default.default.domain}/api`,handleError=t=>{let e=new error_1.SdkError({message:t.message,type:error_1.ErrorType.GENERIC});if(axios_1.default.isAxiosError(t))if(t.response){const r=new error_1.ApiError(e);r.type=error_1.ErrorType.RESPONSE,r.status=t.response.status,r.code=String(r.status),r.errors=t.response.data.errors,e=r}else t.request?(e.type=error_1.ErrorType.REQUEST,e.request=t.request):e.type=error_1.ErrorType.CLIENT;else axios_1.default.isCancel(t)?e.type=error_1.ErrorType.CANCEL:e.source=t;throw e};class ApiClient{constructor(e){_ApiClient_accessToken.set(this,void 0),_ApiClient_client.set(this,void 0),this.baseUrl=baseURL(e.organization,e.domain),__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f");const r={timeout:e.timeout||config_1.default.client.timeout};__classPrivateFieldSet(this,_ApiClient_client,axios_1.default.create(Object.assign({baseURL:this.baseUrl,timeout:config_1.default.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f")}},r)),"f"),this.interceptors=__classPrivateFieldGet(this,_ApiClient_client,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new ApiClient(e)}config(e){const r=__classPrivateFieldGet(this,_ApiClient_client,"f").defaults;e.timeout&&(r.timeout=e.timeout),e.organization&&(this.baseUrl=baseURL(e.organization,e.domain)),e.accessToken&&(__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f"),r.headers.common.Authorization="Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f"))}async request(e,r,i,o){const n=i?{data:i}:void 0,c=r,l=(o==null?void 0:o.organization)?baseURL(o.organization,o.domain):void 0,s=(o==null?void 0:o.accessToken)||__classPrivateFieldGet(this,_ApiClient_accessToken,"f"),u=s?{Authorization:"Bearer "+s}:void 0;return __classPrivateFieldGet(this,_ApiClient_client,"f").request(Object.assign({method:e,baseURL:l,url:c,data:n,headers:u},o)).then(a=>a.data).catch(a=>handleError(a))}}_ApiClient_accessToken=new WeakMap,_ApiClient_client=new WeakMap,exports.default=ApiClient;
1
+ "use strict";var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,r,a,i){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,r,a){if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?a:r==="a"?a.call(t):a?a.value:e.get(t)},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_ApiClient_accessToken,_ApiClient_client;Object.defineProperty(exports,"__esModule",{value:!0});const axios_1=__importDefault(require("axios")),error_1=require("./error"),config_1=__importDefault(require("./config")),baseURL=(t,e)=>`https://${t.toLowerCase()}.${e||config_1.default.default.domain}/api`,handleError=t=>{let e=new error_1.SdkError({message:t.message,type:error_1.ErrorType.GENERIC});if(axios_1.default.isAxiosError(t))if(t.response){const r=new error_1.ApiError(e);r.type=error_1.ErrorType.RESPONSE,r.status=t.response.status,r.code=String(r.status),r.errors=t.response.data.errors,e=r}else t.request?(e.type=error_1.ErrorType.REQUEST,e.request=t.request):e.type=error_1.ErrorType.CLIENT;else axios_1.default.isCancel(t)?e.type=error_1.ErrorType.CANCEL:e.source=t;throw e};class ApiClient{constructor(e){_ApiClient_accessToken.set(this,void 0),_ApiClient_client.set(this,void 0),this.baseUrl=baseURL(e.organization,e.domain),__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f");const r={timeout:e.timeout||config_1.default.client.timeout};__classPrivateFieldSet(this,_ApiClient_client,axios_1.default.create(Object.assign({baseURL:this.baseUrl,timeout:config_1.default.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f")}},r)),"f"),this.interceptors=__classPrivateFieldGet(this,_ApiClient_client,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new ApiClient(e)}config(e){const r=__classPrivateFieldGet(this,_ApiClient_client,"f").defaults;e.timeout&&(r.timeout=e.timeout),e.organization&&(this.baseUrl=baseURL(e.organization,e.domain)),e.accessToken&&(__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f"),r.headers.common.Authorization="Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f"))}async request(e,r,a,i){const n=a?{data:a}:void 0,c=r,l=(i==null?void 0:i.organization)?baseURL(i.organization,i.domain):void 0,o=(i==null?void 0:i.accessToken)||__classPrivateFieldGet(this,_ApiClient_accessToken,"f"),u=o?{Authorization:"Bearer "+o}:void 0;return __classPrivateFieldGet(this,_ApiClient_client,"f").request(Object.assign({method:e,baseURL:l,url:c,data:n,headers:u},i)).then(s=>s.data).catch(s=>handleError(s))}}_ApiClient_accessToken=new WeakMap,_ApiClient_client=new WeakMap,exports.default=ApiClient;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalize=exports.denormalize=void 0;const common_1=require("./common"),denormalize=e=>{let t;e.links&&delete e.links;const r=e.data,i=e.included;return Array.isArray(r)?t=r.map(s=>denormalizeResource(s,i)):t=denormalizeResource(r,i),t};exports.denormalize=denormalize;const findIncluded=(e,t=[])=>t.find(r=>e.id===r.id&&e.type===r.type)||e,denormalizeResource=(e,t)=>{const r=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(i=>{const s=e.relationships[i].data;s?Array.isArray(s)?r[i]=s.map(n=>denormalizeResource(findIncluded(n,t),t)):r[i]=denormalizeResource(findIncluded(s,t),t):s===null&&(r[i]=null)}),r},normalize=e=>{const t={},r={};for(const s in e){if(["type","id"].includes(s))continue;const n=e[s];n&&((0,common_1.isResourceId)(n)||Array.isArray(n)&&(0,common_1.isResourceId)(n[0]))?r[s]={data:n}:t[s]=n}const i={type:e.type,attributes:t,relationships:r};return(0,common_1.isResourceId)(e)&&(i.id=e.id),i};exports.normalize=normalize;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalize=exports.denormalize=void 0;const common_1=require("./common"),denormalize=e=>{let r;e.links&&delete e.links;const t=e.data,o=e.included;return Array.isArray(t)?r=t.map(s=>denormalizeResource(s,o)):r=denormalizeResource(t,o),r};exports.denormalize=denormalize;const findIncluded=(e,r=[])=>r.find(t=>e.id===t.id&&e.type===t.type)||e,denormalizeResource=(e,r)=>{const t=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(o=>{const s=e.relationships[o].data;s?Array.isArray(s)?t[o]=s.map(i=>denormalizeResource(findIncluded(i,r),r)):t[o]=denormalizeResource(findIncluded(s,r),r):s===null&&(t[o]=null)}),t},normalize=e=>{const r={},t={};for(const s in e){if(["type","id"].includes(s))continue;const i=e[s];i&&(0,common_1.isResourceType)(i)&&i.id===null?t[s]={data:null}:i&&((0,common_1.isResourceId)(i)||Array.isArray(i)&&(0,common_1.isResourceId)(i[0]))?t[s]={data:i}:r[s]=i}const o={type:e.type,attributes:r,relationships:t};return(0,common_1.isResourceId)(e)&&(o.id=e.id),o};exports.normalize=normalize;
@@ -3,6 +3,10 @@ import { QueryParamsRetrieve, QueryParamsList } from './query';
3
3
  import { ResourceTypeLock } from './api';
4
4
  import { InterceptorManager } from './interceptor';
5
5
  import { Value as JSONValue } from 'json-typescript';
6
+ declare type ResourceNull = {
7
+ id: null;
8
+ } & ResourceType;
9
+ declare type ResourceRel = ResourceId | ResourceNull;
6
10
  declare type Metadata = {
7
11
  [key: string]: JSONValue;
8
12
  };
@@ -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 = ResourceAdapterConfig & ApiClientConfig;
@@ -63,7 +67,7 @@ declare abstract class ApiResource {
63
67
  static readonly TYPE: ResourceTypeLock;
64
68
  protected resources: ResourceAdapter;
65
69
  constructor(adapter: ResourceAdapter);
66
- abstract relationship(id: string | ResourceId): ResourceId;
70
+ abstract relationship(id: string | ResourceId | null): ResourceRel;
67
71
  }
68
72
  export default ResourceAdapter;
69
73
  export { ApiResource, ResourcesConfig, ResourcesInitConfig };
@@ -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;
@@ -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 { BraintreePayment } from './braintree_payments';
5
- declare type BraintreeGatewayRel = ResourceId & {
5
+ declare type BraintreeGatewayRel = ResourceRel & {
6
6
  type: typeof BraintreeGateways.TYPE;
7
7
  };
8
- declare type BraintreePaymentRel = ResourceId & {
8
+ declare type BraintreePaymentRel = ResourceRel & {
9
9
  type: 'braintree_payments';
10
10
  };
11
11
  interface BraintreeGateway extends Resource {
@@ -47,7 +47,7 @@ declare class BraintreeGateways extends ApiResource {
47
47
  update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
48
48
  delete(id: string, options?: ResourcesConfig): Promise<void>;
49
49
  isBraintreeGateway(resource: any): resource is BraintreeGateway;
50
- relationship(id: string | ResourceId): BraintreeGatewayRel;
50
+ relationship(id: string | ResourceId | null): BraintreeGatewayRel;
51
51
  type(): string;
52
52
  }
53
53
  export default BraintreeGateways;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BraintreeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:BraintreeGateways.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:BraintreeGateways.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:BraintreeGateways.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:BraintreeGateways.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:BraintreeGateways.TYPE,id:e},s)}isBraintreeGateway(e){return e.type&&e.type===BraintreeGateways.TYPE}relationship(e){return typeof e=="string"?{id:e,type:BraintreeGateways.TYPE}:{id:e.id,type:BraintreeGateways.TYPE}}type(){return BraintreeGateways.TYPE}}BraintreeGateways.TYPE="braintree_gateways",exports.default=BraintreeGateways;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BraintreeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:BraintreeGateways.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:BraintreeGateways.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:BraintreeGateways.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:BraintreeGateways.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:BraintreeGateways.TYPE,id:e},s)}isBraintreeGateway(e){return e.type&&e.type===BraintreeGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:BraintreeGateways.TYPE}:{id:e.id,type:BraintreeGateways.TYPE}}type(){return BraintreeGateways.TYPE}}BraintreeGateways.TYPE="braintree_gateways",exports.default=BraintreeGateways;
@@ -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 BraintreePaymentRel = ResourceId & {
5
+ declare type BraintreePaymentRel = ResourceRel & {
6
6
  type: typeof BraintreePayments.TYPE;
7
7
  };
8
- declare type OrderRel = ResourceId & {
8
+ declare type OrderRel = ResourceRel & {
9
9
  type: 'orders';
10
10
  };
11
11
  interface BraintreePayment extends Resource {
@@ -38,7 +38,7 @@ declare class BraintreePayments extends ApiResource {
38
38
  update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
39
39
  delete(id: string, options?: ResourcesConfig): Promise<void>;
40
40
  isBraintreePayment(resource: any): resource is BraintreePayment;
41
- relationship(id: string | ResourceId): BraintreePaymentRel;
41
+ relationship(id: string | ResourceId | null): BraintreePaymentRel;
42
42
  type(): string;
43
43
  }
44
44
  export default BraintreePayments;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BraintreePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:BraintreePayments.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:BraintreePayments.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:BraintreePayments.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:BraintreePayments.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:BraintreePayments.TYPE,id:e},s)}isBraintreePayment(e){return e.type&&e.type===BraintreePayments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:BraintreePayments.TYPE}:{id:e.id,type:BraintreePayments.TYPE}}type(){return BraintreePayments.TYPE}}BraintreePayments.TYPE="braintree_payments",exports.default=BraintreePayments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BraintreePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:BraintreePayments.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:BraintreePayments.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:BraintreePayments.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:BraintreePayments.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:BraintreePayments.TYPE,id:e},s)}isBraintreePayment(e){return e.type&&e.type===BraintreePayments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:BraintreePayments.TYPE}:{id:e.id,type:BraintreePayments.TYPE}}type(){return BraintreePayments.TYPE}}BraintreePayments.TYPE="braintree_payments",exports.default=BraintreePayments;
@@ -1,16 +1,16 @@
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
4
  import { SkuList } from './sku_lists';
5
5
  import { Sku } from './skus';
6
6
  import { Attachment } from './attachments';
7
- declare type BundleRel = ResourceId & {
7
+ declare type BundleRel = ResourceRel & {
8
8
  type: typeof Bundles.TYPE;
9
9
  };
10
- declare type MarketRel = ResourceId & {
10
+ declare type MarketRel = ResourceRel & {
11
11
  type: 'markets';
12
12
  };
13
- declare type SkuListRel = ResourceId & {
13
+ declare type SkuListRel = ResourceRel & {
14
14
  type: 'sku_lists';
15
15
  };
16
16
  interface Bundle extends Resource {
@@ -63,7 +63,7 @@ declare class Bundles extends ApiResource {
63
63
  update(resource: BundleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
64
64
  delete(id: string, options?: ResourcesConfig): Promise<void>;
65
65
  isBundle(resource: any): resource is Bundle;
66
- relationship(id: string | ResourceId): BundleRel;
66
+ relationship(id: string | ResourceId | null): BundleRel;
67
67
  type(): string;
68
68
  }
69
69
  export default Bundles;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Bundles extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Bundles.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Bundles.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Bundles.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Bundles.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Bundles.TYPE,id:e},t)}isBundle(e){return e.type&&e.type===Bundles.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Bundles.TYPE}:{id:e.id,type:Bundles.TYPE}}type(){return Bundles.TYPE}}Bundles.TYPE="bundles",exports.default=Bundles;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Bundles extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Bundles.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Bundles.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Bundles.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Bundles.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Bundles.TYPE,id:e},t)}isBundle(e){return e.type&&e.type===Bundles.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Bundles.TYPE}:{id:e.id,type:Bundles.TYPE}}type(){return Bundles.TYPE}}Bundles.TYPE="bundles",exports.default=Bundles;