@commercelayer/sdk 4.25.0 → 4.27.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.
- package/lib/cjs/api.d.ts +9 -2
- package/lib/cjs/api.js +23 -2
- package/lib/cjs/commercelayer.d.ts +9 -2
- package/lib/cjs/commercelayer.js +8 -1
- package/lib/cjs/model.d.ts +8 -1
- package/lib/cjs/resources/axerve_payments.d.ts +1 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +7 -3
- package/lib/cjs/resources/fixed_price_promotions.d.ts +3 -3
- package/lib/cjs/resources/fixed_price_promotions.js +4 -4
- package/lib/cjs/resources/free_gift_promotions.d.ts +3 -3
- package/lib/cjs/resources/free_gift_promotions.js +4 -4
- package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/cjs/resources/free_shipping_promotions.js +4 -0
- package/lib/cjs/resources/line_items.d.ts +3 -0
- package/lib/cjs/resources/markets.d.ts +8 -0
- package/lib/cjs/resources/markets.js +4 -0
- package/lib/cjs/resources/order_copies.d.ts +11 -9
- package/lib/cjs/resources/order_copies.js +7 -4
- package/lib/cjs/resources/order_factories.d.ts +33 -0
- package/lib/cjs/resources/order_factories.js +36 -0
- package/lib/cjs/resources/order_subscription_items.d.ts +60 -0
- package/lib/cjs/resources/order_subscription_items.js +37 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +25 -3
- package/lib/cjs/resources/order_subscriptions.js +18 -2
- package/lib/cjs/resources/orders.d.ts +15 -3
- package/lib/cjs/resources/orders.js +8 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +3 -3
- package/lib/cjs/resources/percentage_discount_promotions.js +4 -4
- package/lib/cjs/resources/price_frequency_tiers.d.ts +49 -0
- package/lib/cjs/resources/price_frequency_tiers.js +45 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
- package/lib/cjs/resources/price_volume_tiers.js +4 -0
- package/lib/cjs/resources/prices.d.ts +3 -0
- package/lib/cjs/resources/prices.js +4 -0
- package/lib/cjs/resources/promotions.d.ts +3 -0
- package/lib/cjs/resources/promotions.js +4 -0
- package/lib/cjs/resources/recurring_order_copies.d.ts +52 -0
- package/lib/cjs/resources/recurring_order_copies.js +49 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +39 -0
- package/lib/cjs/resources/satispay_gateways.js +41 -0
- package/lib/cjs/resources/satispay_payments.d.ts +43 -0
- package/lib/cjs/resources/satispay_payments.js +41 -0
- package/lib/cjs/resources/subscription_models.d.ts +48 -0
- package/lib/cjs/resources/subscription_models.js +45 -0
- package/lib/esm/api.d.ts +9 -2
- package/lib/esm/api.js +14 -0
- package/lib/esm/commercelayer.d.ts +9 -2
- package/lib/esm/commercelayer.js +8 -1
- package/lib/esm/model.d.ts +8 -1
- package/lib/esm/resources/axerve_payments.d.ts +1 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +7 -3
- package/lib/esm/resources/fixed_price_promotions.d.ts +3 -3
- package/lib/esm/resources/fixed_price_promotions.js +4 -4
- package/lib/esm/resources/free_gift_promotions.d.ts +3 -3
- package/lib/esm/resources/free_gift_promotions.js +4 -4
- package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
- package/lib/esm/resources/free_shipping_promotions.js +4 -0
- package/lib/esm/resources/line_items.d.ts +3 -0
- package/lib/esm/resources/markets.d.ts +8 -0
- package/lib/esm/resources/markets.js +4 -0
- package/lib/esm/resources/order_copies.d.ts +11 -9
- package/lib/esm/resources/order_copies.js +7 -4
- package/lib/esm/resources/order_factories.d.ts +33 -0
- package/lib/esm/resources/order_factories.js +34 -0
- package/lib/esm/resources/order_subscription_items.d.ts +60 -0
- package/lib/esm/resources/order_subscription_items.js +35 -0
- package/lib/esm/resources/order_subscriptions.d.ts +25 -3
- package/lib/esm/resources/order_subscriptions.js +18 -2
- package/lib/esm/resources/orders.d.ts +15 -3
- package/lib/esm/resources/orders.js +8 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +3 -3
- package/lib/esm/resources/percentage_discount_promotions.js +4 -4
- package/lib/esm/resources/price_frequency_tiers.d.ts +49 -0
- package/lib/esm/resources/price_frequency_tiers.js +43 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
- package/lib/esm/resources/price_volume_tiers.js +4 -0
- package/lib/esm/resources/prices.d.ts +3 -0
- package/lib/esm/resources/prices.js +4 -0
- package/lib/esm/resources/promotions.d.ts +3 -0
- package/lib/esm/resources/promotions.js +4 -0
- package/lib/esm/resources/recurring_order_copies.d.ts +52 -0
- package/lib/esm/resources/recurring_order_copies.js +47 -0
- package/lib/esm/resources/satispay_gateways.d.ts +39 -0
- package/lib/esm/resources/satispay_gateways.js +39 -0
- package/lib/esm/resources/satispay_payments.d.ts +43 -0
- package/lib/esm/resources/satispay_payments.js +39 -0
- package/lib/esm/resources/subscription_models.d.ts +48 -0
- package/lib/esm/resources/subscription_models.js +43 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
package/lib/cjs/api.d.ts
CHANGED
@@ -61,6 +61,8 @@ export { default as Markets } from './resources/markets';
|
|
61
61
|
export { default as Merchants } from './resources/merchants';
|
62
62
|
export { default as OrderAmountPromotionRules } from './resources/order_amount_promotion_rules';
|
63
63
|
export { default as OrderCopies } from './resources/order_copies';
|
64
|
+
export { default as OrderFactories } from './resources/order_factories';
|
65
|
+
export { default as OrderSubscriptionItems } from './resources/order_subscription_items';
|
64
66
|
export { default as OrderSubscriptions } from './resources/order_subscriptions';
|
65
67
|
export { default as OrderValidationRules } from './resources/order_validation_rules';
|
66
68
|
export { default as Orders } from './resources/orders';
|
@@ -73,15 +75,19 @@ export { default as PaymentMethods } from './resources/payment_methods';
|
|
73
75
|
export { default as PaypalGateways } from './resources/paypal_gateways';
|
74
76
|
export { default as PaypalPayments } from './resources/paypal_payments';
|
75
77
|
export { default as PercentageDiscountPromotions } from './resources/percentage_discount_promotions';
|
78
|
+
export { default as PriceFrequencyTiers } from './resources/price_frequency_tiers';
|
76
79
|
export { default as PriceLists } from './resources/price_lists';
|
77
80
|
export { default as PriceTiers } from './resources/price_tiers';
|
78
81
|
export { default as PriceVolumeTiers } from './resources/price_volume_tiers';
|
79
82
|
export { default as Prices } from './resources/prices';
|
80
83
|
export { default as PromotionRules } from './resources/promotion_rules';
|
81
84
|
export { default as Promotions } from './resources/promotions';
|
85
|
+
export { default as RecurringOrderCopies } from './resources/recurring_order_copies';
|
82
86
|
export { default as Refunds } from './resources/refunds';
|
83
87
|
export { default as ReturnLineItems } from './resources/return_line_items';
|
84
88
|
export { default as Returns } from './resources/returns';
|
89
|
+
export { default as SatispayGateways } from './resources/satispay_gateways';
|
90
|
+
export { default as SatispayPayments } from './resources/satispay_payments';
|
85
91
|
export { default as Shipments } from './resources/shipments';
|
86
92
|
export { default as ShippingCategories } from './resources/shipping_categories';
|
87
93
|
export { default as ShippingMethodTiers } from './resources/shipping_method_tiers';
|
@@ -99,6 +105,7 @@ export { default as StockLocations } from './resources/stock_locations';
|
|
99
105
|
export { default as StockTransfers } from './resources/stock_transfers';
|
100
106
|
export { default as StripeGateways } from './resources/stripe_gateways';
|
101
107
|
export { default as StripePayments } from './resources/stripe_payments';
|
108
|
+
export { default as SubscriptionModels } from './resources/subscription_models';
|
102
109
|
export { default as TaxCalculators } from './resources/tax_calculators';
|
103
110
|
export { default as TaxCategories } from './resources/tax_categories';
|
104
111
|
export { default as TaxRules } from './resources/tax_rules';
|
@@ -107,5 +114,5 @@ export { default as Transactions } from './resources/transactions';
|
|
107
114
|
export { default as Voids } from './resources/voids';
|
108
115
|
export { default as Webhooks } from './resources/webhooks';
|
109
116
|
export { default as WireTransfers } from './resources/wire_transfers';
|
110
|
-
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_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';
|
111
|
-
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_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"];
|
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"];
|
package/lib/cjs/api.js
CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.InventoryStockLocations = exports.InventoryReturnLocations = exports.InventoryModels = exports.InStockSubscriptions = exports.Imports = exports.GoogleGeocoders = exports.GiftCards = exports.GiftCardRecipients = exports.Geocoders = exports.FreeShippingPromotions = exports.FreeGiftPromotions = exports.FixedPricePromotions = exports.FixedAmountPromotions = exports.ExternalTaxCalculators = exports.ExternalPromotions = exports.ExternalPayments = exports.ExternalGateways = exports.Exports = exports.Events = exports.EventCallbacks = exports.DeliveryLeadTimes = exports.Customers = exports.CustomerSubscriptions = exports.CustomerPaymentSources = exports.CustomerPasswordResets = exports.CustomerGroups = exports.CustomerAddresses = exports.Coupons = exports.CouponRecipients = exports.CouponCodesPromotionRules = exports.Cleanups = exports.CheckoutComPayments = exports.CheckoutComGateways = exports.CarrierAccounts = exports.Captures = exports.Bundles = exports.BraintreePayments = exports.BraintreeGateways = exports.BingGeocoders = exports.BillingInfoValidationRules = exports.AxervePayments = exports.AxerveGateways = exports.AvalaraAccounts = exports.Authorizations = exports.Attachments = exports.Applications = exports.AdyenPayments = exports.AdyenGateways = exports.Adjustments = exports.Addresses = void 0;
|
7
|
-
exports.
|
8
|
-
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = void 0;
|
7
|
+
exports.StockLineItems = exports.StockItems = exports.Skus = exports.SkuOptions = exports.SkuLists = exports.SkuListPromotionRules = exports.SkuListItems = exports.ShippingZones = exports.ShippingWeightTiers = exports.ShippingMethods = exports.ShippingMethodTiers = exports.ShippingCategories = exports.Shipments = exports.SatispayPayments = exports.SatispayGateways = exports.Returns = exports.ReturnLineItems = exports.Refunds = exports.RecurringOrderCopies = exports.Promotions = exports.PromotionRules = exports.Prices = exports.PriceVolumeTiers = exports.PriceTiers = exports.PriceLists = exports.PriceFrequencyTiers = exports.PercentageDiscountPromotions = exports.PaypalPayments = exports.PaypalGateways = exports.PaymentMethods = exports.PaymentGateways = exports.Parcels = exports.ParcelLineItems = exports.Packages = exports.Organizations = exports.Orders = exports.OrderValidationRules = exports.OrderSubscriptions = exports.OrderSubscriptionItems = exports.OrderFactories = exports.OrderCopies = exports.OrderAmountPromotionRules = exports.Merchants = exports.Markets = exports.ManualTaxCalculators = exports.ManualGateways = exports.LineItems = exports.LineItemOptions = exports.KlarnaPayments = exports.KlarnaGateways = void 0;
|
8
|
+
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = exports.SubscriptionModels = exports.StripePayments = exports.StripeGateways = exports.StockTransfers = exports.StockLocations = void 0;
|
9
9
|
// ##__API_RESOURCES_START__##
|
10
10
|
// ##__API_RESOURCES_TEMPLATE:: export { default as ##__RESOURCE_CLASS__## } from './resources/##__RESOURCE_TYPE__##'
|
11
11
|
/**
|
@@ -131,6 +131,10 @@ var order_amount_promotion_rules_1 = require("./resources/order_amount_promotion
|
|
131
131
|
Object.defineProperty(exports, "OrderAmountPromotionRules", { enumerable: true, get: function () { return __importDefault(order_amount_promotion_rules_1).default; } });
|
132
132
|
var order_copies_1 = require("./resources/order_copies");
|
133
133
|
Object.defineProperty(exports, "OrderCopies", { enumerable: true, get: function () { return __importDefault(order_copies_1).default; } });
|
134
|
+
var order_factories_1 = require("./resources/order_factories");
|
135
|
+
Object.defineProperty(exports, "OrderFactories", { enumerable: true, get: function () { return __importDefault(order_factories_1).default; } });
|
136
|
+
var order_subscription_items_1 = require("./resources/order_subscription_items");
|
137
|
+
Object.defineProperty(exports, "OrderSubscriptionItems", { enumerable: true, get: function () { return __importDefault(order_subscription_items_1).default; } });
|
134
138
|
var order_subscriptions_1 = require("./resources/order_subscriptions");
|
135
139
|
Object.defineProperty(exports, "OrderSubscriptions", { enumerable: true, get: function () { return __importDefault(order_subscriptions_1).default; } });
|
136
140
|
var order_validation_rules_1 = require("./resources/order_validation_rules");
|
@@ -155,6 +159,8 @@ var paypal_payments_1 = require("./resources/paypal_payments");
|
|
155
159
|
Object.defineProperty(exports, "PaypalPayments", { enumerable: true, get: function () { return __importDefault(paypal_payments_1).default; } });
|
156
160
|
var percentage_discount_promotions_1 = require("./resources/percentage_discount_promotions");
|
157
161
|
Object.defineProperty(exports, "PercentageDiscountPromotions", { enumerable: true, get: function () { return __importDefault(percentage_discount_promotions_1).default; } });
|
162
|
+
var price_frequency_tiers_1 = require("./resources/price_frequency_tiers");
|
163
|
+
Object.defineProperty(exports, "PriceFrequencyTiers", { enumerable: true, get: function () { return __importDefault(price_frequency_tiers_1).default; } });
|
158
164
|
var price_lists_1 = require("./resources/price_lists");
|
159
165
|
Object.defineProperty(exports, "PriceLists", { enumerable: true, get: function () { return __importDefault(price_lists_1).default; } });
|
160
166
|
var price_tiers_1 = require("./resources/price_tiers");
|
@@ -167,12 +173,18 @@ var promotion_rules_1 = require("./resources/promotion_rules");
|
|
167
173
|
Object.defineProperty(exports, "PromotionRules", { enumerable: true, get: function () { return __importDefault(promotion_rules_1).default; } });
|
168
174
|
var promotions_1 = require("./resources/promotions");
|
169
175
|
Object.defineProperty(exports, "Promotions", { enumerable: true, get: function () { return __importDefault(promotions_1).default; } });
|
176
|
+
var recurring_order_copies_1 = require("./resources/recurring_order_copies");
|
177
|
+
Object.defineProperty(exports, "RecurringOrderCopies", { enumerable: true, get: function () { return __importDefault(recurring_order_copies_1).default; } });
|
170
178
|
var refunds_1 = require("./resources/refunds");
|
171
179
|
Object.defineProperty(exports, "Refunds", { enumerable: true, get: function () { return __importDefault(refunds_1).default; } });
|
172
180
|
var return_line_items_1 = require("./resources/return_line_items");
|
173
181
|
Object.defineProperty(exports, "ReturnLineItems", { enumerable: true, get: function () { return __importDefault(return_line_items_1).default; } });
|
174
182
|
var returns_1 = require("./resources/returns");
|
175
183
|
Object.defineProperty(exports, "Returns", { enumerable: true, get: function () { return __importDefault(returns_1).default; } });
|
184
|
+
var satispay_gateways_1 = require("./resources/satispay_gateways");
|
185
|
+
Object.defineProperty(exports, "SatispayGateways", { enumerable: true, get: function () { return __importDefault(satispay_gateways_1).default; } });
|
186
|
+
var satispay_payments_1 = require("./resources/satispay_payments");
|
187
|
+
Object.defineProperty(exports, "SatispayPayments", { enumerable: true, get: function () { return __importDefault(satispay_payments_1).default; } });
|
176
188
|
var shipments_1 = require("./resources/shipments");
|
177
189
|
Object.defineProperty(exports, "Shipments", { enumerable: true, get: function () { return __importDefault(shipments_1).default; } });
|
178
190
|
var shipping_categories_1 = require("./resources/shipping_categories");
|
@@ -207,6 +219,8 @@ var stripe_gateways_1 = require("./resources/stripe_gateways");
|
|
207
219
|
Object.defineProperty(exports, "StripeGateways", { enumerable: true, get: function () { return __importDefault(stripe_gateways_1).default; } });
|
208
220
|
var stripe_payments_1 = require("./resources/stripe_payments");
|
209
221
|
Object.defineProperty(exports, "StripePayments", { enumerable: true, get: function () { return __importDefault(stripe_payments_1).default; } });
|
222
|
+
var subscription_models_1 = require("./resources/subscription_models");
|
223
|
+
Object.defineProperty(exports, "SubscriptionModels", { enumerable: true, get: function () { return __importDefault(subscription_models_1).default; } });
|
210
224
|
var tax_calculators_1 = require("./resources/tax_calculators");
|
211
225
|
Object.defineProperty(exports, "TaxCalculators", { enumerable: true, get: function () { return __importDefault(tax_calculators_1).default; } });
|
212
226
|
var tax_categories_1 = require("./resources/tax_categories");
|
@@ -286,6 +300,8 @@ exports.resourceList = [
|
|
286
300
|
'merchants',
|
287
301
|
'order_amount_promotion_rules',
|
288
302
|
'order_copies',
|
303
|
+
'order_factories',
|
304
|
+
'order_subscription_items',
|
289
305
|
'order_subscriptions',
|
290
306
|
'order_validation_rules',
|
291
307
|
'orders',
|
@@ -298,15 +314,19 @@ exports.resourceList = [
|
|
298
314
|
'paypal_gateways',
|
299
315
|
'paypal_payments',
|
300
316
|
'percentage_discount_promotions',
|
317
|
+
'price_frequency_tiers',
|
301
318
|
'price_lists',
|
302
319
|
'price_tiers',
|
303
320
|
'price_volume_tiers',
|
304
321
|
'prices',
|
305
322
|
'promotion_rules',
|
306
323
|
'promotions',
|
324
|
+
'recurring_order_copies',
|
307
325
|
'refunds',
|
308
326
|
'return_line_items',
|
309
327
|
'returns',
|
328
|
+
'satispay_gateways',
|
329
|
+
'satispay_payments',
|
310
330
|
'shipments',
|
311
331
|
'shipping_categories',
|
312
332
|
'shipping_method_tiers',
|
@@ -324,6 +344,7 @@ exports.resourceList = [
|
|
324
344
|
'stock_transfers',
|
325
345
|
'stripe_gateways',
|
326
346
|
'stripe_payments',
|
347
|
+
'subscription_models',
|
327
348
|
'tax_calculators',
|
328
349
|
'tax_categories',
|
329
350
|
'tax_rules',
|
@@ -2,7 +2,7 @@ import * as api from './api';
|
|
2
2
|
import { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
4
|
import { ResourcesInitConfig } from './resource';
|
5
|
-
declare const OPEN_API_SCHEMA_VERSION = "
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.1.1";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
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 = "
|
13
|
+
readonly openApiSchemaVersion = "4.1.1";
|
14
14
|
addresses: api.Addresses;
|
15
15
|
adjustments: api.Adjustments;
|
16
16
|
adyen_gateways: api.AdyenGateways;
|
@@ -71,6 +71,8 @@ declare class CommerceLayerClient {
|
|
71
71
|
merchants: api.Merchants;
|
72
72
|
order_amount_promotion_rules: api.OrderAmountPromotionRules;
|
73
73
|
order_copies: api.OrderCopies;
|
74
|
+
order_factories: api.OrderFactories;
|
75
|
+
order_subscription_items: api.OrderSubscriptionItems;
|
74
76
|
order_subscriptions: api.OrderSubscriptions;
|
75
77
|
order_validation_rules: api.OrderValidationRules;
|
76
78
|
orders: api.Orders;
|
@@ -83,15 +85,19 @@ declare class CommerceLayerClient {
|
|
83
85
|
paypal_gateways: api.PaypalGateways;
|
84
86
|
paypal_payments: api.PaypalPayments;
|
85
87
|
percentage_discount_promotions: api.PercentageDiscountPromotions;
|
88
|
+
price_frequency_tiers: api.PriceFrequencyTiers;
|
86
89
|
price_lists: api.PriceLists;
|
87
90
|
price_tiers: api.PriceTiers;
|
88
91
|
price_volume_tiers: api.PriceVolumeTiers;
|
89
92
|
prices: api.Prices;
|
90
93
|
promotion_rules: api.PromotionRules;
|
91
94
|
promotions: api.Promotions;
|
95
|
+
recurring_order_copies: api.RecurringOrderCopies;
|
92
96
|
refunds: api.Refunds;
|
93
97
|
return_line_items: api.ReturnLineItems;
|
94
98
|
returns: api.Returns;
|
99
|
+
satispay_gateways: api.SatispayGateways;
|
100
|
+
satispay_payments: api.SatispayPayments;
|
95
101
|
shipments: api.Shipments;
|
96
102
|
shipping_categories: api.ShippingCategories;
|
97
103
|
shipping_method_tiers: api.ShippingMethodTiers;
|
@@ -109,6 +115,7 @@ declare class CommerceLayerClient {
|
|
109
115
|
stock_transfers: api.StockTransfers;
|
110
116
|
stripe_gateways: api.StripeGateways;
|
111
117
|
stripe_payments: api.StripePayments;
|
118
|
+
subscription_models: api.SubscriptionModels;
|
112
119
|
tax_calculators: api.TaxCalculators;
|
113
120
|
tax_categories: api.TaxCategories;
|
114
121
|
tax_rules: api.TaxRules;
|
package/lib/cjs/commercelayer.js
CHANGED
@@ -45,7 +45,7 @@ const resource_1 = __importDefault(require("./resource"));
|
|
45
45
|
const debug_1 = __importDefault(require("./debug"));
|
46
46
|
const debug = (0, debug_1.default)('commercelayer');
|
47
47
|
// Autogenerated schema version number, do not remove this line
|
48
|
-
const OPEN_API_SCHEMA_VERSION = '
|
48
|
+
const OPEN_API_SCHEMA_VERSION = '4.1.1';
|
49
49
|
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
50
50
|
class CommerceLayerClient {
|
51
51
|
static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
|
@@ -119,6 +119,8 @@ class CommerceLayerClient {
|
|
119
119
|
this.merchants = new api.Merchants(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
120
120
|
this.order_amount_promotion_rules = new api.OrderAmountPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
121
121
|
this.order_copies = new api.OrderCopies(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
122
|
+
this.order_factories = new api.OrderFactories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
123
|
+
this.order_subscription_items = new api.OrderSubscriptionItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
122
124
|
this.order_subscriptions = new api.OrderSubscriptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
123
125
|
this.order_validation_rules = new api.OrderValidationRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
124
126
|
this.orders = new api.Orders(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -131,15 +133,19 @@ class CommerceLayerClient {
|
|
131
133
|
this.paypal_gateways = new api.PaypalGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
132
134
|
this.paypal_payments = new api.PaypalPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
133
135
|
this.percentage_discount_promotions = new api.PercentageDiscountPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
136
|
+
this.price_frequency_tiers = new api.PriceFrequencyTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
134
137
|
this.price_lists = new api.PriceLists(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
135
138
|
this.price_tiers = new api.PriceTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
136
139
|
this.price_volume_tiers = new api.PriceVolumeTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
137
140
|
this.prices = new api.Prices(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
138
141
|
this.promotion_rules = new api.PromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
139
142
|
this.promotions = new api.Promotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
143
|
+
this.recurring_order_copies = new api.RecurringOrderCopies(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
140
144
|
this.refunds = new api.Refunds(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
141
145
|
this.return_line_items = new api.ReturnLineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
142
146
|
this.returns = new api.Returns(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
147
|
+
this.satispay_gateways = new api.SatispayGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
148
|
+
this.satispay_payments = new api.SatispayPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
143
149
|
this.shipments = new api.Shipments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
144
150
|
this.shipping_categories = new api.ShippingCategories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
145
151
|
this.shipping_method_tiers = new api.ShippingMethodTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -157,6 +163,7 @@ class CommerceLayerClient {
|
|
157
163
|
this.stock_transfers = new api.StockTransfers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
158
164
|
this.stripe_gateways = new api.StripeGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
159
165
|
this.stripe_payments = new api.StripePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
166
|
+
this.subscription_models = new api.SubscriptionModels(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
160
167
|
this.tax_calculators = new api.TaxCalculators(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
161
168
|
this.tax_categories = new api.TaxCategories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
162
169
|
this.tax_rules = new api.TaxRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
package/lib/cjs/model.d.ts
CHANGED
@@ -60,7 +60,9 @@ export type { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculato
|
|
60
60
|
export type { Market, MarketCreate, MarketUpdate } from './resources/markets';
|
61
61
|
export type { Merchant, MerchantCreate, MerchantUpdate } from './resources/merchants';
|
62
62
|
export type { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate } from './resources/order_amount_promotion_rules';
|
63
|
-
export type { OrderCopy, OrderCopyCreate } from './resources/order_copies';
|
63
|
+
export type { OrderCopy, OrderCopyCreate, OrderCopyUpdate } from './resources/order_copies';
|
64
|
+
export type { OrderFactory } from './resources/order_factories';
|
65
|
+
export type { OrderSubscriptionItem, OrderSubscriptionItemCreate, OrderSubscriptionItemUpdate } from './resources/order_subscription_items';
|
64
66
|
export type { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate } from './resources/order_subscriptions';
|
65
67
|
export type { OrderValidationRule } from './resources/order_validation_rules';
|
66
68
|
export type { Order, OrderCreate, OrderUpdate } from './resources/orders';
|
@@ -73,15 +75,19 @@ export type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate } from './
|
|
73
75
|
export type { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate } from './resources/paypal_gateways';
|
74
76
|
export type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate } from './resources/paypal_payments';
|
75
77
|
export type { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate } from './resources/percentage_discount_promotions';
|
78
|
+
export type { PriceFrequencyTier, PriceFrequencyTierCreate, PriceFrequencyTierUpdate } from './resources/price_frequency_tiers';
|
76
79
|
export type { PriceList, PriceListCreate, PriceListUpdate } from './resources/price_lists';
|
77
80
|
export type { PriceTier } from './resources/price_tiers';
|
78
81
|
export type { PriceVolumeTier, PriceVolumeTierCreate, PriceVolumeTierUpdate } from './resources/price_volume_tiers';
|
79
82
|
export type { Price, PriceCreate, PriceUpdate } from './resources/prices';
|
80
83
|
export type { PromotionRule } from './resources/promotion_rules';
|
81
84
|
export type { Promotion } from './resources/promotions';
|
85
|
+
export type { RecurringOrderCopy, RecurringOrderCopyCreate, RecurringOrderCopyUpdate } from './resources/recurring_order_copies';
|
82
86
|
export type { Refund } from './resources/refunds';
|
83
87
|
export type { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate } from './resources/return_line_items';
|
84
88
|
export type { Return, ReturnCreate, ReturnUpdate } from './resources/returns';
|
89
|
+
export type { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate } from './resources/satispay_gateways';
|
90
|
+
export type { SatispayPayment, SatispayPaymentCreate, SatispayPaymentUpdate } from './resources/satispay_payments';
|
85
91
|
export type { Shipment, ShipmentUpdate } from './resources/shipments';
|
86
92
|
export type { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate } from './resources/shipping_categories';
|
87
93
|
export type { ShippingMethodTier } from './resources/shipping_method_tiers';
|
@@ -99,6 +105,7 @@ export type { StockLocation, StockLocationCreate, StockLocationUpdate } from './
|
|
99
105
|
export type { StockTransfer, StockTransferCreate, StockTransferUpdate } from './resources/stock_transfers';
|
100
106
|
export type { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate } from './resources/stripe_gateways';
|
101
107
|
export type { StripePayment, StripePaymentCreate, StripePaymentUpdate } from './resources/stripe_payments';
|
108
|
+
export type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate } from './resources/subscription_models';
|
102
109
|
export type { TaxCalculator } from './resources/tax_calculators';
|
103
110
|
export type { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate } from './resources/tax_categories';
|
104
111
|
export type { TaxRule, TaxRuleCreate, TaxRuleUpdate } from './resources/tax_rules';
|
@@ -8,6 +8,7 @@ import type { CheckoutComPayment } from './checkout_com_payments';
|
|
8
8
|
import type { ExternalPayment } from './external_payments';
|
9
9
|
import type { KlarnaPayment } from './klarna_payments';
|
10
10
|
import type { PaypalPayment } from './paypal_payments';
|
11
|
+
import type { SatispayPayment } from './satispay_payments';
|
11
12
|
import type { StripePayment } from './stripe_payments';
|
12
13
|
import type { WireTransfer } from './wire_transfers';
|
13
14
|
type CustomerPaymentSourceRel = ResourceRel & {
|
@@ -37,6 +38,9 @@ type KlarnaPaymentRel = ResourceRel & {
|
|
37
38
|
type PaypalPaymentRel = ResourceRel & {
|
38
39
|
type: 'paypal_payments';
|
39
40
|
};
|
41
|
+
type SatispayPaymentRel = ResourceRel & {
|
42
|
+
type: 'satispay_payments';
|
43
|
+
};
|
40
44
|
type StripePaymentRel = ResourceRel & {
|
41
45
|
type: 'stripe_payments';
|
42
46
|
};
|
@@ -48,15 +52,15 @@ interface CustomerPaymentSource extends Resource {
|
|
48
52
|
customer_token?: string;
|
49
53
|
payment_source_token?: string;
|
50
54
|
customer?: Customer;
|
51
|
-
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | StripePayment | WireTransfer;
|
55
|
+
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer;
|
52
56
|
}
|
53
57
|
interface CustomerPaymentSourceCreate extends ResourceCreate {
|
54
58
|
customer: CustomerRel;
|
55
|
-
payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
59
|
+
payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
56
60
|
}
|
57
61
|
interface CustomerPaymentSourceUpdate extends ResourceUpdate {
|
58
62
|
customer?: CustomerRel;
|
59
|
-
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
63
|
+
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
60
64
|
}
|
61
65
|
declare class CustomerPaymentSources extends ApiResource {
|
62
66
|
static readonly TYPE: 'customer_payment_sources';
|
@@ -6,9 +6,9 @@ import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
|
6
6
|
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
7
|
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
8
|
import type { Attachment } from './attachments';
|
9
|
+
import type { Event } from './events';
|
9
10
|
import type { SkuList } from './sku_lists';
|
10
11
|
import type { Sku } from './skus';
|
11
|
-
import type { Event } from './events';
|
12
12
|
type FixedPricePromotionRel = ResourceRel & {
|
13
13
|
type: typeof FixedPricePromotions.TYPE;
|
14
14
|
};
|
@@ -47,9 +47,9 @@ interface FixedPricePromotion extends Resource {
|
|
47
47
|
sku_list_promotion_rule?: SkuListPromotionRule;
|
48
48
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
49
49
|
attachments?: Attachment[];
|
50
|
+
events?: Event[];
|
50
51
|
sku_list?: SkuList;
|
51
52
|
skus?: Sku[];
|
52
|
-
events?: Event[];
|
53
53
|
}
|
54
54
|
interface FixedPricePromotionCreate extends ResourceCreate {
|
55
55
|
name: string;
|
@@ -91,9 +91,9 @@ declare class FixedPricePromotions extends ApiResource {
|
|
91
91
|
sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
92
92
|
coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
93
93
|
attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
94
|
+
events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
94
95
|
sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
95
96
|
skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
96
|
-
events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
97
97
|
isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
|
98
98
|
relationship(id: string | ResourceId | null): FixedPricePromotionRel;
|
99
99
|
type(): string;
|
@@ -38,6 +38,10 @@ class FixedPricePromotions extends resource_1.ApiResource {
|
|
38
38
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
39
39
|
return this.resources.fetch({ type: 'attachments' }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options);
|
40
40
|
}
|
41
|
+
async events(fixedPricePromotionId, params, options) {
|
42
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
43
|
+
return this.resources.fetch({ type: 'events' }, `fixed_price_promotions/${_fixedPricePromotionId}/events`, params, options);
|
44
|
+
}
|
41
45
|
async sku_list(fixedPricePromotionId, params, options) {
|
42
46
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
43
47
|
return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
|
@@ -46,10 +50,6 @@ class FixedPricePromotions extends resource_1.ApiResource {
|
|
46
50
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
47
51
|
return this.resources.fetch({ type: 'skus' }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
|
48
52
|
}
|
49
|
-
async events(fixedPricePromotionId, params, options) {
|
50
|
-
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
51
|
-
return this.resources.fetch({ type: 'events' }, `fixed_price_promotions/${_fixedPricePromotionId}/events`, params, options);
|
52
|
-
}
|
53
53
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
54
54
|
isFixedPricePromotion(resource) {
|
55
55
|
return resource.type && (resource.type === FixedPricePromotions.TYPE);
|
@@ -6,9 +6,9 @@ import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
|
6
6
|
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
7
|
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
8
|
import type { Attachment } from './attachments';
|
9
|
+
import type { Event } from './events';
|
9
10
|
import type { SkuList } from './sku_lists';
|
10
11
|
import type { Sku } from './skus';
|
11
|
-
import type { Event } from './events';
|
12
12
|
type FreeGiftPromotionRel = ResourceRel & {
|
13
13
|
type: typeof FreeGiftPromotions.TYPE;
|
14
14
|
};
|
@@ -45,9 +45,9 @@ interface FreeGiftPromotion extends Resource {
|
|
45
45
|
sku_list_promotion_rule?: SkuListPromotionRule;
|
46
46
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
47
47
|
attachments?: Attachment[];
|
48
|
+
events?: Event[];
|
48
49
|
sku_list?: SkuList;
|
49
50
|
skus?: Sku[];
|
50
|
-
events?: Event[];
|
51
51
|
}
|
52
52
|
interface FreeGiftPromotionCreate extends ResourceCreate {
|
53
53
|
name: string;
|
@@ -89,9 +89,9 @@ declare class FreeGiftPromotions extends ApiResource {
|
|
89
89
|
sku_list_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
90
90
|
coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
91
91
|
attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
92
|
+
events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
92
93
|
sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
93
94
|
skus(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
94
|
-
events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
95
95
|
isFreeGiftPromotion(resource: any): resource is FreeGiftPromotion;
|
96
96
|
relationship(id: string | ResourceId | null): FreeGiftPromotionRel;
|
97
97
|
type(): string;
|
@@ -38,6 +38,10 @@ class FreeGiftPromotions extends resource_1.ApiResource {
|
|
38
38
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
39
39
|
return this.resources.fetch({ type: 'attachments' }, `free_gift_promotions/${_freeGiftPromotionId}/attachments`, params, options);
|
40
40
|
}
|
41
|
+
async events(freeGiftPromotionId, params, options) {
|
42
|
+
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
43
|
+
return this.resources.fetch({ type: 'events' }, `free_gift_promotions/${_freeGiftPromotionId}/events`, params, options);
|
44
|
+
}
|
41
45
|
async sku_list(freeGiftPromotionId, params, options) {
|
42
46
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
43
47
|
return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
|
@@ -46,10 +50,6 @@ class FreeGiftPromotions extends resource_1.ApiResource {
|
|
46
50
|
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
47
51
|
return this.resources.fetch({ type: 'skus' }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options);
|
48
52
|
}
|
49
|
-
async events(freeGiftPromotionId, params, options) {
|
50
|
-
const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
|
51
|
-
return this.resources.fetch({ type: 'events' }, `free_gift_promotions/${_freeGiftPromotionId}/events`, params, options);
|
52
|
-
}
|
53
53
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
54
54
|
isFreeGiftPromotion(resource) {
|
55
55
|
return resource.type && (resource.type === FreeGiftPromotions.TYPE);
|
@@ -6,6 +6,7 @@ import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
|
6
6
|
import type { SkuListPromotionRule } from './sku_list_promotion_rules';
|
7
7
|
import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
8
8
|
import type { Attachment } from './attachments';
|
9
|
+
import type { Event } from './events';
|
9
10
|
type FreeShippingPromotionRel = ResourceRel & {
|
10
11
|
type: typeof FreeShippingPromotions.TYPE;
|
11
12
|
};
|
@@ -38,6 +39,7 @@ interface FreeShippingPromotion extends Resource {
|
|
38
39
|
sku_list_promotion_rule?: SkuListPromotionRule;
|
39
40
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
40
41
|
attachments?: Attachment[];
|
42
|
+
events?: Event[];
|
41
43
|
}
|
42
44
|
interface FreeShippingPromotionCreate extends ResourceCreate {
|
43
45
|
name: string;
|
@@ -75,6 +77,7 @@ declare class FreeShippingPromotions extends ApiResource {
|
|
75
77
|
sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
76
78
|
coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
77
79
|
attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
80
|
+
events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
78
81
|
isFreeShippingPromotion(resource: any): resource is FreeShippingPromotion;
|
79
82
|
relationship(id: string | ResourceId | null): FreeShippingPromotionRel;
|
80
83
|
type(): string;
|
@@ -38,6 +38,10 @@ class FreeShippingPromotions extends resource_1.ApiResource {
|
|
38
38
|
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
39
39
|
return this.resources.fetch({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options);
|
40
40
|
}
|
41
|
+
async events(freeShippingPromotionId, params, options) {
|
42
|
+
const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
|
43
|
+
return this.resources.fetch({ type: 'events' }, `free_shipping_promotions/${_freeShippingPromotionId}/events`, params, options);
|
44
|
+
}
|
41
45
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
42
46
|
isFreeShippingPromotion(resource) {
|
43
47
|
return resource.type && (resource.type === FreeShippingPromotions.TYPE);
|
@@ -76,6 +76,7 @@ interface LineItem extends Resource {
|
|
76
76
|
tax_rate?: number;
|
77
77
|
tax_breakdown?: object;
|
78
78
|
item_type?: string;
|
79
|
+
frequency?: string;
|
79
80
|
order?: Order;
|
80
81
|
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku;
|
81
82
|
line_item_options?: LineItemOption[];
|
@@ -96,6 +97,7 @@ interface LineItemCreate extends ResourceCreate {
|
|
96
97
|
name?: string;
|
97
98
|
image_url?: string;
|
98
99
|
item_type?: string;
|
100
|
+
frequency?: string;
|
99
101
|
order: OrderRel;
|
100
102
|
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel;
|
101
103
|
}
|
@@ -106,6 +108,7 @@ interface LineItemUpdate extends ResourceUpdate {
|
|
106
108
|
_external_price?: boolean;
|
107
109
|
name?: string;
|
108
110
|
image_url?: string;
|
111
|
+
frequency?: string;
|
109
112
|
}
|
110
113
|
declare class LineItems extends ApiResource {
|
111
114
|
static readonly TYPE: 'line_items';
|
@@ -3,6 +3,7 @@ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import type { Merchant } from './merchants';
|
4
4
|
import type { PriceList } from './price_lists';
|
5
5
|
import type { InventoryModel } from './inventory_models';
|
6
|
+
import type { SubscriptionModel } from './subscription_models';
|
6
7
|
import type { TaxCalculator } from './tax_calculators';
|
7
8
|
import type { CustomerGroup } from './customer_groups';
|
8
9
|
import type { Attachment } from './attachments';
|
@@ -18,6 +19,9 @@ type PriceListRel = ResourceRel & {
|
|
18
19
|
type InventoryModelRel = ResourceRel & {
|
19
20
|
type: 'inventory_models';
|
20
21
|
};
|
22
|
+
type SubscriptionModelRel = ResourceRel & {
|
23
|
+
type: 'subscription_models';
|
24
|
+
};
|
21
25
|
type TaxCalculatorRel = ResourceRel & {
|
22
26
|
type: 'tax_calculators';
|
23
27
|
};
|
@@ -37,6 +41,7 @@ interface Market extends Resource {
|
|
37
41
|
merchant?: Merchant;
|
38
42
|
price_list?: PriceList;
|
39
43
|
inventory_model?: InventoryModel;
|
44
|
+
subscription_model?: SubscriptionModel;
|
40
45
|
tax_calculator?: TaxCalculator;
|
41
46
|
customer_group?: CustomerGroup;
|
42
47
|
attachments?: Attachment[];
|
@@ -50,6 +55,7 @@ interface MarketCreate extends ResourceCreate {
|
|
50
55
|
merchant: MerchantRel;
|
51
56
|
price_list: PriceListRel;
|
52
57
|
inventory_model: InventoryModelRel;
|
58
|
+
subscription_model?: SubscriptionModelRel;
|
53
59
|
tax_calculator?: TaxCalculatorRel;
|
54
60
|
customer_group?: CustomerGroupRel;
|
55
61
|
}
|
@@ -64,6 +70,7 @@ interface MarketUpdate extends ResourceUpdate {
|
|
64
70
|
merchant?: MerchantRel;
|
65
71
|
price_list?: PriceListRel;
|
66
72
|
inventory_model?: InventoryModelRel;
|
73
|
+
subscription_model?: SubscriptionModelRel;
|
67
74
|
tax_calculator?: TaxCalculatorRel;
|
68
75
|
customer_group?: CustomerGroupRel;
|
69
76
|
}
|
@@ -77,6 +84,7 @@ declare class Markets extends ApiResource {
|
|
77
84
|
merchant(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Merchant>;
|
78
85
|
price_list(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceList>;
|
79
86
|
inventory_model(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
87
|
+
subscription_model(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SubscriptionModel>;
|
80
88
|
tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
|
81
89
|
customer_group(marketId: string | Market, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerGroup>;
|
82
90
|
attachments(marketId: string | Market, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
@@ -30,6 +30,10 @@ class Markets extends resource_1.ApiResource {
|
|
30
30
|
const _marketId = marketId.id || marketId;
|
31
31
|
return this.resources.fetch({ type: 'inventory_models' }, `markets/${_marketId}/inventory_model`, params, options);
|
32
32
|
}
|
33
|
+
async subscription_model(marketId, params, options) {
|
34
|
+
const _marketId = marketId.id || marketId;
|
35
|
+
return this.resources.fetch({ type: 'subscription_models' }, `markets/${_marketId}/subscription_model`, params, options);
|
36
|
+
}
|
33
37
|
async tax_calculator(marketId, params, options) {
|
34
38
|
const _marketId = marketId.id || marketId;
|
35
39
|
return this.resources.fetch({ type: 'tax_calculators' }, `markets/${_marketId}/tax_calculator`, params, options);
|