@commercelayer/sdk 5.0.0 → 5.1.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 (137) hide show
  1. package/lib/cjs/api.d.ts +6 -5
  2. package/lib/cjs/api.js +4 -1
  3. package/lib/cjs/commercelayer.d.ts +3 -2
  4. package/lib/cjs/commercelayer.js +2 -1
  5. package/lib/cjs/model.d.ts +1 -0
  6. package/lib/cjs/resource.d.ts +1 -1
  7. package/lib/cjs/resources/addresses.d.ts +13 -2
  8. package/lib/cjs/resources/addresses.js +8 -0
  9. package/lib/cjs/resources/adyen_payments.d.ts +8 -8
  10. package/lib/cjs/resources/axerve_payments.d.ts +3 -3
  11. package/lib/cjs/resources/braintree_payments.d.ts +4 -4
  12. package/lib/cjs/resources/bundles.d.ts +11 -0
  13. package/lib/cjs/resources/bundles.js +8 -0
  14. package/lib/cjs/resources/checkout_com_payments.d.ts +2 -2
  15. package/lib/cjs/resources/cleanups.d.ts +3 -3
  16. package/lib/cjs/resources/coupons.d.ts +15 -4
  17. package/lib/cjs/resources/coupons.js +8 -0
  18. package/lib/cjs/resources/customers.d.ts +8 -0
  19. package/lib/cjs/resources/customers.js +4 -0
  20. package/lib/cjs/resources/event_callbacks.d.ts +1 -1
  21. package/lib/cjs/resources/exports.d.ts +2 -2
  22. package/lib/cjs/resources/external_payments.d.ts +4 -4
  23. package/lib/cjs/resources/external_promotions.d.ts +8 -0
  24. package/lib/cjs/resources/external_promotions.js +4 -0
  25. package/lib/cjs/resources/fixed_amount_promotions.d.ts +8 -0
  26. package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
  27. package/lib/cjs/resources/fixed_price_promotions.d.ts +8 -0
  28. package/lib/cjs/resources/fixed_price_promotions.js +4 -0
  29. package/lib/cjs/resources/free_gift_promotions.d.ts +8 -0
  30. package/lib/cjs/resources/free_gift_promotions.js +4 -0
  31. package/lib/cjs/resources/free_shipping_promotions.d.ts +8 -0
  32. package/lib/cjs/resources/free_shipping_promotions.js +4 -0
  33. package/lib/cjs/resources/gift_cards.d.ts +9 -1
  34. package/lib/cjs/resources/gift_cards.js +4 -0
  35. package/lib/cjs/resources/imports.d.ts +4 -4
  36. package/lib/cjs/resources/klarna_payments.d.ts +2 -2
  37. package/lib/cjs/resources/line_item_options.d.ts +16 -5
  38. package/lib/cjs/resources/line_item_options.js +8 -0
  39. package/lib/cjs/resources/line_items.d.ts +13 -2
  40. package/lib/cjs/resources/line_items.js +8 -0
  41. package/lib/cjs/resources/order_copies.d.ts +1 -1
  42. package/lib/cjs/resources/order_factories.d.ts +1 -1
  43. package/lib/cjs/resources/order_subscriptions.d.ts +2 -2
  44. package/lib/cjs/resources/orders.d.ts +9 -1
  45. package/lib/cjs/resources/orders.js +4 -0
  46. package/lib/cjs/resources/parcels.d.ts +3 -0
  47. package/lib/cjs/resources/paypal_payments.d.ts +1 -1
  48. package/lib/cjs/resources/percentage_discount_promotions.d.ts +8 -0
  49. package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
  50. package/lib/cjs/resources/promotions.d.ts +3 -0
  51. package/lib/cjs/resources/promotions.js +4 -0
  52. package/lib/cjs/resources/recurring_order_copies.d.ts +1 -1
  53. package/lib/cjs/resources/return_line_items.d.ts +3 -3
  54. package/lib/cjs/resources/returns.d.ts +8 -0
  55. package/lib/cjs/resources/returns.js +4 -0
  56. package/lib/cjs/resources/satispay_gateways.d.ts +3 -0
  57. package/lib/cjs/resources/satispay_payments.d.ts +0 -3
  58. package/lib/cjs/resources/shipments.d.ts +2 -2
  59. package/lib/cjs/resources/sku_options.d.ts +11 -0
  60. package/lib/cjs/resources/sku_options.js +8 -0
  61. package/lib/cjs/resources/skus.d.ts +12 -1
  62. package/lib/cjs/resources/skus.js +8 -0
  63. package/lib/cjs/resources/stripe_payments.d.ts +5 -5
  64. package/lib/cjs/resources/tags.d.ts +28 -0
  65. package/lib/cjs/resources/tags.js +25 -0
  66. package/lib/cjs/resources/tax_rules.d.ts +1 -1
  67. package/lib/cjs/resources/wire_transfers.d.ts +1 -1
  68. package/lib/esm/api.d.ts +6 -5
  69. package/lib/esm/api.js +2 -0
  70. package/lib/esm/commercelayer.d.ts +3 -2
  71. package/lib/esm/commercelayer.js +2 -1
  72. package/lib/esm/model.d.ts +1 -0
  73. package/lib/esm/resource.d.ts +1 -1
  74. package/lib/esm/resources/addresses.d.ts +13 -2
  75. package/lib/esm/resources/addresses.js +8 -0
  76. package/lib/esm/resources/adyen_payments.d.ts +8 -8
  77. package/lib/esm/resources/axerve_payments.d.ts +3 -3
  78. package/lib/esm/resources/braintree_payments.d.ts +4 -4
  79. package/lib/esm/resources/bundles.d.ts +11 -0
  80. package/lib/esm/resources/bundles.js +8 -0
  81. package/lib/esm/resources/checkout_com_payments.d.ts +2 -2
  82. package/lib/esm/resources/cleanups.d.ts +3 -3
  83. package/lib/esm/resources/coupons.d.ts +15 -4
  84. package/lib/esm/resources/coupons.js +8 -0
  85. package/lib/esm/resources/customers.d.ts +8 -0
  86. package/lib/esm/resources/customers.js +4 -0
  87. package/lib/esm/resources/event_callbacks.d.ts +1 -1
  88. package/lib/esm/resources/exports.d.ts +2 -2
  89. package/lib/esm/resources/external_payments.d.ts +4 -4
  90. package/lib/esm/resources/external_promotions.d.ts +8 -0
  91. package/lib/esm/resources/external_promotions.js +4 -0
  92. package/lib/esm/resources/fixed_amount_promotions.d.ts +8 -0
  93. package/lib/esm/resources/fixed_amount_promotions.js +4 -0
  94. package/lib/esm/resources/fixed_price_promotions.d.ts +8 -0
  95. package/lib/esm/resources/fixed_price_promotions.js +4 -0
  96. package/lib/esm/resources/free_gift_promotions.d.ts +8 -0
  97. package/lib/esm/resources/free_gift_promotions.js +4 -0
  98. package/lib/esm/resources/free_shipping_promotions.d.ts +8 -0
  99. package/lib/esm/resources/free_shipping_promotions.js +4 -0
  100. package/lib/esm/resources/gift_cards.d.ts +9 -1
  101. package/lib/esm/resources/gift_cards.js +4 -0
  102. package/lib/esm/resources/imports.d.ts +4 -4
  103. package/lib/esm/resources/klarna_payments.d.ts +2 -2
  104. package/lib/esm/resources/line_item_options.d.ts +16 -5
  105. package/lib/esm/resources/line_item_options.js +8 -0
  106. package/lib/esm/resources/line_items.d.ts +13 -2
  107. package/lib/esm/resources/line_items.js +8 -0
  108. package/lib/esm/resources/order_copies.d.ts +1 -1
  109. package/lib/esm/resources/order_factories.d.ts +1 -1
  110. package/lib/esm/resources/order_subscriptions.d.ts +2 -2
  111. package/lib/esm/resources/orders.d.ts +9 -1
  112. package/lib/esm/resources/orders.js +4 -0
  113. package/lib/esm/resources/parcels.d.ts +3 -0
  114. package/lib/esm/resources/paypal_payments.d.ts +1 -1
  115. package/lib/esm/resources/percentage_discount_promotions.d.ts +8 -0
  116. package/lib/esm/resources/percentage_discount_promotions.js +4 -0
  117. package/lib/esm/resources/promotions.d.ts +3 -0
  118. package/lib/esm/resources/promotions.js +4 -0
  119. package/lib/esm/resources/recurring_order_copies.d.ts +1 -1
  120. package/lib/esm/resources/return_line_items.d.ts +3 -3
  121. package/lib/esm/resources/returns.d.ts +8 -0
  122. package/lib/esm/resources/returns.js +4 -0
  123. package/lib/esm/resources/satispay_gateways.d.ts +3 -0
  124. package/lib/esm/resources/satispay_payments.d.ts +0 -3
  125. package/lib/esm/resources/shipments.d.ts +2 -2
  126. package/lib/esm/resources/sku_options.d.ts +11 -0
  127. package/lib/esm/resources/sku_options.js +8 -0
  128. package/lib/esm/resources/skus.d.ts +12 -1
  129. package/lib/esm/resources/skus.js +8 -0
  130. package/lib/esm/resources/stripe_payments.d.ts +5 -5
  131. package/lib/esm/resources/tags.d.ts +28 -0
  132. package/lib/esm/resources/tags.js +23 -0
  133. package/lib/esm/resources/tax_rules.d.ts +1 -1
  134. package/lib/esm/resources/wire_transfers.d.ts +1 -1
  135. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  136. package/lib/tsconfig.tsbuildinfo +1 -1
  137. package/package.json +10 -10
