@commercelayer/sdk 4.18.0 → 4.19.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 (248) hide show
  1. package/lib/cjs/api.d.ts +1 -1
  2. package/lib/cjs/client.d.ts +1 -1
  3. package/lib/cjs/client.js +1 -1
  4. package/lib/cjs/commercelayer.d.ts +1 -1
  5. package/lib/cjs/commercelayer.js +1 -1
  6. package/lib/cjs/common.js +1 -1
  7. package/lib/cjs/debug.d.ts +1 -1
  8. package/lib/cjs/error.js +1 -1
  9. package/lib/cjs/interceptor.d.ts +1 -1
  10. package/lib/cjs/query.d.ts +1 -1
  11. package/lib/cjs/resource.d.ts +1 -1
  12. package/lib/cjs/resources/addresses.d.ts +1 -1
  13. package/lib/cjs/resources/adjustments.d.ts +1 -1
  14. package/lib/cjs/resources/adyen_gateways.d.ts +1 -1
  15. package/lib/cjs/resources/adyen_payments.d.ts +1 -1
  16. package/lib/cjs/resources/application.d.ts +1 -1
  17. package/lib/cjs/resources/attachments.d.ts +1 -1
  18. package/lib/cjs/resources/authorizations.d.ts +1 -1
  19. package/lib/cjs/resources/avalara_accounts.d.ts +1 -1
  20. package/lib/cjs/resources/avalara_accounts.js +1 -1
  21. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -1
  22. package/lib/cjs/resources/bing_geocoders.d.ts +1 -1
  23. package/lib/cjs/resources/braintree_gateways.d.ts +1 -1
  24. package/lib/cjs/resources/braintree_payments.d.ts +1 -1
  25. package/lib/cjs/resources/bundles.d.ts +1 -1
  26. package/lib/cjs/resources/captures.d.ts +1 -1
  27. package/lib/cjs/resources/carrier_accounts.d.ts +1 -1
  28. package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -1
  29. package/lib/cjs/resources/checkout_com_payments.d.ts +1 -1
  30. package/lib/cjs/resources/cleanups.d.ts +1 -1
  31. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -1
  32. package/lib/cjs/resources/coupon_recipients.d.ts +1 -1
  33. package/lib/cjs/resources/coupons.d.ts +1 -1
  34. package/lib/cjs/resources/customer_addresses.d.ts +1 -1
  35. package/lib/cjs/resources/customer_groups.d.ts +1 -1
  36. package/lib/cjs/resources/customer_password_resets.d.ts +1 -1
  37. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -1
  38. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -1
  39. package/lib/cjs/resources/customers.d.ts +1 -1
  40. package/lib/cjs/resources/delivery_lead_times.d.ts +1 -1
  41. package/lib/cjs/resources/event_callbacks.d.ts +1 -1
  42. package/lib/cjs/resources/events.d.ts +1 -1
  43. package/lib/cjs/resources/exports.d.ts +1 -1
  44. package/lib/cjs/resources/external_gateways.d.ts +1 -1
  45. package/lib/cjs/resources/external_payments.d.ts +1 -1
  46. package/lib/cjs/resources/external_promotions.d.ts +1 -1
  47. package/lib/cjs/resources/external_tax_calculators.d.ts +1 -1
  48. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  49. package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -1
  50. package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -1
  51. package/lib/cjs/resources/free_gift_promotions.d.ts +1 -1
  52. package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -1
  53. package/lib/cjs/resources/geocoders.d.ts +1 -1
  54. package/lib/cjs/resources/gift_card_recipients.d.ts +1 -1
  55. package/lib/cjs/resources/gift_cards.d.ts +1 -1
  56. package/lib/cjs/resources/google_geocoders.d.ts +1 -1
  57. package/lib/cjs/resources/imports.d.ts +1 -1
  58. package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -1
  59. package/lib/cjs/resources/inventory_models.d.ts +1 -1
  60. package/lib/cjs/resources/inventory_return_locations.d.ts +1 -1
  61. package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -1
  62. package/lib/cjs/resources/klarna_gateways.d.ts +1 -1
  63. package/lib/cjs/resources/klarna_payments.d.ts +1 -1
  64. package/lib/cjs/resources/line_item_options.d.ts +1 -1
  65. package/lib/cjs/resources/line_items.d.ts +1 -1
  66. package/lib/cjs/resources/manual_gateways.d.ts +1 -1
  67. package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -1
  68. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  69. package/lib/cjs/resources/markets.d.ts +1 -1
  70. package/lib/cjs/resources/merchants.d.ts +1 -1
  71. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -1
  72. package/lib/cjs/resources/order_copies.d.ts +1 -1
  73. package/lib/cjs/resources/order_subscriptions.d.ts +1 -1
  74. package/lib/cjs/resources/order_validation_rules.d.ts +1 -1
  75. package/lib/cjs/resources/orders.d.ts +1 -1
  76. package/lib/cjs/resources/organization.d.ts +1 -1
  77. package/lib/cjs/resources/packages.d.ts +1 -1
  78. package/lib/cjs/resources/parcel_line_items.d.ts +1 -1
  79. package/lib/cjs/resources/parcels.d.ts +1 -1
  80. package/lib/cjs/resources/payment_gateways.d.ts +1 -1
  81. package/lib/cjs/resources/payment_methods.d.ts +1 -1
  82. package/lib/cjs/resources/paypal_gateways.d.ts +1 -1
  83. package/lib/cjs/resources/paypal_payments.d.ts +1 -1
  84. package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -1
  85. package/lib/cjs/resources/price_lists.d.ts +1 -1
  86. package/lib/cjs/resources/price_tiers.d.ts +1 -1
  87. package/lib/cjs/resources/price_volume_tiers.d.ts +1 -1
  88. package/lib/cjs/resources/prices.d.ts +1 -1
  89. package/lib/cjs/resources/promotion_rules.d.ts +1 -1
  90. package/lib/cjs/resources/promotions.d.ts +1 -1
  91. package/lib/cjs/resources/refunds.d.ts +1 -1
  92. package/lib/cjs/resources/return_line_items.d.ts +1 -1
  93. package/lib/cjs/resources/returns.d.ts +1 -1
  94. package/lib/cjs/resources/shipments.d.ts +1 -1
  95. package/lib/cjs/resources/shipping_categories.d.ts +1 -1
  96. package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -1
  97. package/lib/cjs/resources/shipping_methods.d.ts +1 -1
  98. package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -1
  99. package/lib/cjs/resources/shipping_zones.d.ts +1 -1
  100. package/lib/cjs/resources/sku_list_items.d.ts +1 -1
  101. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -1
  102. package/lib/cjs/resources/sku_lists.d.ts +1 -1
  103. package/lib/cjs/resources/sku_lists.js +1 -1
  104. package/lib/cjs/resources/sku_options.d.ts +1 -1
  105. package/lib/cjs/resources/skus.d.ts +1 -1
  106. package/lib/cjs/resources/stock_items.d.ts +1 -1
  107. package/lib/cjs/resources/stock_line_items.d.ts +1 -1
  108. package/lib/cjs/resources/stock_locations.d.ts +1 -1
  109. package/lib/cjs/resources/stock_transfers.d.ts +1 -1
  110. package/lib/cjs/resources/stripe_gateways.d.ts +1 -1
  111. package/lib/cjs/resources/stripe_payments.d.ts +1 -1
  112. package/lib/cjs/resources/tax_calculators.d.ts +1 -1
  113. package/lib/cjs/resources/tax_calculators.js +1 -1
  114. package/lib/cjs/resources/tax_categories.d.ts +1 -1
  115. package/lib/cjs/resources/tax_rules.d.ts +1 -1
  116. package/lib/cjs/resources/taxjar_accounts.d.ts +1 -1
  117. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  118. package/lib/cjs/resources/transactions.d.ts +1 -1
  119. package/lib/cjs/resources/voids.d.ts +1 -1
  120. package/lib/cjs/resources/webhooks.d.ts +1 -1
  121. package/lib/cjs/resources/wire_transfers.d.ts +1 -1
  122. package/lib/cjs/util.d.ts +1 -1
  123. package/lib/esm/api.d.ts +1 -1
  124. package/lib/esm/client.d.ts +1 -1
  125. package/lib/esm/client.js +1 -1
  126. package/lib/esm/commercelayer.d.ts +1 -1
  127. package/lib/esm/commercelayer.js +1 -1
  128. package/lib/esm/common.js +1 -1
  129. package/lib/esm/debug.d.ts +1 -1
  130. package/lib/esm/error.js +1 -1
  131. package/lib/esm/interceptor.d.ts +1 -1
  132. package/lib/esm/query.d.ts +1 -1
  133. package/lib/esm/resource.d.ts +1 -1
  134. package/lib/esm/resource.js +1 -1
  135. package/lib/esm/resources/addresses.d.ts +1 -1
  136. package/lib/esm/resources/adjustments.d.ts +1 -1
  137. package/lib/esm/resources/adyen_gateways.d.ts +1 -1
  138. package/lib/esm/resources/adyen_payments.d.ts +1 -1
  139. package/lib/esm/resources/application.d.ts +1 -1
  140. package/lib/esm/resources/attachments.d.ts +1 -1
  141. package/lib/esm/resources/authorizations.d.ts +1 -1
  142. package/lib/esm/resources/avalara_accounts.d.ts +1 -1
  143. package/lib/esm/resources/avalara_accounts.js +1 -1
  144. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -1
  145. package/lib/esm/resources/bing_geocoders.d.ts +1 -1
  146. package/lib/esm/resources/braintree_gateways.d.ts +1 -1
  147. package/lib/esm/resources/braintree_payments.d.ts +1 -1
  148. package/lib/esm/resources/bundles.d.ts +1 -1
  149. package/lib/esm/resources/captures.d.ts +1 -1
  150. package/lib/esm/resources/carrier_accounts.d.ts +1 -1
  151. package/lib/esm/resources/checkout_com_gateways.d.ts +1 -1
  152. package/lib/esm/resources/checkout_com_payments.d.ts +1 -1
  153. package/lib/esm/resources/cleanups.d.ts +1 -1
  154. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -1
  155. package/lib/esm/resources/coupon_recipients.d.ts +1 -1
  156. package/lib/esm/resources/coupons.d.ts +1 -1
  157. package/lib/esm/resources/customer_addresses.d.ts +1 -1
  158. package/lib/esm/resources/customer_groups.d.ts +1 -1
  159. package/lib/esm/resources/customer_password_resets.d.ts +1 -1
  160. package/lib/esm/resources/customer_payment_sources.d.ts +1 -1
  161. package/lib/esm/resources/customer_subscriptions.d.ts +1 -1
  162. package/lib/esm/resources/customers.d.ts +1 -1
  163. package/lib/esm/resources/delivery_lead_times.d.ts +1 -1
  164. package/lib/esm/resources/event_callbacks.d.ts +1 -1
  165. package/lib/esm/resources/events.d.ts +1 -1
  166. package/lib/esm/resources/exports.d.ts +1 -1
  167. package/lib/esm/resources/external_gateways.d.ts +1 -1
  168. package/lib/esm/resources/external_payments.d.ts +1 -1
  169. package/lib/esm/resources/external_promotions.d.ts +1 -1
  170. package/lib/esm/resources/external_tax_calculators.d.ts +1 -1
  171. package/lib/esm/resources/external_tax_calculators.js +1 -1
  172. package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -1
  173. package/lib/esm/resources/fixed_price_promotions.d.ts +1 -1
  174. package/lib/esm/resources/free_gift_promotions.d.ts +1 -1
  175. package/lib/esm/resources/free_shipping_promotions.d.ts +1 -1
  176. package/lib/esm/resources/geocoders.d.ts +1 -1
  177. package/lib/esm/resources/gift_card_recipients.d.ts +1 -1
  178. package/lib/esm/resources/gift_cards.d.ts +1 -1
  179. package/lib/esm/resources/google_geocoders.d.ts +1 -1
  180. package/lib/esm/resources/imports.d.ts +1 -1
  181. package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -1
  182. package/lib/esm/resources/inventory_models.d.ts +1 -1
  183. package/lib/esm/resources/inventory_return_locations.d.ts +1 -1
  184. package/lib/esm/resources/inventory_stock_locations.d.ts +1 -1
  185. package/lib/esm/resources/klarna_gateways.d.ts +1 -1
  186. package/lib/esm/resources/klarna_payments.d.ts +1 -1
  187. package/lib/esm/resources/line_item_options.d.ts +1 -1
  188. package/lib/esm/resources/line_items.d.ts +1 -1
  189. package/lib/esm/resources/manual_gateways.d.ts +1 -1
  190. package/lib/esm/resources/manual_tax_calculators.d.ts +1 -1
  191. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  192. package/lib/esm/resources/markets.d.ts +1 -1
  193. package/lib/esm/resources/merchants.d.ts +1 -1
  194. package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -1
  195. package/lib/esm/resources/order_copies.d.ts +1 -1
  196. package/lib/esm/resources/order_subscriptions.d.ts +1 -1
  197. package/lib/esm/resources/order_validation_rules.d.ts +1 -1
  198. package/lib/esm/resources/orders.d.ts +1 -1
  199. package/lib/esm/resources/organization.d.ts +1 -1
  200. package/lib/esm/resources/packages.d.ts +1 -1
  201. package/lib/esm/resources/parcel_line_items.d.ts +1 -1
  202. package/lib/esm/resources/parcels.d.ts +1 -1
  203. package/lib/esm/resources/payment_gateways.d.ts +1 -1
  204. package/lib/esm/resources/payment_methods.d.ts +1 -1
  205. package/lib/esm/resources/paypal_gateways.d.ts +1 -1
  206. package/lib/esm/resources/paypal_payments.d.ts +1 -1
  207. package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -1
  208. package/lib/esm/resources/price_lists.d.ts +1 -1
  209. package/lib/esm/resources/price_tiers.d.ts +1 -1
  210. package/lib/esm/resources/price_volume_tiers.d.ts +1 -1
  211. package/lib/esm/resources/prices.d.ts +1 -1
  212. package/lib/esm/resources/promotion_rules.d.ts +1 -1
  213. package/lib/esm/resources/promotions.d.ts +1 -1
  214. package/lib/esm/resources/refunds.d.ts +1 -1
  215. package/lib/esm/resources/return_line_items.d.ts +1 -1
  216. package/lib/esm/resources/returns.d.ts +1 -1
  217. package/lib/esm/resources/shipments.d.ts +1 -1
  218. package/lib/esm/resources/shipping_categories.d.ts +1 -1
  219. package/lib/esm/resources/shipping_method_tiers.d.ts +1 -1
  220. package/lib/esm/resources/shipping_methods.d.ts +1 -1
  221. package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -1
  222. package/lib/esm/resources/shipping_zones.d.ts +1 -1
  223. package/lib/esm/resources/sku_list_items.d.ts +1 -1
  224. package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -1
  225. package/lib/esm/resources/sku_lists.d.ts +1 -1
  226. package/lib/esm/resources/sku_lists.js +1 -1
  227. package/lib/esm/resources/sku_options.d.ts +1 -1
  228. package/lib/esm/resources/skus.d.ts +1 -1
  229. package/lib/esm/resources/stock_items.d.ts +1 -1
  230. package/lib/esm/resources/stock_line_items.d.ts +1 -1
  231. package/lib/esm/resources/stock_locations.d.ts +1 -1
  232. package/lib/esm/resources/stock_transfers.d.ts +1 -1
  233. package/lib/esm/resources/stripe_gateways.d.ts +1 -1
  234. package/lib/esm/resources/stripe_payments.d.ts +1 -1
  235. package/lib/esm/resources/tax_calculators.d.ts +1 -1
  236. package/lib/esm/resources/tax_calculators.js +1 -1
  237. package/lib/esm/resources/tax_categories.d.ts +1 -1
  238. package/lib/esm/resources/tax_rules.d.ts +1 -1
  239. package/lib/esm/resources/taxjar_accounts.d.ts +1 -1
  240. package/lib/esm/resources/taxjar_accounts.js +1 -1
  241. package/lib/esm/resources/transactions.d.ts +1 -1
  242. package/lib/esm/resources/voids.d.ts +1 -1
  243. package/lib/esm/resources/webhooks.d.ts +1 -1
  244. package/lib/esm/resources/wire_transfers.d.ts +1 -1
  245. package/lib/esm/util.d.ts +1 -1
  246. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  247. package/lib/tsconfig.tsbuildinfo +1 -1
  248. package/package.json +3 -3
