@commercelayer/sdk 5.45.0 → 5.47.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/commercelayer.d.ts +1 -1
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/resources/attachments.d.ts +1 -1
- package/lib/cjs/resources/authorizations.d.ts +1 -1
- package/lib/cjs/resources/authorizations.js +1 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -1
- package/lib/cjs/resources/bing_geocoders.js +1 -1
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/cjs/resources/captures.d.ts +1 -1
- package/lib/cjs/resources/captures.js +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -1
- package/lib/cjs/resources/exports.d.ts +1 -1
- package/lib/cjs/resources/external_promotions.d.ts +1 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/cjs/resources/geocoders.d.ts +1 -1
- package/lib/cjs/resources/geocoders.js +1 -1
- package/lib/cjs/resources/google_geocoders.d.ts +1 -1
- package/lib/cjs/resources/google_geocoders.js +1 -1
- package/lib/cjs/resources/line_items.d.ts +1 -1
- package/lib/cjs/resources/links.d.ts +1 -1
- package/lib/cjs/resources/markets.d.ts +1 -1
- package/lib/cjs/resources/markets.js +1 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -1
- package/lib/cjs/resources/orders.d.ts +1 -1
- package/lib/cjs/resources/parcels.d.ts +1 -1
- package/lib/cjs/resources/paypal_payments.d.ts +1 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/cjs/resources/promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/promotions.d.ts +1 -1
- package/lib/cjs/resources/refunds.d.ts +1 -1
- package/lib/cjs/resources/refunds.js +1 -1
- package/lib/cjs/resources/resource_errors.d.ts +1 -1
- package/lib/cjs/resources/return_line_items.d.ts +1 -1
- package/lib/cjs/resources/returns.d.ts +1 -1
- package/lib/cjs/resources/returns.js +1 -1
- package/lib/cjs/resources/satispay_payments.d.ts +1 -1
- package/lib/cjs/resources/shipments.d.ts +1 -1
- package/lib/cjs/resources/shipments.js +1 -1
- package/lib/cjs/resources/shipping_methods.d.ts +1 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/skus.d.ts +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +1 -1
- package/lib/cjs/util.d.ts +0 -5
- package/lib/esm/commercelayer.d.ts +1 -1
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/resources/attachments.d.ts +1 -1
- package/lib/esm/resources/authorizations.d.ts +1 -1
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/bing_geocoders.d.ts +1 -1
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/esm/resources/captures.d.ts +1 -1
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -1
- package/lib/esm/resources/exports.d.ts +1 -1
- package/lib/esm/resources/external_promotions.d.ts +1 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/esm/resources/geocoders.d.ts +1 -1
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/google_geocoders.d.ts +1 -1
- package/lib/esm/resources/google_geocoders.js +1 -1
- package/lib/esm/resources/line_items.d.ts +1 -1
- package/lib/esm/resources/links.d.ts +1 -1
- package/lib/esm/resources/markets.d.ts +1 -1
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/order_subscription_items.d.ts +1 -1
- package/lib/esm/resources/orders.d.ts +1 -1
- package/lib/esm/resources/parcels.d.ts +1 -1
- package/lib/esm/resources/paypal_payments.d.ts +1 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/esm/resources/promotion_rules.d.ts +1 -1
- package/lib/esm/resources/promotions.d.ts +1 -1
- package/lib/esm/resources/refunds.d.ts +1 -1
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/resource_errors.d.ts +1 -1
- package/lib/esm/resources/return_line_items.d.ts +1 -1
- package/lib/esm/resources/returns.d.ts +1 -1
- package/lib/esm/resources/returns.js +1 -1
- package/lib/esm/resources/satispay_payments.d.ts +1 -1
- package/lib/esm/resources/shipments.d.ts +1 -1
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_methods.d.ts +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/skus.d.ts +1 -1
- package/lib/esm/resources/tax_categories.d.ts +1 -1
- package/lib/esm/util.d.ts +0 -5
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
@@ -1 +1 @@
|
|
1
|
-
import*as api from'./api';import type{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{type ResourcesInitConfig}from'./resource';declare const OPEN_API_SCHEMA_VERSION="
|
1
|
+
import*as api from'./api';import type{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{type ResourcesInitConfig}from'./resource';declare const OPEN_API_SCHEMA_VERSION="6.0.0";export{OPEN_API_SCHEMA_VERSION};type SdkConfig={};type CommerceLayerInitConfig=SdkConfig&ResourcesInitConfig;type CommerceLayerConfig=Partial<CommerceLayerInitConfig>;declare class CommerceLayerClient{#private;readonly openApiSchemaVersion="6.0.0";addresses:api.Addresses;adjustments:api.Adjustments;adyen_gateways:api.AdyenGateways;adyen_payments:api.AdyenPayments;application:api.Applications;attachments:api.Attachments;authorizations:api.Authorizations;avalara_accounts:api.AvalaraAccounts;axerve_gateways:api.AxerveGateways;axerve_payments:api.AxervePayments;billing_info_validation_rules:api.BillingInfoValidationRules;bing_geocoders:api.BingGeocoders;braintree_gateways:api.BraintreeGateways;braintree_payments:api.BraintreePayments;bundles:api.Bundles;buy_x_pay_y_promotions:api.BuyXPayYPromotions;captures:api.Captures;carrier_accounts:api.CarrierAccounts;checkout_com_gateways:api.CheckoutComGateways;checkout_com_payments:api.CheckoutComPayments;cleanups:api.Cleanups;coupon_codes_promotion_rules:api.CouponCodesPromotionRules;coupon_recipients:api.CouponRecipients;coupons:api.Coupons;custom_promotion_rules:api.CustomPromotionRules;customer_addresses:api.CustomerAddresses;customer_groups:api.CustomerGroups;customer_password_resets:api.CustomerPasswordResets;customer_payment_sources:api.CustomerPaymentSources;customer_subscriptions:api.CustomerSubscriptions;customers:api.Customers;delivery_lead_times:api.DeliveryLeadTimes;event_callbacks:api.EventCallbacks;events:api.Events;exports:api.Exports;external_gateways:api.ExternalGateways;external_payments:api.ExternalPayments;external_promotions:api.ExternalPromotions;external_tax_calculators:api.ExternalTaxCalculators;fixed_amount_promotions:api.FixedAmountPromotions;fixed_price_promotions:api.FixedPricePromotions;free_gift_promotions:api.FreeGiftPromotions;free_shipping_promotions:api.FreeShippingPromotions;geocoders:api.Geocoders;gift_card_recipients:api.GiftCardRecipients;gift_cards:api.GiftCards;google_geocoders:api.GoogleGeocoders;imports:api.Imports;in_stock_subscriptions:api.InStockSubscriptions;inventory_models:api.InventoryModels;inventory_return_locations:api.InventoryReturnLocations;inventory_stock_locations:api.InventoryStockLocations;klarna_gateways:api.KlarnaGateways;klarna_payments:api.KlarnaPayments;line_item_options:api.LineItemOptions;line_items:api.LineItems;links:api.Links;manual_gateways:api.ManualGateways;manual_tax_calculators:api.ManualTaxCalculators;markets:api.Markets;merchants:api.Merchants;order_amount_promotion_rules:api.OrderAmountPromotionRules;order_copies:api.OrderCopies;order_factories:api.OrderFactories;order_subscription_items:api.OrderSubscriptionItems;order_subscriptions:api.OrderSubscriptions;orders:api.Orders;organization:api.Organizations;packages:api.Packages;parcel_line_items:api.ParcelLineItems;parcels:api.Parcels;payment_gateways:api.PaymentGateways;payment_methods:api.PaymentMethods;payment_options:api.PaymentOptions;paypal_gateways:api.PaypalGateways;paypal_payments:api.PaypalPayments;percentage_discount_promotions:api.PercentageDiscountPromotions;price_frequency_tiers:api.PriceFrequencyTiers;price_list_schedulers:api.PriceListSchedulers;price_lists:api.PriceLists;price_tiers:api.PriceTiers;price_volume_tiers:api.PriceVolumeTiers;prices:api.Prices;promotion_rules:api.PromotionRules;promotions:api.Promotions;recurring_order_copies:api.RecurringOrderCopies;refunds:api.Refunds;reserved_stocks:api.ReservedStocks;resource_errors:api.ResourceErrors;return_line_items:api.ReturnLineItems;returns:api.Returns;satispay_gateways:api.SatispayGateways;satispay_payments:api.SatispayPayments;shipments:api.Shipments;shipping_categories:api.ShippingCategories;shipping_method_tiers:api.ShippingMethodTiers;shipping_methods:api.ShippingMethods;shipping_weight_tiers:api.ShippingWeightTiers;shipping_zones:api.ShippingZones;sku_list_items:api.SkuListItems;sku_list_promotion_rules:api.SkuListPromotionRules;sku_lists:api.SkuLists;sku_options:api.SkuOptions;skus:api.Skus;stock_items:api.StockItems;stock_line_items:api.StockLineItems;stock_locations:api.StockLocations;stock_reservations:api.StockReservations;stock_transfers:api.StockTransfers;stripe_gateways:api.StripeGateways;stripe_payments:api.StripePayments;subscription_models:api.SubscriptionModels;tags:api.Tags;tax_calculators:api.TaxCalculators;tax_categories:api.TaxCategories;tax_rules:api.TaxRules;taxjar_accounts:api.TaxjarAccounts;transactions:api.Transactions;versions:api.Versions;voids:api.Voids;webhooks:api.Webhooks;wire_transfers:api.WireTransfers;constructor(config:CommerceLayerInitConfig);get currentOrganization():string;private localConfig;config(config:CommerceLayerConfig):CommerceLayerClient;resources():readonly string[];singletons():readonly string[];isSingleton(resource:api.ResourceTypeLock):boolean;isApiError(error:any):error is ApiError;addRequestInterceptor(onFulfilled?:RequestInterceptor|null,onRejected?:ErrorInterceptor|null):number;addResponseInterceptor(onFulfilled?:ResponseInterceptor|null,onRejected?:ErrorInterceptor|null):number;removeInterceptor(type:InterceptorType,id:number):void;addRawResponseReader(options?:{headers:boolean;}):RawResponseReader;removeRawResponseReader(reader:number|RawResponseReader):void;}declare const CommerceLayer:(config:CommerceLayerInitConfig)=>CommerceLayerClient;export default CommerceLayer;export{CommerceLayer};export type{CommerceLayerClient,CommerceLayerConfig,CommerceLayerInitConfig};
|
package/lib/cjs/commercelayer.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,i){i===void 0&&(i=s);var n=Object.getOwnPropertyDescriptor(t,s);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,n)}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,s,i){if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_CommerceLayerClient_adapter,_CommerceLayerClient_organization;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayer=exports.OPEN_API_SCHEMA_VERSION=void 0;const api=__importStar(require("./api")),static_1=require("./static"),resource_1=__importDefault(require("./resource")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)("commercelayer"),OPEN_API_SCHEMA_VERSION="5.4.2";exports.OPEN_API_SCHEMA_VERSION=OPEN_API_SCHEMA_VERSION;class CommerceLayerClient{constructor(t){this.openApiSchemaVersion=OPEN_API_SCHEMA_VERSION,_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),debug("new commercelayer instance %O",t),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(t),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f"),this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.axerve_gateways=new api.AxerveGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.axerve_payments=new api.AxervePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.buy_x_pay_y_promotions=new api.BuyXPayYPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.cleanups=new api.Cleanups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_codes_promotion_rules=new api.CouponCodesPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_recipients=new api.CouponRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupons=new api.Coupons(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.custom_promotion_rules=new api.CustomPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_addresses=new api.CustomerAddresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_groups=new api.CustomerGroups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_password_resets=new api.CustomerPasswordResets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_payment_sources=new api.CustomerPaymentSources(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_subscriptions=new api.CustomerSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customers=new api.Customers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.delivery_lead_times=new api.DeliveryLeadTimes(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.event_callbacks=new api.EventCallbacks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.events=new api.Events(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.exports=new api.Exports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_gateways=new api.ExternalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_payments=new api.ExternalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_promotions=new api.ExternalPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_tax_calculators=new api.ExternalTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_amount_promotions=new api.FixedAmountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_price_promotions=new api.FixedPricePromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_gift_promotions=new api.FreeGiftPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_shipping_promotions=new api.FreeShippingPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.geocoders=new api.Geocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_card_recipients=new api.GiftCardRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_cards=new api.GiftCards(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.google_geocoders=new api.GoogleGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.imports=new api.Imports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.in_stock_subscriptions=new api.InStockSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_models=new api.InventoryModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_return_locations=new api.InventoryReturnLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_stock_locations=new api.InventoryStockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.klarna_gateways=new api.KlarnaGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.klarna_payments=new api.KlarnaPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_item_options=new api.LineItemOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_items=new api.LineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.links=new api.Links(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_gateways=new api.ManualGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_tax_calculators=new api.ManualTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.markets=new api.Markets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.merchants=new api.Merchants(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_amount_promotion_rules=new api.OrderAmountPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_copies=new api.OrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_factories=new api.OrderFactories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_subscription_items=new api.OrderSubscriptionItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_subscriptions=new api.OrderSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.orders=new api.Orders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.organization=new api.Organizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.packages=new api.Packages(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcel_line_items=new api.ParcelLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcels=new api.Parcels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_gateways=new api.PaymentGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_methods=new api.PaymentMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_options=new api.PaymentOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_gateways=new api.PaypalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_payments=new api.PaypalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.percentage_discount_promotions=new api.PercentageDiscountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_frequency_tiers=new api.PriceFrequencyTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_list_schedulers=new api.PriceListSchedulers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_lists=new api.PriceLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_tiers=new api.PriceTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_volume_tiers=new api.PriceVolumeTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.prices=new api.Prices(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotion_rules=new api.PromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotions=new api.Promotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.recurring_order_copies=new api.RecurringOrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.refunds=new api.Refunds(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.reserved_stocks=new api.ReservedStocks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.resource_errors=new api.ResourceErrors(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.return_line_items=new api.ReturnLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.returns=new api.Returns(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.satispay_gateways=new api.SatispayGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.satispay_payments=new api.SatispayPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipments=new api.Shipments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_categories=new api.ShippingCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_method_tiers=new api.ShippingMethodTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_weight_tiers=new api.ShippingWeightTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_zones=new api.ShippingZones(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_items=new api.SkuListItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_promotion_rules=new api.SkuListPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_lists=new api.SkuLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_options=new api.SkuOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.skus=new api.Skus(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_items=new api.StockItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_line_items=new api.StockLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_locations=new api.StockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_reservations=new api.StockReservations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_transfers=new api.StockTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_gateways=new api.StripeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_payments=new api.StripePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.subscription_models=new api.SubscriptionModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tags=new api.Tags(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_calculators=new api.TaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_categories=new api.TaxCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_rules=new api.TaxRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.taxjar_accounts=new api.TaxjarAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.transactions=new api.Transactions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.versions=new api.Versions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.voids=new api.Voids(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.webhooks=new api.Webhooks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.wire_transfers=new api.WireTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"))}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}localConfig(t){t.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f")}config(t){return debug("config %o",t),this.localConfig(t),t.organization||(t.organization=this.currentOrganization),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(t),this}resources(){return static_1.CommerceLayerStatic.resources()}singletons(){return static_1.CommerceLayerStatic.singletons()}isSingleton(t){return static_1.CommerceLayerStatic.isSingleton(t)}isApiError(t){return static_1.CommerceLayerStatic.isApiError(t)}addRequestInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(t,s)}addResponseInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(t,s)}removeInterceptor(t,s){__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[t].eject(s)}addRawResponseReader(t){const s={id:void 0,rawResponse:void 0,headers:void 0};function i(r){return s.rawResponse=r?.data,t?.headers&&(s.headers=r.headers),r}const n=this.addResponseInterceptor(i);return s.id=n,s}removeRawResponseReader(t){const s=typeof t=="number"?t:t?.id;s&&s>=0&&this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);exports.CommerceLayer=CommerceLayer,exports.default=CommerceLayer;
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,i){i===void 0&&(i=s);var n=Object.getOwnPropertyDescriptor(t,s);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,n)}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,s,i){if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_CommerceLayerClient_adapter,_CommerceLayerClient_organization;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayer=exports.OPEN_API_SCHEMA_VERSION=void 0;const api=__importStar(require("./api")),static_1=require("./static"),resource_1=__importDefault(require("./resource")),debug_1=__importDefault(require("./debug")),debug=(0,debug_1.default)("commercelayer"),OPEN_API_SCHEMA_VERSION="6.0.0";exports.OPEN_API_SCHEMA_VERSION=OPEN_API_SCHEMA_VERSION;class CommerceLayerClient{constructor(t){this.openApiSchemaVersion=OPEN_API_SCHEMA_VERSION,_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),debug("new commercelayer instance %O",t),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(t),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f"),this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.axerve_gateways=new api.AxerveGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.axerve_payments=new api.AxervePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.buy_x_pay_y_promotions=new api.BuyXPayYPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.cleanups=new api.Cleanups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_codes_promotion_rules=new api.CouponCodesPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_recipients=new api.CouponRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupons=new api.Coupons(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.custom_promotion_rules=new api.CustomPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_addresses=new api.CustomerAddresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_groups=new api.CustomerGroups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_password_resets=new api.CustomerPasswordResets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_payment_sources=new api.CustomerPaymentSources(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_subscriptions=new api.CustomerSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customers=new api.Customers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.delivery_lead_times=new api.DeliveryLeadTimes(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.event_callbacks=new api.EventCallbacks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.events=new api.Events(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.exports=new api.Exports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_gateways=new api.ExternalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_payments=new api.ExternalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_promotions=new api.ExternalPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_tax_calculators=new api.ExternalTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_amount_promotions=new api.FixedAmountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_price_promotions=new api.FixedPricePromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_gift_promotions=new api.FreeGiftPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_shipping_promotions=new api.FreeShippingPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.geocoders=new api.Geocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_card_recipients=new api.GiftCardRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_cards=new api.GiftCards(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.google_geocoders=new api.GoogleGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.imports=new api.Imports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.in_stock_subscriptions=new api.InStockSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_models=new api.InventoryModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_return_locations=new api.InventoryReturnLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_stock_locations=new api.InventoryStockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.klarna_gateways=new api.KlarnaGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.klarna_payments=new api.KlarnaPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_item_options=new api.LineItemOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_items=new api.LineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.links=new api.Links(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_gateways=new api.ManualGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_tax_calculators=new api.ManualTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.markets=new api.Markets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.merchants=new api.Merchants(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_amount_promotion_rules=new api.OrderAmountPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_copies=new api.OrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_factories=new api.OrderFactories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_subscription_items=new api.OrderSubscriptionItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_subscriptions=new api.OrderSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.orders=new api.Orders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.organization=new api.Organizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.packages=new api.Packages(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcel_line_items=new api.ParcelLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcels=new api.Parcels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_gateways=new api.PaymentGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_methods=new api.PaymentMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_options=new api.PaymentOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_gateways=new api.PaypalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_payments=new api.PaypalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.percentage_discount_promotions=new api.PercentageDiscountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_frequency_tiers=new api.PriceFrequencyTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_list_schedulers=new api.PriceListSchedulers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_lists=new api.PriceLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_tiers=new api.PriceTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_volume_tiers=new api.PriceVolumeTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.prices=new api.Prices(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotion_rules=new api.PromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotions=new api.Promotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.recurring_order_copies=new api.RecurringOrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.refunds=new api.Refunds(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.reserved_stocks=new api.ReservedStocks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.resource_errors=new api.ResourceErrors(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.return_line_items=new api.ReturnLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.returns=new api.Returns(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.satispay_gateways=new api.SatispayGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.satispay_payments=new api.SatispayPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipments=new api.Shipments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_categories=new api.ShippingCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_method_tiers=new api.ShippingMethodTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_weight_tiers=new api.ShippingWeightTiers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_zones=new api.ShippingZones(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_items=new api.SkuListItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_promotion_rules=new api.SkuListPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_lists=new api.SkuLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_options=new api.SkuOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.skus=new api.Skus(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_items=new api.StockItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_line_items=new api.StockLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_locations=new api.StockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_reservations=new api.StockReservations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_transfers=new api.StockTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_gateways=new api.StripeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_payments=new api.StripePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.subscription_models=new api.SubscriptionModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tags=new api.Tags(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_calculators=new api.TaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_categories=new api.TaxCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_rules=new api.TaxRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.taxjar_accounts=new api.TaxjarAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.transactions=new api.Transactions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.versions=new api.Versions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.voids=new api.Voids(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.webhooks=new api.Webhooks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.wire_transfers=new api.WireTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"))}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}localConfig(t){t.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f")}config(t){return debug("config %o",t),this.localConfig(t),t.organization||(t.organization=this.currentOrganization),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(t),this}resources(){return static_1.CommerceLayerStatic.resources()}singletons(){return static_1.CommerceLayerStatic.singletons()}isSingleton(t){return static_1.CommerceLayerStatic.isSingleton(t)}isApiError(t){return static_1.CommerceLayerStatic.isApiError(t)}addRequestInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(t,s)}addResponseInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(t,s)}removeInterceptor(t,s){__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[t].eject(s)}addRawResponseReader(t){const s={id:void 0,rawResponse:void 0,headers:void 0};function i(r){return s.rawResponse=r?.data,t?.headers&&(s.headers=r.headers),r}const n=this.addResponseInterceptor(i);return s.id=n,s}removeRawResponseReader(t){const s=typeof t=="number"?t:t?.id;s&&s>=0&&this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);exports.CommerceLayer=CommerceLayer,exports.default=CommerceLayer;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{Geocoder,GeocoderType}from'./geocoders';import type{PriceList,PriceListType}from'./price_lists';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{Market,MarketType}from'./markets';import type{CustomerGroup,CustomerGroupType}from'./customer_groups';import type{Order,OrderType}from'./orders';import type{Transaction,TransactionType}from'./transactions';import type{Promotion,PromotionType}from'./promotions';import type{TaxCalculator,TaxCalculatorType}from'./tax_calculators';import type{TaxCategory,TaxCategoryType}from'./tax_categories';import type{Sku,SkuType}from'./skus';import type{ShippingCategory,ShippingCategoryType}from'./shipping_categories';import type{Bundle,BundleType}from'./bundles';import type{SkuList,SkuListType}from'./sku_lists';import type{StockItem,StockItemType}from'./stock_items';import type{StockLocation,StockLocationType}from'./stock_locations';import type{Return,ReturnType}from'./returns';import type{CarrierAccount,CarrierAccountType}from'./carrier_accounts';import type{CouponRecipient,CouponRecipientType}from'./coupon_recipients';import type{Customer,CustomerType}from'./customers';import type{DeliveryLeadTime,DeliveryLeadTimeType}from'./delivery_lead_times';import type{ShippingMethod,ShippingMethodType}from'./shipping_methods';import type{GiftCardRecipient,GiftCardRecipientType}from'./gift_card_recipients';import type{GiftCard,GiftCardType}from'./gift_cards';import type{InventoryModel,InventoryModelType}from'./inventory_models';import type{StockTransfer,StockTransferType}from'./stock_transfers';import type{SkuOption,SkuOptionType}from'./sku_options';import type{Merchant,MerchantType}from'./merchants';import type{SubscriptionModel,SubscriptionModelType}from'./subscription_models';import type{Shipment,ShipmentType}from'./shipments';import type{PaymentOption,PaymentOptionType}from'./payment_options';import type{Package,PackageType}from'./packages';import type{Parcel,ParcelType}from'./parcels';import type{Price,PriceType}from'./prices';import type{PriceTier,PriceTierType}from'./price_tiers';import type{ShippingMethodTier,ShippingMethodTierType}from'./shipping_method_tiers';import type{ShippingZone,ShippingZoneType}from'./shipping_zones';type AttachmentType='attachments';type AttachmentRel=ResourceRel&{type:AttachmentType;};type GeocoderRel=ResourceRel&{type:GeocoderType;};type PriceListRel=ResourceRel&{type:PriceListType;};type PaymentMethodRel=ResourceRel&{type:PaymentMethodType;};type MarketRel=ResourceRel&{type:MarketType;};type CustomerGroupRel=ResourceRel&{type:CustomerGroupType;};type OrderRel=ResourceRel&{type:OrderType;};type TransactionRel=ResourceRel&{type:TransactionType;};type PromotionRel=ResourceRel&{type:PromotionType;};type TaxCalculatorRel=ResourceRel&{type:TaxCalculatorType;};type TaxCategoryRel=ResourceRel&{type:TaxCategoryType;};type SkuRel=ResourceRel&{type:SkuType;};type ShippingCategoryRel=ResourceRel&{type:ShippingCategoryType;};type BundleRel=ResourceRel&{type:BundleType;};type SkuListRel=ResourceRel&{type:SkuListType;};type StockItemRel=ResourceRel&{type:StockItemType;};type StockLocationRel=ResourceRel&{type:StockLocationType;};type ReturnRel=ResourceRel&{type:ReturnType;};type CarrierAccountRel=ResourceRel&{type:CarrierAccountType;};type CouponRecipientRel=ResourceRel&{type:CouponRecipientType;};type CustomerRel=ResourceRel&{type:CustomerType;};type DeliveryLeadTimeRel=ResourceRel&{type:DeliveryLeadTimeType;};type ShippingMethodRel=ResourceRel&{type:ShippingMethodType;};type GiftCardRecipientRel=ResourceRel&{type:GiftCardRecipientType;};type GiftCardRel=ResourceRel&{type:GiftCardType;};type InventoryModelRel=ResourceRel&{type:InventoryModelType;};type StockTransferRel=ResourceRel&{type:StockTransferType;};type SkuOptionRel=ResourceRel&{type:SkuOptionType;};type MerchantRel=ResourceRel&{type:MerchantType;};type SubscriptionModelRel=ResourceRel&{type:SubscriptionModelType;};type ShipmentRel=ResourceRel&{type:ShipmentType;};type PaymentOptionRel=ResourceRel&{type:PaymentOptionType;};type PackageRel=ResourceRel&{type:PackageType;};type ParcelRel=ResourceRel&{type:ParcelType;};type PriceRel=ResourceRel&{type:PriceType;};type PriceTierRel=ResourceRel&{type:PriceTierType;};type ShippingMethodTierRel=ResourceRel&{type:ShippingMethodTierType;};type ShippingZoneRel=ResourceRel&{type:ShippingZoneType;};interface Attachment extends Resource{readonly type:AttachmentType;name:string;description?:string|null;url?:string|null;attachable?:Geocoder|PriceList|PaymentMethod|Market|CustomerGroup|Order|Transaction|Promotion|TaxCalculator|TaxCategory|Sku|ShippingCategory|Bundle|SkuList|StockItem|StockLocation|Return|CarrierAccount|CouponRecipient|Customer|DeliveryLeadTime|ShippingMethod|GiftCardRecipient|GiftCard|InventoryModel|StockTransfer|SkuOption|Merchant|SubscriptionModel|Shipment|PaymentOption|Package|Parcel|Price|PriceTier|ShippingMethodTier|ShippingZone|null;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string|null;url?:string|null;attachable:GeocoderRel|PriceListRel|PaymentMethodRel|MarketRel|CustomerGroupRel|OrderRel|TransactionRel|PromotionRel|TaxCalculatorRel|TaxCategoryRel|SkuRel|ShippingCategoryRel|BundleRel|SkuListRel|StockItemRel|StockLocationRel|ReturnRel|CarrierAccountRel|CouponRecipientRel|CustomerRel|DeliveryLeadTimeRel|ShippingMethodRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|StockTransferRel|SkuOptionRel|MerchantRel|SubscriptionModelRel|ShipmentRel|PaymentOptionRel|PackageRel|ParcelRel|PriceRel|PriceTierRel|ShippingMethodTierRel|ShippingZoneRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string|null;description?:string|null;url?:string|null;attachable?:GeocoderRel|PriceListRel|PaymentMethodRel|MarketRel|CustomerGroupRel|OrderRel|TransactionRel|PromotionRel|TaxCalculatorRel|TaxCategoryRel|SkuRel|ShippingCategoryRel|BundleRel|SkuListRel|StockItemRel|StockLocationRel|ReturnRel|CarrierAccountRel|CouponRecipientRel|CustomerRel|DeliveryLeadTimeRel|ShippingMethodRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|StockTransferRel|SkuOptionRel|MerchantRel|SubscriptionModelRel|ShipmentRel|PaymentOptionRel|PackageRel|ParcelRel|PriceRel|PriceTierRel|ShippingMethodTierRel|ShippingZoneRel|null;}declare class Attachments extends ApiResource<Attachment>{static readonly TYPE:AttachmentType;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():AttachmentType;}export default Attachments;export type{Attachment,AttachmentCreate,AttachmentUpdate,AttachmentType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order}from'./orders';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';import type{Capture}from'./captures';import type{Void}from'./voids';type AuthorizationType='authorizations';type AuthorizationRel=ResourceRel&{type:AuthorizationType;};interface Authorization extends Resource{readonly type:AuthorizationType;number:string;currency_code:string;amount_cents:number;amount_float:number;formatted_amount:string;succeeded:boolean;message?:string|null;error_code?:string|null;error_detail?:string|null;token?:string|null;gateway_transaction_id?:string|null;cvv_code?:string|null;cvv_message?:string|null;avs_code?:string|null;avs_message?:string|null;fraud_review?:string|null;capture_amount_cents?:number|null;capture_amount_float?:number|null;formatted_capture_amount?:string|null;capture_balance_cents?:number|null;capture_balance_float?:number|null;formatted_capture_balance?:string|null;void_balance_cents?:number|null;void_balance_float?:number|null;formatted_void_balance?:string|null;order?:Order|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;captures?:Capture[]|null;voids?:Void[]|null;}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean|null;_capture_amount_cents?:number|null;_void?:boolean|null;}declare class Authorizations extends ApiResource<Authorization>{static readonly TYPE:AuthorizationType;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;attachments(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;_capture(id:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;_capture_amount_cents(id:string|Authorization,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;_void(id:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():AuthorizationType;}export default Authorizations;export type{Authorization,AuthorizationUpdate,AuthorizationType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order}from'./orders';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';import type{Capture}from'./captures';import type{Void}from'./voids';type AuthorizationType='authorizations';type AuthorizationRel=ResourceRel&{type:AuthorizationType;};interface Authorization extends Resource{readonly type:AuthorizationType;number:string;currency_code:string;amount_cents:number;amount_float:number;formatted_amount:string;succeeded:boolean;message?:string|null;error_code?:string|null;error_detail?:string|null;token?:string|null;gateway_transaction_id?:string|null;cvv_code?:string|null;cvv_message?:string|null;avs_code?:string|null;avs_message?:string|null;fraud_review?:string|null;capture_amount_cents?:number|null;capture_amount_float?:number|null;formatted_capture_amount?:string|null;capture_balance_cents?:number|null;capture_balance_float?:number|null;formatted_capture_balance?:string|null;void_balance_cents?:number|null;void_balance_float?:number|null;formatted_void_balance?:string|null;order?:Order|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;captures?:Capture[]|null;voids?:Void[]|null;}interface AuthorizationUpdate extends ResourceUpdate{succeeded?:boolean|null;_forward?:boolean|null;_capture?:boolean|null;_capture_amount_cents?:number|null;_void?:boolean|null;}declare class Authorizations extends ApiResource<Authorization>{static readonly TYPE:AuthorizationType;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;attachments(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;_forward(id:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;_capture(id:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;_capture_amount_cents(id:string|Authorization,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;_void(id:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():AuthorizationType;}export default Authorizations;export type{Authorization,AuthorizationUpdate,AuthorizationType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Authorizations extends resource_1.ApiResource{async update(e,t,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Authorizations extends resource_1.ApiResource{async update(e,t,r){return this.resources.update({...e,type:Authorizations.TYPE},t,r)}async order(e,t,r){const s=e.id||e;return this.resources.fetch({type:"orders"},`authorizations/${s}/order`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`authorizations/${s}/attachments`,t,r)}async events(e,t,r){const s=e.id||e;return this.resources.fetch({type:"events"},`authorizations/${s}/events`,t,r)}async versions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"versions"},`authorizations/${s}/versions`,t,r)}async captures(e,t,r){const s=e.id||e;return this.resources.fetch({type:"captures"},`authorizations/${s}/captures`,t,r)}async voids(e,t,r){const s=e.id||e;return this.resources.fetch({type:"voids"},`authorizations/${s}/voids`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Authorizations.TYPE,_forward:!0},t,r)}async _capture(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Authorizations.TYPE,_capture:!0},t,r)}async _capture_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Authorizations.TYPE,_capture_amount_cents:t},r,s)}async _void(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Authorizations.TYPE,_void:!0},t,r)}isAuthorization(e){return e.type&&e.type===Authorizations.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Authorizations.TYPE}:{id:e.id,type:Authorizations.TYPE}}type(){return Authorizations.TYPE}}Authorizations.TYPE="authorizations",exports.default=Authorizations;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';type BingGeocoderType='bing_geocoders';type BingGeocoderRel=ResourceRel&{type:BingGeocoderType;};interface BingGeocoder extends Resource{readonly type:BingGeocoderType;name:string;addresses?:Address[]|null;attachments?:Attachment[]|null;}interface BingGeocoderCreate extends ResourceCreate{name:string;key:string;}interface BingGeocoderUpdate extends ResourceUpdate{name?:string|null;key?:string|null;}declare class BingGeocoders extends ApiResource<BingGeocoder>{static readonly TYPE:BingGeocoderType;create(resource:BingGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;update(resource:BingGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;addresses(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBingGeocoder(resource:any):resource is BingGeocoder;relationship(id:string|ResourceId|null):BingGeocoderRel;type():BingGeocoderType;}export default BingGeocoders;export type{BingGeocoder,BingGeocoderCreate,BingGeocoderUpdate,BingGeocoderType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market}from'./markets';import type{Address}from'./addresses';import type{Attachment}from'./attachments';type BingGeocoderType='bing_geocoders';type BingGeocoderRel=ResourceRel&{type:BingGeocoderType;};interface BingGeocoder extends Resource{readonly type:BingGeocoderType;name:string;markets?:Market[]|null;addresses?:Address[]|null;attachments?:Attachment[]|null;}interface BingGeocoderCreate extends ResourceCreate{name:string;key:string;}interface BingGeocoderUpdate extends ResourceUpdate{name?:string|null;key?:string|null;}declare class BingGeocoders extends ApiResource<BingGeocoder>{static readonly TYPE:BingGeocoderType;create(resource:BingGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;update(resource:BingGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BingGeocoder>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;markets(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;addresses(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(bingGeocoderId:string|BingGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isBingGeocoder(resource:any):resource is BingGeocoder;relationship(id:string|ResourceId|null):BingGeocoderRel;type():BingGeocoderType;}export default BingGeocoders;export type{BingGeocoder,BingGeocoderCreate,BingGeocoderUpdate,BingGeocoderType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BingGeocoders extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:BingGeocoders.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:BingGeocoders.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:BingGeocoders.TYPE}:e,t)}async addresses(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`bing_geocoders/${r}/addresses`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`bing_geocoders/${r}/attachments`,t,s)}isBingGeocoder(e){return e.type&&e.type===BingGeocoders.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:BingGeocoders.TYPE}:{id:e.id,type:BingGeocoders.TYPE}}type(){return BingGeocoders.TYPE}}BingGeocoders.TYPE="bing_geocoders",exports.default=BingGeocoders;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class BingGeocoders extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:BingGeocoders.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:BingGeocoders.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:BingGeocoders.TYPE}:e,t)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`bing_geocoders/${r}/markets`,t,s)}async addresses(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`bing_geocoders/${r}/addresses`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`bing_geocoders/${r}/attachments`,t,s)}isBingGeocoder(e){return e.type&&e.type===BingGeocoders.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:BingGeocoders.TYPE}:{id:e.id,type:BingGeocoders.TYPE}}type(){return BingGeocoders.TYPE}}BingGeocoders.TYPE="bing_geocoders",exports.default=BingGeocoders;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{OrderAmountPromotionRule,OrderAmountPromotionRuleType}from'./order_amount_promotion_rules';import type{SkuListPromotionRule,SkuListPromotionRuleType}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule,CouponCodesPromotionRuleType}from'./coupon_codes_promotion_rules';import type{CustomPromotionRule,CustomPromotionRuleType}from'./custom_promotion_rules';import type{SkuList,SkuListType}from'./sku_lists';import type{Coupon}from'./coupons';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';import type{Sku}from'./skus';import type{PromotionRule}from'./promotion_rules';type BuyXPayYPromotionType='buy_x_pay_y_promotions';type BuyXPayYPromotionRel=ResourceRel&{type:BuyXPayYPromotionType;};type MarketRel=ResourceRel&{type:MarketType;};type OrderAmountPromotionRuleRel=ResourceRel&{type:OrderAmountPromotionRuleType;};type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};type CouponCodesPromotionRuleRel=ResourceRel&{type:CouponCodesPromotionRuleType;};type CustomPromotionRuleRel=ResourceRel&{type:CustomPromotionRuleType;};type SkuListRel=ResourceRel&{type:SkuListType;};type TagRel=ResourceRel&{type:TagType;};interface BuyXPayYPromotion extends Resource{readonly type:BuyXPayYPromotionType;name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;total_usage_count?:number|null;active?:boolean|null;status?:'expired'|'pending'|'active'|'inactive'|'disabled'|null;disabled_at?:string|null;x:number;y:number;cheapest_free?:boolean|null;market?:Market|null;promotion_rules?:PromotionRule[]|null;order_amount_promotion_rule?:OrderAmountPromotionRule|null;sku_list_promotion_rule?:SkuListPromotionRule|null;coupon_codes_promotion_rule?:CouponCodesPromotionRule|null;custom_promotion_rule?:CustomPromotionRule|null;sku_list?:SkuList|null;coupons?:Coupon[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;skus?:Sku[]|null;}interface BuyXPayYPromotionCreate extends ResourceCreate{name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;x:number;y:number;cheapest_free?:boolean|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list:SkuListRel;tags?:TagRel[]|null;}interface BuyXPayYPromotionUpdate extends ResourceUpdate{name?:string|null;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at?:string|null;expires_at?:string|null;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;x?:number|null;y?:number|null;cheapest_free?:boolean|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}declare class BuyXPayYPromotions extends ApiResource<BuyXPayYPromotion>{static readonly TYPE:BuyXPayYPromotionType;create(resource:BuyXPayYPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BuyXPayYPromotion>;update(resource:BuyXPayYPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BuyXPayYPromotion>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;skus(buyXPayYPromotionId:string|BuyXPayYPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;_disable(id:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BuyXPayYPromotion>;_enable(id:string|BuyXPayYPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<BuyXPayYPromotion>;isBuyXPayYPromotion(resource:any):resource is BuyXPayYPromotion;relationship(id:string|ResourceId|null):BuyXPayYPromotionRel;type():BuyXPayYPromotionType;}export default BuyXPayYPromotions;export type{BuyXPayYPromotion,BuyXPayYPromotionCreate,BuyXPayYPromotionUpdate,BuyXPayYPromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order}from'./orders';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';import type{Authorization}from'./authorizations';import type{Refund}from'./refunds';type CaptureType='captures';type CaptureRel=ResourceRel&{type:CaptureType;};interface Capture extends Resource{readonly type:CaptureType;number:string;currency_code:string;amount_cents:number;amount_float:number;formatted_amount:string;succeeded:boolean;message?:string|null;error_code?:string|null;error_detail?:string|null;token?:string|null;gateway_transaction_id?:string|null;refund_amount_cents?:number|null;refund_amount_float?:number|null;formatted_refund_amount?:string|null;refund_balance_cents?:number|null;refund_balance_float?:number|null;formatted_refund_balance?:string|null;order?:Order|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;reference_authorization?:Authorization|null;refunds?:Refund[]|null;}interface CaptureUpdate extends ResourceUpdate{_refund?:boolean|null;_refund_amount_cents?:number|null;}declare class Captures extends ApiResource<Capture>{static readonly TYPE:CaptureType;update(resource:CaptureUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;order(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;attachments(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;reference_authorization(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;refunds(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;_refund(id:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;_refund_amount_cents(id:string|Capture,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;isCapture(resource:any):resource is Capture;relationship(id:string|ResourceId|null):CaptureRel;type():CaptureType;}export default Captures;export type{Capture,CaptureUpdate,CaptureType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order}from'./orders';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';import type{Authorization}from'./authorizations';import type{Refund}from'./refunds';import type{Return}from'./returns';type CaptureType='captures';type CaptureRel=ResourceRel&{type:CaptureType;};interface Capture extends Resource{readonly type:CaptureType;number:string;currency_code:string;amount_cents:number;amount_float:number;formatted_amount:string;succeeded:boolean;message?:string|null;error_code?:string|null;error_detail?:string|null;token?:string|null;gateway_transaction_id?:string|null;refund_amount_cents?:number|null;refund_amount_float?:number|null;formatted_refund_amount?:string|null;refund_balance_cents?:number|null;refund_balance_float?:number|null;formatted_refund_balance?:string|null;order?:Order|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;reference_authorization?:Authorization|null;refunds?:Refund[]|null;return?:Return|null;}interface CaptureUpdate extends ResourceUpdate{succeeded?:boolean|null;_forward?:boolean|null;_refund?:boolean|null;_refund_amount_cents?:number|null;}declare class Captures extends ApiResource<Capture>{static readonly TYPE:CaptureType;update(resource:CaptureUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;order(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;attachments(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;reference_authorization(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;refunds(captureId:string|Capture,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;return(captureId:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_forward(id:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;_refund(id:string|Capture,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;_refund_amount_cents(id:string|Capture,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;isCapture(resource:any):resource is Capture;relationship(id:string|ResourceId|null):CaptureRel;type():CaptureType;}export default Captures;export type{Capture,CaptureUpdate,CaptureType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Captures extends resource_1.ApiResource{async update(e,t,r){return this.resources.update({...e,type:Captures.TYPE},t,r)}async order(e,t,r){const s=e.id||e;return this.resources.fetch({type:"orders"},`captures/${s}/order`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`captures/${s}/attachments`,t,r)}async events(e,t,r){const s=e.id||e;return this.resources.fetch({type:"events"},`captures/${s}/events`,t,r)}async versions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"versions"},`captures/${s}/versions`,t,r)}async reference_authorization(e,t,r){const s=e.id||e;return this.resources.fetch({type:"authorizations"},`captures/${s}/reference_authorization`,t,r)}async refunds(e,t,r){const s=e.id||e;return this.resources.fetch({type:"refunds"},`captures/${s}/refunds`,t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Captures.TYPE,_refund:!0},t,r)}async _refund_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Captures.TYPE,_refund_amount_cents:t},r,s)}isCapture(e){return e.type&&e.type===Captures.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Captures.TYPE}:{id:e.id,type:Captures.TYPE}}type(){return Captures.TYPE}}Captures.TYPE="captures",exports.default=Captures;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Captures extends resource_1.ApiResource{async update(e,t,r){return this.resources.update({...e,type:Captures.TYPE},t,r)}async order(e,t,r){const s=e.id||e;return this.resources.fetch({type:"orders"},`captures/${s}/order`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`captures/${s}/attachments`,t,r)}async events(e,t,r){const s=e.id||e;return this.resources.fetch({type:"events"},`captures/${s}/events`,t,r)}async versions(e,t,r){const s=e.id||e;return this.resources.fetch({type:"versions"},`captures/${s}/versions`,t,r)}async reference_authorization(e,t,r){const s=e.id||e;return this.resources.fetch({type:"authorizations"},`captures/${s}/reference_authorization`,t,r)}async refunds(e,t,r){const s=e.id||e;return this.resources.fetch({type:"refunds"},`captures/${s}/refunds`,t,r)}async return(e,t,r){const s=e.id||e;return this.resources.fetch({type:"returns"},`captures/${s}/return`,t,r)}async _forward(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Captures.TYPE,_forward:!0},t,r)}async _refund(e,t,r){return this.resources.update({id:typeof e=="string"?e:e.id,type:Captures.TYPE,_refund:!0},t,r)}async _refund_amount_cents(e,t,r,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Captures.TYPE,_refund_amount_cents:t},r,s)}isCapture(e){return e.type&&e.type===Captures.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Captures.TYPE}:{id:e.id,type:Captures.TYPE}}type(){return Captures.TYPE}}Captures.TYPE="captures",exports.default=Captures;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{PercentageDiscountPromotion,PercentageDiscountPromotionType}from'./percentage_discount_promotions';import type{FreeShippingPromotion,FreeShippingPromotionType}from'./free_shipping_promotions';import type{BuyXPayYPromotion,BuyXPayYPromotionType}from'./buy_x_pay_y_promotions';import type{FreeGiftPromotion,FreeGiftPromotionType}from'./free_gift_promotions';import type{FixedPricePromotion,FixedPricePromotionType}from'./fixed_price_promotions';import type{ExternalPromotion,ExternalPromotionType}from'./external_promotions';import type{FixedAmountPromotion,FixedAmountPromotionType}from'./fixed_amount_promotions';
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Version}from'./versions';import type{Coupon,CouponType}from'./coupons';import type{PercentageDiscountPromotion,PercentageDiscountPromotionType}from'./percentage_discount_promotions';import type{FreeShippingPromotion,FreeShippingPromotionType}from'./free_shipping_promotions';import type{BuyXPayYPromotion,BuyXPayYPromotionType}from'./buy_x_pay_y_promotions';import type{FreeGiftPromotion,FreeGiftPromotionType}from'./free_gift_promotions';import type{FixedPricePromotion,FixedPricePromotionType}from'./fixed_price_promotions';import type{ExternalPromotion,ExternalPromotionType}from'./external_promotions';import type{FixedAmountPromotion,FixedAmountPromotionType}from'./fixed_amount_promotions';type CouponCodesPromotionRuleType='coupon_codes_promotion_rules';type CouponCodesPromotionRuleRel=ResourceRel&{type:CouponCodesPromotionRuleType;};type PercentageDiscountPromotionRel=ResourceRel&{type:PercentageDiscountPromotionType;};type FreeShippingPromotionRel=ResourceRel&{type:FreeShippingPromotionType;};type BuyXPayYPromotionRel=ResourceRel&{type:BuyXPayYPromotionType;};type FreeGiftPromotionRel=ResourceRel&{type:FreeGiftPromotionType;};type FixedPricePromotionRel=ResourceRel&{type:FixedPricePromotionType;};type ExternalPromotionRel=ResourceRel&{type:ExternalPromotionType;};type FixedAmountPromotionRel=ResourceRel&{type:FixedAmountPromotionType;};type CouponRel=ResourceRel&{type:CouponType;};interface CouponCodesPromotionRule extends Resource{readonly type:CouponCodesPromotionRuleType;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|BuyXPayYPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion|FixedAmountPromotion|null;versions?:Version[]|null;coupons?:Coupon[]|null;}interface CouponCodesPromotionRuleCreate extends ResourceCreate{promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel;coupons?:CouponRel[]|null;}interface CouponCodesPromotionRuleUpdate extends ResourceUpdate{promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel|null;coupons?:CouponRel[]|null;}declare class CouponCodesPromotionRules extends ApiResource<CouponCodesPromotionRule>{static readonly TYPE:CouponCodesPromotionRuleType;create(resource:CouponCodesPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;update(resource:CouponCodesPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;versions(couponCodesPromotionRuleId:string|CouponCodesPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;coupons(couponCodesPromotionRuleId:string|CouponCodesPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;isCouponCodesPromotionRule(resource:any):resource is CouponCodesPromotionRule;relationship(id:string|ResourceId|null):CouponCodesPromotionRuleRel;type():CouponCodesPromotionRuleType;}export default CouponCodesPromotionRules;export type{CouponCodesPromotionRule,CouponCodesPromotionRuleCreate,CouponCodesPromotionRuleUpdate,CouponCodesPromotionRuleType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{PercentageDiscountPromotion,PercentageDiscountPromotionType}from'./percentage_discount_promotions';import type{FreeShippingPromotion,FreeShippingPromotionType}from'./free_shipping_promotions';import type{BuyXPayYPromotion,BuyXPayYPromotionType}from'./buy_x_pay_y_promotions';import type{FreeGiftPromotion,FreeGiftPromotionType}from'./free_gift_promotions';import type{FixedPricePromotion,FixedPricePromotionType}from'./fixed_price_promotions';import type{ExternalPromotion,ExternalPromotionType}from'./external_promotions';import type{FixedAmountPromotion,FixedAmountPromotionType}from'./fixed_amount_promotions';
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Version}from'./versions';import type{PercentageDiscountPromotion,PercentageDiscountPromotionType}from'./percentage_discount_promotions';import type{FreeShippingPromotion,FreeShippingPromotionType}from'./free_shipping_promotions';import type{BuyXPayYPromotion,BuyXPayYPromotionType}from'./buy_x_pay_y_promotions';import type{FreeGiftPromotion,FreeGiftPromotionType}from'./free_gift_promotions';import type{FixedPricePromotion,FixedPricePromotionType}from'./fixed_price_promotions';import type{ExternalPromotion,ExternalPromotionType}from'./external_promotions';import type{FixedAmountPromotion,FixedAmountPromotionType}from'./fixed_amount_promotions';type CustomPromotionRuleType='custom_promotion_rules';type CustomPromotionRuleRel=ResourceRel&{type:CustomPromotionRuleType;};type PercentageDiscountPromotionRel=ResourceRel&{type:PercentageDiscountPromotionType;};type FreeShippingPromotionRel=ResourceRel&{type:FreeShippingPromotionType;};type BuyXPayYPromotionRel=ResourceRel&{type:BuyXPayYPromotionType;};type FreeGiftPromotionRel=ResourceRel&{type:FreeGiftPromotionType;};type FixedPricePromotionRel=ResourceRel&{type:FixedPricePromotionType;};type ExternalPromotionRel=ResourceRel&{type:ExternalPromotionType;};type FixedAmountPromotionRel=ResourceRel&{type:FixedAmountPromotionType;};interface CustomPromotionRule extends Resource{readonly type:CustomPromotionRuleType;filters?:Record<string,any>|null;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|BuyXPayYPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion|FixedAmountPromotion|null;versions?:Version[]|null;}interface CustomPromotionRuleCreate extends ResourceCreate{filters?:Record<string,any>|null;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel;}interface CustomPromotionRuleUpdate extends ResourceUpdate{filters?:Record<string,any>|null;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel|null;}declare class CustomPromotionRules extends ApiResource<CustomPromotionRule>{static readonly TYPE:CustomPromotionRuleType;create(resource:CustomPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;update(resource:CustomPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;versions(customPromotionRuleId:string|CustomPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isCustomPromotionRule(resource:any):resource is CustomPromotionRule;relationship(id:string|ResourceId|null):CustomPromotionRuleRel;type():CustomPromotionRuleType;}export default CustomPromotionRules;export type{CustomPromotionRule,CustomPromotionRuleCreate,CustomPromotionRuleUpdate,CustomPromotionRuleType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Customer,CustomerType}from'./customers';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{AdyenPayment,AdyenPaymentType}from'./adyen_payments';import type{AxervePayment,AxervePaymentType}from'./axerve_payments';import type{BraintreePayment,BraintreePaymentType}from'./braintree_payments';import type{CheckoutComPayment,CheckoutComPaymentType}from'./checkout_com_payments';import type{ExternalPayment,ExternalPaymentType}from'./external_payments';import type{KlarnaPayment,KlarnaPaymentType}from'./klarna_payments';import type{SatispayPayment,SatispayPaymentType}from'./satispay_payments';import type{StripePayment,StripePaymentType}from'./stripe_payments';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Customer,CustomerType}from'./customers';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{Version}from'./versions';import type{AdyenPayment,AdyenPaymentType}from'./adyen_payments';import type{AxervePayment,AxervePaymentType}from'./axerve_payments';import type{BraintreePayment,BraintreePaymentType}from'./braintree_payments';import type{CheckoutComPayment,CheckoutComPaymentType}from'./checkout_com_payments';import type{ExternalPayment,ExternalPaymentType}from'./external_payments';import type{KlarnaPayment,KlarnaPaymentType}from'./klarna_payments';import type{PaypalPayment,PaypalPaymentType}from'./paypal_payments';import type{SatispayPayment,SatispayPaymentType}from'./satispay_payments';import type{StripePayment,StripePaymentType}from'./stripe_payments';import type{WireTransfer,WireTransferType}from'./wire_transfers';type CustomerPaymentSourceType='customer_payment_sources';type CustomerPaymentSourceRel=ResourceRel&{type:CustomerPaymentSourceType;};type CustomerRel=ResourceRel&{type:CustomerType;};type PaymentMethodRel=ResourceRel&{type:PaymentMethodType;};type AdyenPaymentRel=ResourceRel&{type:AdyenPaymentType;};type AxervePaymentRel=ResourceRel&{type:AxervePaymentType;};type BraintreePaymentRel=ResourceRel&{type:BraintreePaymentType;};type CheckoutComPaymentRel=ResourceRel&{type:CheckoutComPaymentType;};type ExternalPaymentRel=ResourceRel&{type:ExternalPaymentType;};type KlarnaPaymentRel=ResourceRel&{type:KlarnaPaymentType;};type PaypalPaymentRel=ResourceRel&{type:PaypalPaymentType;};type SatispayPaymentRel=ResourceRel&{type:SatispayPaymentType;};type StripePaymentRel=ResourceRel&{type:StripePaymentType;};type WireTransferRel=ResourceRel&{type:WireTransferType;};interface CustomerPaymentSource extends Resource{readonly type:CustomerPaymentSourceType;name?:string|null;customer_token?:string|null;payment_source_token?:string|null;customer?:Customer|null;payment_method?:PaymentMethod|null;payment_source?:AdyenPayment|AxervePayment|BraintreePayment|CheckoutComPayment|ExternalPayment|KlarnaPayment|PaypalPayment|SatispayPayment|StripePayment|WireTransfer|null;versions?:Version[]|null;}interface CustomerPaymentSourceCreate extends ResourceCreate{customer_token?:string|null;payment_source_token?:string|null;customer:CustomerRel;payment_method?:PaymentMethodRel|null;payment_source?:AdyenPaymentRel|AxervePaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|SatispayPaymentRel|StripePaymentRel|WireTransferRel|null;}interface CustomerPaymentSourceUpdate extends ResourceUpdate{customer_token?:string|null;payment_source_token?:string|null;customer?:CustomerRel|null;payment_method?:PaymentMethodRel|null;payment_source?:AdyenPaymentRel|AxervePaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|SatispayPaymentRel|StripePaymentRel|WireTransferRel|null;}declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource>{static readonly TYPE:CustomerPaymentSourceType;create(resource:CustomerPaymentSourceCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPaymentSource>;update(resource:CustomerPaymentSourceUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerPaymentSource>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;customer(customerPaymentSourceId:string|CustomerPaymentSource,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;payment_method(customerPaymentSourceId:string|CustomerPaymentSource,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;versions(customerPaymentSourceId:string|CustomerPaymentSource,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isCustomerPaymentSource(resource:any):resource is CustomerPaymentSource;relationship(id:string|ResourceId|null):CustomerPaymentSourceRel;type():CustomerPaymentSourceType;}export default CustomerPaymentSources;export type{CustomerPaymentSource,CustomerPaymentSourceCreate,CustomerPaymentSourceUpdate,CustomerPaymentSourceType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Event}from'./events';type ExportType='exports';type ExportRel=ResourceRel&{type:ExportType;};interface Export extends Resource{readonly type:ExportType;resource_type:string;format?:string|null;status:'pending'|'in_progress'|'completed';includes?:string[]|null;filters?:Record<string,any>|null;dry_data?:boolean|null;started_at?:string|null;completed_at?:string|null;interrupted_at?:string|null;records_count?:number|null;attachment_url?:string|null;events?:Event[]|null;}interface ExportCreate extends ResourceCreate{resource_type:string;format?:string|null;includes?:string[]|null;filters?:Record<string,any>|null;dry_data?:boolean|null;}declare class Exports extends ApiResource<Export>{static readonly TYPE:ExportType;create(resource:ExportCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Export>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;events(exportId:string|Export,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;isExport(resource:any):resource is Export;relationship(id:string|ResourceId|null):ExportRel;type():ExportType;}export default Exports;export type{Export,ExportCreate,ExportType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Event}from'./events';type ExportType='exports';type ExportRel=ResourceRel&{type:ExportType;};interface Export extends Resource{readonly type:ExportType;resource_type:string;format?:string|null;status:'pending'|'in_progress'|'interrupted'|'completed';includes?:string[]|null;filters?:Record<string,any>|null;dry_data?:boolean|null;started_at?:string|null;completed_at?:string|null;interrupted_at?:string|null;records_count?:number|null;attachment_url?:string|null;events?:Event[]|null;}interface ExportCreate extends ResourceCreate{resource_type:string;format?:string|null;includes?:string[]|null;filters?:Record<string,any>|null;dry_data?:boolean|null;}declare class Exports extends ApiResource<Export>{static readonly TYPE:ExportType;create(resource:ExportCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Export>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;events(exportId:string|Export,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;isExport(resource:any):resource is Export;relationship(id:string|ResourceId|null):ExportRel;type():ExportType;}export default Exports;export type{Export,ExportCreate,ExportType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{OrderAmountPromotionRule,OrderAmountPromotionRuleType}from'./order_amount_promotion_rules';import type{SkuListPromotionRule,SkuListPromotionRuleType}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule,CouponCodesPromotionRuleType}from'./coupon_codes_promotion_rules';import type{CustomPromotionRule,CustomPromotionRuleType}from'./custom_promotion_rules';import type{SkuList,SkuListType}from'./sku_lists';import type{Coupon}from'./coupons';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';import type{Sku}from'./skus';import type{PromotionRule}from'./promotion_rules';type ExternalPromotionType='external_promotions';type ExternalPromotionRel=ResourceRel&{type:ExternalPromotionType;};type MarketRel=ResourceRel&{type:MarketType;};type OrderAmountPromotionRuleRel=ResourceRel&{type:OrderAmountPromotionRuleType;};type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};type CouponCodesPromotionRuleRel=ResourceRel&{type:CouponCodesPromotionRuleType;};type CustomPromotionRuleRel=ResourceRel&{type:CustomPromotionRuleType;};type SkuListRel=ResourceRel&{type:SkuListType;};type TagRel=ResourceRel&{type:TagType;};interface ExternalPromotion extends Resource{readonly type:ExternalPromotionType;name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;total_usage_count?:number|null;active?:boolean|null;status?:'expired'|'pending'|'active'|'inactive'|'disabled'|null;disabled_at?:string|null;promotion_url:string;circuit_state?:string|null;circuit_failure_count?:number|null;shared_secret:string;market?:Market|null;promotion_rules?:PromotionRule[]|null;order_amount_promotion_rule?:OrderAmountPromotionRule|null;sku_list_promotion_rule?:SkuListPromotionRule|null;coupon_codes_promotion_rule?:CouponCodesPromotionRule|null;custom_promotion_rule?:CustomPromotionRule|null;sku_list?:SkuList|null;coupons?:Coupon[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;skus?:Sku[]|null;}interface ExternalPromotionCreate extends ResourceCreate{name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;promotion_url:string;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}interface ExternalPromotionUpdate extends ResourceUpdate{name?:string|null;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at?:string|null;expires_at?:string|null;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;promotion_url?:string|null;_reset_circuit?:boolean|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}declare class ExternalPromotions extends ApiResource<ExternalPromotion>{static readonly TYPE:ExternalPromotionType;create(resource:ExternalPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;update(resource:ExternalPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(externalPromotionId:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(externalPromotionId:string|ExternalPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(externalPromotionId:string|ExternalPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(externalPromotionId:string|ExternalPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(externalPromotionId:string|ExternalPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(externalPromotionId:string|ExternalPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;skus(externalPromotionId:string|ExternalPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;_disable(id:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;_enable(id:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;_reset_circuit(id:string|ExternalPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ExternalPromotion>;isExternalPromotion(resource:any):resource is ExternalPromotion;relationship(id:string|ResourceId|null):ExternalPromotionRel;type():ExternalPromotionType;}export default ExternalPromotions;export type{ExternalPromotion,ExternalPromotionCreate,ExternalPromotionUpdate,ExternalPromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{OrderAmountPromotionRule,OrderAmountPromotionRuleType}from'./order_amount_promotion_rules';import type{SkuListPromotionRule,SkuListPromotionRuleType}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule,CouponCodesPromotionRuleType}from'./coupon_codes_promotion_rules';import type{CustomPromotionRule,CustomPromotionRuleType}from'./custom_promotion_rules';import type{SkuList,SkuListType}from'./sku_lists';import type{Coupon}from'./coupons';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';import type{Sku}from'./skus';import type{PromotionRule}from'./promotion_rules';type FixedAmountPromotionType='fixed_amount_promotions';type FixedAmountPromotionRel=ResourceRel&{type:FixedAmountPromotionType;};type MarketRel=ResourceRel&{type:MarketType;};type OrderAmountPromotionRuleRel=ResourceRel&{type:OrderAmountPromotionRuleType;};type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};type CouponCodesPromotionRuleRel=ResourceRel&{type:CouponCodesPromotionRuleType;};type CustomPromotionRuleRel=ResourceRel&{type:CustomPromotionRuleType;};type SkuListRel=ResourceRel&{type:SkuListType;};type TagRel=ResourceRel&{type:TagType;};interface FixedAmountPromotion extends Resource{readonly type:FixedAmountPromotionType;name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;total_usage_count?:number|null;active?:boolean|null;status?:'expired'|'pending'|'active'|'inactive'|'disabled'|null;disabled_at?:string|null;fixed_amount_cents:number;fixed_amount_float?:number|null;formatted_fixed_amount?:string|null;market?:Market|null;promotion_rules?:PromotionRule[]|null;order_amount_promotion_rule?:OrderAmountPromotionRule|null;sku_list_promotion_rule?:SkuListPromotionRule|null;coupon_codes_promotion_rule?:CouponCodesPromotionRule|null;custom_promotion_rule?:CustomPromotionRule|null;sku_list?:SkuList|null;coupons?:Coupon[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;skus?:Sku[]|null;}interface FixedAmountPromotionCreate extends ResourceCreate{name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;fixed_amount_cents:number;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}interface FixedAmountPromotionUpdate extends ResourceUpdate{name?:string|null;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at?:string|null;expires_at?:string|null;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;fixed_amount_cents?:number|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion>{static readonly TYPE:FixedAmountPromotionType;create(resource:FixedAmountPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedAmountPromotion>;update(resource:FixedAmountPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedAmountPromotion>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;skus(fixedAmountPromotionId:string|FixedAmountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;_disable(id:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedAmountPromotion>;_enable(id:string|FixedAmountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedAmountPromotion>;isFixedAmountPromotion(resource:any):resource is FixedAmountPromotion;relationship(id:string|ResourceId|null):FixedAmountPromotionRel;type():FixedAmountPromotionType;}export default FixedAmountPromotions;export type{FixedAmountPromotion,FixedAmountPromotionCreate,FixedAmountPromotionUpdate,FixedAmountPromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{OrderAmountPromotionRule,OrderAmountPromotionRuleType}from'./order_amount_promotion_rules';import type{SkuListPromotionRule,SkuListPromotionRuleType}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule,CouponCodesPromotionRuleType}from'./coupon_codes_promotion_rules';import type{CustomPromotionRule,CustomPromotionRuleType}from'./custom_promotion_rules';import type{SkuList,SkuListType}from'./sku_lists';import type{Coupon}from'./coupons';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';import type{Sku}from'./skus';import type{PromotionRule}from'./promotion_rules';type FixedPricePromotionType='fixed_price_promotions';type FixedPricePromotionRel=ResourceRel&{type:FixedPricePromotionType;};type MarketRel=ResourceRel&{type:MarketType;};type OrderAmountPromotionRuleRel=ResourceRel&{type:OrderAmountPromotionRuleType;};type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};type CouponCodesPromotionRuleRel=ResourceRel&{type:CouponCodesPromotionRuleType;};type CustomPromotionRuleRel=ResourceRel&{type:CustomPromotionRuleType;};type SkuListRel=ResourceRel&{type:SkuListType;};type TagRel=ResourceRel&{type:TagType;};interface FixedPricePromotion extends Resource{readonly type:FixedPricePromotionType;name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;total_usage_count?:number|null;active?:boolean|null;status?:'expired'|'pending'|'active'|'inactive'|'disabled'|null;disabled_at?:string|null;fixed_amount_cents:number;fixed_amount_float?:number|null;formatted_fixed_amount?:string|null;market?:Market|null;promotion_rules?:PromotionRule[]|null;order_amount_promotion_rule?:OrderAmountPromotionRule|null;sku_list_promotion_rule?:SkuListPromotionRule|null;coupon_codes_promotion_rule?:CouponCodesPromotionRule|null;custom_promotion_rule?:CustomPromotionRule|null;sku_list?:SkuList|null;coupons?:Coupon[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;skus?:Sku[]|null;}interface FixedPricePromotionCreate extends ResourceCreate{name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;fixed_amount_cents:number;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list:SkuListRel;tags?:TagRel[]|null;}interface FixedPricePromotionUpdate extends ResourceUpdate{name?:string|null;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at?:string|null;expires_at?:string|null;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;fixed_amount_cents?:number|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}declare class FixedPricePromotions extends ApiResource<FixedPricePromotion>{static readonly TYPE:FixedPricePromotionType;create(resource:FixedPricePromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedPricePromotion>;update(resource:FixedPricePromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedPricePromotion>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;skus(fixedPricePromotionId:string|FixedPricePromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;_disable(id:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedPricePromotion>;_enable(id:string|FixedPricePromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FixedPricePromotion>;isFixedPricePromotion(resource:any):resource is FixedPricePromotion;relationship(id:string|ResourceId|null):FixedPricePromotionRel;type():FixedPricePromotionType;}export default FixedPricePromotions;export type{FixedPricePromotion,FixedPricePromotionCreate,FixedPricePromotionUpdate,FixedPricePromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{OrderAmountPromotionRule,OrderAmountPromotionRuleType}from'./order_amount_promotion_rules';import type{SkuListPromotionRule,SkuListPromotionRuleType}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule,CouponCodesPromotionRuleType}from'./coupon_codes_promotion_rules';import type{CustomPromotionRule,CustomPromotionRuleType}from'./custom_promotion_rules';import type{SkuList,SkuListType}from'./sku_lists';import type{Coupon}from'./coupons';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';import type{Sku}from'./skus';import type{PromotionRule}from'./promotion_rules';type FreeGiftPromotionType='free_gift_promotions';type FreeGiftPromotionRel=ResourceRel&{type:FreeGiftPromotionType;};type MarketRel=ResourceRel&{type:MarketType;};type OrderAmountPromotionRuleRel=ResourceRel&{type:OrderAmountPromotionRuleType;};type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};type CouponCodesPromotionRuleRel=ResourceRel&{type:CouponCodesPromotionRuleType;};type CustomPromotionRuleRel=ResourceRel&{type:CustomPromotionRuleType;};type SkuListRel=ResourceRel&{type:SkuListType;};type TagRel=ResourceRel&{type:TagType;};interface FreeGiftPromotion extends Resource{readonly type:FreeGiftPromotionType;name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;total_usage_count?:number|null;active?:boolean|null;status?:'expired'|'pending'|'active'|'inactive'|'disabled'|null;disabled_at?:string|null;max_quantity?:number|null;market?:Market|null;promotion_rules?:PromotionRule[]|null;order_amount_promotion_rule?:OrderAmountPromotionRule|null;sku_list_promotion_rule?:SkuListPromotionRule|null;coupon_codes_promotion_rule?:CouponCodesPromotionRule|null;custom_promotion_rule?:CustomPromotionRule|null;sku_list?:SkuList|null;coupons?:Coupon[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;skus?:Sku[]|null;}interface FreeGiftPromotionCreate extends ResourceCreate{name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;max_quantity?:number|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list:SkuListRel;tags?:TagRel[]|null;}interface FreeGiftPromotionUpdate extends ResourceUpdate{name?:string|null;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at?:string|null;expires_at?:string|null;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;max_quantity?:number|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion>{static readonly TYPE:FreeGiftPromotionType;create(resource:FreeGiftPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeGiftPromotion>;update(resource:FreeGiftPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeGiftPromotion>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;skus(freeGiftPromotionId:string|FreeGiftPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;_disable(id:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeGiftPromotion>;_enable(id:string|FreeGiftPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeGiftPromotion>;isFreeGiftPromotion(resource:any):resource is FreeGiftPromotion;relationship(id:string|ResourceId|null):FreeGiftPromotionRel;type():FreeGiftPromotionType;}export default FreeGiftPromotions;export type{FreeGiftPromotion,FreeGiftPromotionCreate,FreeGiftPromotionUpdate,FreeGiftPromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market,MarketType}from'./markets';import type{OrderAmountPromotionRule,OrderAmountPromotionRuleType}from'./order_amount_promotion_rules';import type{SkuListPromotionRule,SkuListPromotionRuleType}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule,CouponCodesPromotionRuleType}from'./coupon_codes_promotion_rules';import type{CustomPromotionRule,CustomPromotionRuleType}from'./custom_promotion_rules';import type{SkuList,SkuListType}from'./sku_lists';import type{Coupon}from'./coupons';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';import type{PromotionRule}from'./promotion_rules';type FreeShippingPromotionType='free_shipping_promotions';type FreeShippingPromotionRel=ResourceRel&{type:FreeShippingPromotionType;};type MarketRel=ResourceRel&{type:MarketType;};type OrderAmountPromotionRuleRel=ResourceRel&{type:OrderAmountPromotionRuleType;};type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};type CouponCodesPromotionRuleRel=ResourceRel&{type:CouponCodesPromotionRuleType;};type CustomPromotionRuleRel=ResourceRel&{type:CustomPromotionRuleType;};type SkuListRel=ResourceRel&{type:SkuListType;};type TagRel=ResourceRel&{type:TagType;};interface FreeShippingPromotion extends Resource{readonly type:FreeShippingPromotionType;name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;total_usage_count?:number|null;active?:boolean|null;status?:'expired'|'pending'|'active'|'inactive'|'disabled'|null;disabled_at?:string|null;market?:Market|null;promotion_rules?:PromotionRule[]|null;order_amount_promotion_rule?:OrderAmountPromotionRule|null;sku_list_promotion_rule?:SkuListPromotionRule|null;coupon_codes_promotion_rule?:CouponCodesPromotionRule|null;custom_promotion_rule?:CustomPromotionRule|null;sku_list?:SkuList|null;coupons?:Coupon[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;}interface FreeShippingPromotionCreate extends ResourceCreate{name:string;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at:string;expires_at:string;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}interface FreeShippingPromotionUpdate extends ResourceUpdate{name?:string|null;currency_code?:string|null;exclusive?:boolean|null;priority?:number|null;starts_at?:string|null;expires_at?:string|null;total_usage_limit?:number|null;_disable?:boolean|null;_enable?:boolean|null;market?:MarketRel|null;order_amount_promotion_rule?:OrderAmountPromotionRuleRel|null;sku_list_promotion_rule?:SkuListPromotionRuleRel|null;coupon_codes_promotion_rule?:CouponCodesPromotionRuleRel|null;custom_promotion_rule?:CustomPromotionRuleRel|null;sku_list?:SkuListRel|null;tags?:TagRel[]|null;}declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion>{static readonly TYPE:FreeShippingPromotionType;create(resource:FreeShippingPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeShippingPromotion>;update(resource:FreeShippingPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeShippingPromotion>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(freeShippingPromotionId:string|FreeShippingPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_disable(id:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeShippingPromotion>;_enable(id:string|FreeShippingPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<FreeShippingPromotion>;isFreeShippingPromotion(resource:any):resource is FreeShippingPromotion;relationship(id:string|ResourceId|null):FreeShippingPromotionRel;type():FreeShippingPromotionType;}export default FreeShippingPromotions;export type{FreeShippingPromotion,FreeShippingPromotionCreate,FreeShippingPromotionUpdate,FreeShippingPromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';type GeocoderType='geocoders';type GeocoderRel=ResourceRel&{type:GeocoderType;};interface Geocoder extends Resource{readonly type:GeocoderType;name:string;addresses?:Address[]|null;attachments?:Attachment[]|null;}declare class Geocoders extends ApiResource<Geocoder>{static readonly TYPE:GeocoderType;addresses(geocoderId:string|Geocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(geocoderId:string|Geocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGeocoder(resource:any):resource is Geocoder;relationship(id:string|ResourceId|null):GeocoderRel;type():GeocoderType;}export default Geocoders;export type{Geocoder,GeocoderType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList}from'../query';import type{Market}from'./markets';import type{Address}from'./addresses';import type{Attachment}from'./attachments';type GeocoderType='geocoders';type GeocoderRel=ResourceRel&{type:GeocoderType;};interface Geocoder extends Resource{readonly type:GeocoderType;name:string;markets?:Market[]|null;addresses?:Address[]|null;attachments?:Attachment[]|null;}declare class Geocoders extends ApiResource<Geocoder>{static readonly TYPE:GeocoderType;markets(geocoderId:string|Geocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;addresses(geocoderId:string|Geocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(geocoderId:string|Geocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGeocoder(resource:any):resource is Geocoder;relationship(id:string|ResourceId|null):GeocoderRel;type():GeocoderType;}export default Geocoders;export type{Geocoder,GeocoderType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Geocoders extends resource_1.ApiResource{async addresses(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`geocoders/${r}/addresses`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`geocoders/${r}/attachments`,t,s)}isGeocoder(e){return e.type&&e.type===Geocoders.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Geocoders.TYPE}:{id:e.id,type:Geocoders.TYPE}}type(){return Geocoders.TYPE}}Geocoders.TYPE="geocoders",exports.default=Geocoders;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Geocoders extends resource_1.ApiResource{async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`geocoders/${r}/markets`,t,s)}async addresses(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`geocoders/${r}/addresses`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`geocoders/${r}/attachments`,t,s)}isGeocoder(e){return e.type&&e.type===Geocoders.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Geocoders.TYPE}:{id:e.id,type:Geocoders.TYPE}}type(){return Geocoders.TYPE}}Geocoders.TYPE="geocoders",exports.default=Geocoders;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Address}from'./addresses';import type{Attachment}from'./attachments';type GoogleGeocoderType='google_geocoders';type GoogleGeocoderRel=ResourceRel&{type:GoogleGeocoderType;};interface GoogleGeocoder extends Resource{readonly type:GoogleGeocoderType;name:string;addresses?:Address[]|null;attachments?:Attachment[]|null;}interface GoogleGeocoderCreate extends ResourceCreate{name:string;api_key:string;}interface GoogleGeocoderUpdate extends ResourceUpdate{name?:string|null;api_key?:string|null;}declare class GoogleGeocoders extends ApiResource<GoogleGeocoder>{static readonly TYPE:GoogleGeocoderType;create(resource:GoogleGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GoogleGeocoder>;update(resource:GoogleGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GoogleGeocoder>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;addresses(googleGeocoderId:string|GoogleGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(googleGeocoderId:string|GoogleGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGoogleGeocoder(resource:any):resource is GoogleGeocoder;relationship(id:string|ResourceId|null):GoogleGeocoderRel;type():GoogleGeocoderType;}export default GoogleGeocoders;export type{GoogleGeocoder,GoogleGeocoderCreate,GoogleGeocoderUpdate,GoogleGeocoderType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market}from'./markets';import type{Address}from'./addresses';import type{Attachment}from'./attachments';type GoogleGeocoderType='google_geocoders';type GoogleGeocoderRel=ResourceRel&{type:GoogleGeocoderType;};interface GoogleGeocoder extends Resource{readonly type:GoogleGeocoderType;name:string;markets?:Market[]|null;addresses?:Address[]|null;attachments?:Attachment[]|null;}interface GoogleGeocoderCreate extends ResourceCreate{name:string;api_key:string;}interface GoogleGeocoderUpdate extends ResourceUpdate{name?:string|null;api_key?:string|null;}declare class GoogleGeocoders extends ApiResource<GoogleGeocoder>{static readonly TYPE:GoogleGeocoderType;create(resource:GoogleGeocoderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GoogleGeocoder>;update(resource:GoogleGeocoderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<GoogleGeocoder>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;markets(googleGeocoderId:string|GoogleGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;addresses(googleGeocoderId:string|GoogleGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;attachments(googleGeocoderId:string|GoogleGeocoder,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isGoogleGeocoder(resource:any):resource is GoogleGeocoder;relationship(id:string|ResourceId|null):GoogleGeocoderRel;type():GoogleGeocoderType;}export default GoogleGeocoders;export type{GoogleGeocoder,GoogleGeocoderCreate,GoogleGeocoderUpdate,GoogleGeocoderType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class GoogleGeocoders extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:GoogleGeocoders.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:GoogleGeocoders.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:GoogleGeocoders.TYPE}:e,t)}async addresses(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`google_geocoders/${r}/addresses`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`google_geocoders/${r}/attachments`,t,s)}isGoogleGeocoder(e){return e.type&&e.type===GoogleGeocoders.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:GoogleGeocoders.TYPE}:{id:e.id,type:GoogleGeocoders.TYPE}}type(){return GoogleGeocoders.TYPE}}GoogleGeocoders.TYPE="google_geocoders",exports.default=GoogleGeocoders;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class GoogleGeocoders extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:GoogleGeocoders.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:GoogleGeocoders.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:GoogleGeocoders.TYPE}:e,t)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`google_geocoders/${r}/markets`,t,s)}async addresses(e,t,s){const r=e.id||e;return this.resources.fetch({type:"addresses"},`google_geocoders/${r}/addresses`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`google_geocoders/${r}/attachments`,t,s)}isGoogleGeocoder(e){return e.type&&e.type===GoogleGeocoders.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:GoogleGeocoders.TYPE}:{id:e.id,type:GoogleGeocoders.TYPE}}type(){return GoogleGeocoders.TYPE}}GoogleGeocoders.TYPE="google_geocoders",exports.default=GoogleGeocoders;
|