package/lib/esm/api.d.ts CHANGED
@@ -106,6 +106,7 @@ export { default as StockTransfers } from './resources/stock_transfers';
106
106
  export { default as StripeGateways } from './resources/stripe_gateways';
107
107
  export { default as StripePayments } from './resources/stripe_payments';
108
108
  export { default as SubscriptionModels } from './resources/subscription_models';
109
+ export { default as Tags } from './resources/tags';
109
110
  export { default as TaxCalculators } from './resources/tax_calculators';
110
111
  export { default as TaxCategories } from './resources/tax_categories';
111
112
  export { default as TaxRules } from './resources/tax_rules';
@@ -114,8 +115,8 @@ export { default as Transactions } from './resources/transactions';
114
115
  export { default as Voids } from './resources/voids';
115
116
  export { default as Webhooks } from './resources/webhooks';
116
117
  export { default as WireTransfers } from './resources/wire_transfers';
117
- export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | '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_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | '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' | 'subscription_models' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
118
- export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "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_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "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", "subscription_models", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
118
+ export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | '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_factories' | 'order_subscription_items' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'recurring_order_copies' | 'refunds' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | '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' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
119
+ export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "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_factories", "order_subscription_items", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_frequency_tiers", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "recurring_order_copies", "refunds", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "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", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
119
120
  export type RetrievableResourceType = ResourceTypeLock;