package/lib/cjs/api.d.ts CHANGED
@@ -1 +1 @@
1
- export{default as Addresses}from'./resources/addresses';export{default as Adjustments}from'./resources/adjustments';export{default as AdyenGateways}from'./resources/adyen_gateways';export{default as AdyenPayments}from'./resources/adyen_payments';export{default as Applications}from'./resources/application';export{default as Attachments}from'./resources/attachments';export{default as Authorizations}from'./resources/authorizations';export{default as AvalaraAccounts}from'./resources/avalara_accounts';export{default as BillingInfoValidationRules}from'./resources/billing_info_validation_rules';export{default as BingGeocoders}from'./resources/bing_geocoders';export{default as BraintreeGateways}from'./resources/braintree_gateways';export{default as BraintreePayments}from'./resources/braintree_payments';export{default as Bundles}from'./resources/bundles';export{default as Captures}from'./resources/captures';export{default as CarrierAccounts}from'./resources/carrier_accounts';export{default as CheckoutComGateways}from'./resources/checkout_com_gateways';export{default as CheckoutComPayments}from'./resources/checkout_com_payments';export{default as Cleanups}from'./resources/cleanups';export{default as CouponCodesPromotionRules}from'./resources/coupon_codes_promotion_rules';export{default as CouponRecipients}from'./resources/coupon_recipients';export{default as Coupons}from'./resources/coupons';export{default as CustomerAddresses}from'./resources/customer_addresses';export{default as CustomerGroups}from'./resources/customer_groups';export{default as CustomerPasswordResets}from'./resources/customer_password_resets';export{default as CustomerPaymentSources}from'./resources/customer_payment_sources';export{default as CustomerSubscriptions}from'./resources/customer_subscriptions';export{default as Customers}from'./resources/customers';export{default as DeliveryLeadTimes}from'./resources/delivery_lead_times';export{default as EventCallbacks}from'./resources/event_callbacks';export{default as Events}from'./resources/events';export{default as Exports}from'./resources/exports';export{default as ExternalGateways}from'./resources/external_gateways';export{default as ExternalPayments}from'./resources/external_payments';export{default as ExternalPromotions}from'./resources/external_promotions';export{default as ExternalTaxCalculators}from'./resources/external_tax_calculators';export{default as FixedAmountPromotions}from'./resources/fixed_amount_promotions';export{default as FixedPricePromotions}from'./resources/fixed_price_promotions';export{default as FreeGiftPromotions}from'./resources/free_gift_promotions';export{default as FreeShippingPromotions}from'./resources/free_shipping_promotions';export{default as Geocoders}from'./resources/geocoders';export{default as GiftCardRecipients}from'./resources/gift_card_recipients';export{default as GiftCards}from'./resources/gift_cards';export{default as GoogleGeocoders}from'./resources/google_geocoders';export{default as Imports}from'./resources/imports';export{default as InStockSubscriptions}from'./resources/in_stock_subscriptions';export{default as InventoryModels}from'./resources/inventory_models';export{default as InventoryReturnLocations}from'./resources/inventory_return_locations';export{default as InventoryStockLocations}from'./resources/inventory_stock_locations';export{default as KlarnaGateways}from'./resources/klarna_gateways';export{default as KlarnaPayments}from'./resources/klarna_payments';export{default as LineItemOptions}from'./resources/line_item_options';export{default as LineItems}from'./resources/line_items';export{default as ManualGateways}from'./resources/manual_gateways';export{default as ManualTaxCalculators}from'./resources/manual_tax_calculators';export{default as Markets}from'./resources/markets';export{default as Merchants}from'./resources/merchants';export{default as OrderAmountPromotionRules}from'./resources/order_amount_promotion_rules';export{default as OrderCopies}from'./resources/order_copies';export{default as OrderSubscriptions}from'./resources/order_subscriptions';export{default as OrderValidationRules}from'./resources/order_validation_rules';export{default as Orders}from'./resources/orders';export{default as Organizations}from'./resources/organization';export{default as Packages}from'./resources/packages';export{default as ParcelLineItems}from'./resources/parcel_line_items';export{default as Parcels}from'./resources/parcels';export{default as PaymentGateways}from'./resources/payment_gateways';export{default as PaymentMethods}from'./resources/payment_methods';export{default as PaypalGateways}from'./resources/paypal_gateways';export{default as PaypalPayments}from'./resources/paypal_payments';export{default as PercentageDiscountPromotions}from'./resources/percentage_discount_promotions';export{default as PriceLists}from'./resources/price_lists';export{default as PriceTiers}from'./resources/price_tiers';export{default as PriceVolumeTiers}from'./resources/price_volume_tiers';export{default as Prices}from'./resources/prices';export{default as PromotionRules}from'./resources/promotion_rules';export{default as Promotions}from'./resources/promotions';export{default as Refunds}from'./resources/refunds';export{default as ReturnLineItems}from'./resources/return_line_items';export{default as Returns}from'./resources/returns';export{default as Shipments}from'./resources/shipments';export{default as ShippingCategories}from'./resources/shipping_categories';export{default as ShippingMethodTiers}from'./resources/shipping_method_tiers';export{default as ShippingMethods}from'./resources/shipping_methods';export{default as ShippingWeightTiers}from'./resources/shipping_weight_tiers';export{default as ShippingZones}from'./resources/shipping_zones';export{default as SkuListItems}from'./resources/sku_list_items';export{default as SkuListPromotionRules}from'./resources/sku_list_promotion_rules';export{default as SkuLists}from'./resources/sku_lists';export{default as SkuOptions}from'./resources/sku_options';export{default as Skus}from'./resources/skus';export{default as StockItems}from'./resources/stock_items';export{default as StockLineItems}from'./resources/stock_line_items';export{default as StockLocations}from'./resources/stock_locations';export{default as StockTransfers}from'./resources/stock_transfers';export{default as StripeGateways}from'./resources/stripe_gateways';export{default as StripePayments}from'./resources/stripe_payments';export{default as TaxCalculators}from'./resources/tax_calculators';export{default as TaxCategories}from'./resources/tax_categories';export{default as TaxRules}from'./resources/tax_rules';export{default as TaxjarAccounts}from'./resources/taxjar_accounts';export{default as Transactions}from'./resources/transactions';export{default as Voids}from'./resources/voids';export{default as Webhooks}from'./resources/webhooks';export{default as WireTransfers}from'./resources/wire_transfers';export declare type ResourceTypeLock='addresses'|'adjustments'|'adyen_gateways'|'adyen_payments'|'application'|'attachments'|'authorizations'|'avalara_accounts'|'billing_info_validation_rules'|'bing_geocoders'|'braintree_gateways'|'braintree_payments'|'bundles'|'captures'|'carrier_accounts'|'checkout_com_gateways'|'checkout_com_payments'|'cleanups'|'coupon_codes_promotion_rules'|'coupon_recipients'|'coupons'|'customer_addresses'|'customer_groups'|'customer_password_resets'|'customer_payment_sources'|'customer_subscriptions'|'customers'|'delivery_lead_times'|'event_callbacks'|'events'|'exports'|'external_gateways'|'external_payments'|'external_promotions'|'external_tax_calculators'|'fixed_amount_promotions'|'fixed_price_promotions'|'free_gift_promotions'|'free_shipping_promotions'|'geocoders'|'gift_card_recipients'|'gift_cards'|'google_geocoders'|'imports'|'in_stock_subscriptions'|'inventory_models'|'inventory_return_locations'|'inventory_stock_locations'|'klarna_gateways'|'klarna_payments'|'line_item_options'|'line_items'|'manual_gateways'|'manual_tax_calculators'|'markets'|'merchants'|'order_amount_promotion_rules'|'order_copies'|'order_subscriptions'|'order_validation_rules'|'orders'|'organization'|'packages'|'parcel_line_items'|'parcels'|'payment_gateways'|'payment_methods'|'paypal_gateways'|'paypal_payments'|'percentage_discount_promotions'|'price_lists'|'price_tiers'|'price_volume_tiers'|'prices'|'promotion_rules'|'promotions'|'refunds'|'return_line_items'|'returns'|'shipments'|'shipping_categories'|'shipping_method_tiers'|'shipping_methods'|'shipping_weight_tiers'|'shipping_zones'|'sku_list_items'|'sku_list_promotion_rules'|'sku_lists'|'sku_options'|'skus'|'stock_items'|'stock_line_items'|'stock_locations'|'stock_transfers'|'stripe_gateways'|'stripe_payments'|'tax_calculators'|'tax_categories'|'tax_rules'|'taxjar_accounts'|'transactions'|'voids'|'webhooks'|'wire_transfers';export declare const resourceList:readonly["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","cleanups","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","events","exports","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","price_tiers","price_volume_tiers","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_method_tiers","shipping_methods","shipping_weight_tiers","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
1
+ export{default as Addresses}from'./resources/addresses';export{default as Adjustments}from'./resources/adjustments';export{default as AdyenGateways}from'./resources/adyen_gateways';export{default as AdyenPayments}from'./resources/adyen_payments';export{default as Applications}from'./resources/application';export{default as Attachments}from'./resources/attachments';export{default as Authorizations}from'./resources/authorizations';export{default as AvalaraAccounts}from'./resources/avalara_accounts';export{default as BillingInfoValidationRules}from'./resources/billing_info_validation_rules';export{default as BingGeocoders}from'./resources/bing_geocoders';export{default as BraintreeGateways}from'./resources/braintree_gateways';export{default as BraintreePayments}from'./resources/braintree_payments';export{default as Bundles}from'./resources/bundles';export{default as Captures}from'./resources/captures';export{default as CarrierAccounts}from'./resources/carrier_accounts';export{default as CheckoutComGateways}from'./resources/checkout_com_gateways';export{default as CheckoutComPayments}from'./resources/checkout_com_payments';export{default as Cleanups}from'./resources/cleanups';export{default as CouponCodesPromotionRules}from'./resources/coupon_codes_promotion_rules';export{default as CouponRecipients}from'./resources/coupon_recipients';export{default as Coupons}from'./resources/coupons';export{default as CustomerAddresses}from'./resources/customer_addresses';export{default as CustomerGroups}from'./resources/customer_groups';export{default as CustomerPasswordResets}from'./resources/customer_password_resets';export{default as CustomerPaymentSources}from'./resources/customer_payment_sources';export{default as CustomerSubscriptions}from'./resources/customer_subscriptions';export{default as Customers}from'./resources/customers';export{default as DeliveryLeadTimes}from'./resources/delivery_lead_times';export{default as EventCallbacks}from'./resources/event_callbacks';export{default as Events}from'./resources/events';export{default as Exports}from'./resources/exports';export{default as ExternalGateways}from'./resources/external_gateways';export{default as ExternalPayments}from'./resources/external_payments';export{default as ExternalPromotions}from'./resources/external_promotions';export{default as ExternalTaxCalculators}from'./resources/external_tax_calculators';export{default as FixedAmountPromotions}from'./resources/fixed_amount_promotions';export{default as FixedPricePromotions}from'./resources/fixed_price_promotions';export{default as FreeGiftPromotions}from'./resources/free_gift_promotions';export{default as FreeShippingPromotions}from'./resources/free_shipping_promotions';export{default as Geocoders}from'./resources/geocoders';export{default as GiftCardRecipients}from'./resources/gift_card_recipients';export{default as GiftCards}from'./resources/gift_cards';export{default as GoogleGeocoders}from'./resources/google_geocoders';export{default as Imports}from'./resources/imports';export{default as InStockSubscriptions}from'./resources/in_stock_subscriptions';export{default as InventoryModels}from'./resources/inventory_models';export{default as InventoryReturnLocations}from'./resources/inventory_return_locations';export{default as InventoryStockLocations}from'./resources/inventory_stock_locations';export{default as KlarnaGateways}from'./resources/klarna_gateways';export{default as KlarnaPayments}from'./resources/klarna_payments';export{default as LineItemOptions}from'./resources/line_item_options';export{default as LineItems}from'./resources/line_items';export{default as ManualGateways}from'./resources/manual_gateways';export{default as ManualTaxCalculators}from'./resources/manual_tax_calculators';export{default as Markets}from'./resources/markets';export{default as Merchants}from'./resources/merchants';export{default as OrderAmountPromotionRules}from'./resources/order_amount_promotion_rules';export{default as OrderCopies}from'./resources/order_copies';export{default as OrderSubscriptions}from'./resources/order_subscriptions';export{default as OrderValidationRules}from'./resources/order_validation_rules';export{default as Orders}from'./resources/orders';export{default as Organizations}from'./resources/organization';export{default as Packages}from'./resources/packages';export{default as ParcelLineItems}from'./resources/parcel_line_items';export{default as Parcels}from'./resources/parcels';export{default as PaymentGateways}from'./resources/payment_gateways';export{default as PaymentMethods}from'./resources/payment_methods';export{default as PaypalGateways}from'./resources/paypal_gateways';export{default as PaypalPayments}from'./resources/paypal_payments';export{default as PercentageDiscountPromotions}from'./resources/percentage_discount_promotions';export{default as PriceLists}from'./resources/price_lists';export{default as PriceTiers}from'./resources/price_tiers';export{default as PriceVolumeTiers}from'./resources/price_volume_tiers';export{default as Prices}from'./resources/prices';export{default as PromotionRules}from'./resources/promotion_rules';export{default as Promotions}from'./resources/promotions';export{default as Refunds}from'./resources/refunds';export{default as ReturnLineItems}from'./resources/return_line_items';export{default as Returns}from'./resources/returns';export{default as Shipments}from'./resources/shipments';export{default as ShippingCategories}from'./resources/shipping_categories';export{default as ShippingMethodTiers}from'./resources/shipping_method_tiers';export{default as ShippingMethods}from'./resources/shipping_methods';export{default as ShippingWeightTiers}from'./resources/shipping_weight_tiers';export{default as ShippingZones}from'./resources/shipping_zones';export{default as SkuListItems}from'./resources/sku_list_items';export{default as SkuListPromotionRules}from'./resources/sku_list_promotion_rules';export{default as SkuLists}from'./resources/sku_lists';export{default as SkuOptions}from'./resources/sku_options';export{default as Skus}from'./resources/skus';export{default as StockItems}from'./resources/stock_items';export{default as StockLineItems}from'./resources/stock_line_items';export{default as StockLocations}from'./resources/stock_locations';export{default as StockTransfers}from'./resources/stock_transfers';export{default as StripeGateways}from'./resources/stripe_gateways';export{default as StripePayments}from'./resources/stripe_payments';export{default as TaxCalculators}from'./resources/tax_calculators';export{default as TaxCategories}from'./resources/tax_categories';export{default as TaxRules}from'./resources/tax_rules';export{default as TaxjarAccounts}from'./resources/taxjar_accounts';export{default as Transactions}from'./resources/transactions';export{default as Voids}from'./resources/voids';export{default as Webhooks}from'./resources/webhooks';export{default as WireTransfers}from'./resources/wire_transfers';export type ResourceTypeLock='addresses'|'adjustments'|'adyen_gateways'|'adyen_payments'|'application'|'attachments'|'authorizations'|'avalara_accounts'|'billing_info_validation_rules'|'bing_geocoders'|'braintree_gateways'|'braintree_payments'|'bundles'|'captures'|'carrier_accounts'|'checkout_com_gateways'|'checkout_com_payments'|'cleanups'|'coupon_codes_promotion_rules'|'coupon_recipients'|'coupons'|'customer_addresses'|'customer_groups'|'customer_password_resets'|'customer_payment_sources'|'customer_subscriptions'|'customers'|'delivery_lead_times'|'event_callbacks'|'events'|'exports'|'external_gateways'|'external_payments'|'external_promotions'|'external_tax_calculators'|'fixed_amount_promotions'|'fixed_price_promotions'|'free_gift_promotions'|'free_shipping_promotions'|'geocoders'|'gift_card_recipients'|'gift_cards'|'google_geocoders'|'imports'|'in_stock_subscriptions'|'inventory_models'|'inventory_return_locations'|'inventory_stock_locations'|'klarna_gateways'|'klarna_payments'|'line_item_options'|'line_items'|'manual_gateways'|'manual_tax_calculators'|'markets'|'merchants'|'order_amount_promotion_rules'|'order_copies'|'order_subscriptions'|'order_validation_rules'|'orders'|'organization'|'packages'|'parcel_line_items'|'parcels'|'payment_gateways'|'payment_methods'|'paypal_gateways'|'paypal_payments'|'percentage_discount_promotions'|'price_lists'|'price_tiers'|'price_volume_tiers'|'prices'|'promotion_rules'|'promotions'|'refunds'|'return_line_items'|'returns'|'shipments'|'shipping_categories'|'shipping_method_tiers'|'shipping_methods'|'shipping_weight_tiers'|'shipping_zones'|'sku_list_items'|'sku_list_promotion_rules'|'sku_lists'|'sku_options'|'skus'|'stock_items'|'stock_line_items'|'stock_locations'|'stock_transfers'|'stripe_gateways'|'stripe_payments'|'tax_calculators'|'tax_categories'|'tax_rules'|'taxjar_accounts'|'transactions'|'voids'|'webhooks'|'wire_transfers';export declare const resourceList:readonly["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","cleanups","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","events","exports","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","price_tiers","price_volume_tiers","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_method_tiers","shipping_methods","shipping_weight_tiers","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
@@ -1,3 +1,3 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
- import{AxiosProxyConfig,Method}from'axios';import type{InterceptorManager}from'./interceptor';import type{Agent as HttpAgent}from'http';import type{Agent as HttpsAgent}from'https';declare type ProxyConfig=AxiosProxyConfig|false;declare type RequestConfig={timeout?:number;params?:{[key:string]:string|number|boolean;};httpAgent?:HttpAgent;httpsAgent?:HttpsAgent;proxy?:ProxyConfig;};declare type ApiClientInitConfig={organization:string;domain?:string;accessToken:string;}&RequestConfig;declare type ApiClientConfig=Partial<ApiClientInitConfig>;declare class ApiClient{#private;static create(options:ApiClientInitConfig):ApiClient;baseUrl:string;interceptors:InterceptorManager;private constructor();config(config:ApiClientConfig):void;request(method:Method,path:string,body?:any,options?:ApiClientConfig):Promise<any>;}export default ApiClient;export{ApiClientInitConfig,ApiClientConfig,RequestConfig};
3
+ import{AxiosProxyConfig,Method}from'axios';import type{InterceptorManager}from'./interceptor';import type{Agent as HttpAgent}from'http';import type{Agent as HttpsAgent}from'https';type ProxyConfig=AxiosProxyConfig|false;type RequestConfig={timeout?:number;params?:{[key:string]:string|number|boolean;};httpAgent?:HttpAgent;httpsAgent?:HttpsAgent;proxy?:ProxyConfig;};type ApiClientInitConfig={organization:string;domain?:string;accessToken:string;}&RequestConfig;type ApiClientConfig=Partial<ApiClientInitConfig>;declare class ApiClient{#private;static create(options:ApiClientInitConfig):ApiClient;baseUrl:string;interceptors:InterceptorManager;private constructor();config(config:ApiClientConfig):void;request(method:Method,path:string,body?:any,options?:ApiClientConfig):Promise<any>;}export default ApiClient;export{ApiClientInitConfig,ApiClientConfig,RequestConfig};
package/lib/cjs/client.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,r,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(t):s?s.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")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)("client"),baseURL=(t,e)=>`https://${t.toLowerCase()}.${e||config_1.default.default.domain}/api`,handleError=t=>{let e=new error_1.SdkError({message:t.message});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),debug("new client instance %O",e),this.baseUrl=baseURL(e.organization,e.domain),__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f");const r={timeout:e.timeout||config_1.default.client.timeout,proxy:e.proxy,httpAgent:e.httpAgent,httpsAgent:e.httpsAgent},s=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);debug("axios options: %O",s),__classPrivateFieldSet(this,_ApiClient_client,axios_1.default.create(s),"f"),this.interceptors=__classPrivateFieldGet(this,_ApiClient_client,"f").interceptors}static create(e){if(!e?.organization)throw new Error("Undefined 'organization' parameter");if(!e?.accessToken)throw new Error("Undefined 'accessToken' parameter");return new ApiClient(e)}config(e){debug("config %o",e);const r=__classPrivateFieldGet(this,_ApiClient_client,"f").defaults;e.timeout&&(r.timeout=e.timeout),e.proxy&&(r.proxy=e.proxy),e.httpAgent&&(r.httpAgent=e.httpAgent),e.httpsAgent&&(r.httpsAgent=e.httpsAgent),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,s,a){debug("request %s %s, %O, %O",e,r,s||{},a||{});const c=s?{data:s}:void 0,u=r,p=a?.organization?baseURL(a.organization,a.domain):void 0,i=a?.accessToken||__classPrivateFieldGet(this,_ApiClient_accessToken,"f"),d=i?{Authorization:"Bearer "+i}:void 0,n=Object.assign({method:e,baseURL:p,url:u,data:c,headers:d},a);return debug("request params: %O",n),__classPrivateFieldGet(this,_ApiClient_client,"f").request(n).then(o=>o.data).catch(o=>handleError(o))}}_ApiClient_accessToken=new WeakMap,_ApiClient_client=new WeakMap,exports.default=ApiClient;
1
+ "use strict";var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,r,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(t):s?s.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")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)("client"),baseURL=(t,e)=>`https://${t.toLowerCase()}.${e||config_1.default.default.domain}/api`,handleError=t=>{let e=new error_1.SdkError({message:t.message});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{static create(e){if(!e?.organization)throw new Error("Undefined 'organization' parameter");if(!e?.accessToken)throw new Error("Undefined 'accessToken' parameter");return new ApiClient(e)}constructor(e){_ApiClient_accessToken.set(this,void 0),_ApiClient_client.set(this,void 0),debug("new client instance %O",e),this.baseUrl=baseURL(e.organization,e.domain),__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f");const r={timeout:e.timeout||config_1.default.client.timeout,proxy:e.proxy,httpAgent:e.httpAgent,httpsAgent:e.httpsAgent},s=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);debug("axios options: %O",s),__classPrivateFieldSet(this,_ApiClient_client,axios_1.default.create(s),"f"),this.interceptors=__classPrivateFieldGet(this,_ApiClient_client,"f").interceptors}config(e){debug("config %o",e);const r=__classPrivateFieldGet(this,_ApiClient_client,"f").defaults;e.timeout&&(r.timeout=e.timeout),e.proxy&&(r.proxy=e.proxy),e.httpAgent&&(r.httpAgent=e.httpAgent),e.httpsAgent&&(r.httpsAgent=e.httpsAgent),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,s,a){debug("request %s %s, %O, %O",e,r,s||{},a||{});const c=s?{data:s}:void 0,u=r,p=a?.organization?baseURL(a.organization,a.domain):void 0,i=a?.accessToken||__classPrivateFieldGet(this,_ApiClient_accessToken,"f"),d=i?{Authorization:"Bearer "+i}:void 0,n=Object.assign({method:e,baseURL:p,url:u,data:c,headers:d},a);return debug("request params: %O",n),__classPrivateFieldGet(this,_ApiClient_client,"f").request(n).then(o=>o.data).catch(o=>handleError(o))}}_ApiClient_accessToken=new WeakMap,_ApiClient_client=new WeakMap,exports.default=ApiClient;
@@ -1 +1 @@
1
- import*as api from'./api';import{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{ResourcesInitConfig}from'./resource';declare type SdkConfig={};declare type CommerceLayerInitConfig=SdkConfig&ResourcesInitConfig;declare type CommerceLayerConfig=Partial<CommerceLayerInitConfig>;declare class CommerceLayerClient{#private;static get openApiSchemaVersion():string;readonly openApiSchemaVersion="3.0.3";addresses:api.Addresses;adjustments:api.Adjustments;adyen_gateways:api.AdyenGateways;adyen_payments:api.AdyenPayments;application:api.Applications;attachments:api.Attachments;authorizations:api.Authorizations;avalara_accounts:api.AvalaraAccounts;billing_info_validation_rules:api.BillingInfoValidationRules;bing_geocoders:api.BingGeocoders;braintree_gateways:api.BraintreeGateways;braintree_payments:api.BraintreePayments;bundles:api.Bundles;captures:api.Captures;carrier_accounts:api.CarrierAccounts;checkout_com_gateways:api.CheckoutComGateways;checkout_com_payments:api.CheckoutComPayments;cleanups:api.Cleanups;coupon_codes_promotion_rules:api.CouponCodesPromotionRules;coupon_recipients:api.CouponRecipients;coupons:api.Coupons;customer_addresses:api.CustomerAddresses;customer_groups:api.CustomerGroups;customer_password_resets:api.CustomerPasswordResets;customer_payment_sources:api.CustomerPaymentSources;customer_subscriptions:api.CustomerSubscriptions;customers:api.Customers;delivery_lead_times:api.DeliveryLeadTimes;event_callbacks:api.EventCallbacks;events:api.Events;exports:api.Exports;external_gateways:api.ExternalGateways;external_payments:api.ExternalPayments;external_promotions:api.ExternalPromotions;external_tax_calculators:api.ExternalTaxCalculators;fixed_amount_promotions:api.FixedAmountPromotions;fixed_price_promotions:api.FixedPricePromotions;free_gift_promotions:api.FreeGiftPromotions;free_shipping_promotions:api.FreeShippingPromotions;geocoders:api.Geocoders;gift_card_recipients:api.GiftCardRecipients;gift_cards:api.GiftCards;google_geocoders:api.GoogleGeocoders;imports:api.Imports;in_stock_subscriptions:api.InStockSubscriptions;inventory_models:api.InventoryModels;inventory_return_locations:api.InventoryReturnLocations;inventory_stock_locations:api.InventoryStockLocations;klarna_gateways:api.KlarnaGateways;klarna_payments:api.KlarnaPayments;line_item_options:api.LineItemOptions;line_items:api.LineItems;manual_gateways:api.ManualGateways;manual_tax_calculators:api.ManualTaxCalculators;markets:api.Markets;merchants:api.Merchants;order_amount_promotion_rules:api.OrderAmountPromotionRules;order_copies:api.OrderCopies;order_subscriptions:api.OrderSubscriptions;order_validation_rules:api.OrderValidationRules;orders:api.Orders;organization:api.Organizations;packages:api.Packages;parcel_line_items:api.ParcelLineItems;parcels:api.Parcels;payment_gateways:api.PaymentGateways;payment_methods:api.PaymentMethods;paypal_gateways:api.PaypalGateways;paypal_payments:api.PaypalPayments;percentage_discount_promotions:api.PercentageDiscountPromotions;price_lists:api.PriceLists;price_tiers:api.PriceTiers;price_volume_tiers:api.PriceVolumeTiers;prices:api.Prices;promotion_rules:api.PromotionRules;promotions:api.Promotions;refunds:api.Refunds;return_line_items:api.ReturnLineItems;returns:api.Returns;shipments:api.Shipments;shipping_categories:api.ShippingCategories;shipping_method_tiers:api.ShippingMethodTiers;shipping_methods:api.ShippingMethods;shipping_weight_tiers:api.ShippingWeightTiers;shipping_zones:api.ShippingZones;sku_list_items:api.SkuListItems;sku_list_promotion_rules:api.SkuListPromotionRules;sku_lists:api.SkuLists;sku_options:api.SkuOptions;skus:api.Skus;stock_items:api.StockItems;stock_line_items:api.StockLineItems;stock_locations:api.StockLocations;stock_transfers:api.StockTransfers;stripe_gateways:api.StripeGateways;stripe_payments:api.StripePayments;tax_calculators:api.TaxCalculators;tax_categories:api.TaxCategories;tax_rules:api.TaxRules;taxjar_accounts:api.TaxjarAccounts;transactions:api.Transactions;voids:api.Voids;webhooks:api.Webhooks;wire_transfers:api.WireTransfers;constructor(config:CommerceLayerInitConfig);get currentOrganization():string;private localConfig;config(config:CommerceLayerConfig):void;resources():readonly string[];isApiError(error:any):error is ApiError;addRequestInterceptor(onFulfilled?:RequestInterceptor,onRejected?:ErrorInterceptor):number;addResponseInterceptor(onFulfilled?:ResponseInterceptor,onRejected?:ErrorInterceptor):number;removeInterceptor(type:InterceptorType,id:number):void;addRawResponseReader(options?:{headers:boolean;}):RawResponseReader;removeRawResponseReader(reader:number|RawResponseReader):void;}declare const CommerceLayer:(config:CommerceLayerInitConfig)=>CommerceLayerClient;export default CommerceLayer;export type{CommerceLayerClient,CommerceLayerConfig,CommerceLayerInitConfig};
1
+ import*as api from'./api';import{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{ResourcesInitConfig}from'./resource';type SdkConfig={};type CommerceLayerInitConfig=SdkConfig&ResourcesInitConfig;type CommerceLayerConfig=Partial<CommerceLayerInitConfig>;declare class CommerceLayerClient{#private;static get openApiSchemaVersion():string;readonly openApiSchemaVersion="3.0.3";addresses:api.Addresses;adjustments:api.Adjustments;adyen_gateways:api.AdyenGateways;adyen_payments:api.AdyenPayments;application:api.Applications;attachments:api.Attachments;authorizations:api.Authorizations;avalara_accounts:api.AvalaraAccounts;billing_info_validation_rules:api.BillingInfoValidationRules;bing_geocoders:api.BingGeocoders;braintree_gateways:api.BraintreeGateways;braintree_payments:api.BraintreePayments;bundles:api.Bundles;captures:api.Captures;carrier_accounts:api.CarrierAccounts;checkout_com_gateways:api.CheckoutComGateways;checkout_com_payments:api.CheckoutComPayments;cleanups:api.Cleanups;coupon_codes_promotion_rules:api.CouponCodesPromotionRules;coupon_recipients:api.CouponRecipients;coupons:api.Coupons;customer_addresses:api.CustomerAddresses;customer_groups:api.CustomerGroups;customer_password_resets:api.CustomerPasswordResets;customer_payment_sources:api.CustomerPaymentSources;customer_subscriptions:api.CustomerSubscriptions;customers:api.Customers;delivery_lead_times:api.DeliveryLeadTimes;event_callbacks:api.EventCallbacks;events:api.Events;exports:api.Exports;external_gateways:api.ExternalGateways;external_payments:api.ExternalPayments;external_promotions:api.ExternalPromotions;external_tax_calculators:api.ExternalTaxCalculators;fixed_amount_promotions:api.FixedAmountPromotions;fixed_price_promotions:api.FixedPricePromotions;free_gift_promotions:api.FreeGiftPromotions;free_shipping_promotions:api.FreeShippingPromotions;geocoders:api.Geocoders;gift_card_recipients:api.GiftCardRecipients;gift_cards:api.GiftCards;google_geocoders:api.GoogleGeocoders;imports:api.Imports;in_stock_subscriptions:api.InStockSubscriptions;inventory_models:api.InventoryModels;inventory_return_locations:api.InventoryReturnLocations;inventory_stock_locations:api.InventoryStockLocations;klarna_gateways:api.KlarnaGateways;klarna_payments:api.KlarnaPayments;line_item_options:api.LineItemOptions;line_items:api.LineItems;manual_gateways:api.ManualGateways;manual_tax_calculators:api.ManualTaxCalculators;markets:api.Markets;merchants:api.Merchants;order_amount_promotion_rules:api.OrderAmountPromotionRules;order_copies:api.OrderCopies;order_subscriptions:api.OrderSubscriptions;order_validation_rules:api.OrderValidationRules;orders:api.Orders;organization:api.Organizations;packages:api.Packages;parcel_line_items:api.ParcelLineItems;parcels:api.Parcels;payment_gateways:api.PaymentGateways;payment_methods:api.PaymentMethods;paypal_gateways:api.PaypalGateways;paypal_payments:api.PaypalPayments;percentage_discount_promotions:api.PercentageDiscountPromotions;price_lists:api.PriceLists;price_tiers:api.PriceTiers;price_volume_tiers:api.PriceVolumeTiers;prices:api.Prices;promotion_rules:api.PromotionRules;promotions:api.Promotions;refunds:api.Refunds;return_line_items:api.ReturnLineItems;returns:api.Returns;shipments:api.Shipments;shipping_categories:api.ShippingCategories;shipping_method_tiers:api.ShippingMethodTiers;shipping_methods:api.ShippingMethods;shipping_weight_tiers:api.ShippingWeightTiers;shipping_zones:api.ShippingZones;sku_list_items:api.SkuListItems;sku_list_promotion_rules:api.SkuListPromotionRules;sku_lists:api.SkuLists;sku_options:api.SkuOptions;skus:api.Skus;stock_items:api.StockItems;stock_line_items:api.StockLineItems;stock_locations:api.StockLocations;stock_transfers:api.StockTransfers;stripe_gateways:api.StripeGateways;stripe_payments:api.StripePayments;tax_calculators:api.TaxCalculators;tax_categories:api.TaxCategories;tax_rules:api.TaxRules;taxjar_accounts:api.TaxjarAccounts;transactions:api.Transactions;voids:api.Voids;webhooks:api.Webhooks;wire_transfers:api.WireTransfers;constructor(config:CommerceLayerInitConfig);get currentOrganization():string;private localConfig;config(config:CommerceLayerConfig):void;resources():readonly string[];isApiError(error:any):error is ApiError;addRequestInterceptor(onFulfilled?:RequestInterceptor,onRejected?:ErrorInterceptor):number;addResponseInterceptor(onFulfilled?:ResponseInterceptor,onRejected?:ErrorInterceptor):number;removeInterceptor(type:InterceptorType,id:number):void;addRawResponseReader(options?:{headers:boolean;}):RawResponseReader;removeRawResponseReader(reader:number|RawResponseReader):void;}declare const CommerceLayer:(config:CommerceLayerInitConfig)=>CommerceLayerClient;export default CommerceLayer;export type{CommerceLayerClient,CommerceLayerConfig,CommerceLayerInitConfig};
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(t,e,s,i){i===void 0&&(i=s);var n=Object.getOwnPropertyDescriptor(e,s);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,n)}:function(t,e,s,i){i===void 0&&(i=s),t[i]=e[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)&&__createBinding(e,t,s);return __setModuleDefault(e,t),e},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,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 e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(t,s):n?n.value=s:e.set(t,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,s,i){if(s==="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 s==="m"?i:s==="a"?i.call(t):i?i.value:e.get(t)},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_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)("commercelayer"),OPEN_API_SCHEMA_VERSION="3.0.3";class CommerceLayerClient{constructor(e){this.openApiSchemaVersion=OPEN_API_SCHEMA_VERSION,_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),debug("new commercelayer instance %O",e),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(e),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.organization,"f"),this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.cleanups=new api.Cleanups(__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.events=new api.Events(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.exports=new api.Exports(__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.price_tiers=new api.PriceTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_volume_tiers=new api.PriceVolumeTiers(__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_method_tiers=new api.ShippingMethodTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_weight_tiers=new api.ShippingWeightTiers(__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(e){e.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.organization,"f")}config(e){debug("config %o",e),this.localConfig(e),e.organization||(e.organization=this.currentOrganization),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(e)}resources(){return static_1.CommerceLayerStatic.resources()}isApiError(e){return static_1.CommerceLayerStatic.isApiError(e)}addRequestInterceptor(e,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(e,s)}addResponseInterceptor(e,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(e,s)}removeInterceptor(e,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[e].eject(s)}addRawResponseReader(e){const s={id:void 0,rawResponse:void 0,headers:void 0};function i(r){return s.rawResponse=r?.data,e?.headers&&(s.headers=r.headers),r}const n=this.addResponseInterceptor(i);return s.id=n,s}removeRawResponseReader(e){const s=typeof e=="number"?e:e?.id;if(s&&s>=0)return this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=t=>new CommerceLayerClient(t);exports.default=CommerceLayer;
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(t,e,s,i){i===void 0&&(i=s);var n=Object.getOwnPropertyDescriptor(e,s);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,n)}:function(t,e,s,i){i===void 0&&(i=s),t[i]=e[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),__importStar=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)&&__createBinding(e,t,s);return __setModuleDefault(e,t),e},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(t,e,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 e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(t,s):n?n.value=s:e.set(t,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(t,e,s,i){if(s==="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 s==="m"?i:s==="a"?i.call(t):i?i.value:e.get(t)},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_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)("commercelayer"),OPEN_API_SCHEMA_VERSION="3.0.3";class CommerceLayerClient{static get openApiSchemaVersion(){return OPEN_API_SCHEMA_VERSION}constructor(e){this.openApiSchemaVersion=OPEN_API_SCHEMA_VERSION,_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),debug("new commercelayer instance %O",e),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(e),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.organization,"f"),this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.cleanups=new api.Cleanups(__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.events=new api.Events(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.exports=new api.Exports(__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.price_tiers=new api.PriceTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_volume_tiers=new api.PriceVolumeTiers(__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_method_tiers=new api.ShippingMethodTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_weight_tiers=new api.ShippingWeightTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_zones=new api.ShippingZones(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_items=new api.SkuListItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_promotion_rules=new api.SkuListPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_lists=new api.SkuLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_options=new api.SkuOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.skus=new api.Skus(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_items=new api.StockItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_line_items=new api.StockLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_locations=new api.StockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_transfers=new api.StockTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_gateways=new api.StripeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_payments=new api.StripePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_calculators=new api.TaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_categories=new api.TaxCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_rules=new api.TaxRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.taxjar_accounts=new api.TaxjarAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.transactions=new api.Transactions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.voids=new api.Voids(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.webhooks=new api.Webhooks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.wire_transfers=new api.WireTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"))}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}localConfig(e){e.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.organization,"f")}config(e){debug("config %o",e),this.localConfig(e),e.organization||(e.organization=this.currentOrganization),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(e)}resources(){return static_1.CommerceLayerStatic.resources()}isApiError(e){return static_1.CommerceLayerStatic.isApiError(e)}addRequestInterceptor(e,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(e,s)}addResponseInterceptor(e,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(e,s)}removeInterceptor(e,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[e].eject(s)}addRawResponseReader(e){const s={id:void 0,rawResponse:void 0,headers:void 0};function i(r){return s.rawResponse=r?.data,e?.headers&&(s.headers=r.headers),r}const n=this.addResponseInterceptor(i);return s.id=n,s}removeRawResponseReader(e){const s=typeof e=="number"?e:e?.id;if(s&&s>=0)return this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=t=>new CommerceLayerClient(t);exports.default=CommerceLayer;
package/lib/cjs/common.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isResourceType=exports.isResourceId=void 0;const api_1=require("./api"),isResourceId=e=>e&&e.type&&e.id&&api_1.resourceList.includes(e.type);exports.isResourceId=isResourceId;const isResourceType=e=>e&&typeof e.type<"u"&&e.type&&api_1.resourceList.includes(e.type);exports.isResourceType=isResourceType;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isResourceType=exports.isResourceId=void 0;const api_1=require("./api"),isResourceId=e=>e?.type&&e.id&&api_1.resourceList.includes(e.type);exports.isResourceId=isResourceId;const isResourceType=e=>e&&typeof e.type<"u"&&e.type&&api_1.resourceList.includes(e.type);exports.isResourceType=isResourceType;
@@ -1 +1 @@
1
- declare type Debugger=(pattern:string,...args:any[])=>void;declare const debug:(namespace:string)=>Debugger;export default debug;
1
+ type Debugger=(pattern:string,...args:any[])=>void;declare const debug:(namespace:string)=>Debugger;export default debug;
package/lib/cjs/error.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorType=exports.ApiError=exports.SdkError=void 0;var ErrorType;(function(e){e.CLIENT="client",e.REQUEST="request",e.RESPONSE="response",e.GENERIC="generic",e.CANCEL="cancel"})(ErrorType||(ErrorType={})),exports.ErrorType=ErrorType;class SdkError extends Error{constructor(r){super(r.message),this.name=SdkError.NAME,this.type=r.type||ErrorType.GENERIC}static isSdkError(r){return r&&[SdkError.NAME,ApiError.NAME].includes(r.name)&&Object.values(ErrorType).includes(r.type)}}exports.SdkError=SdkError,SdkError.NAME="SdkError";class ApiError extends SdkError{constructor(r){super(Object.assign(Object.assign({},r),{type:ErrorType.RESPONSE})),this.errors=[],this.name=ApiError.NAME}static isApiError(r){return SdkError.isSdkError(r)&&r.name===ApiError.NAME&&r.type===ErrorType.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}exports.ApiError=ApiError,ApiError.NAME="ApiError";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ErrorType=exports.ApiError=exports.SdkError=void 0;var ErrorType;(function(e){e.CLIENT="client",e.REQUEST="request",e.RESPONSE="response",e.GENERIC="generic",e.CANCEL="cancel"})(ErrorType||(ErrorType={})),exports.ErrorType=ErrorType;class SdkError extends Error{static isSdkError(r){return r&&[SdkError.NAME,ApiError.NAME].includes(r.name)&&Object.values(ErrorType).includes(r.type)}constructor(r){super(r.message),this.name=SdkError.NAME,this.type=r.type||ErrorType.GENERIC}}exports.SdkError=SdkError,SdkError.NAME="SdkError";class ApiError extends SdkError{static isApiError(r){return SdkError.isSdkError(r)&&r.name===ApiError.NAME&&r.type===ErrorType.RESPONSE}constructor(r){super(Object.assign(Object.assign({},r),{type:ErrorType.RESPONSE})),this.errors=[],this.name=ApiError.NAME}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}exports.ApiError=ApiError,ApiError.NAME="ApiError";
@@ -1 +1 @@
1
- import{AxiosError,AxiosInterceptorManager,AxiosRequestConfig,AxiosResponse,AxiosResponseHeaders,RawAxiosResponseHeaders}from'axios';declare type InterceptorManager={request:AxiosInterceptorManager<AxiosRequestConfig>;response:AxiosInterceptorManager<any>;};declare type RequestObj=AxiosRequestConfig;declare type RequestInterceptor=(request:RequestObj)=>RequestObj|Promise<RequestObj>;declare type ResponseObj=AxiosResponse;declare type ResponseInterceptor=(response:ResponseObj)=>ResponseObj;declare type HeadersObj=AxiosResponseHeaders|RawAxiosResponseHeaders;declare type ErrorObj=AxiosError;declare type ErrorInterceptor=(error:ErrorObj)=>ErrorObj;declare type InterceptorType='request'|'response';export type{InterceptorManager,RequestInterceptor,ResponseInterceptor,ErrorInterceptor,InterceptorType};export type{RequestObj,ResponseObj,ErrorObj,HeadersObj};declare type RawResponseReader={id:number|undefined;rawResponse:ResponseObj|undefined;headers:HeadersObj|undefined;};export type{RawResponseReader};
1
+ import{AxiosError,AxiosInterceptorManager,AxiosRequestConfig,AxiosResponse,AxiosResponseHeaders,RawAxiosResponseHeaders}from'axios';type InterceptorManager={request:AxiosInterceptorManager<AxiosRequestConfig>;response:AxiosInterceptorManager<any>;};type RequestObj=AxiosRequestConfig;type RequestInterceptor=(request:RequestObj)=>RequestObj|Promise<RequestObj>;type ResponseObj=AxiosResponse;type ResponseInterceptor=(response:ResponseObj)=>ResponseObj;type HeadersObj=AxiosResponseHeaders|RawAxiosResponseHeaders;type ErrorObj=AxiosError;type ErrorInterceptor=(error:ErrorObj)=>ErrorObj;type InterceptorType='request'|'response';export type{InterceptorManager,RequestInterceptor,ResponseInterceptor,ErrorInterceptor,InterceptorType};export type{RequestObj,ResponseObj,ErrorObj,HeadersObj};type RawResponseReader={id:number|undefined;rawResponse:ResponseObj|undefined;headers:HeadersObj|undefined;};export type{RawResponseReader};
@@ -1 +1 @@
1
- import{ResourceType}from"./resource";interface QueryParamsRetrieve{include?:string[];fields?:string[]|{[key:string]:string[];};}interface QueryParamsList extends QueryParamsRetrieve{sort?:string[]|{[key:string]:'asc'|'desc';};filters?:{[key:string]:string|number|boolean;};pageNumber?:number;pageSize?:number;}declare type QueryParams=QueryParamsRetrieve|QueryParamsList;export{QueryParamsRetrieve,QueryParamsList,QueryParams};declare const generateQueryStringParams:(params:QueryParamsRetrieve|QueryParamsList|undefined,res:string|ResourceType)=>{[key:string]:string;};export{generateQueryStringParams};
1
+ import{ResourceType}from"./resource";interface QueryParamsRetrieve{include?:string[];fields?:string[]|{[key:string]:string[];};}interface QueryParamsList extends QueryParamsRetrieve{sort?:string[]|{[key:string]:'asc'|'desc';};filters?:{[key:string]:string|number|boolean;};pageNumber?:number;pageSize?:number;}type QueryParams=QueryParamsRetrieve|QueryParamsList;export{QueryParamsRetrieve,QueryParamsList,QueryParams};declare const generateQueryStringParams:(params:QueryParamsRetrieve|QueryParamsList|undefined,res:string|ResourceType)=>{[key:string]:string;};export{generateQueryStringParams};
@@ -1 +1 @@
1
- import{ApiClientInitConfig}from'./client';import{QueryParamsRetrieve,QueryParamsList}from'./query';import{ResourceTypeLock}from'./api';import{InterceptorManager}from'./interceptor';import{QueryParams}from'.';declare type ResourceNull={id:null;}&ResourceType;declare type ResourceRel=ResourceId|ResourceNull;declare type Metadata={[key:string]:any;};interface ResourceType{readonly type:ResourceTypeLock;}interface ResourceId extends ResourceType{readonly id:string;}interface Resource extends ResourceId{reference?:string;reference_origin?:string;metadata?:Metadata;readonly created_at:string;readonly updated_at:string;}interface ResourceCreate{reference?:string;reference_origin?:string;metadata?:Metadata;}interface ResourceUpdate{readonly id:string;reference?:string;reference_origin?:string;metadata?:Metadata;}declare type ListMeta={readonly pageCount:number;readonly recordCount:number;readonly currentPage:number;readonly recordsPerPage:number;};declare class ListResponse<R>extends Array<R>{readonly meta:ListMeta;constructor(meta:ListMeta,data:Array<R>);first():R|undefined;last():R|undefined;get(index:number):R|undefined;}export type{Metadata,ResourceType,ResourceId,Resource,ResourceCreate,ResourceUpdate,ListResponse,ResourceRel};declare type ResourceAdapterConfig={};declare type ResourcesInitConfig=ResourceAdapterConfig&ApiClientInitConfig;declare type ResourcesConfig=Partial<ResourcesInitConfig>;declare class ResourceAdapter{#private;constructor(config:ResourcesInitConfig);get interceptors():InterceptorManager;private localConfig;config(config:ResourcesConfig):void;singleton<R extends Resource>(resource:ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;retrieve<R extends Resource>(resource:ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;list<R extends Resource>(resource:ResourceType,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<R>>;create<C extends ResourceCreate,R extends Resource>(resource:C&ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;update<U extends ResourceUpdate,R extends Resource>(resource:U&ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;delete(resource:ResourceId,options?:ResourcesConfig):Promise<void>;fetch<R extends Resource>(resource:string|ResourceType,path:string,params?:QueryParams,options?:ResourcesConfig):Promise<R|ListResponse<R>>;}declare abstract class ApiResource{static readonly TYPE:ResourceTypeLock;protected resources:ResourceAdapter;constructor(adapter:ResourceAdapter);abstract relationship(id:string|ResourceId|null):ResourceRel;abstract type():string;}export default ResourceAdapter;export{ApiResource,ResourcesConfig,ResourcesInitConfig};
1
+ import{ApiClientInitConfig}from'./client';import{QueryParamsRetrieve,QueryParamsList}from'./query';import{ResourceTypeLock}from'./api';import{InterceptorManager}from'./interceptor';import{QueryParams}from'.';type ResourceNull={id:null;}&ResourceType;type ResourceRel=ResourceId|ResourceNull;type Metadata={[key:string]:any;};interface ResourceType{readonly type:ResourceTypeLock;}interface ResourceId extends ResourceType{readonly id:string;}interface Resource extends ResourceId{reference?:string;reference_origin?:string;metadata?:Metadata;readonly created_at:string;readonly updated_at:string;}interface ResourceCreate{reference?:string;reference_origin?:string;metadata?:Metadata;}interface ResourceUpdate{readonly id:string;reference?:string;reference_origin?:string;metadata?:Metadata;}type ListMeta={readonly pageCount:number;readonly recordCount:number;readonly currentPage:number;readonly recordsPerPage:number;};declare class ListResponse<R>extends Array<R>{readonly meta:ListMeta;constructor(meta:ListMeta,data:R[]);first():R|undefined;last():R|undefined;get(index:number):R|undefined;}export type{Metadata,ResourceType,ResourceId,Resource,ResourceCreate,ResourceUpdate,ListResponse,ResourceRel};type ResourceAdapterConfig={};type ResourcesInitConfig=ResourceAdapterConfig&ApiClientInitConfig;type ResourcesConfig=Partial<ResourcesInitConfig>;declare class ResourceAdapter{#private;constructor(config:ResourcesInitConfig);get interceptors():InterceptorManager;private localConfig;config(config:ResourcesConfig):void;singleton<R extends Resource>(resource:ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;retrieve<R extends Resource>(resource:ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;list<R extends Resource>(resource:ResourceType,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<R>>;create<C extends ResourceCreate,R extends Resource>(resource:C&ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;update<U extends ResourceUpdate,R extends Resource>(resource:U&ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;delete(resource:ResourceId,options?:ResourcesConfig):Promise<void>;fetch<R extends Resource>(resource:string|ResourceType,path:string,params?:QueryParams,options?:ResourcesConfig):Promise<R|ListResponse<R>>;}declare abstract class ApiResource{static readonly TYPE:ResourceTypeLock;protected resources:ResourceAdapter;constructor(adapter:ResourceAdapter);abstract relationship(id:string|ResourceId|null):ResourceRel;abstract type():string;}export default ResourceAdapter;export{ApiResource,ResourcesConfig,ResourcesInitConfig};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Geocoder}from'./geocoders';declare type AddressRel=ResourceRel&{type:typeof Addresses.TYPE;};declare type GeocoderRel=ResourceRel&{type:'geocoders';};interface Address extends Resource{business?:boolean;first_name?:string;last_name?:string;company?:string;full_name?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;full_address?:string;name?:string;email?:string;notes?:string;lat?:number;lng?:number;is_localized?:boolean;is_geocoded?:boolean;provider_name?:string;map_url?:string;static_map_url?:string;billing_info?:string;geocoder?:Geocoder;}interface AddressCreate extends ResourceCreate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1:string;line_2?:string;city:string;zip_code?:string;state_code:string;country_code:string;phone:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}interface AddressUpdate extends ResourceUpdate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}declare class Addresses extends ApiResource{static readonly TYPE:'addresses';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;create(resource:AddressCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;update(resource:AddressUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;delete(id:string,options?:ResourcesConfig):Promise<void>;geocoder(addressId:string|Address,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Geocoder>;isAddress(resource:any):resource is Address;relationship(id:string|ResourceId|null):AddressRel;type():string;}export default Addresses;export{Address,AddressCreate,AddressUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Geocoder}from'./geocoders';type AddressRel=ResourceRel&{type:typeof Addresses.TYPE;};type GeocoderRel=ResourceRel&{type:'geocoders';};interface Address extends Resource{business?:boolean;first_name?:string;last_name?:string;company?:string;full_name?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;full_address?:string;name?:string;email?:string;notes?:string;lat?:number;lng?:number;is_localized?:boolean;is_geocoded?:boolean;provider_name?:string;map_url?:string;static_map_url?:string;billing_info?:string;geocoder?:Geocoder;}interface AddressCreate extends ResourceCreate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1:string;line_2?:string;city:string;zip_code?:string;state_code:string;country_code:string;phone:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}interface AddressUpdate extends ResourceUpdate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}declare class Addresses extends ApiResource{static readonly TYPE:'addresses';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;create(resource:AddressCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;update(resource:AddressUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;delete(id:string,options?:ResourcesConfig):Promise<void>;geocoder(addressId:string|Address,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Geocoder>;isAddress(resource:any):resource is Address;relationship(id:string|ResourceId|null):AddressRel;type():string;}export default Addresses;export{Address,AddressCreate,AddressUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';declare type AdjustmentRel=ResourceRel&{type:typeof Adjustments.TYPE;};interface Adjustment extends Resource{name?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;}interface AdjustmentCreate extends ResourceCreate{name:string;currency_code:string;amount_cents:number;}interface AdjustmentUpdate extends ResourceUpdate{name?:string;currency_code?:string;amount_cents?:number;}declare class Adjustments extends ApiResource{static readonly TYPE:'adjustments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Adjustment>>;create(resource:AdjustmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;update(resource:AdjustmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAdjustment(resource:any):resource is Adjustment;relationship(id:string|ResourceId|null):AdjustmentRel;type():string;}export default Adjustments;export{Adjustment,AdjustmentCreate,AdjustmentUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';type AdjustmentRel=ResourceRel&{type:typeof Adjustments.TYPE;};interface Adjustment extends Resource{name?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;}interface AdjustmentCreate extends ResourceCreate{name:string;currency_code:string;amount_cents:number;}interface AdjustmentUpdate extends ResourceUpdate{name?:string;currency_code?:string;amount_cents?:number;}declare class Adjustments extends ApiResource{static readonly TYPE:'adjustments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Adjustment>>;create(resource:AdjustmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;update(resource:AdjustmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAdjustment(resource:any):resource is Adjustment;relationship(id:string|ResourceId|null):AdjustmentRel;type():string;}export default Adjustments;export{Adjustment,AdjustmentCreate,AdjustmentUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{AdyenPayment}from'./adyen_payments';declare type AdyenGatewayRel=ResourceRel&{type:typeof AdyenGateways.TYPE;};declare type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};interface AdyenGateway extends Resource{name?:string;live_url_prefix?:string;payment_methods?:PaymentMethod[];adyen_payments?:AdyenPayment[];}interface AdyenGatewayCreate extends ResourceCreate{name:string;merchant_account:string;api_key:string;public_key?:string;live_url_prefix:string;adyen_payments?:AdyenPaymentRel[];}interface AdyenGatewayUpdate extends ResourceUpdate{name?:string;merchant_account?:string;api_key?:string;public_key?:string;live_url_prefix?:string;adyen_payments?:AdyenPaymentRel[];}declare class AdyenGateways extends ApiResource{static readonly TYPE:'adyen_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenGateway>>;create(resource:AdyenGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;update(resource:AdyenGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;adyen_payments(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;isAdyenGateway(resource:any):resource is AdyenGateway;relationship(id:string|ResourceId|null):AdyenGatewayRel;type():string;}export default AdyenGateways;export{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{AdyenPayment}from'./adyen_payments';type AdyenGatewayRel=ResourceRel&{type:typeof AdyenGateways.TYPE;};type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};interface AdyenGateway extends Resource{name?:string;live_url_prefix?:string;payment_methods?:PaymentMethod[];adyen_payments?:AdyenPayment[];}interface AdyenGatewayCreate extends ResourceCreate{name:string;merchant_account:string;api_key:string;public_key?:string;live_url_prefix:string;adyen_payments?:AdyenPaymentRel[];}interface AdyenGatewayUpdate extends ResourceUpdate{name?:string;merchant_account?:string;api_key?:string;public_key?:string;live_url_prefix?:string;adyen_payments?:AdyenPaymentRel[];}declare class AdyenGateways extends ApiResource{static readonly TYPE:'adyen_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenGateway>>;create(resource:AdyenGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;update(resource:AdyenGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;adyen_payments(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;isAdyenGateway(resource:any):resource is AdyenGateway;relationship(id:string|ResourceId|null):AdyenGatewayRel;type():string;}export default AdyenGateways;export{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type AdyenPaymentRel=ResourceRel&{type:typeof AdyenPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface AdyenPayment extends Resource{public_key?:string;payment_methods?:object;payment_request_data?:object;payment_request_details?:object;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface AdyenPaymentCreate extends ResourceCreate{order:OrderRel;}interface AdyenPaymentUpdate extends ResourceUpdate{payment_request_data?:object;payment_request_details?:object;payment_response?:object;_details?:boolean;order?:OrderRel;}declare class AdyenPayments extends ApiResource{static readonly TYPE:'adyen_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;create(resource:AdyenPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;update(resource:AdyenPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isAdyenPayment(resource:any):resource is AdyenPayment;relationship(id:string|ResourceId|null):AdyenPaymentRel;type():string;}export default AdyenPayments;export{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';type AdyenPaymentRel=ResourceRel&{type:typeof AdyenPayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface AdyenPayment extends Resource{public_key?:string;payment_methods?:object;payment_request_data?:object;payment_request_details?:object;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface AdyenPaymentCreate extends ResourceCreate{order:OrderRel;}interface AdyenPaymentUpdate extends ResourceUpdate{payment_request_data?:object;payment_request_details?:object;payment_response?:object;_details?:boolean;order?:OrderRel;}declare class AdyenPayments extends ApiResource{static readonly TYPE:'adyen_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;create(resource:AdyenPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;update(resource:AdyenPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isAdyenPayment(resource:any):resource is AdyenPayment;relationship(id:string|ResourceId|null):AdyenPaymentRel;type():string;}export default AdyenPayments;export{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';declare type ApplicationRel=ResourceRel&{type:typeof Applications.TYPE;};interface Application extends Resource{name?:string;kind?:string;public_access?:boolean;redirect_uri?:string;scopes?:string;}declare class Applications extends ApiResource{static readonly TYPE:'application';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Application>;isApplication(resource:any):resource is Application;relationship(id:string|ResourceId|null):ApplicationRel;type():string;}export default Applications;export{Application};
1
+ import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';type ApplicationRel=ResourceRel&{type:typeof Applications.TYPE;};interface Application extends Resource{name?:string;kind?:string;public_access?:boolean;redirect_uri?:string;scopes?:string;}declare class Applications extends ApiResource{static readonly TYPE:'application';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Application>;isApplication(resource:any):resource is Application;relationship(id:string|ResourceId|null):ApplicationRel;type():string;}export default Applications;export{Application};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Bundle}from'./bundles';import type{CarrierAccount}from'./carrier_accounts';import type{CustomerGroup}from'./customer_groups';import type{Customer}from'./customers';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Geocoder}from'./geocoders';import type{GiftCardRecipient}from'./gift_card_recipients';import type{GiftCard}from'./gift_cards';import type{InventoryModel}from'./inventory_models';import type{Market}from'./markets';import type{Merchant}from'./merchants';import type{BillingInfoValidationRule}from'./billing_info_validation_rules';import type{Order}from'./orders';import type{Package}from'./packages';import type{Parcel}from'./parcels';import type{PaymentMethod}from'./payment_methods';import type{PriceList}from'./price_lists';import type{Price}from'./prices';import type{Promotion}from'./promotions';import type{Return}from'./returns';import type{Shipment}from'./shipments';import type{ShippingCategory}from'./shipping_categories';import type{ShippingMethod}from'./shipping_methods';import type{ShippingZone}from'./shipping_zones';import type{SkuOption}from'./sku_options';import type{Sku}from'./skus';import type{StockItem}from'./stock_items';import type{StockLocation}from'./stock_locations';import type{TaxCalculator}from'./tax_calculators';import type{TaxCategory}from'./tax_categories';declare type AttachmentRel=ResourceRel&{type:typeof Attachments.TYPE;};declare type BundleRel=ResourceRel&{type:'bundles';};declare type CarrierAccountRel=ResourceRel&{type:'carrier_accounts';};declare type CustomerGroupRel=ResourceRel&{type:'customer_groups';};declare type CustomerRel=ResourceRel&{type:'customers';};declare type DeliveryLeadTimeRel=ResourceRel&{type:'delivery_lead_times';};declare type GeocoderRel=ResourceRel&{type:'geocoders';};declare type GiftCardRecipientRel=ResourceRel&{type:'gift_card_recipients';};declare type GiftCardRel=ResourceRel&{type:'gift_cards';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};declare type MarketRel=ResourceRel&{type:'markets';};declare type MerchantRel=ResourceRel&{type:'merchants';};declare type BillingInfoValidationRuleRel=ResourceRel&{type:'billing_info_validation_rules';};declare type OrderRel=ResourceRel&{type:'orders';};declare type PackageRel=ResourceRel&{type:'packages';};declare type ParcelRel=ResourceRel&{type:'parcels';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type PriceRel=ResourceRel&{type:'prices';};declare type PromotionRel=ResourceRel&{type:'promotions';};declare type ReturnRel=ResourceRel&{type:'returns';};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};declare type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};declare type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};declare type SkuOptionRel=ResourceRel&{type:'sku_options';};declare type SkuRel=ResourceRel&{type:'skus';};declare type StockItemRel=ResourceRel&{type:'stock_items';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface Attachment extends Resource{name?:string;description?:string;url?:string;attachable?:Bundle|CarrierAccount|CustomerGroup|Customer|DeliveryLeadTime|Geocoder|GiftCardRecipient|GiftCard|InventoryModel|Market|Merchant|BillingInfoValidationRule|Order|Package|Parcel|PaymentMethod|PriceList|Price|Promotion|Return|Shipment|ShippingCategory|ShippingMethod|ShippingZone|SkuOption|Sku|StockItem|StockLocation|TaxCalculator|TaxCategory;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string;url?:string;attachable:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string;description?:string;url?:string;attachable?:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}declare class Attachments extends ApiResource{static readonly TYPE:'attachments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():string;}export default Attachments;export{Attachment,AttachmentCreate,AttachmentUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Bundle}from'./bundles';import type{CarrierAccount}from'./carrier_accounts';import type{CustomerGroup}from'./customer_groups';import type{Customer}from'./customers';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Geocoder}from'./geocoders';import type{GiftCardRecipient}from'./gift_card_recipients';import type{GiftCard}from'./gift_cards';import type{InventoryModel}from'./inventory_models';import type{Market}from'./markets';import type{Merchant}from'./merchants';import type{BillingInfoValidationRule}from'./billing_info_validation_rules';import type{Order}from'./orders';import type{Package}from'./packages';import type{Parcel}from'./parcels';import type{PaymentMethod}from'./payment_methods';import type{PriceList}from'./price_lists';import type{Price}from'./prices';import type{Promotion}from'./promotions';import type{Return}from'./returns';import type{Shipment}from'./shipments';import type{ShippingCategory}from'./shipping_categories';import type{ShippingMethod}from'./shipping_methods';import type{ShippingZone}from'./shipping_zones';import type{SkuOption}from'./sku_options';import type{Sku}from'./skus';import type{StockItem}from'./stock_items';import type{StockLocation}from'./stock_locations';import type{TaxCalculator}from'./tax_calculators';import type{TaxCategory}from'./tax_categories';type AttachmentRel=ResourceRel&{type:typeof Attachments.TYPE;};type BundleRel=ResourceRel&{type:'bundles';};type CarrierAccountRel=ResourceRel&{type:'carrier_accounts';};type CustomerGroupRel=ResourceRel&{type:'customer_groups';};type CustomerRel=ResourceRel&{type:'customers';};type DeliveryLeadTimeRel=ResourceRel&{type:'delivery_lead_times';};type GeocoderRel=ResourceRel&{type:'geocoders';};type GiftCardRecipientRel=ResourceRel&{type:'gift_card_recipients';};type GiftCardRel=ResourceRel&{type:'gift_cards';};type InventoryModelRel=ResourceRel&{type:'inventory_models';};type MarketRel=ResourceRel&{type:'markets';};type MerchantRel=ResourceRel&{type:'merchants';};type BillingInfoValidationRuleRel=ResourceRel&{type:'billing_info_validation_rules';};type OrderRel=ResourceRel&{type:'orders';};type PackageRel=ResourceRel&{type:'packages';};type ParcelRel=ResourceRel&{type:'parcels';};type PaymentMethodRel=ResourceRel&{type:'payment_methods';};type PriceListRel=ResourceRel&{type:'price_lists';};type PriceRel=ResourceRel&{type:'prices';};type PromotionRel=ResourceRel&{type:'promotions';};type ReturnRel=ResourceRel&{type:'returns';};type ShipmentRel=ResourceRel&{type:'shipments';};type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};type SkuOptionRel=ResourceRel&{type:'sku_options';};type SkuRel=ResourceRel&{type:'skus';};type StockItemRel=ResourceRel&{type:'stock_items';};type StockLocationRel=ResourceRel&{type:'stock_locations';};type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface Attachment extends Resource{name?:string;description?:string;url?:string;attachable?:Bundle|CarrierAccount|CustomerGroup|Customer|DeliveryLeadTime|Geocoder|GiftCardRecipient|GiftCard|InventoryModel|Market|Merchant|BillingInfoValidationRule|Order|Package|Parcel|PaymentMethod|PriceList|Price|Promotion|Return|Shipment|ShippingCategory|ShippingMethod|ShippingZone|SkuOption|Sku|StockItem|StockLocation|TaxCalculator|TaxCategory;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string;url?:string;attachable:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string;description?:string;url?:string;attachable?:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}declare class Attachments extends ApiResource{static readonly TYPE:'attachments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():string;}export default Attachments;export{Attachment,AttachmentCreate,AttachmentUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';import type{Void}from'./voids';declare type AuthorizationRel=ResourceRel&{type:typeof Authorizations.TYPE;};interface Authorization extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;cvv_code?:string;cvv_message?:string;avs_code?:string;avs_message?:string;fraud_review?:string;capture_amount_cents?:number;capture_amount_float?:number;formatted_capture_amount?:string;capture_balance_cents?:number;capture_balance_float?:number;formatted_capture_balance?:string;void_balance_cents?:number;void_balance_float?:number;formatted_void_balance?:string;order?:Order;captures?:Capture[];voids?:Void[];}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean;_capture_amount_cents?:number;_void?:boolean;}declare class Authorizations extends ApiResource{static readonly TYPE:'authorizations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():string;}export default Authorizations;export{Authorization,AuthorizationUpdate};
1
+ import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';import type{Void}from'./voids';type AuthorizationRel=ResourceRel&{type:typeof Authorizations.TYPE;};interface Authorization extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;cvv_code?:string;cvv_message?:string;avs_code?:string;avs_message?:string;fraud_review?:string;capture_amount_cents?:number;capture_amount_float?:number;formatted_capture_amount?:string;capture_balance_cents?:number;capture_balance_float?:number;formatted_capture_balance?:string;void_balance_cents?:number;void_balance_float?:number;formatted_void_balance?:string;order?:Order;captures?:Capture[];voids?:Void[];}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean;_capture_amount_cents?:number;_void?:boolean;}declare class Authorizations extends ApiResource{static readonly TYPE:'authorizations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():string;}export default Authorizations;export{Authorization,AuthorizationUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{TaxCategory}from'./tax_categories';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type AvalaraAccountRel=ResourceRel&{type:typeof AvalaraAccounts.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface AvalaraAccount extends Resource{name?:string;username?:string;company_code?:string;commit_invoice?:string;ddp?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}interface AvalaraAccountCreate extends ResourceCreate{name:string;username:string;password:string;company_code:string;commit_invoice?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}interface AvalaraAccountUpdate extends ResourceUpdate{name?:string;username?:string;password?:string;company_code?:string;commit_invoice?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}declare class AvalaraAccounts extends ApiResource{static readonly TYPE:'avalara_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AvalaraAccount>>;create(resource:AvalaraAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;update(resource:AvalaraAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isAvalaraAccount(resource:any):resource is AvalaraAccount;relationship(id:string|ResourceId|null):AvalaraAccountRel;type():string;}export default AvalaraAccounts;export{AvalaraAccount,AvalaraAccountCreate,AvalaraAccountUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';import type{TaxCategory}from'./tax_categories';type AvalaraAccountRel=ResourceRel&{type:typeof AvalaraAccounts.TYPE;};type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface AvalaraAccount extends Resource{name?:string;username?:string;company_code?:string;commit_invoice?:string;ddp?:string;markets?:Market[];attachments?:Attachment[];tax_categories?:TaxCategory[];}interface AvalaraAccountCreate extends ResourceCreate{name:string;username:string;password:string;company_code:string;commit_invoice?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}interface AvalaraAccountUpdate extends ResourceUpdate{name?:string;username?:string;password?:string;company_code?:string;commit_invoice?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}declare class AvalaraAccounts extends ApiResource{static readonly TYPE:'avalara_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AvalaraAccount>>;create(resource:AvalaraAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;update(resource:AvalaraAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;markets(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;tax_categories(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;isAvalaraAccount(resource:any):resource is AvalaraAccount;relationship(id:string|ResourceId|null):AvalaraAccountRel;type():string;}export default AvalaraAccounts;export{AvalaraAccount,AvalaraAccountCreate,AvalaraAccountUpdate};
@@ -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,s){return this.resources.create(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:AvalaraAccounts.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:AvalaraAccounts.TYPE,id:e},t)}async tax_categories(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${r}/tax_categories`,t,s)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${r}/markets`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${r}/attachments`,t,s)}isAvalaraAccount(e){return e.type&&e.type===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
+ "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,s){return this.resources.create(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:AvalaraAccounts.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:AvalaraAccounts.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:AvalaraAccounts.TYPE,id:e},t)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${r}/markets`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${r}/attachments`,t,s)}async tax_categories(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${r}/tax_categories`,t,s)}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 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';declare type BillingInfoValidationRuleRel=ResourceRel&{type:typeof BillingInfoValidationRules.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};interface BillingInfoValidationRule extends Resource{market?:Market;}interface BillingInfoValidationRuleCreate extends ResourceCreate{market:MarketRel;}interface BillingInfoValidationRuleUpdate extends ResourceUpdate{market?:MarketRel;}declare class BillingInfoValidationRules extends ApiResource{static readonly TYPE:'billing_info_validation_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BillingInfoValidationRule>>;create(resource:BillingInfoValidationRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;update(resource:BillingInfoValidationRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(billingInfoValidationRuleId:string|BillingInfoValidationRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;isBillingInfoValidationRule(resource:any):resource is BillingInfoValidationRule;relationship(id:string|ResourceId|null):BillingInfoValidationRuleRel;type():string;}export default BillingInfoValidationRules;export{BillingInfoValidationRule,BillingInfoValidationRuleCreate,BillingInfoValidationRuleUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';type BillingInfoValidationRuleRel=ResourceRel&{type:typeof BillingInfoValidationRules.TYPE;};type MarketRel=ResourceRel&{type:'markets';};interface BillingInfoValidationRule extends Resource{market?:Market;}interface BillingInfoValidationRuleCreate extends ResourceCreate{market:MarketRel;}interface BillingInfoValidationRuleUpdate extends ResourceUpdate{market?:MarketRel;}declare class BillingInfoValidationRules extends ApiResource{static readonly TYPE:'billing_info_validation_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BillingInfoValidationRule>>;create(resource:BillingInfoValidationRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;update(resource:BillingInfoValidationRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BillingInfoValidationRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(billingInfoValidationRuleId:string|BillingInfoValidationRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;isBillingInfoValidationRule(resource:any):resource is BillingInfoValidationRule;relationship(id:string|ResourceId|null):BillingInfoValidationRuleRel;type():string;}export default BillingInfoValidationRules;export{BillingInfoValidationRule,BillingInfoValidationRuleCreate,BillingInfoValidationRuleUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';declare type BingGeocoderRel=ResourceRel&{type:typeof BingGeocoders.TYPE;};interface BingGeocoder extends Resource{name?:string;addresses?:Address[];attachments?:Attachment[];}interface BingGeocoderCreate extends ResourceCreate{name:string;key:string;}interface BingGeocoderUpdate extends ResourceUpdate{name?:string;key?:string;}declare class BingGeocoders extends ApiResource{static readonly TYPE:'bing_geocoders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BingGeocoder>>;create(resource:BingGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;update(resource:BingGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;delete(id:string,options?:ResourcesConfig):Promise<void>;addresses(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBingGeocoder(resource:any):resource is BingGeocoder;relationship(id:string|ResourceId|null):BingGeocoderRel;type():string;}export default BingGeocoders;export{BingGeocoder,BingGeocoderCreate,BingGeocoderUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';type BingGeocoderRel=ResourceRel&{type:typeof BingGeocoders.TYPE;};interface BingGeocoder extends Resource{name?:string;addresses?:Address[];attachments?:Attachment[];}interface BingGeocoderCreate extends ResourceCreate{name:string;key:string;}interface BingGeocoderUpdate extends ResourceUpdate{name?:string;key?:string;}declare class BingGeocoders extends ApiResource{static readonly TYPE:'bing_geocoders';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BingGeocoder>>;create(resource:BingGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;update(resource:BingGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;delete(id:string,options?:ResourcesConfig):Promise<void>;addresses(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBingGeocoder(resource:any):resource is BingGeocoder;relationship(id:string|ResourceId|null):BingGeocoderRel;type():string;}export default BingGeocoders;export{BingGeocoder,BingGeocoderCreate,BingGeocoderUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{BraintreePayment}from'./braintree_payments';declare type BraintreeGatewayRel=ResourceRel&{type:typeof BraintreeGateways.TYPE;};declare type BraintreePaymentRel=ResourceRel&{type:'braintree_payments';};interface BraintreeGateway extends Resource{name?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];braintree_payments?:BraintreePayment[];}interface BraintreeGatewayCreate extends ResourceCreate{name:string;merchant_account_id:string;merchant_id:string;public_key:string;private_key:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}interface BraintreeGatewayUpdate extends ResourceUpdate{name?:string;merchant_account_id?:string;merchant_id?:string;public_key?:string;private_key?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}declare class BraintreeGateways extends ApiResource{static readonly TYPE:'braintree_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreeGateway>>;create(resource:BraintreeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;update(resource:BraintreeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;braintree_payments(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreePayment>>;isBraintreeGateway(resource:any):resource is BraintreeGateway;relationship(id:string|ResourceId|null):BraintreeGatewayRel;type():string;}export default BraintreeGateways;export{BraintreeGateway,BraintreeGatewayCreate,BraintreeGatewayUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{BraintreePayment}from'./braintree_payments';type BraintreeGatewayRel=ResourceRel&{type:typeof BraintreeGateways.TYPE;};type BraintreePaymentRel=ResourceRel&{type:'braintree_payments';};interface BraintreeGateway extends Resource{name?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];braintree_payments?:BraintreePayment[];}interface BraintreeGatewayCreate extends ResourceCreate{name:string;merchant_account_id:string;merchant_id:string;public_key:string;private_key:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}interface BraintreeGatewayUpdate extends ResourceUpdate{name?:string;merchant_account_id?:string;merchant_id?:string;public_key?:string;private_key?:string;descriptor_name?:string;descriptor_phone?:string;descriptor_url?:string;braintree_payments?:BraintreePaymentRel[];}declare class BraintreeGateways extends ApiResource{static readonly TYPE:'braintree_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreeGateway>>;create(resource:BraintreeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;update(resource:BraintreeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreeGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;braintree_payments(braintreeGatewayId:string|BraintreeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreePayment>>;isBraintreeGateway(resource:any):resource is BraintreeGateway;relationship(id:string|ResourceId|null):BraintreeGatewayRel;type():string;}export default BraintreeGateways;export{BraintreeGateway,BraintreeGatewayCreate,BraintreeGatewayUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type BraintreePaymentRel=ResourceRel&{type:typeof BraintreePayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface BraintreePayment extends Resource{client_token?:string;payment_method_nonce?:string;payment_id?:string;local?:boolean;options?:object;order?:Order;payment_gateway?:PaymentGateway;}interface BraintreePaymentCreate extends ResourceCreate{payment_id?:string;local?:boolean;options?:object;order:OrderRel;}interface BraintreePaymentUpdate extends ResourceUpdate{payment_method_nonce?:string;payment_id?:string;local?:boolean;options?:object;order?:OrderRel;}declare class BraintreePayments extends ApiResource{static readonly TYPE:'braintree_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreePayment>>;create(resource:BraintreePaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;update(resource:BraintreePaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(braintreePaymentId:string|BraintreePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(braintreePaymentId:string|BraintreePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isBraintreePayment(resource:any):resource is BraintreePayment;relationship(id:string|ResourceId|null):BraintreePaymentRel;type():string;}export default BraintreePayments;export{BraintreePayment,BraintreePaymentCreate,BraintreePaymentUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';type BraintreePaymentRel=ResourceRel&{type:typeof BraintreePayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface BraintreePayment extends Resource{client_token?:string;payment_method_nonce?:string;payment_id?:string;local?:boolean;options?:object;order?:Order;payment_gateway?:PaymentGateway;}interface BraintreePaymentCreate extends ResourceCreate{payment_id?:string;local?:boolean;options?:object;order:OrderRel;}interface BraintreePaymentUpdate extends ResourceUpdate{payment_method_nonce?:string;payment_id?:string;local?:boolean;options?:object;order?:OrderRel;}declare class BraintreePayments extends ApiResource{static readonly TYPE:'braintree_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<BraintreePayment>>;create(resource:BraintreePaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;update(resource:BraintreePaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BraintreePayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(braintreePaymentId:string|BraintreePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(braintreePaymentId:string|BraintreePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isBraintreePayment(resource:any):resource is BraintreePayment;relationship(id:string|ResourceId|null):BraintreePaymentRel;type():string;}export default BraintreePayments;export{BraintreePayment,BraintreePaymentCreate,BraintreePaymentUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';import type{Attachment}from'./attachments';declare type BundleRel=ResourceRel&{type:typeof Bundles.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type SkuListRel=ResourceRel&{type:'sku_lists';};interface Bundle extends Resource{code?:string;name?:string;currency_code?:string;description?:string;image_url?:string;do_not_ship?:boolean;do_not_track?:boolean;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;compare_at_amount_cents?:number;compare_at_amount_float?:number;formatted_compare_at_amount?:string;skus_count?:number;market?:Market;sku_list?:SkuList;skus?:Sku[];attachments?:Attachment[];}interface BundleCreate extends ResourceCreate{code:string;name:string;currency_code?:string;description?:string;image_url?:string;price_amount_cents:number;compare_at_amount_cents:number;_compute_price_amount?:boolean;_compute_compare_at_amount?:boolean;market?:MarketRel;sku_list:SkuListRel;}interface BundleUpdate extends ResourceUpdate{code?:string;name?:string;currency_code?:string;description?:string;image_url?:string;price_amount_cents?:number;compare_at_amount_cents?:number;_compute_price_amount?:boolean;_compute_compare_at_amount?:boolean;}declare class Bundles extends ApiResource{static readonly TYPE:'bundles';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;create(resource:BundleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;update(resource:BundleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(bundleId:string|Bundle,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;sku_list(bundleId:string|Bundle,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(bundleId:string|Bundle,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;attachments(bundleId:string|Bundle,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBundle(resource:any):resource is Bundle;relationship(id:string|ResourceId|null):BundleRel;type():string;}export default Bundles;export{Bundle,BundleCreate,BundleUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';import type{Attachment}from'./attachments';type BundleRel=ResourceRel&{type:typeof Bundles.TYPE;};type MarketRel=ResourceRel&{type:'markets';};type SkuListRel=ResourceRel&{type:'sku_lists';};interface Bundle extends Resource{code?:string;name?:string;currency_code?:string;description?:string;image_url?:string;do_not_ship?:boolean;do_not_track?:boolean;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;compare_at_amount_cents?:number;compare_at_amount_float?:number;formatted_compare_at_amount?:string;skus_count?:number;market?:Market;sku_list?:SkuList;skus?:Sku[];attachments?:Attachment[];}interface BundleCreate extends ResourceCreate{code:string;name:string;currency_code?:string;description?:string;image_url?:string;price_amount_cents:number;compare_at_amount_cents:number;_compute_price_amount?:boolean;_compute_compare_at_amount?:boolean;market?:MarketRel;sku_list:SkuListRel;}interface BundleUpdate extends ResourceUpdate{code?:string;name?:string;currency_code?:string;description?:string;image_url?:string;price_amount_cents?:number;compare_at_amount_cents?:number;_compute_price_amount?:boolean;_compute_compare_at_amount?:boolean;}declare class Bundles extends ApiResource{static readonly TYPE:'bundles';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;create(resource:BundleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;update(resource:BundleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Bundle>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(bundleId:string|Bundle,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;sku_list(bundleId:string|Bundle,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(bundleId:string|Bundle,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;attachments(bundleId:string|Bundle,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBundle(resource:any):resource is Bundle;relationship(id:string|ResourceId|null):BundleRel;type():string;}export default Bundles;export{Bundle,BundleCreate,BundleUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Authorization}from'./authorizations';import type{Refund}from'./refunds';declare type CaptureRel=ResourceRel&{type:typeof Captures.TYPE;};interface Capture extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;refund_amount_cents?:number;refund_amount_float?:number;formatted_refund_amount?:string;refund_balance_cents?:number;refund_balance_float?:number;formatted_refund_balance?:string;order?:Order;reference_authorization?:Authorization;refunds?:Refund[];}interface CaptureUpdate extends ResourceUpdate{_refund?:boolean;_refund_amount_cents?:number;}declare class Captures extends ApiResource{static readonly TYPE:'captures';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;update(resource:CaptureUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;order(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_authorization(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;refunds(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;isCapture(resource:any):resource is Capture;relationship(id:string|ResourceId|null):CaptureRel;type():string;}export default Captures;export{Capture,CaptureUpdate};
1
+ import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Authorization}from'./authorizations';import type{Refund}from'./refunds';type CaptureRel=ResourceRel&{type:typeof Captures.TYPE;};interface Capture extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;refund_amount_cents?:number;refund_amount_float?:number;formatted_refund_amount?:string;refund_balance_cents?:number;refund_balance_float?:number;formatted_refund_balance?:string;order?:Order;reference_authorization?:Authorization;refunds?:Refund[];}interface CaptureUpdate extends ResourceUpdate{_refund?:boolean;_refund_amount_cents?:number;}declare class Captures extends ApiResource{static readonly TYPE:'captures';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;update(resource:CaptureUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;order(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_authorization(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;refunds(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;isCapture(resource:any):resource is Capture;relationship(id:string|ResourceId|null):CaptureRel;type():string;}export default Captures;export{Capture,CaptureUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type CarrierAccountRel=ResourceRel&{type:typeof CarrierAccounts.TYPE;};interface CarrierAccount extends Resource{name?:string;easypost_type?:string;easypost_id?:string;market?:Market;attachments?:Attachment[];}declare class CarrierAccounts extends ApiResource{static readonly TYPE:'carrier_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CarrierAccount>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CarrierAccount>;market(carrierAccountId:string|CarrierAccount,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;attachments(carrierAccountId:string|CarrierAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCarrierAccount(resource:any):resource is CarrierAccount;relationship(id:string|ResourceId|null):CarrierAccountRel;type():string;}export default CarrierAccounts;export{CarrierAccount};
1
+ import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';type CarrierAccountRel=ResourceRel&{type:typeof CarrierAccounts.TYPE;};interface CarrierAccount extends Resource{name?:string;easypost_type?:string;easypost_id?:string;market?:Market;attachments?:Attachment[];}declare class CarrierAccounts extends ApiResource{static readonly TYPE:'carrier_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CarrierAccount>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CarrierAccount>;market(carrierAccountId:string|CarrierAccount,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;attachments(carrierAccountId:string|CarrierAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCarrierAccount(resource:any):resource is CarrierAccount;relationship(id:string|ResourceId|null):CarrierAccountRel;type():string;}export default CarrierAccounts;export{CarrierAccount};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{CheckoutComPayment}from'./checkout_com_payments';declare type CheckoutComGatewayRel=ResourceRel&{type:typeof CheckoutComGateways.TYPE;};declare type CheckoutComPaymentRel=ResourceRel&{type:'checkout_com_payments';};interface CheckoutComGateway extends Resource{name?:string;webhook_endpoint_id?:string;webhook_endpoint_secret?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];checkout_com_payments?:CheckoutComPayment[];}interface CheckoutComGatewayCreate extends ResourceCreate{name:string;secret_key:string;public_key:string;checkout_com_payments?:CheckoutComPaymentRel[];}interface CheckoutComGatewayUpdate extends ResourceUpdate{name?:string;secret_key?:string;public_key?:string;checkout_com_payments?:CheckoutComPaymentRel[];}declare class CheckoutComGateways extends ApiResource{static readonly TYPE:'checkout_com_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComGateway>>;create(resource:CheckoutComGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;update(resource:CheckoutComGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(checkoutComGatewayId:string|CheckoutComGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;checkout_com_payments(checkoutComGatewayId:string|CheckoutComGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComPayment>>;isCheckoutComGateway(resource:any):resource is CheckoutComGateway;relationship(id:string|ResourceId|null):CheckoutComGatewayRel;type():string;}export default CheckoutComGateways;export{CheckoutComGateway,CheckoutComGatewayCreate,CheckoutComGatewayUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{CheckoutComPayment}from'./checkout_com_payments';type CheckoutComGatewayRel=ResourceRel&{type:typeof CheckoutComGateways.TYPE;};type CheckoutComPaymentRel=ResourceRel&{type:'checkout_com_payments';};interface CheckoutComGateway extends Resource{name?:string;webhook_endpoint_id?:string;webhook_endpoint_secret?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];checkout_com_payments?:CheckoutComPayment[];}interface CheckoutComGatewayCreate extends ResourceCreate{name:string;secret_key:string;public_key:string;checkout_com_payments?:CheckoutComPaymentRel[];}interface CheckoutComGatewayUpdate extends ResourceUpdate{name?:string;secret_key?:string;public_key?:string;checkout_com_payments?:CheckoutComPaymentRel[];}declare class CheckoutComGateways extends ApiResource{static readonly TYPE:'checkout_com_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComGateway>>;create(resource:CheckoutComGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;update(resource:CheckoutComGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(checkoutComGatewayId:string|CheckoutComGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;checkout_com_payments(checkoutComGatewayId:string|CheckoutComGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComPayment>>;isCheckoutComGateway(resource:any):resource is CheckoutComGateway;relationship(id:string|ResourceId|null):CheckoutComGatewayRel;type():string;}export default CheckoutComGateways;export{CheckoutComGateway,CheckoutComGatewayCreate,CheckoutComGatewayUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';declare type CheckoutComPaymentRel=ResourceRel&{type:typeof CheckoutComPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface CheckoutComPayment extends Resource{public_key?:string;payment_type?:string;token?:string;session_id?:string;success_url?:string;failure_url?:string;source_id?:string;customer_token?:string;redirect_uri?:string;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface CheckoutComPaymentCreate extends ResourceCreate{payment_type:string;token:string;session_id?:string;success_url?:string;failure_url?:string;order:OrderRel;}interface CheckoutComPaymentUpdate extends ResourceUpdate{payment_type?:string;token?:string;session_id?:string;success_url?:string;failure_url?:string;_details?:boolean;_refresh?:boolean;order?:OrderRel;}declare class CheckoutComPayments extends ApiResource{static readonly TYPE:'checkout_com_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComPayment>>;create(resource:CheckoutComPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;update(resource:CheckoutComPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(checkoutComPaymentId:string|CheckoutComPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(checkoutComPaymentId:string|CheckoutComPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isCheckoutComPayment(resource:any):resource is CheckoutComPayment;relationship(id:string|ResourceId|null):CheckoutComPaymentRel;type():string;}export default CheckoutComPayments;export{CheckoutComPayment,CheckoutComPaymentCreate,CheckoutComPaymentUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';type CheckoutComPaymentRel=ResourceRel&{type:typeof CheckoutComPayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface CheckoutComPayment extends Resource{public_key?:string;payment_type?:string;token?:string;session_id?:string;success_url?:string;failure_url?:string;source_id?:string;customer_token?:string;redirect_uri?:string;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface CheckoutComPaymentCreate extends ResourceCreate{payment_type:string;token:string;session_id?:string;success_url?:string;failure_url?:string;order:OrderRel;}interface CheckoutComPaymentUpdate extends ResourceUpdate{payment_type?:string;token?:string;session_id?:string;success_url?:string;failure_url?:string;_details?:boolean;_refresh?:boolean;order?:OrderRel;}declare class CheckoutComPayments extends ApiResource{static readonly TYPE:'checkout_com_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CheckoutComPayment>>;create(resource:CheckoutComPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;update(resource:CheckoutComPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CheckoutComPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(checkoutComPaymentId:string|CheckoutComPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(checkoutComPaymentId:string|CheckoutComPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isCheckoutComPayment(resource:any):resource is CheckoutComPayment;relationship(id:string|ResourceId|null):CheckoutComPaymentRel;type():string;}export default CheckoutComPayments;export{CheckoutComPayment,CheckoutComPaymentCreate,CheckoutComPaymentUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Event}from'./events';declare type CleanupRel=ResourceRel&{type:typeof Cleanups.TYPE;};interface Cleanup extends Resource{resource_type?:string;status?:string;started_at?:string;completed_at?:string;interrupted_at?:string;filters?:object;records_count?:number;errors_count?:number;processed_count?:number;errors_log?:object;events?:Event[];}interface CleanupCreate extends ResourceCreate{resource_type:string;filters?:object;}declare class Cleanups extends ApiResource{static readonly TYPE:'cleanups';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Cleanup>>;create(resource:CleanupCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Cleanup>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Cleanup>;delete(id:string,options?:ResourcesConfig):Promise<void>;events(cleanupId:string|Cleanup,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;isCleanup(resource:any):resource is Cleanup;relationship(id:string|ResourceId|null):CleanupRel;type():string;}export default Cleanups;export{Cleanup,CleanupCreate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Event}from'./events';type CleanupRel=ResourceRel&{type:typeof Cleanups.TYPE;};interface Cleanup extends Resource{resource_type?:string;status?:string;started_at?:string;completed_at?:string;interrupted_at?:string;filters?:object;records_count?:number;errors_count?:number;processed_count?:number;errors_log?:object;events?:Event[];}interface CleanupCreate extends ResourceCreate{resource_type:string;filters?:object;}declare class Cleanups extends ApiResource{static readonly TYPE:'cleanups';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Cleanup>>;create(resource:CleanupCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Cleanup>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Cleanup>;delete(id:string,options?:ResourcesConfig):Promise<void>;events(cleanupId:string|Cleanup,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;isCleanup(resource:any):resource is Cleanup;relationship(id:string|ResourceId|null):CleanupRel;type():string;}export default Cleanups;export{Cleanup,CleanupCreate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';import type{Coupon}from'./coupons';declare type CouponCodesPromotionRuleRel=ResourceRel&{type:typeof CouponCodesPromotionRules.TYPE;};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeGiftPromotionRel=ResourceRel&{type:'free_gift_promotions';};declare type FixedPricePromotionRel=ResourceRel&{type:'fixed_price_promotions';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};declare type CouponRel=ResourceRel&{type:'coupons';};interface CouponCodesPromotionRule extends Resource{promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;coupons?:Coupon[];}interface CouponCodesPromotionRuleCreate extends ResourceCreate{promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;coupons?:CouponRel[];}interface CouponCodesPromotionRuleUpdate extends ResourceUpdate{promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;coupons?:CouponRel[];}declare class CouponCodesPromotionRules extends ApiResource{static readonly TYPE:'coupon_codes_promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CouponCodesPromotionRule>>;create(resource:CouponCodesPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;update(resource:CouponCodesPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;coupons(couponCodesPromotionRuleId:string|CouponCodesPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;isCouponCodesPromotionRule(resource:any):resource is CouponCodesPromotionRule;relationship(id:string|ResourceId|null):CouponCodesPromotionRuleRel;type():string;}export default CouponCodesPromotionRules;export{CouponCodesPromotionRule,CouponCodesPromotionRuleCreate,CouponCodesPromotionRuleUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';import type{Coupon}from'./coupons';type CouponCodesPromotionRuleRel=ResourceRel&{type:typeof CouponCodesPromotionRules.TYPE;};type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};type FreeGiftPromotionRel=ResourceRel&{type:'free_gift_promotions';};type FixedPricePromotionRel=ResourceRel&{type:'fixed_price_promotions';};type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};type CouponRel=ResourceRel&{type:'coupons';};interface CouponCodesPromotionRule extends Resource{promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;coupons?:Coupon[];}interface CouponCodesPromotionRuleCreate extends ResourceCreate{promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;coupons?:CouponRel[];}interface CouponCodesPromotionRuleUpdate extends ResourceUpdate{promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;coupons?:CouponRel[];}declare class CouponCodesPromotionRules extends ApiResource{static readonly TYPE:'coupon_codes_promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CouponCodesPromotionRule>>;create(resource:CouponCodesPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;update(resource:CouponCodesPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;coupons(couponCodesPromotionRuleId:string|CouponCodesPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;isCouponCodesPromotionRule(resource:any):resource is CouponCodesPromotionRule;relationship(id:string|ResourceId|null):CouponCodesPromotionRuleRel;type():string;}export default CouponCodesPromotionRules;export{CouponCodesPromotionRule,CouponCodesPromotionRuleCreate,CouponCodesPromotionRuleUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{Attachment}from'./attachments';declare type CouponRecipientRel=ResourceRel&{type:typeof CouponRecipients.TYPE;};declare type CustomerRel=ResourceRel&{type:'customers';};interface CouponRecipient extends Resource{email?:string;first_name?:string;last_name?:string;customer?:Customer;attachments?:Attachment[];}interface CouponRecipientCreate extends ResourceCreate{email:string;first_name?:string;last_name?:string;customer?:CustomerRel;}interface CouponRecipientUpdate extends ResourceUpdate{email?:string;first_name?:string;last_name?:string;customer?:CustomerRel;}declare class CouponRecipients extends ApiResource{static readonly TYPE:'coupon_recipients';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CouponRecipient>>;create(resource:CouponRecipientCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;update(resource:CouponRecipientUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(couponRecipientId:string|CouponRecipient,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;attachments(couponRecipientId:string|CouponRecipient,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCouponRecipient(resource:any):resource is CouponRecipient;relationship(id:string|ResourceId|null):CouponRecipientRel;type():string;}export default CouponRecipients;export{CouponRecipient,CouponRecipientCreate,CouponRecipientUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{Attachment}from'./attachments';type CouponRecipientRel=ResourceRel&{type:typeof CouponRecipients.TYPE;};type CustomerRel=ResourceRel&{type:'customers';};interface CouponRecipient extends Resource{email?:string;first_name?:string;last_name?:string;customer?:Customer;attachments?:Attachment[];}interface CouponRecipientCreate extends ResourceCreate{email:string;first_name?:string;last_name?:string;customer?:CustomerRel;}interface CouponRecipientUpdate extends ResourceUpdate{email?:string;first_name?:string;last_name?:string;customer?:CustomerRel;}declare class CouponRecipients extends ApiResource{static readonly TYPE:'coupon_recipients';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CouponRecipient>>;create(resource:CouponRecipientCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;update(resource:CouponRecipientUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponRecipient>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(couponRecipientId:string|CouponRecipient,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;attachments(couponRecipientId:string|CouponRecipient,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isCouponRecipient(resource:any):resource is CouponRecipient;relationship(id:string|ResourceId|null):CouponRecipientRel;type():string;}export default CouponRecipients;export{CouponRecipient,CouponRecipientCreate,CouponRecipientUpdate};
@@ -1 +1 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';declare type CouponRel=ResourceRel&{type:typeof Coupons.TYPE;};declare type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};interface Coupon extends Resource{code?:string;customer_single_use?:boolean;usage_limit?:number;usage_count?:number;recipient_email?:string;promotion_rule?:CouponCodesPromotionRule;}interface CouponCreate extends ResourceCreate{code:string;customer_single_use?:boolean;usage_limit:number;recipient_email?:string;promotion_rule:CouponCodesPromotionRuleRel;}interface CouponUpdate extends ResourceUpdate{code?:string;customer_single_use?:boolean;usage_limit?:number;recipient_email?:string;promotion_rule?:CouponCodesPromotionRuleRel;}declare class Coupons extends ApiResource{static readonly TYPE:'coupons';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;create(resource:CouponCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;update(resource:CouponUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;delete(id:string,options?:ResourcesConfig):Promise<void>;promotion_rule(couponId:string|Coupon,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;isCoupon(resource:any):resource is Coupon;relationship(id:string|ResourceId|null):CouponRel;type():string;}export default Coupons;export{Coupon,CouponCreate,CouponUpdate};
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';type CouponRel=ResourceRel&{type:typeof Coupons.TYPE;};type CouponCodesPromotionRuleRel=ResourceRel&{type:'coupon_codes_promotion_rules';};interface Coupon extends Resource{code?:string;customer_single_use?:boolean;usage_limit?:number;usage_count?:number;recipient_email?:string;promotion_rule?:CouponCodesPromotionRule;}interface CouponCreate extends ResourceCreate{code:string;customer_single_use?:boolean;usage_limit:number;recipient_email?:string;promotion_rule:CouponCodesPromotionRuleRel;}interface CouponUpdate extends ResourceUpdate{code?:string;customer_single_use?:boolean;usage_limit?:number;recipient_email?:string;promotion_rule?:CouponCodesPromotionRuleRel;}declare class Coupons extends ApiResource{static readonly TYPE:'coupons';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;create(resource:CouponCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;update(resource:CouponUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Coupon>;delete(id:string,options?:ResourcesConfig):Promise<void>;promotion_rule(couponId:string|Coupon,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;isCoupon(resource:any):resource is Coupon;relationship(id:string|ResourceId|null):CouponRel;type():string;}export default Coupons;export{Coupon,CouponCreate,CouponUpdate};