@commercelayer/sdk 5.31.1 → 5.33.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 +3 -2
- package/lib/cjs/api.js +5 -2
- package/lib/cjs/commercelayer.d.ts +3 -2
- package/lib/cjs/commercelayer.js +2 -1
- package/lib/cjs/model.d.ts +1 -0
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +4 -14
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +4 -4
- package/lib/cjs/resources/external_promotions.d.ts +4 -14
- package/lib/cjs/resources/external_promotions.js +4 -4
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +4 -14
- package/lib/cjs/resources/fixed_amount_promotions.js +4 -4
- package/lib/cjs/resources/fixed_price_promotions.d.ts +4 -14
- package/lib/cjs/resources/fixed_price_promotions.js +4 -4
- package/lib/cjs/resources/free_gift_promotions.d.ts +4 -14
- package/lib/cjs/resources/free_gift_promotions.js +4 -4
- package/lib/cjs/resources/free_shipping_promotions.d.ts +9 -14
- package/lib/cjs/resources/free_shipping_promotions.js +4 -4
- package/lib/cjs/resources/gift_cards.d.ts +3 -0
- package/lib/cjs/resources/orders.d.ts +10 -1
- package/lib/cjs/resources/orders.js +7 -0
- package/lib/cjs/resources/payment_methods.d.ts +3 -0
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +4 -14
- package/lib/cjs/resources/percentage_discount_promotions.js +4 -4
- package/lib/cjs/resources/promotions.d.ts +3 -3
- package/lib/cjs/resources/promotions.js +4 -4
- package/lib/cjs/resources/resource_errors.d.ts +22 -0
- package/lib/cjs/resources/resource_errors.js +16 -0
- package/lib/cjs/resources/stock_transfers.d.ts +1 -1
- package/lib/cjs/resources/stripe_payments.d.ts +4 -1
- package/lib/esm/api.d.ts +3 -2
- package/lib/esm/api.js +2 -0
- package/lib/esm/commercelayer.d.ts +3 -2
- package/lib/esm/commercelayer.js +2 -1
- package/lib/esm/model.d.ts +1 -0
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +4 -14
- package/lib/esm/resources/buy_x_pay_y_promotions.js +4 -4
- package/lib/esm/resources/external_promotions.d.ts +4 -14
- package/lib/esm/resources/external_promotions.js +4 -4
- package/lib/esm/resources/fixed_amount_promotions.d.ts +4 -14
- package/lib/esm/resources/fixed_amount_promotions.js +4 -4
- package/lib/esm/resources/fixed_price_promotions.d.ts +4 -14
- package/lib/esm/resources/fixed_price_promotions.js +4 -4
- package/lib/esm/resources/free_gift_promotions.d.ts +4 -14
- package/lib/esm/resources/free_gift_promotions.js +4 -4
- package/lib/esm/resources/free_shipping_promotions.d.ts +9 -14
- package/lib/esm/resources/free_shipping_promotions.js +4 -4
- package/lib/esm/resources/gift_cards.d.ts +3 -0
- package/lib/esm/resources/orders.d.ts +10 -1
- package/lib/esm/resources/orders.js +7 -0
- package/lib/esm/resources/payment_methods.d.ts +3 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +4 -14
- package/lib/esm/resources/percentage_discount_promotions.js +4 -4
- package/lib/esm/resources/promotions.d.ts +3 -3
- package/lib/esm/resources/promotions.js +4 -4
- package/lib/esm/resources/resource_errors.d.ts +22 -0
- package/lib/esm/resources/resource_errors.js +14 -0
- package/lib/esm/resources/stock_transfers.d.ts +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +4 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
package/lib/cjs/api.d.ts
CHANGED
@@ -91,6 +91,7 @@ export { default as Promotions } from './resources/promotions';
|
|
91
91
|
export { default as RecurringOrderCopies } from './resources/recurring_order_copies';
|
92
92
|
export { default as Refunds } from './resources/refunds';
|
93
93
|
export { default as ReservedStocks } from './resources/reserved_stocks';
|
94
|
+
export { default as ResourceErrors } from './resources/resource_errors';
|
94
95
|
export { default as ReturnLineItems } from './resources/return_line_items';
|
95
96
|
export { default as Returns } from './resources/returns';
|
96
97
|
export { default as SatispayGateways } from './resources/satispay_gateways';
|
@@ -124,8 +125,8 @@ export { default as Versions } from './resources/versions';
|
|
124
125
|
export { default as Voids } from './resources/voids';
|
125
126
|
export { default as Webhooks } from './resources/webhooks';
|
126
127
|
export { default as WireTransfers } from './resources/wire_transfers';
|
127
|
-
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' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | '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' | 'payment_options' | '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' | 'reserved_stocks' | '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_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
|
128
|
-
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", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "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", "payment_options", "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", "reserved_stocks", "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_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "voids", "webhooks", "wire_transfers"];
|
128
|
+
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' | 'buy_x_pay_y_promotions' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'custom_promotion_rules' | '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' | 'payment_options' | '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' | 'reserved_stocks' | 'resource_errors' | '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_reservations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'subscription_models' | 'tags' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'versions' | 'voids' | 'webhooks' | 'wire_transfers';
|
129
|
+
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", "buy_x_pay_y_promotions", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "custom_promotion_rules", "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", "payment_options", "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", "reserved_stocks", "resource_errors", "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_reservations", "stock_transfers", "stripe_gateways", "stripe_payments", "subscription_models", "tags", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "versions", "voids", "webhooks", "wire_transfers"];
|
129
130
|
export declare const singletonList: readonly ["application", "organization"];
|
130
131
|
export type RetrievableResourceType = ResourceTypeLock;
|
131
132
|
export type RetrievableResource = Resource & {
|
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.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.CustomPromotionRules = exports.Coupons = exports.CouponRecipients = exports.CouponCodesPromotionRules = exports.Cleanups = exports.CheckoutComPayments = exports.CheckoutComGateways = exports.CarrierAccounts = exports.Captures = exports.BuyXPayYPromotions = 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.singletonList = exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Versions = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = exports.Tags = exports.SubscriptionModels = exports.StripePayments = exports.StripeGateways = exports.StockTransfers = exports.StockReservations = exports.StockLocations = exports.StockLineItems = exports.StockItems = exports.Skus = exports.SkuOptions = void 0;
|
7
|
+
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.ResourceErrors = exports.ReservedStocks = 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.PaymentOptions = 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 = exports.InventoryStockLocations = exports.InventoryReturnLocations = void 0;
|
8
|
+
exports.singletonList = exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Versions = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = exports.Tags = exports.SubscriptionModels = exports.StripePayments = exports.StripeGateways = exports.StockTransfers = exports.StockReservations = exports.StockLocations = exports.StockLineItems = exports.StockItems = exports.Skus = exports.SkuOptions = exports.SkuLists = void 0;
|
9
9
|
// ##__API_RESOURCES_START__##
|
10
10
|
// ##__API_RESOURCES_TEMPLATE:: export { default as ##__RESOURCE_CLASS__## } from './resources/##__RESOURCE_TYPE__##'
|
11
11
|
/**
|
@@ -185,6 +185,8 @@ var refunds_1 = require("./resources/refunds");
|
|
185
185
|
Object.defineProperty(exports, "Refunds", { enumerable: true, get: function () { return __importDefault(refunds_1).default; } });
|
186
186
|
var reserved_stocks_1 = require("./resources/reserved_stocks");
|
187
187
|
Object.defineProperty(exports, "ReservedStocks", { enumerable: true, get: function () { return __importDefault(reserved_stocks_1).default; } });
|
188
|
+
var resource_errors_1 = require("./resources/resource_errors");
|
189
|
+
Object.defineProperty(exports, "ResourceErrors", { enumerable: true, get: function () { return __importDefault(resource_errors_1).default; } });
|
188
190
|
var return_line_items_1 = require("./resources/return_line_items");
|
189
191
|
Object.defineProperty(exports, "ReturnLineItems", { enumerable: true, get: function () { return __importDefault(return_line_items_1).default; } });
|
190
192
|
var returns_1 = require("./resources/returns");
|
@@ -341,6 +343,7 @@ exports.resourceList = [
|
|
341
343
|
'recurring_order_copies',
|
342
344
|
'refunds',
|
343
345
|
'reserved_stocks',
|
346
|
+
'resource_errors',
|
344
347
|
'return_line_items',
|
345
348
|
'returns',
|
346
349
|
'satispay_gateways',
|
@@ -2,14 +2,14 @@ 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.
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.27.0";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
8
8
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
9
9
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
10
10
|
declare class CommerceLayerClient {
|
11
11
|
#private;
|
12
|
-
readonly openApiSchemaVersion = "4.
|
12
|
+
readonly openApiSchemaVersion = "4.27.0";
|
13
13
|
addresses: api.Addresses;
|
14
14
|
adjustments: api.Adjustments;
|
15
15
|
adyen_gateways: api.AdyenGateways;
|
@@ -97,6 +97,7 @@ declare class CommerceLayerClient {
|
|
97
97
|
recurring_order_copies: api.RecurringOrderCopies;
|
98
98
|
refunds: api.Refunds;
|
99
99
|
reserved_stocks: api.ReservedStocks;
|
100
|
+
resource_errors: api.ResourceErrors;
|
100
101
|
return_line_items: api.ReturnLineItems;
|
101
102
|
returns: api.Returns;
|
102
103
|
satispay_gateways: api.SatispayGateways;
|
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 = '4.
|
48
|
+
const OPEN_API_SCHEMA_VERSION = '4.27.0';
|
49
49
|
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
50
50
|
class CommerceLayerClient {
|
51
51
|
// ##__CL_RESOURCES_DEF_STOP__##
|
@@ -147,6 +147,7 @@ class CommerceLayerClient {
|
|
147
147
|
this.recurring_order_copies = new api.RecurringOrderCopies(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
148
148
|
this.refunds = new api.Refunds(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
149
149
|
this.reserved_stocks = new api.ReservedStocks(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
150
|
+
this.resource_errors = new api.ResourceErrors(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
150
151
|
this.return_line_items = new api.ReturnLineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
151
152
|
this.returns = new api.Returns(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
152
153
|
this.satispay_gateways = new api.SatispayGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
package/lib/cjs/model.d.ts
CHANGED
@@ -88,6 +88,7 @@ export type { Promotion } from './resources/promotions';
|
|
88
88
|
export type { RecurringOrderCopy, RecurringOrderCopyCreate, RecurringOrderCopyUpdate } from './resources/recurring_order_copies';
|
89
89
|
export type { Refund } from './resources/refunds';
|
90
90
|
export type { ReservedStock } from './resources/reserved_stocks';
|
91
|
+
export type { ResourceError } from './resources/resource_errors';
|
91
92
|
export type { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate } from './resources/return_line_items';
|
92
93
|
export type { Return, ReturnCreate, ReturnUpdate } from './resources/returns';
|
93
94
|
export type { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate } from './resources/satispay_gateways';
|
@@ -2,13 +2,13 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market, MarketType } from './markets';
|
5
|
-
import type { PromotionRule
|
5
|
+
import type { PromotionRule } from './promotion_rules';
|
6
6
|
import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
|
7
7
|
import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
|
8
8
|
import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
|
9
9
|
import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
|
10
|
-
import type { Coupon, CouponType } from './coupons';
|
11
10
|
import type { SkuList, SkuListType } from './sku_lists';
|
11
|
+
import type { Coupon } from './coupons';
|
12
12
|
import type { Attachment } from './attachments';
|
13
13
|
import type { Event } from './events';
|
14
14
|
import type { Tag, TagType } from './tags';
|
@@ -21,9 +21,6 @@ type BuyXPayYPromotionRel = ResourceRel & {
|
|
21
21
|
type MarketRel = ResourceRel & {
|
22
22
|
type: MarketType;
|
23
23
|
};
|
24
|
-
type PromotionRuleRel = ResourceRel & {
|
25
|
-
type: PromotionRuleType;
|
26
|
-
};
|
27
24
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
28
25
|
type: OrderAmountPromotionRuleType;
|
29
26
|
};
|
@@ -36,9 +33,6 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
|
|
36
33
|
type CustomPromotionRuleRel = ResourceRel & {
|
37
34
|
type: CustomPromotionRuleType;
|
38
35
|
};
|
39
|
-
type CouponRel = ResourceRel & {
|
40
|
-
type: CouponType;
|
41
|
-
};
|
42
36
|
type SkuListRel = ResourceRel & {
|
43
37
|
type: SkuListType;
|
44
38
|
};
|
@@ -66,8 +60,8 @@ interface BuyXPayYPromotion extends Resource {
|
|
66
60
|
sku_list_promotion_rule?: SkuListPromotionRule | null;
|
67
61
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
|
68
62
|
custom_promotion_rule?: CustomPromotionRule | null;
|
69
|
-
coupons?: Coupon[] | null;
|
70
63
|
sku_list?: SkuList | null;
|
64
|
+
coupons?: Coupon[] | null;
|
71
65
|
attachments?: Attachment[] | null;
|
72
66
|
events?: Event[] | null;
|
73
67
|
tags?: Tag[] | null;
|
@@ -88,12 +82,10 @@ interface BuyXPayYPromotionCreate extends ResourceCreate {
|
|
88
82
|
y: number;
|
89
83
|
cheapest_free?: boolean | null;
|
90
84
|
market?: MarketRel | null;
|
91
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
92
85
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
93
86
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
94
87
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
95
88
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
96
|
-
coupons?: CouponRel[] | null;
|
97
89
|
sku_list: SkuListRel;
|
98
90
|
tags?: TagRel[] | null;
|
99
91
|
}
|
@@ -111,12 +103,10 @@ interface BuyXPayYPromotionUpdate extends ResourceUpdate {
|
|
111
103
|
y?: number | null;
|
112
104
|
cheapest_free?: boolean | null;
|
113
105
|
market?: MarketRel | null;
|
114
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
115
106
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
116
107
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
117
108
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
118
109
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
119
|
-
coupons?: CouponRel[] | null;
|
120
110
|
sku_list?: SkuListRel | null;
|
121
111
|
tags?: TagRel[] | null;
|
122
112
|
}
|
@@ -130,8 +120,8 @@ declare class BuyXPayYPromotions extends ApiResource<BuyXPayYPromotion> {
|
|
130
120
|
sku_list_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
131
121
|
coupon_codes_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
132
122
|
custom_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
133
|
-
coupons(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
134
123
|
sku_list(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
124
|
+
coupons(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
135
125
|
attachments(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
136
126
|
events(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
137
127
|
tags(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
@@ -31,14 +31,14 @@ class BuyXPayYPromotions extends resource_1.ApiResource {
|
|
31
31
|
const _buyXPayYPromotionId = buyXPayYPromotionId.id || buyXPayYPromotionId;
|
32
32
|
return this.resources.fetch({ type: 'custom_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/custom_promotion_rule`, params, options);
|
33
33
|
}
|
34
|
-
async coupons(buyXPayYPromotionId, params, options) {
|
35
|
-
const _buyXPayYPromotionId = buyXPayYPromotionId.id || buyXPayYPromotionId;
|
36
|
-
return this.resources.fetch({ type: 'coupons' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupons`, params, options);
|
37
|
-
}
|
38
34
|
async sku_list(buyXPayYPromotionId, params, options) {
|
39
35
|
const _buyXPayYPromotionId = buyXPayYPromotionId.id || buyXPayYPromotionId;
|
40
36
|
return this.resources.fetch({ type: 'sku_lists' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list`, params, options);
|
41
37
|
}
|
38
|
+
async coupons(buyXPayYPromotionId, params, options) {
|
39
|
+
const _buyXPayYPromotionId = buyXPayYPromotionId.id || buyXPayYPromotionId;
|
40
|
+
return this.resources.fetch({ type: 'coupons' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupons`, params, options);
|
41
|
+
}
|
42
42
|
async attachments(buyXPayYPromotionId, params, options) {
|
43
43
|
const _buyXPayYPromotionId = buyXPayYPromotionId.id || buyXPayYPromotionId;
|
44
44
|
return this.resources.fetch({ type: 'attachments' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/attachments`, params, options);
|
@@ -2,13 +2,13 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market, MarketType } from './markets';
|
5
|
-
import type { PromotionRule
|
5
|
+
import type { PromotionRule } from './promotion_rules';
|
6
6
|
import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
|
7
7
|
import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
|
8
8
|
import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
|
9
9
|
import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
|
10
|
-
import type { Coupon, CouponType } from './coupons';
|
11
10
|
import type { SkuList, SkuListType } from './sku_lists';
|
11
|
+
import type { Coupon } from './coupons';
|
12
12
|
import type { Attachment } from './attachments';
|
13
13
|
import type { Event } from './events';
|
14
14
|
import type { Tag, TagType } from './tags';
|
@@ -21,9 +21,6 @@ type ExternalPromotionRel = ResourceRel & {
|
|
21
21
|
type MarketRel = ResourceRel & {
|
22
22
|
type: MarketType;
|
23
23
|
};
|
24
|
-
type PromotionRuleRel = ResourceRel & {
|
25
|
-
type: PromotionRuleType;
|
26
|
-
};
|
27
24
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
28
25
|
type: OrderAmountPromotionRuleType;
|
29
26
|
};
|
@@ -36,9 +33,6 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
|
|
36
33
|
type CustomPromotionRuleRel = ResourceRel & {
|
37
34
|
type: CustomPromotionRuleType;
|
38
35
|
};
|
39
|
-
type CouponRel = ResourceRel & {
|
40
|
-
type: CouponType;
|
41
|
-
};
|
42
36
|
type SkuListRel = ResourceRel & {
|
43
37
|
type: SkuListType;
|
44
38
|
};
|
@@ -65,8 +59,8 @@ interface ExternalPromotion extends Resource {
|
|
65
59
|
sku_list_promotion_rule?: SkuListPromotionRule | null;
|
66
60
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
|
67
61
|
custom_promotion_rule?: CustomPromotionRule | null;
|
68
|
-
coupons?: Coupon[] | null;
|
69
62
|
sku_list?: SkuList | null;
|
63
|
+
coupons?: Coupon[] | null;
|
70
64
|
attachments?: Attachment[] | null;
|
71
65
|
events?: Event[] | null;
|
72
66
|
tags?: Tag[] | null;
|
@@ -85,12 +79,10 @@ interface ExternalPromotionCreate extends ResourceCreate {
|
|
85
79
|
_enable?: boolean | null;
|
86
80
|
promotion_url: string;
|
87
81
|
market?: MarketRel | null;
|
88
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
89
82
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
90
83
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
91
84
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
92
85
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
93
|
-
coupons?: CouponRel[] | null;
|
94
86
|
sku_list?: SkuListRel | null;
|
95
87
|
tags?: TagRel[] | null;
|
96
88
|
}
|
@@ -106,12 +98,10 @@ interface ExternalPromotionUpdate extends ResourceUpdate {
|
|
106
98
|
_enable?: boolean | null;
|
107
99
|
promotion_url?: string | null;
|
108
100
|
market?: MarketRel | null;
|
109
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
110
101
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
111
102
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
112
103
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
113
104
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
114
|
-
coupons?: CouponRel[] | null;
|
115
105
|
sku_list?: SkuListRel | null;
|
116
106
|
tags?: TagRel[] | null;
|
117
107
|
}
|
@@ -125,8 +115,8 @@ declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
|
|
125
115
|
sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
126
116
|
coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
127
117
|
custom_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
128
|
-
coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
129
118
|
sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
119
|
+
coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
130
120
|
attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
131
121
|
events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
132
122
|
tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
@@ -31,14 +31,14 @@ class ExternalPromotions extends resource_1.ApiResource {
|
|
31
31
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
32
32
|
return this.resources.fetch({ type: 'custom_promotion_rules' }, `external_promotions/${_externalPromotionId}/custom_promotion_rule`, params, options);
|
33
33
|
}
|
34
|
-
async coupons(externalPromotionId, params, options) {
|
35
|
-
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
36
|
-
return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
|
37
|
-
}
|
38
34
|
async sku_list(externalPromotionId, params, options) {
|
39
35
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
40
36
|
return this.resources.fetch({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options);
|
41
37
|
}
|
38
|
+
async coupons(externalPromotionId, params, options) {
|
39
|
+
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
40
|
+
return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
|
41
|
+
}
|
42
42
|
async attachments(externalPromotionId, params, options) {
|
43
43
|
const _externalPromotionId = externalPromotionId.id || externalPromotionId;
|
44
44
|
return this.resources.fetch({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options);
|
@@ -2,13 +2,13 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market, MarketType } from './markets';
|
5
|
-
import type { PromotionRule
|
5
|
+
import type { PromotionRule } from './promotion_rules';
|
6
6
|
import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
|
7
7
|
import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
|
8
8
|
import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
|
9
9
|
import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
|
10
|
-
import type { Coupon, CouponType } from './coupons';
|
11
10
|
import type { SkuList, SkuListType } from './sku_lists';
|
11
|
+
import type { Coupon } from './coupons';
|
12
12
|
import type { Attachment } from './attachments';
|
13
13
|
import type { Event } from './events';
|
14
14
|
import type { Tag, TagType } from './tags';
|
@@ -21,9 +21,6 @@ type FixedAmountPromotionRel = ResourceRel & {
|
|
21
21
|
type MarketRel = ResourceRel & {
|
22
22
|
type: MarketType;
|
23
23
|
};
|
24
|
-
type PromotionRuleRel = ResourceRel & {
|
25
|
-
type: PromotionRuleType;
|
26
|
-
};
|
27
24
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
28
25
|
type: OrderAmountPromotionRuleType;
|
29
26
|
};
|
@@ -36,9 +33,6 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
|
|
36
33
|
type CustomPromotionRuleRel = ResourceRel & {
|
37
34
|
type: CustomPromotionRuleType;
|
38
35
|
};
|
39
|
-
type CouponRel = ResourceRel & {
|
40
|
-
type: CouponType;
|
41
|
-
};
|
42
36
|
type SkuListRel = ResourceRel & {
|
43
37
|
type: SkuListType;
|
44
38
|
};
|
@@ -66,8 +60,8 @@ interface FixedAmountPromotion extends Resource {
|
|
66
60
|
sku_list_promotion_rule?: SkuListPromotionRule | null;
|
67
61
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
|
68
62
|
custom_promotion_rule?: CustomPromotionRule | null;
|
69
|
-
coupons?: Coupon[] | null;
|
70
63
|
sku_list?: SkuList | null;
|
64
|
+
coupons?: Coupon[] | null;
|
71
65
|
attachments?: Attachment[] | null;
|
72
66
|
events?: Event[] | null;
|
73
67
|
tags?: Tag[] | null;
|
@@ -86,12 +80,10 @@ interface FixedAmountPromotionCreate extends ResourceCreate {
|
|
86
80
|
_enable?: boolean | null;
|
87
81
|
fixed_amount_cents: number;
|
88
82
|
market?: MarketRel | null;
|
89
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
90
83
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
91
84
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
92
85
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
93
86
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
94
|
-
coupons?: CouponRel[] | null;
|
95
87
|
sku_list?: SkuListRel | null;
|
96
88
|
tags?: TagRel[] | null;
|
97
89
|
}
|
@@ -107,12 +99,10 @@ interface FixedAmountPromotionUpdate extends ResourceUpdate {
|
|
107
99
|
_enable?: boolean | null;
|
108
100
|
fixed_amount_cents?: number | null;
|
109
101
|
market?: MarketRel | null;
|
110
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
111
102
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
112
103
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
113
104
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
114
105
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
115
|
-
coupons?: CouponRel[] | null;
|
116
106
|
sku_list?: SkuListRel | null;
|
117
107
|
tags?: TagRel[] | null;
|
118
108
|
}
|
@@ -126,8 +116,8 @@ declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
|
|
126
116
|
sku_list_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
127
117
|
coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
128
118
|
custom_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
129
|
-
coupons(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
130
119
|
sku_list(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
120
|
+
coupons(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
131
121
|
attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
132
122
|
events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
133
123
|
tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
@@ -31,14 +31,14 @@ class FixedAmountPromotions extends resource_1.ApiResource {
|
|
31
31
|
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
32
32
|
return this.resources.fetch({ type: 'custom_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/custom_promotion_rule`, params, options);
|
33
33
|
}
|
34
|
-
async coupons(fixedAmountPromotionId, params, options) {
|
35
|
-
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
36
|
-
return this.resources.fetch({ type: 'coupons' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options);
|
37
|
-
}
|
38
34
|
async sku_list(fixedAmountPromotionId, params, options) {
|
39
35
|
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
40
36
|
return this.resources.fetch({ type: 'sku_lists' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list`, params, options);
|
41
37
|
}
|
38
|
+
async coupons(fixedAmountPromotionId, params, options) {
|
39
|
+
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
40
|
+
return this.resources.fetch({ type: 'coupons' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options);
|
41
|
+
}
|
42
42
|
async attachments(fixedAmountPromotionId, params, options) {
|
43
43
|
const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
|
44
44
|
return this.resources.fetch({ type: 'attachments' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/attachments`, params, options);
|
@@ -2,13 +2,13 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market, MarketType } from './markets';
|
5
|
-
import type { PromotionRule
|
5
|
+
import type { PromotionRule } from './promotion_rules';
|
6
6
|
import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
|
7
7
|
import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
|
8
8
|
import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
|
9
9
|
import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
|
10
|
-
import type { Coupon, CouponType } from './coupons';
|
11
10
|
import type { SkuList, SkuListType } from './sku_lists';
|
11
|
+
import type { Coupon } from './coupons';
|
12
12
|
import type { Attachment } from './attachments';
|
13
13
|
import type { Event } from './events';
|
14
14
|
import type { Tag, TagType } from './tags';
|
@@ -21,9 +21,6 @@ type FixedPricePromotionRel = ResourceRel & {
|
|
21
21
|
type MarketRel = ResourceRel & {
|
22
22
|
type: MarketType;
|
23
23
|
};
|
24
|
-
type PromotionRuleRel = ResourceRel & {
|
25
|
-
type: PromotionRuleType;
|
26
|
-
};
|
27
24
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
28
25
|
type: OrderAmountPromotionRuleType;
|
29
26
|
};
|
@@ -36,9 +33,6 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
|
|
36
33
|
type CustomPromotionRuleRel = ResourceRel & {
|
37
34
|
type: CustomPromotionRuleType;
|
38
35
|
};
|
39
|
-
type CouponRel = ResourceRel & {
|
40
|
-
type: CouponType;
|
41
|
-
};
|
42
36
|
type SkuListRel = ResourceRel & {
|
43
37
|
type: SkuListType;
|
44
38
|
};
|
@@ -66,8 +60,8 @@ interface FixedPricePromotion extends Resource {
|
|
66
60
|
sku_list_promotion_rule?: SkuListPromotionRule | null;
|
67
61
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
|
68
62
|
custom_promotion_rule?: CustomPromotionRule | null;
|
69
|
-
coupons?: Coupon[] | null;
|
70
63
|
sku_list?: SkuList | null;
|
64
|
+
coupons?: Coupon[] | null;
|
71
65
|
attachments?: Attachment[] | null;
|
72
66
|
events?: Event[] | null;
|
73
67
|
tags?: Tag[] | null;
|
@@ -86,12 +80,10 @@ interface FixedPricePromotionCreate extends ResourceCreate {
|
|
86
80
|
_enable?: boolean | null;
|
87
81
|
fixed_amount_cents: number;
|
88
82
|
market?: MarketRel | null;
|
89
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
90
83
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
91
84
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
92
85
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
93
86
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
94
|
-
coupons?: CouponRel[] | null;
|
95
87
|
sku_list: SkuListRel;
|
96
88
|
tags?: TagRel[] | null;
|
97
89
|
}
|
@@ -107,12 +99,10 @@ interface FixedPricePromotionUpdate extends ResourceUpdate {
|
|
107
99
|
_enable?: boolean | null;
|
108
100
|
fixed_amount_cents?: number | null;
|
109
101
|
market?: MarketRel | null;
|
110
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
111
102
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
112
103
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
113
104
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
114
105
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
115
|
-
coupons?: CouponRel[] | null;
|
116
106
|
sku_list?: SkuListRel | null;
|
117
107
|
tags?: TagRel[] | null;
|
118
108
|
}
|
@@ -126,8 +116,8 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
|
|
126
116
|
sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
127
117
|
coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
128
118
|
custom_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
129
|
-
coupons(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
130
119
|
sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
120
|
+
coupons(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
131
121
|
attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
132
122
|
events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
133
123
|
tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
@@ -31,14 +31,14 @@ class FixedPricePromotions extends resource_1.ApiResource {
|
|
31
31
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
32
32
|
return this.resources.fetch({ type: 'custom_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/custom_promotion_rule`, params, options);
|
33
33
|
}
|
34
|
-
async coupons(fixedPricePromotionId, params, options) {
|
35
|
-
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
36
|
-
return this.resources.fetch({ type: 'coupons' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options);
|
37
|
-
}
|
38
34
|
async sku_list(fixedPricePromotionId, params, options) {
|
39
35
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
40
36
|
return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
|
41
37
|
}
|
38
|
+
async coupons(fixedPricePromotionId, params, options) {
|
39
|
+
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
40
|
+
return this.resources.fetch({ type: 'coupons' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options);
|
41
|
+
}
|
42
42
|
async attachments(fixedPricePromotionId, params, options) {
|
43
43
|
const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
|
44
44
|
return this.resources.fetch({ type: 'attachments' }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options);
|
@@ -2,13 +2,13 @@ import { ApiResource } from '../resource';
|
|
2
2
|
import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
|
3
3
|
import type { QueryParamsRetrieve, QueryParamsList } from '../query';
|
4
4
|
import type { Market, MarketType } from './markets';
|
5
|
-
import type { PromotionRule
|
5
|
+
import type { PromotionRule } from './promotion_rules';
|
6
6
|
import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
|
7
7
|
import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
|
8
8
|
import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
|
9
9
|
import type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules';
|
10
|
-
import type { Coupon, CouponType } from './coupons';
|
11
10
|
import type { SkuList, SkuListType } from './sku_lists';
|
11
|
+
import type { Coupon } from './coupons';
|
12
12
|
import type { Attachment } from './attachments';
|
13
13
|
import type { Event } from './events';
|
14
14
|
import type { Tag, TagType } from './tags';
|
@@ -21,9 +21,6 @@ type FreeGiftPromotionRel = ResourceRel & {
|
|
21
21
|
type MarketRel = ResourceRel & {
|
22
22
|
type: MarketType;
|
23
23
|
};
|
24
|
-
type PromotionRuleRel = ResourceRel & {
|
25
|
-
type: PromotionRuleType;
|
26
|
-
};
|
27
24
|
type OrderAmountPromotionRuleRel = ResourceRel & {
|
28
25
|
type: OrderAmountPromotionRuleType;
|
29
26
|
};
|
@@ -36,9 +33,6 @@ type CouponCodesPromotionRuleRel = ResourceRel & {
|
|
36
33
|
type CustomPromotionRuleRel = ResourceRel & {
|
37
34
|
type: CustomPromotionRuleType;
|
38
35
|
};
|
39
|
-
type CouponRel = ResourceRel & {
|
40
|
-
type: CouponType;
|
41
|
-
};
|
42
36
|
type SkuListRel = ResourceRel & {
|
43
37
|
type: SkuListType;
|
44
38
|
};
|
@@ -64,8 +58,8 @@ interface FreeGiftPromotion extends Resource {
|
|
64
58
|
sku_list_promotion_rule?: SkuListPromotionRule | null;
|
65
59
|
coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
|
66
60
|
custom_promotion_rule?: CustomPromotionRule | null;
|
67
|
-
coupons?: Coupon[] | null;
|
68
61
|
sku_list?: SkuList | null;
|
62
|
+
coupons?: Coupon[] | null;
|
69
63
|
attachments?: Attachment[] | null;
|
70
64
|
events?: Event[] | null;
|
71
65
|
tags?: Tag[] | null;
|
@@ -84,12 +78,10 @@ interface FreeGiftPromotionCreate extends ResourceCreate {
|
|
84
78
|
_enable?: boolean | null;
|
85
79
|
max_quantity?: number | null;
|
86
80
|
market?: MarketRel | null;
|
87
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
88
81
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
89
82
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
90
83
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
91
84
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
92
|
-
coupons?: CouponRel[] | null;
|
93
85
|
sku_list: SkuListRel;
|
94
86
|
tags?: TagRel[] | null;
|
95
87
|
}
|
@@ -105,12 +97,10 @@ interface FreeGiftPromotionUpdate extends ResourceUpdate {
|
|
105
97
|
_enable?: boolean | null;
|
106
98
|
max_quantity?: number | null;
|
107
99
|
market?: MarketRel | null;
|
108
|
-
promotion_rules?: PromotionRuleRel[] | null;
|
109
100
|
order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
|
110
101
|
sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
|
111
102
|
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
|
112
103
|
custom_promotion_rule?: CustomPromotionRuleRel | null;
|
113
|
-
coupons?: CouponRel[] | null;
|
114
104
|
sku_list?: SkuListRel | null;
|
115
105
|
tags?: TagRel[] | null;
|
116
106
|
}
|
@@ -124,8 +114,8 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
|
|
124
114
|
sku_list_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
|
125
115
|
coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
|
126
116
|
custom_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
|
127
|
-
coupons(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
128
117
|
sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
118
|
+
coupons(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
|
129
119
|
attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
130
120
|
events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
131
121
|
tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|