120
121
  export type RetrievableResource = {
121
122
  type: RetrievableResourceType;
@@ -124,15 +125,15 @@ export type ListableResourceType = Exclude<ResourceTypeLock, 'application' | 'or
124
125
  export type ListableResource = {
125
126
  type: ListableResourceType;
126
127
  };
127
- export type CreatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | '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' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
128
+ export type CreatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | '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' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
128
129
  export type CreatableResource = {
129
130
  type: CreatableResourceType;
130
131
  };
131
- export type UpdatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
132
+ export type UpdatableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
132
133
  export type UpdatableResource = {
133
134
  type: UpdatableResourceType;
134
135
  };
135
- export type DeletableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | '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' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
136
+ export type DeletableResourceType = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'attachments' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | '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' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | '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_subscription_items' | 'order_subscriptions' | 'orders' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_frequency_tiers' | 'price_lists' | 'price_volume_tiers' | 'prices' | 'recurring_order_copies' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipping_categories' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'webhooks' | 'wire_transfers';
136
137
  export type DeletableResource = {
137
138
  type: DeletableResourceType;
138
139
  };
package/lib/esm/api.js CHANGED
@@ -108,6 +108,7 @@ export { default as StockTransfers } from './resources/stock_transfers';
108
108
  export { default as StripeGateways } from './resources/stripe_gateways';
109
109
  export { default as StripePayments } from './resources/stripe_payments';
110
110
  export { default as SubscriptionModels } from './resources/subscription_models';
111
+ export { default as Tags } from './resources/tags';
111
112
  export { default as TaxCalculators } from './resources/tax_calculators';
112
113
  export { default as TaxCategories } from './resources/tax_categories';
113
114
  export { default as TaxRules } from './resources/tax_rules';
@@ -224,6 +225,7 @@ export const resourceList = [
224
225
  'stripe_gateways',
225
226
  'stripe_payments',
226
227
  'subscription_models',
228
+ 'tags',
227
229
  'tax_calculators',
228
230
  'tax_categories',
229
231
  'tax_rules',
@@ -2,7 +2,7 @@ import * as api from './api';
2
2
  import type { ApiError } from './error';
3
3
  import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
4
4
  import { type ResourcesInitConfig } from './resource';
5
- declare const OPEN_API_SCHEMA_VERSION = "4.1.3";
5
+ declare const OPEN_API_SCHEMA_VERSION = "4.2.4";
6
6
  export { OPEN_API_SCHEMA_VERSION };
7
7
  type SdkConfig = Record<string, unknown>;
8
8
  type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
@@ -10,7 +10,7 @@ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
10
10
  declare class CommerceLayerClient {
11
11
  #private;
12
12
  static get openApiSchemaVersion(): string;
13
- readonly openApiSchemaVersion = "4.1.3";
13
+ readonly openApiSchemaVersion = "4.2.4";
14
14
  addresses: api.Addresses;
15
15
  adjustments: api.Adjustments;
16
16
  adyen_gateways: api.AdyenGateways;
@@ -116,6 +116,7 @@ declare class CommerceLayerClient {
116
116
  stripe_gateways: api.StripeGateways;
117
117
  stripe_payments: api.StripePayments;
118
118
  subscription_models: api.SubscriptionModels;
119
+ tags: api.Tags;
119
120
  tax_calculators: api.TaxCalculators;
120
121
  tax_categories: api.TaxCategories;
121
122
  tax_rules: api.TaxRules;
@@ -16,7 +16,7 @@ import ResourceAdapter from './resource';
16
16
  import Debug from './debug';
17
17
  const debug = Debug('commercelayer');
18
18
  // Autogenerated schema version number, do not remove this line
19
- const OPEN_API_SCHEMA_VERSION = '4.1.3';
19
+ const OPEN_API_SCHEMA_VERSION = '4.2.4';
20
20
  export { OPEN_API_SCHEMA_VERSION };
21
21
  class CommerceLayerClient {
22
22
  static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
@@ -135,6 +135,7 @@ class CommerceLayerClient {
135
135
  this.stripe_gateways = new api.StripeGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
136
136
  this.stripe_payments = new api.StripePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
137
137
  this.subscription_models = new api.SubscriptionModels(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
138
+ this.tags = new api.Tags(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
138
139
  this.tax_calculators = new api.TaxCalculators(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
139
140
  this.tax_categories = new api.TaxCategories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
140
141
  this.tax_rules = new api.TaxRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
@@ -106,6 +106,7 @@ export type { StockTransfer, StockTransferCreate, StockTransferUpdate } from './
106
106
  export type { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate } from './resources/stripe_gateways';
107
107
  export type { StripePayment, StripePaymentCreate, StripePaymentUpdate } from './resources/stripe_payments';
108
108
  export type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate } from './resources/subscription_models';
109
+ export type { Tag, TagCreate, TagUpdate } from './resources/tags';
109
110
  export type { TaxCalculator } from './resources/tax_calculators';
110
111
  export type { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate } from './resources/tax_categories';
111
112
  export type { TaxRule, TaxRuleCreate, TaxRuleUpdate } from './resources/tax_rules';
@@ -46,7 +46,7 @@ declare class ListResponse<R> extends Array<R> {
46
46
  get recordCount(): number;
47
47
  get pageCount(): number;
48
48
  }
49
- export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ResourceRel };
49
+ export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ListMeta, ResourceRel };
50
50
  type ResourceAdapterConfig = {};
51
51
  type ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig;
52
52
  type ResourcesConfig = Partial<ResourcesInitConfig>;
@@ -1,7 +1,9 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Geocoder, GeocoderType } from './geocoders';
5
+ import type { Event } from './events';
6
+ import type { Tag, TagType } from './tags';
5
7
  type AddressType = 'addresses';
6
8
  type AddressRel = ResourceRel & {
7
9
  type: AddressType;
@@ -9,6 +11,9 @@ type AddressRel = ResourceRel & {
9
11
  type GeocoderRel = ResourceRel & {
10
12
  type: GeocoderType;
11
13
  };
14
+ type TagRel = ResourceRel & {
15
+ type: TagType;
16
+ };
12
17
  interface Address extends Resource {
13
18
  readonly type: AddressType;
14
19
  business?: boolean | null;
@@ -36,6 +41,8 @@ interface Address extends Resource {
36
41
  static_map_url?: string | null;
37
42
  billing_info?: string | null;
38
43
  geocoder?: Geocoder | null;
44
+ events?: Event[] | null;
45
+ tags?: Tag[] | null;
39
46
  }
40
47
  interface AddressCreate extends ResourceCreate {
41
48
  business?: boolean | null;
@@ -55,6 +62,7 @@ interface AddressCreate extends ResourceCreate {
55
62
  lng?: number | null;
56
63
  billing_info?: string | null;
57
64
  geocoder?: GeocoderRel | null;
65
+ tags?: TagRel[] | null;
58
66
  }
59
67
  interface AddressUpdate extends ResourceUpdate {
60
68
  business?: boolean | null;
@@ -74,6 +82,7 @@ interface AddressUpdate extends ResourceUpdate {
74
82
  lng?: number | null;
75
83
  billing_info?: string | null;
76
84
  geocoder?: GeocoderRel | null;
85
+ tags?: TagRel[] | null;
77
86
  }
78
87
  declare class Addresses extends ApiResource<Address> {
79
88
  static readonly TYPE: AddressType;
@@ -81,6 +90,8 @@ declare class Addresses extends ApiResource<Address> {
81
90
  update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
82
91
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
83
92
  geocoder(addressId: string | Address, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
93
+ events(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
94
+ tags(addressId: string | Address, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
84
95
  isAddress(resource: any): resource is Address;
85
96
  relationship(id: string | ResourceId | null): AddressRel;
86
97
  type(): AddressType;
@@ -13,6 +13,14 @@ class Addresses extends ApiResource {
13
13
  const _addressId = addressId.id || addressId;
14
14
  return this.resources.fetch({ type: 'geocoders' }, `addresses/${_addressId}/geocoder`, params, options);
15
15
  }
16
+ async events(addressId, params, options) {
17
+ const _addressId = addressId.id || addressId;
18
+ return this.resources.fetch({ type: 'events' }, `addresses/${_addressId}/events`, params, options);
19
+ }
20
+ async tags(addressId, params, options) {
21
+ const _addressId = addressId.id || addressId;
22
+ return this.resources.fetch({ type: 'tags' }, `addresses/${_addressId}/tags`, params, options);
23
+ }
16
24
  isAddress(resource) {
17
25
  return resource.type && (resource.type === Addresses.TYPE);
18
26
  }
@@ -13,12 +13,12 @@ type OrderRel = ResourceRel & {
13
13
  interface AdyenPayment extends Resource {
14
14
  readonly type: AdyenPaymentType;
15
15
  public_key?: string | null;
16
- payment_methods: object;
17
- payment_request_data?: object | null;
18
- payment_request_details?: object | null;
19
- payment_response?: object | null;
16
+ payment_methods: Record<string, any>;
17
+ payment_request_data?: Record<string, any> | null;
18
+ payment_request_details?: Record<string, any> | null;
19
+ payment_response?: Record<string, any> | null;
20
20
  mismatched_amounts?: boolean | null;
21
- payment_instrument?: object | null;
21
+ payment_instrument?: Record<string, any> | null;
22
22
  order?: Order | null;
23
23
  payment_gateway?: PaymentGateway | null;
24
24
  }
@@ -26,9 +26,9 @@ interface AdyenPaymentCreate extends ResourceCreate {
26
26
  order: OrderRel;
27
27
  }
28
28
  interface AdyenPaymentUpdate extends ResourceUpdate {
29
- payment_request_data?: object | null;
30
- payment_request_details?: object | null;
31
- payment_response?: object | null;
29
+ payment_request_data?: Record<string, any> | null;
30
+ payment_request_details?: Record<string, any> | null;
31
+ payment_response?: Record<string, any> | null;
32
32
  _details?: boolean | null;
33
33
  order?: OrderRel | null;
34
34
  }
@@ -14,12 +14,12 @@ interface AxervePayment extends Resource {
14
14
  readonly type: AxervePaymentType;
15
15
  login: string;
16
16
  return_url: string;
17
- payment_request_data?: object | null;
17
+ payment_request_data?: Record<string, any> | null;
18
18
  mismatched_amounts?: boolean | null;
19
19
  intent_amount_cents: number;
20
20
  intent_amount_float?: number | null;
21
21
  formatted_intent_amount?: string | null;
22
- payment_instrument?: object | null;
22
+ payment_instrument?: Record<string, any> | null;
23
23
  order?: Order | null;
24
24
  payment_gateway?: PaymentGateway | null;
25
25
  }
@@ -28,7 +28,7 @@ interface AxervePaymentCreate extends ResourceCreate {
28
28
  order: OrderRel;
29
29
  }
30
30
  interface AxervePaymentUpdate extends ResourceUpdate {
31
- payment_request_data?: object | null;
31
+ payment_request_data?: Record<string, any> | null;
32
32
  _update?: boolean | null;
33
33
  order?: OrderRel | null;
34
34
  }
@@ -16,22 +16,22 @@ interface BraintreePayment extends Resource {
16
16
  payment_method_nonce?: string | null;
17
17
  payment_id?: string | null;
18
18
  local?: boolean | null;
19
- options?: object | null;
20
- payment_instrument?: object | null;
19
+ options?: Record<string, any> | null;
20
+ payment_instrument?: Record<string, any> | null;
21
21
  order?: Order | null;
22
22
  payment_gateway?: PaymentGateway | null;
23
23
  }
24
24
  interface BraintreePaymentCreate extends ResourceCreate {
25
25
  payment_id?: string | null;
26
26
  local?: boolean | null;
27
- options?: object | null;
27
+ options?: Record<string, any> | null;
28
28
  order: OrderRel;
29
29
  }
30
30
  interface BraintreePaymentUpdate extends ResourceUpdate {
31
31
  payment_method_nonce?: string | null;
32
32
  payment_id?: string | null;
33
33
  local?: boolean | null;
34
- options?: object | null;
34
+ options?: Record<string, any> | null;
35
35
  order?: OrderRel | null;
36
36
  }
37
37
  declare class BraintreePayments extends ApiResource<BraintreePayment> {
@@ -5,6 +5,8 @@ import type { Market, MarketType } from './markets';
5
5
  import type { SkuList, SkuListType } from './sku_lists';
6
6
  import type { Sku } from './skus';
7
7
  import type { Attachment } from './attachments';
8
+ import type { Event } from './events';
9
+ import type { Tag, TagType } from './tags';
8
10
  type BundleType = 'bundles';
9
11
  type BundleRel = ResourceRel & {
10
12
  type: BundleType;
@@ -15,6 +17,9 @@ type MarketRel = ResourceRel & {
15
17
  type SkuListRel = ResourceRel & {
16
18
  type: SkuListType;
17
19
  };
20
+ type TagRel = ResourceRel & {
21
+ type: TagType;
22
+ };
18
23
  interface Bundle extends Resource {
19
24
  readonly type: BundleType;
20
25
  code: string;
@@ -35,6 +40,8 @@ interface Bundle extends Resource {
35
40
  sku_list?: SkuList | null;
36
41
  skus?: Sku[] | null;
37
42
  attachments?: Attachment[] | null;
43
+ events?: Event[] | null;
44
+ tags?: Tag[] | null;
38
45
  }
39
46
  interface BundleCreate extends ResourceCreate {
40
47
  code: string;
@@ -48,6 +55,7 @@ interface BundleCreate extends ResourceCreate {
48
55
  _compute_compare_at_amount?: boolean | null;
49
56
  market?: MarketRel | null;
50
57
  sku_list: SkuListRel;
58
+ tags?: TagRel[] | null;
51
59
  }
52
60
  interface BundleUpdate extends ResourceUpdate {
53
61
  code?: string | null;
@@ -59,6 +67,7 @@ interface BundleUpdate extends ResourceUpdate {
59
67
  compare_at_amount_cents?: number | null;
60
68
  _compute_price_amount?: boolean | null;
61
69
  _compute_compare_at_amount?: boolean | null;
70
+ tags?: TagRel[] | null;
62
71
  }
63
72
  declare class Bundles extends ApiResource<Bundle> {
64
73
  static readonly TYPE: BundleType;
@@ -69,6 +78,8 @@ declare class Bundles extends ApiResource<Bundle> {
69
78
  sku_list(bundleId: string | Bundle, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
70
79
  skus(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
71
80
  attachments(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
81
+ events(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
82
+ tags(bundleId: string | Bundle, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
72
83
  isBundle(resource: any): resource is Bundle;
73
84
  relationship(id: string | ResourceId | null): BundleRel;
74
85
  type(): BundleType;
@@ -25,6 +25,14 @@ class Bundles extends ApiResource {
25
25
  const _bundleId = bundleId.id || bundleId;
26
26
  return this.resources.fetch({ type: 'attachments' }, `bundles/${_bundleId}/attachments`, params, options);
27
27
  }
28
+ async events(bundleId, params, options) {
29
+ const _bundleId = bundleId.id || bundleId;
30
+ return this.resources.fetch({ type: 'events' }, `bundles/${_bundleId}/events`, params, options);
31
+ }
32
+ async tags(bundleId, params, options) {
33
+ const _bundleId = bundleId.id || bundleId;
34
+ return this.resources.fetch({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options);
35
+ }
28
36
  isBundle(resource) {
29
37
  return resource.type && (resource.type === Bundles.TYPE);
30
38
  }
@@ -21,9 +21,9 @@ interface CheckoutComPayment extends Resource {
21
21
  source_id?: string | null;
22
22
  customer_token?: string | null;
23
23
  redirect_uri?: string | null;
24
- payment_response?: object | null;
24
+ payment_response?: Record<string, any> | null;
25
25
  mismatched_amounts?: boolean | null;
26
- payment_instrument?: object | null;
26
+ payment_instrument?: Record<string, any> | null;
27
27
  order?: Order | null;
28
28
  payment_gateway?: PaymentGateway | null;
29
29
  }
@@ -13,16 +13,16 @@ interface Cleanup extends Resource {
13
13
  started_at?: string | null;
14
14
  completed_at?: string | null;
15
15
  interrupted_at?: string | null;
16
- filters?: object | null;
16
+ filters?: Record<string, any> | null;
17
17
  records_count?: number | null;
18
18
  errors_count?: number | null;
19
19
  processed_count?: number | null;
20
- errors_log?: object | null;
20
+ errors_log?: Record<string, any> | null;
21
21
  events?: Event[] | null;
22
22
  }
23
23
  interface CleanupCreate extends ResourceCreate {
24
24
  resource_type: string;
25
- filters?: object | null;
25
+ filters?: Record<string, any> | null;
26
26
  }
27
27
  declare class Cleanups extends ApiResource<Cleanup> {
28
28
  static readonly TYPE: CleanupType;
@@ -1,7 +1,9 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
5
+ import type { Event } from './events';
6
+ import type { Tag, TagType } from './tags';
5
7
  type CouponType = 'coupons';
6
8
  type CouponRel = ResourceRel & {
7
9
  type: CouponType;
@@ -9,21 +11,27 @@ type CouponRel = ResourceRel & {
9
11
  type CouponCodesPromotionRuleRel = ResourceRel & {
10
12
  type: CouponCodesPromotionRuleType;
11
13
  };
14
+ type TagRel = ResourceRel & {
15
+ type: TagType;
16
+ };
12
17
  interface Coupon extends Resource {
13
18
  readonly type: CouponType;
14
19
  code: string;
15
20
  customer_single_use?: boolean | null;
16
- usage_limit: number;
21
+ usage_limit?: number | null;
17
22
  usage_count?: number | null;
18
23
  recipient_email?: string | null;
19
24
  promotion_rule?: CouponCodesPromotionRule | null;
25
+ events?: Event[] | null;
26
+ tags?: Tag[] | null;
20
27
  }
21
28
  interface CouponCreate extends ResourceCreate {
22
29
  code: string;
23
30
  customer_single_use?: boolean | null;
24
- usage_limit: number;
31
+ usage_limit?: number | null;
25
32
  recipient_email?: string | null;
26
33
  promotion_rule: CouponCodesPromotionRuleRel;
34
+ tags?: TagRel[] | null;
27
35
  }
28
36
  interface CouponUpdate extends ResourceUpdate {
29
37
  code?: string | null;
@@ -31,6 +39,7 @@ interface CouponUpdate extends ResourceUpdate {
31
39
  usage_limit?: number | null;
32
40
  recipient_email?: string | null;
33
41
  promotion_rule?: CouponCodesPromotionRuleRel | null;
42
+ tags?: TagRel[] | null;
34
43
  }
35
44
  declare class Coupons extends ApiResource<Coupon> {
36
45
  static readonly TYPE: CouponType;
@@ -38,6 +47,8 @@ declare class Coupons extends ApiResource<Coupon> {
38
47
  update(resource: CouponUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Coupon>;
39
48
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
40
49
  promotion_rule(couponId: string | Coupon, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
50
+ events(couponId: string | Coupon, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
51
+ tags(couponId: string | Coupon, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
41
52
  isCoupon(resource: any): resource is Coupon;
42
53
  relationship(id: string | ResourceId | null): CouponRel;
43
54
  type(): CouponType;
@@ -13,6 +13,14 @@ class Coupons extends ApiResource {
13
13
  const _couponId = couponId.id || couponId;
14
14
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `coupons/${_couponId}/promotion_rule`, params, options);
15
15
  }
16
+ async events(couponId, params, options) {
17
+ const _couponId = couponId.id || couponId;
18
+ return this.resources.fetch({ type: 'events' }, `coupons/${_couponId}/events`, params, options);
19
+ }
20
+ async tags(couponId, params, options) {
21
+ const _couponId = couponId.id || couponId;
22
+ return this.resources.fetch({ type: 'tags' }, `coupons/${_couponId}/tags`, params, options);
23
+ }
16
24
  isCoupon(resource) {
17
25
  return resource.type && (resource.type === Coupons.TYPE);
18
26
  }
@@ -11,6 +11,7 @@ import type { Return } from './returns';
11
11
  import type { SkuList } from './sku_lists';
12
12
  import type { Attachment } from './attachments';
13
13
  import type { Event } from './events';
14
+ import type { Tag, TagType } from './tags';
14
15
  type CustomerType = 'customers';
15
16
  type CustomerRel = ResourceRel & {
16
17
  type: CustomerType;
@@ -18,6 +19,9 @@ type CustomerRel = ResourceRel & {
18
19
  type CustomerGroupRel = ResourceRel & {
19
20
  type: CustomerGroupType;
20
21
  };
22
+ type TagRel = ResourceRel & {
23
+ type: TagType;
24
+ };
21
25
  interface Customer extends Resource {
22
26
  readonly type: CustomerType;
23
27
  email: string;
@@ -33,16 +37,19 @@ interface Customer extends Resource {
33
37
  sku_lists?: SkuList[] | null;
34
38
  attachments?: Attachment[] | null;
35
39
  events?: Event[] | null;
40
+ tags?: Tag[] | null;
36
41
  }
37
42
  interface CustomerCreate extends ResourceCreate {
38
43
  email: string;
39
44
  password?: string | null;
40
45
  customer_group?: CustomerGroupRel | null;
46
+ tags?: TagRel[] | null;
41
47
  }
42
48
  interface CustomerUpdate extends ResourceUpdate {
43
49
  email?: string | null;
44
50
  password?: string | null;
45
51
  customer_group?: CustomerGroupRel | null;
52
+ tags?: TagRel[] | null;
46
53
  }
47
54
  declare class Customers extends ApiResource<Customer> {
48
55
  static readonly TYPE: CustomerType;
@@ -59,6 +66,7 @@ declare class Customers extends ApiResource<Customer> {
59
66
  sku_lists(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuList>>;
60
67
  attachments(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
61
68
  events(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
69
+ tags(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
62
70
  isCustomer(resource: any): resource is Customer;
63
71
  relationship(id: string | ResourceId | null): CustomerRel;
64
72
  type(): CustomerType;
@@ -49,6 +49,10 @@ class Customers extends ApiResource {
49
49
  const _customerId = customerId.id || customerId;
50
50
  return this.resources.fetch({ type: 'events' }, `customers/${_customerId}/events`, params, options);
51
51
  }
52
+ async tags(customerId, params, options) {
53
+ const _customerId = customerId.id || customerId;
54
+ return this.resources.fetch({ type: 'tags' }, `customers/${_customerId}/tags`, params, options);
55
+ }
52
56
  isCustomer(resource) {
53
57
  return resource.type && (resource.type === Customers.TYPE);
54
58
  }
@@ -9,7 +9,7 @@ type EventCallbackRel = ResourceRel & {
9
9
  interface EventCallback extends Resource {
10
10
  readonly type: EventCallbackType;
11
11
  callback_url: string;
12
- payload?: object | null;
12
+ payload?: Record<string, any> | null;
13
13
  response_code?: string | null;
14
14
  response_message?: string | null;
15
15
  webhook?: Webhook | null;
@@ -12,7 +12,7 @@ interface Export extends Resource {
12
12
  format?: string | null;
13
13
  status: 'pending' | 'in_progress' | 'completed';
14
14
  includes?: string[] | null;
15
- filters?: object | null;
15
+ filters?: Record<string, any> | null;
16
16
  dry_data?: boolean | null;
17
17
  started_at?: string | null;
18
18
  completed_at?: string | null;
@@ -25,7 +25,7 @@ interface ExportCreate extends ResourceCreate {
25
25
  resource_type: string;
26
26
  format?: string | null;
27
27
  includes?: string[] | null;
28
- filters?: object | null;
28
+ filters?: Record<string, any> | null;
29
29
  dry_data?: boolean | null;
30
30
  }
31
31
  declare class Exports extends ApiResource<Export> {
@@ -14,19 +14,19 @@ type OrderRel = ResourceRel & {
14
14
  interface ExternalPayment extends Resource {
15
15
  readonly type: ExternalPaymentType;
16
16
  payment_source_token: string;
17
- options?: object | null;
18
- payment_instrument?: object | null;
17
+ options?: Record<string, any> | null;
18
+ payment_instrument?: Record<string, any> | null;
19
19
  order?: Order | null;
20
20
  payment_gateway?: PaymentGateway | null;
21
21
  wallet?: CustomerPaymentSource | null;
22
22
  }
23
23
  interface ExternalPaymentCreate extends ResourceCreate {
24
24
  payment_source_token: string;
25
- options?: object | null;
25
+ options?: Record<string, any> | null;
26
26
  order: OrderRel;
27
27
  }
28
28
  interface ExternalPaymentUpdate extends ResourceUpdate {
29
- options?: object | null;
29
+ options?: Record<string, any> | null;
30
30
  order?: OrderRel | null;
31
31
  }
32
32
  declare class ExternalPayments extends ApiResource<ExternalPayment> {