@commercelayer/sdk 5.46.0 → 5.47.1
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/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/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{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order,OrderType}from'./orders';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{Order,OrderType}from'./orders';import type{LineItemOption}from'./line_item_options';import type{ReturnLineItem}from'./return_line_items';import type{StockReservation}from'./stock_reservations';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Sku,SkuType}from'./skus';import type{Bundle,BundleType}from'./bundles';import type{GiftCard,GiftCardType}from'./gift_cards';import type{Shipment,ShipmentType}from'./shipments';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{Adjustment,AdjustmentType}from'./adjustments';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 LineItemType='line_items';type LineItemRel=ResourceRel&{type:LineItemType;};type OrderRel=ResourceRel&{type:OrderType;};type SkuRel=ResourceRel&{type:SkuType;};type BundleRel=ResourceRel&{type:BundleType;};type GiftCardRel=ResourceRel&{type:GiftCardType;};type ShipmentRel=ResourceRel&{type:ShipmentType;};type PaymentMethodRel=ResourceRel&{type:PaymentMethodType;};type AdjustmentRel=ResourceRel&{type:AdjustmentType;};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 TagRel=ResourceRel&{type:TagType;};interface LineItem extends Resource{readonly type:LineItemType;sku_code?:string|null;bundle_code?:string|null;quantity:number;_external_price?:boolean|null;currency_code?:string|null;unit_amount_cents?:number|null;unit_amount_float?:number|null;formatted_unit_amount?:string|null;compare_at_amount_cents?:number|null;compare_at_amount_float?:number|null;formatted_compare_at_amount?:string|null;options_amount_cents?:number|null;options_amount_float?:number|null;formatted_options_amount?:string|null;discount_cents?:number|null;discount_float?:number|null;formatted_discount?:string|null;total_amount_cents?:number|null;total_amount_float:number;formatted_total_amount?:string|null;tax_amount_cents?:number|null;tax_amount_float:number;formatted_tax_amount?:string|null;name?:string|null;image_url?:string|null;discount_breakdown?:Record<string,any>|null;tax_rate?:number|null;tax_breakdown?:Record<string,any>|null;item_type?:'skus'|'bundles'|'gift_cards'|'shipments'|'payment_methods'|'adjustments'|'percentage_discount_promotions'|'free_shipping_promotions'|'buy_x_pay_y_promotions'|'free_gift_promotions'|'fixed_price_promotions'|'external_promotions'|'fixed_amount_promotions'|null;frequency?:string|null;coupon_code?:string|null;circuit_state?:string|null;circuit_failure_count?:number|null;order?:Order|null;item?:Sku|Bundle|GiftCard|Shipment|PaymentMethod|Adjustment|PercentageDiscountPromotion|FreeShippingPromotion|BuyXPayYPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion|FixedAmountPromotion|null;sku?:Sku|null;bundle?:Bundle|null;adjustment?:Adjustment|null;gift_card?:GiftCard|null;shipment?:Shipment|null;payment_method?:PaymentMethod|null;line_item_options?:LineItemOption[]|null;return_line_items?:ReturnLineItem[]|null;stock_reservations?:StockReservation[]|null;stock_line_items?:StockLineItem[]|null;stock_transfers?:StockTransfer[]|null;events?:Event[]|null;tags?:Tag[]|null;}interface LineItemCreate extends ResourceCreate{sku_code?:string|null;bundle_code?:string|null;quantity:number;_external_price?:boolean|null;_update_quantity?:boolean|null;_reserve_stock?:boolean|null;unit_amount_cents?:number|null;compare_at_amount_cents?:number|null;name?:string|null;image_url?:string|null;item_type?:'skus'|'bundles'|'gift_cards'|'shipments'|'payment_methods'|'adjustments'|'percentage_discount_promotions'|'free_shipping_promotions'|'buy_x_pay_y_promotions'|'free_gift_promotions'|'fixed_price_promotions'|'external_promotions'|'fixed_amount_promotions'|null;frequency?:string|null;order:OrderRel;item?:SkuRel|BundleRel|GiftCardRel|ShipmentRel|PaymentMethodRel|AdjustmentRel|PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel|null;tags?:TagRel[]|null;}interface LineItemUpdate extends ResourceUpdate{sku_code?:string|null;bundle_code?:string|null;quantity?:number|null;_external_price?:boolean|null;_reserve_stock?:boolean|null;unit_amount_cents?:number|null;compare_at_amount_cents?:number|null;name?:string|null;image_url?:string|null;frequency?:string|null;_reset_circuit?:boolean|null;tags?:TagRel[]|null;}declare class LineItems extends ApiResource<LineItem>{static readonly TYPE:LineItemType;create(resource:LineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;update(resource:LineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(lineItemId:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;line_item_options(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;return_line_items(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;stock_reservations(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;stock_line_items(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;events(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(lineItemId:string|LineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;_external_price(id:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;_reserve_stock(id:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;_reset_circuit(id:string|LineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isLineItem(resource:any):resource is LineItem;relationship(id:string|ResourceId|null):LineItemRel;type():LineItemType;}export default LineItems;export type{LineItem,LineItemCreate,LineItemUpdate,LineItemType};
|
@@ -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{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Event}from'./events';import type{Order,OrderType}from'./orders';import type{SkuList,SkuListType}from'./sku_lists';type LinkType='links';type LinkRel=ResourceRel&{type:LinkType;};type OrderRel=ResourceRel&{type:OrderType;};type SkuListRel=ResourceRel&{type:SkuListType;};interface Link extends Resource{readonly type:LinkType;name:string;client_id:string;scope:string;starts_at:string;expires_at:string;active?:boolean|null;status?:'expired'|'pending'|'active'|'disabled'|null;domain?:string|null;url?:string|null;disabled_at?:string|null;item?:Order|SkuList|null;events?:Event[]|null;}interface LinkCreate extends ResourceCreate{name:string;client_id:string;scope:string;starts_at:string;expires_at:string;domain?:string|null;_disable?:boolean|null;_enable?:boolean|null;item:OrderRel|SkuListRel;}interface LinkUpdate extends ResourceUpdate{name?:string|null;client_id?:string|null;scope?:string|null;starts_at?:string|null;expires_at?:string|null;domain?:string|null;_disable?:boolean|null;_enable?:boolean|null;item?:OrderRel|SkuListRel|null;}declare class Links extends ApiResource<Link>{static readonly TYPE:LinkType;create(resource:LinkCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Link>;update(resource:LinkUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Link>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;events(linkId:string|Link,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;_disable(id:string|Link,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Link>;_enable(id:string|Link,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Link>;isLink(resource:any):resource is Link;relationship(id:string|ResourceId|null):LinkRel;type():LinkType;}export default Links;export type{Link,LinkCreate,LinkUpdate,LinkType};
|
@@ -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{Merchant,MerchantType}from'./merchants';import type{PriceList,PriceListType}from'./price_lists';import type{InventoryModel,InventoryModelType}from'./inventory_models';import type{SubscriptionModel,SubscriptionModelType}from'./subscription_models';import type{TaxCalculator
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Merchant,MerchantType}from'./merchants';import type{PriceList,PriceListType}from'./price_lists';import type{InventoryModel,InventoryModelType}from'./inventory_models';import type{SubscriptionModel,SubscriptionModelType}from'./subscription_models';import type{TaxCalculator}from'./tax_calculators';import type{CustomerGroup,CustomerGroupType}from'./customer_groups';import type{Geocoder,GeocoderType}from'./geocoders';import type{PriceListScheduler}from'./price_list_schedulers';import type{Attachment}from'./attachments';import type{Version}from'./versions';import type{AvalaraAccount,AvalaraAccountType}from'./avalara_accounts';import type{TaxjarAccount,TaxjarAccountType}from'./taxjar_accounts';import type{ManualTaxCalculator,ManualTaxCalculatorType}from'./manual_tax_calculators';import type{ExternalTaxCalculator,ExternalTaxCalculatorType}from'./external_tax_calculators';type MarketType='markets';type MarketRel=ResourceRel&{type:MarketType;};type MerchantRel=ResourceRel&{type:MerchantType;};type PriceListRel=ResourceRel&{type:PriceListType;};type InventoryModelRel=ResourceRel&{type:InventoryModelType;};type SubscriptionModelRel=ResourceRel&{type:SubscriptionModelType;};type AvalaraAccountRel=ResourceRel&{type:AvalaraAccountType;};type TaxjarAccountRel=ResourceRel&{type:TaxjarAccountType;};type ManualTaxCalculatorRel=ResourceRel&{type:ManualTaxCalculatorType;};type ExternalTaxCalculatorRel=ResourceRel&{type:ExternalTaxCalculatorType;};type CustomerGroupRel=ResourceRel&{type:CustomerGroupType;};type GeocoderRel=ResourceRel&{type:GeocoderType;};interface Market extends Resource{readonly type:MarketType;number?:number|null;name:string;code?:string|null;facebook_pixel_id?:string|null;checkout_url?:string|null;external_prices_url?:string|null;external_order_validation_url?:string|null;private?:boolean|null;disabled_at?:string|null;shared_secret:string;merchant?:Merchant|null;price_list?:PriceList|null;inventory_model?:InventoryModel|null;subscription_model?:SubscriptionModel|null;tax_calculator?:AvalaraAccount|TaxjarAccount|ManualTaxCalculator|ExternalTaxCalculator|null;customer_group?:CustomerGroup|null;geocoder?:Geocoder|null;price_list_schedulers?:PriceListScheduler[]|null;attachments?:Attachment[]|null;versions?:Version[]|null;}interface MarketCreate extends ResourceCreate{name:string;code?:string|null;facebook_pixel_id?:string|null;checkout_url?:string|null;external_prices_url?:string|null;external_order_validation_url?:string|null;_disable?:boolean|null;_enable?:boolean|null;merchant:MerchantRel;price_list:PriceListRel;inventory_model:InventoryModelRel;subscription_model?:SubscriptionModelRel|null;tax_calculator?:AvalaraAccountRel|TaxjarAccountRel|ManualTaxCalculatorRel|ExternalTaxCalculatorRel|null;customer_group?:CustomerGroupRel|null;geocoder?:GeocoderRel|null;}interface MarketUpdate extends ResourceUpdate{name?:string|null;code?:string|null;facebook_pixel_id?:string|null;checkout_url?:string|null;external_prices_url?:string|null;external_order_validation_url?:string|null;_disable?:boolean|null;_enable?:boolean|null;merchant?:MerchantRel|null;price_list?:PriceListRel|null;inventory_model?:InventoryModelRel|null;subscription_model?:SubscriptionModelRel|null;tax_calculator?:AvalaraAccountRel|TaxjarAccountRel|ManualTaxCalculatorRel|ExternalTaxCalculatorRel|null;customer_group?:CustomerGroupRel|null;geocoder?:GeocoderRel|null;}declare class Markets extends ApiResource<Market>{static readonly TYPE:MarketType;create(resource:MarketCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;update(resource:MarketUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;merchant(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Merchant>;price_list(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PriceList>;inventory_model(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<InventoryModel>;subscription_model(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SubscriptionModel>;tax_calculator(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCalculator>;customer_group(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomerGroup>;geocoder(marketId:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Geocoder>;price_list_schedulers(marketId:string|Market,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PriceListScheduler>>;attachments(marketId:string|Market,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(marketId:string|Market,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_disable(id:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;_enable(id:string|Market,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;isMarket(resource:any):resource is Market;relationship(id:string|ResourceId|null):MarketRel;type():MarketType;}export default Markets;export type{Market,MarketCreate,MarketUpdate,MarketType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Markets extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:Markets.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:Markets.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Markets.TYPE}:e,t)}async merchant(e,t,s){const r=e.id||e;return this.resources.fetch({type:"merchants"},`markets/${r}/merchant`,t,s)}async price_list(e,t,s){const r=e.id||e;return this.resources.fetch({type:"price_lists"},`markets/${r}/price_list`,t,s)}async inventory_model(e,t,s){const r=e.id||e;return this.resources.fetch({type:"inventory_models"},`markets/${r}/inventory_model`,t,s)}async subscription_model(e,t,s){const r=e.id||e;return this.resources.fetch({type:"subscription_models"},`markets/${r}/subscription_model`,t,s)}async tax_calculator(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_calculators"},`markets/${r}/tax_calculator`,t,s)}async customer_group(e,t,s){const r=e.id||e;return this.resources.fetch({type:"customer_groups"},`markets/${r}/customer_group`,t,s)}async price_list_schedulers(e,t,s){const r=e.id||e;return this.resources.fetch({type:"price_list_schedulers"},`markets/${r}/price_list_schedulers`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`markets/${r}/attachments`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`markets/${r}/versions`,t,s)}async _disable(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Markets.TYPE,_disable:!0},t,s)}async _enable(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Markets.TYPE,_enable:!0},t,s)}isMarket(e){return e.type&&e.type===Markets.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Markets.TYPE}:{id:e.id,type:Markets.TYPE}}type(){return Markets.TYPE}}Markets.TYPE="markets",exports.default=Markets;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Markets extends resource_1.ApiResource{async create(e,t,s){return this.resources.create({...e,type:Markets.TYPE},t,s)}async update(e,t,s){return this.resources.update({...e,type:Markets.TYPE},t,s)}async delete(e,t){await this.resources.delete(typeof e=="string"?{id:e,type:Markets.TYPE}:e,t)}async merchant(e,t,s){const r=e.id||e;return this.resources.fetch({type:"merchants"},`markets/${r}/merchant`,t,s)}async price_list(e,t,s){const r=e.id||e;return this.resources.fetch({type:"price_lists"},`markets/${r}/price_list`,t,s)}async inventory_model(e,t,s){const r=e.id||e;return this.resources.fetch({type:"inventory_models"},`markets/${r}/inventory_model`,t,s)}async subscription_model(e,t,s){const r=e.id||e;return this.resources.fetch({type:"subscription_models"},`markets/${r}/subscription_model`,t,s)}async tax_calculator(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_calculators"},`markets/${r}/tax_calculator`,t,s)}async customer_group(e,t,s){const r=e.id||e;return this.resources.fetch({type:"customer_groups"},`markets/${r}/customer_group`,t,s)}async geocoder(e,t,s){const r=e.id||e;return this.resources.fetch({type:"geocoders"},`markets/${r}/geocoder`,t,s)}async price_list_schedulers(e,t,s){const r=e.id||e;return this.resources.fetch({type:"price_list_schedulers"},`markets/${r}/price_list_schedulers`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`markets/${r}/attachments`,t,s)}async versions(e,t,s){const r=e.id||e;return this.resources.fetch({type:"versions"},`markets/${r}/versions`,t,s)}async _disable(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Markets.TYPE,_disable:!0},t,s)}async _enable(e,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Markets.TYPE,_enable:!0},t,s)}isMarket(e){return e.type&&e.type===Markets.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Markets.TYPE}:{id:e.id,type:Markets.TYPE}}type(){return Markets.TYPE}}Markets.TYPE="markets",exports.default=Markets;
|
@@ -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 OrderAmountPromotionRuleType='order_amount_promotion_rules';type OrderAmountPromotionRuleRel=ResourceRel&{type:OrderAmountPromotionRuleType;};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 OrderAmountPromotionRule extends Resource{readonly type:OrderAmountPromotionRuleType;order_amount_cents?:number|null;order_amount_float?:number|null;formatted_order_amount?:string|null;use_subtotal?:boolean|null;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|BuyXPayYPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion|FixedAmountPromotion|null;versions?:Version[]|null;}interface OrderAmountPromotionRuleCreate extends ResourceCreate{order_amount_cents?:number|null;use_subtotal?:boolean|null;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel;}interface OrderAmountPromotionRuleUpdate extends ResourceUpdate{order_amount_cents?:number|null;use_subtotal?:boolean|null;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel|null;}declare class OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule>{static readonly TYPE:OrderAmountPromotionRuleType;create(resource:OrderAmountPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;update(resource:OrderAmountPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;versions(orderAmountPromotionRuleId:string|OrderAmountPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isOrderAmountPromotionRule(resource:any):resource is OrderAmountPromotionRule;relationship(id:string|ResourceId|null):OrderAmountPromotionRuleRel;type():OrderAmountPromotionRuleType;}export default OrderAmountPromotionRules;export type{OrderAmountPromotionRule,OrderAmountPromotionRuleCreate,OrderAmountPromotionRuleUpdate,OrderAmountPromotionRuleType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{OrderSubscription,OrderSubscriptionType}from'./order_subscriptions';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{OrderSubscription,OrderSubscriptionType}from'./order_subscriptions';import type{LineItem}from'./line_items';import type{Sku,SkuType}from'./skus';import type{Bundle,BundleType}from'./bundles';import type{Adjustment,AdjustmentType}from'./adjustments';type OrderSubscriptionItemType='order_subscription_items';type OrderSubscriptionItemRel=ResourceRel&{type:OrderSubscriptionItemType;};type OrderSubscriptionRel=ResourceRel&{type:OrderSubscriptionType;};type SkuRel=ResourceRel&{type:SkuType;};type BundleRel=ResourceRel&{type:BundleType;};type AdjustmentRel=ResourceRel&{type:AdjustmentType;};interface OrderSubscriptionItem extends Resource{readonly type:OrderSubscriptionItemType;sku_code?:string|null;bundle_code?:string|null;quantity:number;unit_amount_cents?:number|null;unit_amount_float?:number|null;formatted_unit_amount?:string|null;total_amount_cents?:number|null;total_amount_float:number;formatted_total_amount?:string|null;order_subscription?:OrderSubscription|null;item?:Sku|Bundle|Adjustment|null;sku?:Sku|null;bundle?:Bundle|null;adjustment?:Adjustment|null;source_line_item?:LineItem|null;}interface OrderSubscriptionItemCreate extends ResourceCreate{sku_code?:string|null;bundle_code?:string|null;quantity:number;unit_amount_cents?:number|null;order_subscription:OrderSubscriptionRel;item:SkuRel|BundleRel|AdjustmentRel;sku?:SkuRel|null;bundle?:BundleRel|null;adjustment?:AdjustmentRel|null;}interface OrderSubscriptionItemUpdate extends ResourceUpdate{sku_code?:string|null;bundle_code?:string|null;quantity?:number|null;unit_amount_cents?:number|null;}declare class OrderSubscriptionItems extends ApiResource<OrderSubscriptionItem>{static readonly TYPE:OrderSubscriptionItemType;create(resource:OrderSubscriptionItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscriptionItem>;update(resource:OrderSubscriptionItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscriptionItem>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order_subscription(orderSubscriptionItemId:string|OrderSubscriptionItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;source_line_item(orderSubscriptionItemId:string|OrderSubscriptionItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isOrderSubscriptionItem(resource:any):resource is OrderSubscriptionItem;relationship(id:string|ResourceId|null):OrderSubscriptionItemRel;type():OrderSubscriptionItemType;}export default OrderSubscriptionItems;export type{OrderSubscriptionItem,OrderSubscriptionItemCreate,OrderSubscriptionItemUpdate,OrderSubscriptionItemType};
|
@@ -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{Customer,CustomerType}from'./customers';import type{Address,AddressType}from'./addresses';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{CustomerPaymentSource}from'./customer_payment_sources';import type{Sku}from'./skus';import type{Bundle}from'./bundles';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';import type{LineItem}from'./line_items';import type{LineItemOption}from'./line_item_options';import type{StockReservation}from'./stock_reservations';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';import type{Shipment}from'./shipments';import type{PaymentOption}from'./payment_options';import type{Authorization}from'./authorizations';import type{Capture}from'./captures';import type{Void}from'./voids';import type{Refund}from'./refunds';import type{Return}from'./returns';import type{OrderSubscription}from'./order_subscriptions';import type{OrderFactory}from'./order_factories';import type{OrderCopy}from'./order_copies';import type{RecurringOrderCopy}from'./recurring_order_copies';import type{Attachment}from'./attachments';import type{ResourceError}from'./resource_errors';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';type OrderType='orders';type OrderRel=ResourceRel&{type:OrderType;};type MarketRel=ResourceRel&{type:MarketType;};type CustomerRel=ResourceRel&{type:CustomerType;};type AddressRel=ResourceRel&{type:AddressType;};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;};type TagRel=ResourceRel&{type:TagType;};interface Order extends Resource{readonly type:OrderType;number?:string|null;autorefresh?:boolean|null;place_async?:boolean|null;status:'draft'|'pending'|'placing'|'placed'|'editing'|'approved'|'cancelled';payment_status:'unpaid'|'authorized'|'partially_authorized'|'paid'|'partially_paid'|'voided'|'partially_voided'|'refunded'|'partially_refunded'|'free';fulfillment_status:'unfulfilled'|'in_progress'|'fulfilled'|'not_required';guest?:boolean|null;editable?:boolean|null;customer_email?:string|null;language_code?:string|null;currency_code?:string|null;tax_included?:boolean|null;tax_rate?:number|null;freight_taxable?:boolean|null;payment_method_taxable?:boolean|null;adjustment_taxable?:boolean|null;gift_card_taxable?:boolean|null;requires_billing_info?:boolean|null;country_code?:string|null;shipping_country_code_lock?:string|null;coupon_code?:string|null;gift_card_code?:string|null;subtotal_amount_cents?:number|null;subtotal_amount_float?:number|null;formatted_subtotal_amount?:string|null;shipping_amount_cents?:number|null;shipping_amount_float?:number|null;formatted_shipping_amount?:string|null;payment_method_amount_cents?:number|null;payment_method_amount_float?:number|null;formatted_payment_method_amount?:string|null;discount_amount_cents?:number|null;discount_amount_float?:number|null;formatted_discount_amount?:string|null;adjustment_amount_cents?:number|null;adjustment_amount_float?:number|null;formatted_adjustment_amount?:string|null;gift_card_amount_cents?:number|null;gift_card_amount_float?:number|null;formatted_gift_card_amount?:string|null;total_tax_amount_cents?:number|null;total_tax_amount_float?:number|null;formatted_total_tax_amount?:string|null;subtotal_tax_amount_cents?:number|null;subtotal_tax_amount_float?:number|null;formatted_subtotal_tax_amount?:string|null;shipping_tax_amount_cents?:number|null;shipping_tax_amount_float?:number|null;formatted_shipping_tax_amount?:string|null;payment_method_tax_amount_cents?:number|null;payment_method_tax_amount_float?:number|null;formatted_payment_method_tax_amount?:string|null;adjustment_tax_amount_cents?:number|null;adjustment_tax_amount_float?:number|null;formatted_adjustment_tax_amount?:string|null;total_amount_cents?:number|null;total_amount_float?:number|null;formatted_total_amount?:string|null;total_taxable_amount_cents?:number|null;total_taxable_amount_float?:number|null;formatted_total_taxable_amount?:string|null;subtotal_taxable_amount_cents?:number|null;subtotal_taxable_amount_float?:number|null;formatted_subtotal_taxable_amount?:string|null;shipping_taxable_amount_cents?:number|null;shipping_taxable_amount_float?:number|null;formatted_shipping_taxable_amount?:string|null;payment_method_taxable_amount_cents?:number|null;payment_method_taxable_amount_float?:number|null;formatted_payment_method_taxable_amount?:string|null;adjustment_taxable_amount_cents?:number|null;adjustment_taxable_amount_float?:number|null;formatted_adjustment_taxable_amount?:string|null;total_amount_with_taxes_cents?:number|null;total_amount_with_taxes_float?:number|null;formatted_total_amount_with_taxes?:string|null;fees_amount_cents?:number|null;fees_amount_float?:number|null;formatted_fees_amount?:string|null;duty_amount_cents?:number|null;duty_amount_float?:number|null;formatted_duty_amount?:string|null;place_total_amount_cents?:number|null;place_total_amount_float?:number|null;formatted_place_total_amount?:string|null;skus_count?:number|null;line_item_options_count?:number|null;shipments_count?:number|null;tax_calculations_count?:number|null;validations_count?:number|null;errors_count?:number|null;payment_source_details?:Record<string,any>|null;token?:string|null;cart_url?:string|null;return_url?:string|null;terms_url?:string|null;privacy_url?:string|null;checkout_url?:string|null;placed_at?:string|null;approved_at?:string|null;cancelled_at?:string|null;payment_updated_at?:string|null;fulfillment_updated_at?:string|null;refreshed_at?:string|null;archived_at?:string|null;subscription_created_at?:string|null;circuit_state?:string|null;circuit_failure_count?:number|null;market?:Market|null;customer?:Customer|null;shipping_address?:Address|null;billing_address?:Address|null;available_payment_methods?:PaymentMethod[]|null;available_customer_payment_sources?:CustomerPaymentSource[]|null;available_free_skus?:Sku[]|null;available_free_bundles?:Bundle[]|null;payment_method?:PaymentMethod|null;payment_source?:AdyenPayment|AxervePayment|BraintreePayment|CheckoutComPayment|ExternalPayment|KlarnaPayment|PaypalPayment|SatispayPayment|StripePayment|WireTransfer|null;line_items?:LineItem[]|null;line_item_options?:LineItemOption[]|null;stock_reservations?:StockReservation[]|null;stock_line_items?:StockLineItem[]|null;stock_transfers?:StockTransfer[]|null;shipments?:Shipment[]|null;payment_options?:PaymentOption[]|null;transactions?:Array<Authorization|Capture|Void|Refund>|null;authorizations?:Authorization[]|null;captures?:Capture[]|null;voids?:Void[]|null;refunds?:Refund[]|null;returns?:Return[]|null;order_subscription?:OrderSubscription|null;order_subscriptions?:OrderSubscription[]|null;order_factories?:OrderFactory[]|null;order_copies?:OrderCopy[]|null;recurring_order_copies?:RecurringOrderCopy[]|null;attachments?:Attachment[]|null;resource_errors?:ResourceError[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;}interface OrderCreate extends ResourceCreate{number?:string|null;autorefresh?:boolean|null;place_async?:boolean|null;guest?:boolean|null;customer_email?:string|null;customer_password?:string|null;language_code?:string|null;freight_taxable?:boolean|null;payment_method_taxable?:boolean|null;adjustment_taxable?:boolean|null;gift_card_taxable?:boolean|null;shipping_country_code_lock?:string|null;coupon_code?:string|null;gift_card_code?:string|null;cart_url?:string|null;return_url?:string|null;terms_url?:string|null;privacy_url?:string|null;market?:MarketRel|null;customer?:CustomerRel|null;shipping_address?:AddressRel|null;billing_address?:AddressRel|null;payment_method?:PaymentMethodRel|null;payment_source?:AdyenPaymentRel|AxervePaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|SatispayPaymentRel|StripePaymentRel|WireTransferRel|null;tags?:TagRel[]|null;}interface OrderUpdate extends ResourceUpdate{number?:string|null;autorefresh?:boolean|null;place_async?:boolean|null;guest?:boolean|null;customer_email?:string|null;customer_password?:string|null;language_code?:string|null;freight_taxable?:boolean|null;payment_method_taxable?:boolean|null;adjustment_taxable?:boolean|null;gift_card_taxable?:boolean|null;shipping_country_code_lock?:string|null;coupon_code?:string|null;gift_card_code?:string|null;cart_url?:string|null;return_url?:string|null;terms_url?:string|null;privacy_url?:string|null;_archive?:boolean|null;_unarchive?:boolean|null;_pending?:boolean|null;_place?:boolean|null;_cancel?:boolean|null;_approve?:boolean|null;_approve_and_capture?:boolean|null;_authorize?:boolean|null;_authorization_amount_cents?:number|null;_capture?:boolean|null;_refund?:boolean|null;_fulfill?:boolean|null;_update_taxes?:boolean|null;_nullify_payment_source?:boolean|null;_billing_address_clone_id?:string|null;_shipping_address_clone_id?:string|null;_customer_payment_source_id?:string|null;_shipping_address_same_as_billing?:boolean|null;_billing_address_same_as_shipping?:boolean|null;_commit_invoice?:boolean|null;_refund_invoice?:boolean|null;_save_payment_source_to_customer_wallet?:boolean|null;_save_shipping_address_to_customer_address_book?:boolean|null;_save_billing_address_to_customer_address_book?:boolean|null;_refresh?:boolean|null;_validate?:boolean|null;_create_subscriptions?:boolean|null;_start_editing?:boolean|null;_stop_editing?:boolean|null;_reset_circuit?:boolean|null;market?:MarketRel|null;customer?:CustomerRel|null;shipping_address?:AddressRel|null;billing_address?:AddressRel|null;payment_method?:PaymentMethodRel|null;payment_source?:AdyenPaymentRel|AxervePaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|SatispayPaymentRel|StripePaymentRel|WireTransferRel|null;tags?:TagRel[]|null;}declare class Orders extends ApiResource<Order>{static readonly TYPE:OrderType;create(resource:OrderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;update(resource:OrderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;customer(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;shipping_address(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;billing_address(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;available_payment_methods(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;available_customer_payment_sources(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerPaymentSource>>;available_free_skus(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;available_free_bundles(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;payment_method(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;line_items(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;line_item_options(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;stock_reservations(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;stock_line_items(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;shipments(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;payment_options(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentOption>>;authorizations(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;captures(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;refunds(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;returns(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Return>>;order_subscription(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;order_subscriptions(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;order_factories(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderFactory>>;order_copies(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;recurring_order_copies(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<RecurringOrderCopy>>;attachments(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;resource_errors(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ResourceError>>;events(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_archive(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_unarchive(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_pending(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_place(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_cancel(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_approve(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_approve_and_capture(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_authorize(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_authorization_amount_cents(id:string|Order,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_capture(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_refund(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_fulfill(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_update_taxes(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_nullify_payment_source(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_billing_address_clone_id(id:string|Order,triggerValue:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_shipping_address_clone_id(id:string|Order,triggerValue:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_customer_payment_source_id(id:string|Order,triggerValue:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_shipping_address_same_as_billing(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_billing_address_same_as_shipping(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_commit_invoice(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_refund_invoice(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_save_payment_source_to_customer_wallet(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_save_shipping_address_to_customer_address_book(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_save_billing_address_to_customer_address_book(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_refresh(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_validate(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_create_subscriptions(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_start_editing(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_stop_editing(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_reset_circuit(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isOrder(resource:any):resource is Order;relationship(id:string|ResourceId|null):OrderRel;type():OrderType;}export default Orders;export type{Order,OrderCreate,OrderUpdate,OrderType};
|
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{Customer,CustomerType}from'./customers';import type{Address,AddressType}from'./addresses';import type{PaymentMethod,PaymentMethodType}from'./payment_methods';import type{CustomerPaymentSource}from'./customer_payment_sources';import type{Sku}from'./skus';import type{Bundle}from'./bundles';import type{LineItem}from'./line_items';import type{LineItemOption}from'./line_item_options';import type{StockReservation}from'./stock_reservations';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';import type{Shipment}from'./shipments';import type{PaymentOption}from'./payment_options';import type{Authorization}from'./authorizations';import type{Capture}from'./captures';import type{Void}from'./voids';import type{Refund}from'./refunds';import type{Return}from'./returns';import type{OrderSubscription}from'./order_subscriptions';import type{OrderFactory}from'./order_factories';import type{OrderCopy}from'./order_copies';import type{RecurringOrderCopy}from'./recurring_order_copies';import type{Attachment}from'./attachments';import type{ResourceError}from'./resource_errors';import type{Event}from'./events';import type{Tag,TagType}from'./tags';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 OrderType='orders';type OrderRel=ResourceRel&{type:OrderType;};type MarketRel=ResourceRel&{type:MarketType;};type CustomerRel=ResourceRel&{type:CustomerType;};type AddressRel=ResourceRel&{type:AddressType;};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;};type TagRel=ResourceRel&{type:TagType;};interface Order extends Resource{readonly type:OrderType;number?:string|null;autorefresh?:boolean|null;place_async?:boolean|null;status:'draft'|'pending'|'editing'|'placing'|'placed'|'approved'|'cancelled';payment_status:'unpaid'|'authorized'|'partially_authorized'|'paid'|'partially_paid'|'voided'|'partially_voided'|'refunded'|'partially_refunded'|'free';fulfillment_status:'unfulfilled'|'in_progress'|'fulfilled'|'not_required';guest?:boolean|null;editable?:boolean|null;customer_email?:string|null;language_code?:string|null;currency_code?:string|null;tax_included?:boolean|null;tax_rate?:number|null;freight_taxable?:boolean|null;payment_method_taxable?:boolean|null;adjustment_taxable?:boolean|null;gift_card_taxable?:boolean|null;requires_billing_info?:boolean|null;country_code?:string|null;shipping_country_code_lock?:string|null;coupon_code?:string|null;gift_card_code?:string|null;subtotal_amount_cents?:number|null;subtotal_amount_float?:number|null;formatted_subtotal_amount?:string|null;shipping_amount_cents?:number|null;shipping_amount_float?:number|null;formatted_shipping_amount?:string|null;payment_method_amount_cents?:number|null;payment_method_amount_float?:number|null;formatted_payment_method_amount?:string|null;discount_amount_cents?:number|null;discount_amount_float?:number|null;formatted_discount_amount?:string|null;adjustment_amount_cents?:number|null;adjustment_amount_float?:number|null;formatted_adjustment_amount?:string|null;gift_card_amount_cents?:number|null;gift_card_amount_float?:number|null;formatted_gift_card_amount?:string|null;total_tax_amount_cents?:number|null;total_tax_amount_float?:number|null;formatted_total_tax_amount?:string|null;subtotal_tax_amount_cents?:number|null;subtotal_tax_amount_float?:number|null;formatted_subtotal_tax_amount?:string|null;shipping_tax_amount_cents?:number|null;shipping_tax_amount_float?:number|null;formatted_shipping_tax_amount?:string|null;payment_method_tax_amount_cents?:number|null;payment_method_tax_amount_float?:number|null;formatted_payment_method_tax_amount?:string|null;adjustment_tax_amount_cents?:number|null;adjustment_tax_amount_float?:number|null;formatted_adjustment_tax_amount?:string|null;total_amount_cents?:number|null;total_amount_float?:number|null;formatted_total_amount?:string|null;total_taxable_amount_cents?:number|null;total_taxable_amount_float?:number|null;formatted_total_taxable_amount?:string|null;subtotal_taxable_amount_cents?:number|null;subtotal_taxable_amount_float?:number|null;formatted_subtotal_taxable_amount?:string|null;shipping_taxable_amount_cents?:number|null;shipping_taxable_amount_float?:number|null;formatted_shipping_taxable_amount?:string|null;payment_method_taxable_amount_cents?:number|null;payment_method_taxable_amount_float?:number|null;formatted_payment_method_taxable_amount?:string|null;adjustment_taxable_amount_cents?:number|null;adjustment_taxable_amount_float?:number|null;formatted_adjustment_taxable_amount?:string|null;total_amount_with_taxes_cents?:number|null;total_amount_with_taxes_float?:number|null;formatted_total_amount_with_taxes?:string|null;fees_amount_cents?:number|null;fees_amount_float?:number|null;formatted_fees_amount?:string|null;duty_amount_cents?:number|null;duty_amount_float?:number|null;formatted_duty_amount?:string|null;place_total_amount_cents?:number|null;place_total_amount_float?:number|null;formatted_place_total_amount?:string|null;skus_count?:number|null;line_item_options_count?:number|null;shipments_count?:number|null;tax_calculations_count?:number|null;validations_count?:number|null;errors_count?:number|null;payment_source_details?:Record<string,any>|null;token?:string|null;cart_url?:string|null;return_url?:string|null;terms_url?:string|null;privacy_url?:string|null;checkout_url?:string|null;placed_at?:string|null;approved_at?:string|null;cancelled_at?:string|null;payment_updated_at?:string|null;fulfillment_updated_at?:string|null;refreshed_at?:string|null;archived_at?:string|null;subscription_created_at?:string|null;circuit_state?:string|null;circuit_failure_count?:number|null;market?:Market|null;customer?:Customer|null;shipping_address?:Address|null;billing_address?:Address|null;available_payment_methods?:PaymentMethod[]|null;available_customer_payment_sources?:CustomerPaymentSource[]|null;available_free_skus?:Sku[]|null;available_free_bundles?:Bundle[]|null;payment_method?:PaymentMethod|null;payment_source?:AdyenPayment|AxervePayment|BraintreePayment|CheckoutComPayment|ExternalPayment|KlarnaPayment|PaypalPayment|SatispayPayment|StripePayment|WireTransfer|null;line_items?:LineItem[]|null;line_item_options?:LineItemOption[]|null;stock_reservations?:StockReservation[]|null;stock_line_items?:StockLineItem[]|null;stock_transfers?:StockTransfer[]|null;shipments?:Shipment[]|null;payment_options?:PaymentOption[]|null;transactions?:Array<Authorization|Void|Capture|Refund>|null;authorizations?:Authorization[]|null;captures?:Capture[]|null;voids?:Void[]|null;refunds?:Refund[]|null;returns?:Return[]|null;order_subscription?:OrderSubscription|null;order_subscriptions?:OrderSubscription[]|null;order_factories?:OrderFactory[]|null;order_copies?:OrderCopy[]|null;recurring_order_copies?:RecurringOrderCopy[]|null;attachments?:Attachment[]|null;resource_errors?:ResourceError[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;}interface OrderCreate extends ResourceCreate{number?:string|null;autorefresh?:boolean|null;place_async?:boolean|null;guest?:boolean|null;customer_email?:string|null;customer_password?:string|null;language_code?:string|null;freight_taxable?:boolean|null;payment_method_taxable?:boolean|null;adjustment_taxable?:boolean|null;gift_card_taxable?:boolean|null;shipping_country_code_lock?:string|null;coupon_code?:string|null;gift_card_code?:string|null;cart_url?:string|null;return_url?:string|null;terms_url?:string|null;privacy_url?:string|null;market?:MarketRel|null;customer?:CustomerRel|null;shipping_address?:AddressRel|null;billing_address?:AddressRel|null;payment_method?:PaymentMethodRel|null;payment_source?:AdyenPaymentRel|AxervePaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|SatispayPaymentRel|StripePaymentRel|WireTransferRel|null;tags?:TagRel[]|null;}interface OrderUpdate extends ResourceUpdate{number?:string|null;autorefresh?:boolean|null;place_async?:boolean|null;guest?:boolean|null;customer_email?:string|null;customer_password?:string|null;language_code?:string|null;freight_taxable?:boolean|null;payment_method_taxable?:boolean|null;adjustment_taxable?:boolean|null;gift_card_taxable?:boolean|null;shipping_country_code_lock?:string|null;coupon_code?:string|null;gift_card_code?:string|null;cart_url?:string|null;return_url?:string|null;terms_url?:string|null;privacy_url?:string|null;_archive?:boolean|null;_unarchive?:boolean|null;_pending?:boolean|null;_place?:boolean|null;_cancel?:boolean|null;_approve?:boolean|null;_approve_and_capture?:boolean|null;_authorize?:boolean|null;_authorization_amount_cents?:number|null;_capture?:boolean|null;_refund?:boolean|null;_fulfill?:boolean|null;_update_taxes?:boolean|null;_nullify_payment_source?:boolean|null;_billing_address_clone_id?:string|null;_shipping_address_clone_id?:string|null;_customer_payment_source_id?:string|null;_shipping_address_same_as_billing?:boolean|null;_billing_address_same_as_shipping?:boolean|null;_commit_invoice?:boolean|null;_refund_invoice?:boolean|null;_save_payment_source_to_customer_wallet?:boolean|null;_save_shipping_address_to_customer_address_book?:boolean|null;_save_billing_address_to_customer_address_book?:boolean|null;_refresh?:boolean|null;_validate?:boolean|null;_create_subscriptions?:boolean|null;_start_editing?:boolean|null;_stop_editing?:boolean|null;_reset_circuit?:boolean|null;market?:MarketRel|null;customer?:CustomerRel|null;shipping_address?:AddressRel|null;billing_address?:AddressRel|null;payment_method?:PaymentMethodRel|null;payment_source?:AdyenPaymentRel|AxervePaymentRel|BraintreePaymentRel|CheckoutComPaymentRel|ExternalPaymentRel|KlarnaPaymentRel|PaypalPaymentRel|SatispayPaymentRel|StripePaymentRel|WireTransferRel|null;tags?:TagRel[]|null;}declare class Orders extends ApiResource<Order>{static readonly TYPE:OrderType;create(resource:OrderCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;update(resource:OrderUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;customer(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;shipping_address(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;billing_address(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;available_payment_methods(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;available_customer_payment_sources(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CustomerPaymentSource>>;available_free_skus(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;available_free_bundles(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;payment_method(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentMethod>;line_items(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItem>>;line_item_options(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<LineItemOption>>;stock_reservations(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;stock_line_items(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;shipments(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;payment_options(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentOption>>;authorizations(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;captures(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;refunds(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Refund>>;returns(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Return>>;order_subscription(orderId:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderSubscription>;order_subscriptions(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderSubscription>>;order_factories(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderFactory>>;order_copies(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<OrderCopy>>;recurring_order_copies(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<RecurringOrderCopy>>;attachments(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;resource_errors(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ResourceError>>;events(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(orderId:string|Order,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_archive(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_unarchive(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_pending(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_place(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_cancel(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_approve(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_approve_and_capture(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_authorize(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_authorization_amount_cents(id:string|Order,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_capture(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_refund(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_fulfill(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_update_taxes(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_nullify_payment_source(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_billing_address_clone_id(id:string|Order,triggerValue:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_shipping_address_clone_id(id:string|Order,triggerValue:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_customer_payment_source_id(id:string|Order,triggerValue:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_shipping_address_same_as_billing(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_billing_address_same_as_shipping(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_commit_invoice(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_refund_invoice(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_save_payment_source_to_customer_wallet(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_save_shipping_address_to_customer_address_book(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_save_billing_address_to_customer_address_book(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_refresh(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_validate(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_create_subscriptions(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_start_editing(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_stop_editing(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;_reset_circuit(id:string|Order,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isOrder(resource:any):resource is Order;relationship(id:string|ResourceId|null):OrderRel;type():OrderType;}export default Orders;export type{Order,OrderCreate,OrderUpdate,OrderType};
|
@@ -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{Shipment,ShipmentType}from'./shipments';import type{Package,PackageType}from'./packages';import type{ParcelLineItem}from'./parcel_line_items';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';type ParcelType='parcels';type ParcelRel=ResourceRel&{type:ParcelType;};type ShipmentRel=ResourceRel&{type:ShipmentType;};type PackageRel=ResourceRel&{type:PackageType;};interface Parcel extends Resource{readonly type:ParcelType;number?:string|null;weight:number;unit_of_weight:
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Shipment,ShipmentType}from'./shipments';import type{Package,PackageType}from'./packages';import type{ParcelLineItem}from'./parcel_line_items';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Version}from'./versions';type ParcelType='parcels';type ParcelRel=ResourceRel&{type:ParcelType;};type ShipmentRel=ResourceRel&{type:ShipmentType;};type PackageRel=ResourceRel&{type:PackageType;};interface Parcel extends Resource{readonly type:ParcelType;number?:string|null;weight:number;unit_of_weight:'gr'|'oz'|'lb';eel_pfc?:string|null;contents_type?:string|null;contents_explanation?:string|null;customs_certify?:boolean|null;customs_signer?:string|null;non_delivery_option?:string|null;restriction_type?:string|null;restriction_comments?:string|null;customs_info_required?:boolean|null;shipping_label_url?:string|null;shipping_label_file_type?:string|null;shipping_label_size?:string|null;shipping_label_resolution?:string|null;tracking_number?:string|null;tracking_status?:string|null;tracking_status_detail?:string|null;tracking_status_updated_at?:string|null;tracking_details?:Record<string,any>|null;carrier_weight_oz?:string|null;signed_by?:string|null;incoterm?:string|null;delivery_confirmation?:string|null;shipment?:Shipment|null;package?:Package|null;parcel_line_items?:ParcelLineItem[]|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;}interface ParcelCreate extends ResourceCreate{weight:number;unit_of_weight:'gr'|'oz'|'lb';eel_pfc?:string|null;contents_type?:string|null;contents_explanation?:string|null;customs_certify?:boolean|null;customs_signer?:string|null;non_delivery_option?:string|null;restriction_type?:string|null;restriction_comments?:string|null;customs_info_required?:boolean|null;shipping_label_url?:string|null;shipping_label_file_type?:string|null;shipping_label_size?:string|null;shipping_label_resolution?:string|null;tracking_number?:string|null;tracking_status?:string|null;tracking_status_detail?:string|null;tracking_status_updated_at?:string|null;tracking_details?:Record<string,any>|null;carrier_weight_oz?:string|null;signed_by?:string|null;incoterm?:string|null;delivery_confirmation?:string|null;shipment:ShipmentRel;package:PackageRel;}interface ParcelUpdate extends ResourceUpdate{weight?:number|null;unit_of_weight?:'gr'|'oz'|'lb'|null;eel_pfc?:string|null;contents_type?:string|null;contents_explanation?:string|null;customs_certify?:boolean|null;customs_signer?:string|null;non_delivery_option?:string|null;restriction_type?:string|null;restriction_comments?:string|null;customs_info_required?:boolean|null;shipping_label_url?:string|null;shipping_label_file_type?:string|null;shipping_label_size?:string|null;shipping_label_resolution?:string|null;tracking_number?:string|null;tracking_status?:string|null;tracking_status_detail?:string|null;tracking_status_updated_at?:string|null;tracking_details?:Record<string,any>|null;carrier_weight_oz?:string|null;signed_by?:string|null;incoterm?:string|null;delivery_confirmation?:string|null;shipment?:ShipmentRel|null;package?:PackageRel|null;}declare class Parcels extends ApiResource<Parcel>{static readonly TYPE:ParcelType;create(resource:ParcelCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;update(resource:ParcelUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Parcel>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;shipment(parcelId:string|Parcel,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;package(parcelId:string|Parcel,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Package>;parcel_line_items(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ParcelLineItem>>;attachments(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(parcelId:string|Parcel,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isParcel(resource:any):resource is Parcel;relationship(id:string|ResourceId|null):ParcelRel;type():ParcelType;}export default Parcels;export type{Parcel,ParcelCreate,ParcelUpdate,ParcelType};
|
@@ -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{Order,OrderType}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type PaypalPaymentType='paypal_payments';type PaypalPaymentRel=ResourceRel&{type:PaypalPaymentType;};type OrderRel=ResourceRel&{type:OrderType;};interface PaypalPayment extends Resource{readonly type:PaypalPaymentType;return_url:string;cancel_url:string;note_to_payer?:string|null;paypal_payer_id?:string|null;name?:string|null;paypal_id?:string|null;status
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order,OrderType}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type PaypalPaymentType='paypal_payments';type PaypalPaymentRel=ResourceRel&{type:PaypalPaymentType;};type OrderRel=ResourceRel&{type:OrderType;};interface PaypalPayment extends Resource{readonly type:PaypalPaymentType;return_url:string;cancel_url:string;note_to_payer?:string|null;paypal_payer_id?:string|null;name?:string|null;paypal_id?:string|null;status?:'created'|'approved'|null;approval_url?:string|null;mismatched_amounts?:boolean|null;payment_instrument?:Record<string,any>|null;order?:Order|null;payment_gateway?:PaymentGateway|null;versions?:Version[]|null;}interface PaypalPaymentCreate extends ResourceCreate{return_url:string;cancel_url:string;note_to_payer?:string|null;order:OrderRel;}interface PaypalPaymentUpdate extends ResourceUpdate{paypal_payer_id?:string|null;order?:OrderRel|null;}declare class PaypalPayments extends ApiResource<PaypalPayment>{static readonly TYPE:PaypalPaymentType;create(resource:PaypalPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;update(resource:PaypalPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaypalPayment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(paypalPaymentId:string|PaypalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(paypalPaymentId:string|PaypalPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(paypalPaymentId:string|PaypalPayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isPaypalPayment(resource:any):resource is PaypalPayment;relationship(id:string|ResourceId|null):PaypalPaymentRel;type():PaypalPaymentType;}export default PaypalPayments;export type{PaypalPayment,PaypalPaymentCreate,PaypalPaymentUpdate,PaypalPaymentType};
|
@@ -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 PercentageDiscountPromotionType='percentage_discount_promotions';type PercentageDiscountPromotionRel=ResourceRel&{type:PercentageDiscountPromotionType;};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 PercentageDiscountPromotion extends Resource{readonly type:PercentageDiscountPromotionType;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;percentage:number;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 PercentageDiscountPromotionCreate 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;percentage: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 PercentageDiscountPromotionUpdate 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;percentage?: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 PercentageDiscountPromotions extends ApiResource<PercentageDiscountPromotion>{static readonly TYPE:PercentageDiscountPromotionType;create(resource:PercentageDiscountPromotionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;update(resource:PercentageDiscountPromotionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;skus(percentageDiscountPromotionId:string|PercentageDiscountPromotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;_disable(id:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;_enable(id:string|PercentageDiscountPromotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PercentageDiscountPromotion>;isPercentageDiscountPromotion(resource:any):resource is PercentageDiscountPromotion;relationship(id:string|ResourceId|null):PercentageDiscountPromotionRel;type():PercentageDiscountPromotionType;}export default PercentageDiscountPromotions;export type{PercentageDiscountPromotion,PercentageDiscountPromotionCreate,PercentageDiscountPromotionUpdate,PercentageDiscountPromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList}from'../query';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{BuyXPayYPromotion}from'./buy_x_pay_y_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList}from'../query';import type{Version}from'./versions';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{BuyXPayYPromotion}from'./buy_x_pay_y_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';type PromotionRuleType='promotion_rules';type PromotionRuleRel=ResourceRel&{type:PromotionRuleType;};interface PromotionRule extends Resource{readonly type:PromotionRuleType;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|BuyXPayYPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion|FixedAmountPromotion|null;versions?:Version[]|null;}declare class PromotionRules extends ApiResource<PromotionRule>{static readonly TYPE:PromotionRuleType;versions(promotionRuleId:string|PromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isPromotionRule(resource:any):resource is PromotionRule;relationship(id:string|ResourceId|null):PromotionRuleRel;type():PromotionRuleType;}export default PromotionRules;export type{PromotionRule,PromotionRuleType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market}from'./markets';import type{
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Market}from'./markets';import type{OrderAmountPromotionRule}from'./order_amount_promotion_rules';import type{SkuListPromotionRule}from'./sku_list_promotion_rules';import type{CouponCodesPromotionRule}from'./coupon_codes_promotion_rules';import type{CustomPromotionRule}from'./custom_promotion_rules';import type{SkuList}from'./sku_lists';import type{Coupon}from'./coupons';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag}from'./tags';import type{Version}from'./versions';import type{PromotionRule}from'./promotion_rules';type PromotionType='promotions';type PromotionRel=ResourceRel&{type:PromotionType;};interface Promotion extends Resource{readonly type:PromotionType;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;}declare class Promotions extends ApiResource<Promotion>{static readonly TYPE:PromotionType;market(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;order_amount_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<OrderAmountPromotionRule>;sku_list_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;coupon_codes_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CouponCodesPromotionRule>;custom_promotion_rule(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<CustomPromotionRule>;sku_list(promotionId:string|Promotion,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;coupons(promotionId:string|Promotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Coupon>>;attachments(promotionId:string|Promotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(promotionId:string|Promotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(promotionId:string|Promotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(promotionId:string|Promotion,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isPromotion(resource:any):resource is Promotion;relationship(id:string|ResourceId|null):PromotionRel;type():PromotionType;}export default Promotions;export type{Promotion,PromotionType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,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';type RefundType='refunds';type RefundRel=ResourceRel&{type:RefundType;};interface Refund extends Resource{readonly type:RefundType;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;order?:Order|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;reference_capture?:Capture|null;}declare class Refunds extends ApiResource<Refund>{static readonly TYPE:RefundType;order(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;attachments(refundId:string|Refund,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(refundId:string|Refund,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(refundId:string|Refund,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;reference_capture(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;isRefund(resource:any):resource is Refund;relationship(id:string|ResourceId|null):RefundRel;type():RefundType;}export default Refunds;export type{Refund,RefundType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,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{Return}from'./returns';type RefundType='refunds';type RefundRel=ResourceRel&{type:RefundType;};interface Refund extends Resource{readonly type:RefundType;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;order?:Order|null;attachments?:Attachment[]|null;events?:Event[]|null;versions?:Version[]|null;reference_capture?:Capture|null;return?:Return|null;}declare class Refunds extends ApiResource<Refund>{static readonly TYPE:RefundType;order(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;attachments(refundId:string|Refund,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(refundId:string|Refund,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;versions(refundId:string|Refund,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;reference_capture(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;return(refundId:string|Refund,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;isRefund(resource:any):resource is Refund;relationship(id:string|ResourceId|null):RefundRel;type():RefundType;}export default Refunds;export type{Refund,RefundType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Refunds extends resource_1.ApiResource{async order(e,r,t){const s=e.id||e;return this.resources.fetch({type:"orders"},`refunds/${s}/order`,r,t)}async attachments(e,r,t){const s=e.id||e;return this.resources.fetch({type:"attachments"},`refunds/${s}/attachments`,r,t)}async events(e,r,t){const s=e.id||e;return this.resources.fetch({type:"events"},`refunds/${s}/events`,r,t)}async versions(e,r,t){const s=e.id||e;return this.resources.fetch({type:"versions"},`refunds/${s}/versions`,r,t)}async reference_capture(e,r,t){const s=e.id||e;return this.resources.fetch({type:"captures"},`refunds/${s}/reference_capture`,r,t)}isRefund(e){return e.type&&e.type===Refunds.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Refunds.TYPE}:{id:e.id,type:Refunds.TYPE}}type(){return Refunds.TYPE}}Refunds.TYPE="refunds",exports.default=Refunds;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Refunds extends resource_1.ApiResource{async order(e,r,t){const s=e.id||e;return this.resources.fetch({type:"orders"},`refunds/${s}/order`,r,t)}async attachments(e,r,t){const s=e.id||e;return this.resources.fetch({type:"attachments"},`refunds/${s}/attachments`,r,t)}async events(e,r,t){const s=e.id||e;return this.resources.fetch({type:"events"},`refunds/${s}/events`,r,t)}async versions(e,r,t){const s=e.id||e;return this.resources.fetch({type:"versions"},`refunds/${s}/versions`,r,t)}async reference_capture(e,r,t){const s=e.id||e;return this.resources.fetch({type:"captures"},`refunds/${s}/reference_capture`,r,t)}async return(e,r,t){const s=e.id||e;return this.resources.fetch({type:"returns"},`refunds/${s}/return`,r,t)}isRefund(e){return e.type&&e.type===Refunds.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Refunds.TYPE}:{id:e.id,type:Refunds.TYPE}}type(){return Refunds.TYPE}}Refunds.TYPE="refunds",exports.default=Refunds;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourceRel}from'../resource';
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceId,ResourceRel}from'../resource';type ResourceErrorType='resource_errors';type ResourceErrorRel=ResourceRel&{type:ResourceErrorType;};interface ResourceError extends Resource{readonly type:ResourceErrorType;name:string;code:string;message:string;resource?:Resource|null;}declare class ResourceErrors extends ApiResource<ResourceError>{static readonly TYPE:ResourceErrorType;isResourceError(resource:any):resource is ResourceError;relationship(id:string|ResourceId|null):ResourceErrorRel;type():ResourceErrorType;}export default ResourceErrors;export type{ResourceError,ResourceErrorType};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{Return,ReturnType}from'./returns';import type{LineItem,LineItemType}from'./line_items';type ReturnLineItemType='return_line_items';type ReturnLineItemRel=ResourceRel&{type:ReturnLineItemType;};type ReturnRel=ResourceRel&{type:ReturnType;};type LineItemRel=ResourceRel&{type:LineItemType;};interface ReturnLineItem extends Resource{readonly type:ReturnLineItemType;sku_code?:string|null;bundle_code?:string|null;quantity:number;name?:string|null;image_url?:string|null;return_reason?:Record<string,any>|null;restocked_at?:string|null;return?:Return|null;line_item?:LineItem|null;}interface ReturnLineItemCreate extends ResourceCreate{quantity:number;return_reason?:Record<string,any>|null;return:ReturnRel;line_item:LineItemRel;}interface ReturnLineItemUpdate extends ResourceUpdate{quantity?:number|null;_restock?:boolean|null;return_reason?:Record<string,any>|null;}declare class ReturnLineItems extends ApiResource<ReturnLineItem>{static readonly TYPE:ReturnLineItemType;create(resource:ReturnLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;update(resource:ReturnLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;return(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;line_item(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;_restock(id:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;isReturnLineItem(resource:any):resource is ReturnLineItem;relationship(id:string|ResourceId|null):ReturnLineItemRel;type():ReturnLineItemType;}export default ReturnLineItems;export type{ReturnLineItem,ReturnLineItemCreate,ReturnLineItemUpdate,ReturnLineItemType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';import type{Return,ReturnType}from'./returns';import type{LineItem,LineItemType}from'./line_items';type ReturnLineItemType='return_line_items';type ReturnLineItemRel=ResourceRel&{type:ReturnLineItemType;};type ReturnRel=ResourceRel&{type:ReturnType;};type LineItemRel=ResourceRel&{type:LineItemType;};interface ReturnLineItem extends Resource{readonly type:ReturnLineItemType;sku_code?:string|null;bundle_code?:string|null;quantity:number;name?:string|null;image_url?:string|null;total_amount_cents?:number|null;total_amount_float:number;formatted_total_amount?:string|null;return_reason?:Record<string,any>|null;restocked_at?:string|null;return?:Return|null;line_item?:LineItem|null;}interface ReturnLineItemCreate extends ResourceCreate{quantity:number;return_reason?:Record<string,any>|null;return:ReturnRel;line_item:LineItemRel;}interface ReturnLineItemUpdate extends ResourceUpdate{quantity?:number|null;_restock?:boolean|null;return_reason?:Record<string,any>|null;}declare class ReturnLineItems extends ApiResource<ReturnLineItem>{static readonly TYPE:ReturnLineItemType;create(resource:ReturnLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;update(resource:ReturnLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;return(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;line_item(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;_restock(id:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;isReturnLineItem(resource:any):resource is ReturnLineItem;relationship(id:string|ResourceId|null):ReturnLineItemRel;type():ReturnLineItemType;}export default ReturnLineItems;export type{ReturnLineItem,ReturnLineItemCreate,ReturnLineItemUpdate,ReturnLineItemType};
|
@@ -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{Order,OrderType}from'./orders';import type{Customer}from'./customers';import type{StockLocation,StockLocationType}from'./stock_locations';import type{Address}from'./addresses';import type{ReturnLineItem}from'./return_line_items';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';type ReturnType='returns';type ReturnRel=ResourceRel&{type:ReturnType;};type OrderRel=ResourceRel&{type:OrderType;};type StockLocationRel=ResourceRel&{type:StockLocationType;};type TagRel=ResourceRel&{type:TagType;};interface Return extends Resource{readonly type:ReturnType;number?:string|null;status:'draft'|'requested'|'approved'|'cancelled'|'shipped'|'rejected'|'received';customer_email?:string|null;skus_count?:number|null;approved_at?:string|null;cancelled_at?:string|null;shipped_at?:string|null;rejected_at?:string|null;received_at?:string|null;archived_at?:string|null;order?:Order|null;customer?:Customer|null;stock_location?:StockLocation|null;origin_address?:Address|null;destination_address?:Address|null;return_line_items?:ReturnLineItem[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;}interface ReturnCreate extends ResourceCreate{order:OrderRel;stock_location?:StockLocationRel|null;tags?:TagRel[]|null;}interface ReturnUpdate extends ResourceUpdate{_request?:boolean|null;_approve?:boolean|null;_cancel?:boolean|null;_ship?:boolean|null;_reject?:boolean|null;_receive?:boolean|null;_restock?:boolean|null;_archive?:boolean|null;_unarchive?:boolean|null;stock_location?:StockLocationRel|null;tags?:TagRel[]|null;}declare class Returns extends ApiResource<Return>{static readonly TYPE:ReturnType;create(resource:ReturnCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;update(resource:ReturnUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;stock_location(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;destination_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;return_line_items(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;attachments(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_request(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_approve(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_cancel(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_ship(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_reject(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_receive(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_restock(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_archive(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_unarchive(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;isReturn(resource:any):resource is Return;relationship(id:string|ResourceId|null):ReturnRel;type():ReturnType;}export default Returns;export type{Return,ReturnCreate,ReturnUpdate,ReturnType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order,OrderType}from'./orders';import type{Customer}from'./customers';import type{StockLocation,StockLocationType}from'./stock_locations';import type{Address}from'./addresses';import type{Capture,CaptureType}from'./captures';import type{Refund}from'./refunds';import type{ReturnLineItem}from'./return_line_items';import type{Attachment}from'./attachments';import type{ResourceError}from'./resource_errors';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';type ReturnType='returns';type ReturnRel=ResourceRel&{type:ReturnType;};type OrderRel=ResourceRel&{type:OrderType;};type StockLocationRel=ResourceRel&{type:StockLocationType;};type CaptureRel=ResourceRel&{type:CaptureType;};type TagRel=ResourceRel&{type:TagType;};interface Return extends Resource{readonly type:ReturnType;number?:string|null;status:'draft'|'requested'|'approved'|'cancelled'|'shipped'|'rejected'|'received'|'refunded';customer_email?:string|null;skus_count?:number|null;approved_at?:string|null;cancelled_at?:string|null;shipped_at?:string|null;rejected_at?:string|null;received_at?:string|null;refunded_at?:string|null;archived_at?:string|null;estimated_refund_amount_cents?:number|null;estimated_refund_amount_float?:number|null;formatted_estimated_refund_amount?:string|null;order?:Order|null;customer?:Customer|null;stock_location?:StockLocation|null;origin_address?:Address|null;destination_address?:Address|null;reference_capture?:Capture|null;reference_refund?:Refund|null;return_line_items?:ReturnLineItem[]|null;attachments?:Attachment[]|null;resource_errors?:ResourceError[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;}interface ReturnCreate extends ResourceCreate{order:OrderRel;stock_location?:StockLocationRel|null;reference_capture?:CaptureRel|null;tags?:TagRel[]|null;}interface ReturnUpdate extends ResourceUpdate{_request?:boolean|null;_approve?:boolean|null;_cancel?:boolean|null;_ship?:boolean|null;_reject?:boolean|null;_receive?:boolean|null;_restock?:boolean|null;_archive?:boolean|null;_unarchive?:boolean|null;_refund?:boolean|null;_refund_amount_cents?:number|null;stock_location?:StockLocationRel|null;reference_capture?:CaptureRel|null;tags?:TagRel[]|null;}declare class Returns extends ApiResource<Return>{static readonly TYPE:ReturnType;create(resource:ReturnCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;update(resource:ReturnUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;stock_location(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;destination_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;reference_capture(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Capture>;reference_refund(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Refund>;return_line_items(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;attachments(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;resource_errors(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ResourceError>>;events(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_request(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_approve(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_cancel(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_ship(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_reject(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_receive(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_restock(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_archive(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_unarchive(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_refund(id:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;_refund_amount_cents(id:string|Return,triggerValue:number,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;isReturn(resource:any):resource is Return;relationship(id:string|ResourceId|null):ReturnRel;type():ReturnType;}export default Returns;export type{Return,ReturnCreate,ReturnUpdate,ReturnType};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Returns extends resource_1.ApiResource{async create(e,t
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Returns extends resource_1.ApiResource{async create(e,r,t){return this.resources.create({...e,type:Returns.TYPE},r,t)}async update(e,r,t){return this.resources.update({...e,type:Returns.TYPE},r,t)}async delete(e,r){await this.resources.delete(typeof e=="string"?{id:e,type:Returns.TYPE}:e,r)}async order(e,r,t){const s=e.id||e;return this.resources.fetch({type:"orders"},`returns/${s}/order`,r,t)}async customer(e,r,t){const s=e.id||e;return this.resources.fetch({type:"customers"},`returns/${s}/customer`,r,t)}async stock_location(e,r,t){const s=e.id||e;return this.resources.fetch({type:"stock_locations"},`returns/${s}/stock_location`,r,t)}async origin_address(e,r,t){const s=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${s}/origin_address`,r,t)}async destination_address(e,r,t){const s=e.id||e;return this.resources.fetch({type:"addresses"},`returns/${s}/destination_address`,r,t)}async reference_capture(e,r,t){const s=e.id||e;return this.resources.fetch({type:"captures"},`returns/${s}/reference_capture`,r,t)}async reference_refund(e,r,t){const s=e.id||e;return this.resources.fetch({type:"refunds"},`returns/${s}/reference_refund`,r,t)}async return_line_items(e,r,t){const s=e.id||e;return this.resources.fetch({type:"return_line_items"},`returns/${s}/return_line_items`,r,t)}async attachments(e,r,t){const s=e.id||e;return this.resources.fetch({type:"attachments"},`returns/${s}/attachments`,r,t)}async resource_errors(e,r,t){const s=e.id||e;return this.resources.fetch({type:"resource_errors"},`returns/${s}/resource_errors`,r,t)}async events(e,r,t){const s=e.id||e;return this.resources.fetch({type:"events"},`returns/${s}/events`,r,t)}async tags(e,r,t){const s=e.id||e;return this.resources.fetch({type:"tags"},`returns/${s}/tags`,r,t)}async versions(e,r,t){const s=e.id||e;return this.resources.fetch({type:"versions"},`returns/${s}/versions`,r,t)}async _request(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_request:!0},r,t)}async _approve(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_approve:!0},r,t)}async _cancel(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_cancel:!0},r,t)}async _ship(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_ship:!0},r,t)}async _reject(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_reject:!0},r,t)}async _receive(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_receive:!0},r,t)}async _restock(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_restock:!0},r,t)}async _archive(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_archive:!0},r,t)}async _unarchive(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_unarchive:!0},r,t)}async _refund(e,r,t){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_refund:!0},r,t)}async _refund_amount_cents(e,r,t,s){return this.resources.update({id:typeof e=="string"?e:e.id,type:Returns.TYPE,_refund_amount_cents:r},t,s)}isReturn(e){return e.type&&e.type===Returns.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Returns.TYPE}:{id:e.id,type:Returns.TYPE}}type(){return Returns.TYPE}}Returns.TYPE="returns",exports.default=Returns;
|
@@ -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{Order,OrderType}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type SatispayPaymentType='satispay_payments';type SatispayPaymentRel=ResourceRel&{type:SatispayPaymentType;};type OrderRel=ResourceRel&{type:OrderType;};interface SatispayPayment extends Resource{readonly type:SatispayPaymentType;payment_id?:string|null;flow?:string|null;status?:string|null;redirect_url?:string|null;payment_url?:string|null;payment_response?:Record<string,any>|null;order?:Order|null;payment_gateway?:PaymentGateway|null;versions?:Version[]|null;}interface SatispayPaymentCreate extends ResourceCreate{flow?:string|null;redirect_url?:string|null;order:OrderRel;}interface SatispayPaymentUpdate extends ResourceUpdate{redirect_url?:string|null;_refresh?:boolean|null;order?:OrderRel|null;}declare class SatispayPayments extends ApiResource<SatispayPayment>{static readonly TYPE:SatispayPaymentType;create(resource:SatispayPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;update(resource:SatispayPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(satispayPaymentId:string|SatispayPayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_refresh(id:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;isSatispayPayment(resource:any):resource is SatispayPayment;relationship(id:string|ResourceId|null):SatispayPaymentRel;type():SatispayPaymentType;}export default SatispayPayments;export type{SatispayPayment,SatispayPaymentCreate,SatispayPaymentUpdate,SatispayPaymentType};
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{Order,OrderType}from'./orders';import type{PaymentGateway}from'./payment_gateways';import type{Version}from'./versions';type SatispayPaymentType='satispay_payments';type SatispayPaymentRel=ResourceRel&{type:SatispayPaymentType;};type OrderRel=ResourceRel&{type:OrderType;};interface SatispayPayment extends Resource{readonly type:SatispayPaymentType;payment_id?:string|null;flow?:string|null;status?:string|null;redirect_url?:string|null;payment_url?:string|null;payment_response?:Record<string,any>|null;payment_instrument?:Record<string,any>|null;order?:Order|null;payment_gateway?:PaymentGateway|null;versions?:Version[]|null;}interface SatispayPaymentCreate extends ResourceCreate{flow?:string|null;redirect_url?:string|null;order:OrderRel;}interface SatispayPaymentUpdate extends ResourceUpdate{redirect_url?:string|null;_refresh?:boolean|null;order?:OrderRel|null;}declare class SatispayPayments extends ApiResource<SatispayPayment>{static readonly TYPE:SatispayPaymentType;create(resource:SatispayPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;update(resource:SatispayPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;order(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(satispayPaymentId:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;versions(satispayPaymentId:string|SatispayPayment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_refresh(id:string|SatispayPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SatispayPayment>;isSatispayPayment(resource:any):resource is SatispayPayment;relationship(id:string|ResourceId|null):SatispayPaymentRel;type():SatispayPaymentType;}export default SatispayPayments;export type{SatispayPayment,SatispayPaymentCreate,SatispayPaymentUpdate,SatispayPaymentType};
|
@@ -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{ShippingZone,ShippingZoneType}from'./shipping_zones';import type{ShippingCategory,ShippingCategoryType}from'./shipping_categories';import type{StockLocation,StockLocationType}from'./stock_locations';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{ShippingMethodTier,ShippingMethodTierType}from'./shipping_method_tiers';import type{ShippingWeightTier}from'./shipping_weight_tiers';import type{Attachment}from'./attachments';import type{Version}from'./versions';type ShippingMethodType='shipping_methods';type ShippingMethodRel=ResourceRel&{type:ShippingMethodType;};type MarketRel=ResourceRel&{type:MarketType;};type ShippingZoneRel=ResourceRel&{type:ShippingZoneType;};type ShippingCategoryRel=ResourceRel&{type:ShippingCategoryType;};type StockLocationRel=ResourceRel&{type:StockLocationType;};type ShippingMethodTierRel=ResourceRel&{type:ShippingMethodTierType;};interface ShippingMethod extends Resource{readonly type:ShippingMethodType;name:string;scheme?:
|
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{ShippingZone,ShippingZoneType}from'./shipping_zones';import type{ShippingCategory,ShippingCategoryType}from'./shipping_categories';import type{StockLocation,StockLocationType}from'./stock_locations';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{ShippingMethodTier,ShippingMethodTierType}from'./shipping_method_tiers';import type{ShippingWeightTier}from'./shipping_weight_tiers';import type{Attachment}from'./attachments';import type{Version}from'./versions';type ShippingMethodType='shipping_methods';type ShippingMethodRel=ResourceRel&{type:ShippingMethodType;};type MarketRel=ResourceRel&{type:MarketType;};type ShippingZoneRel=ResourceRel&{type:ShippingZoneType;};type ShippingCategoryRel=ResourceRel&{type:ShippingCategoryType;};type StockLocationRel=ResourceRel&{type:StockLocationType;};type ShippingMethodTierRel=ResourceRel&{type:ShippingMethodTierType;};interface ShippingMethod extends Resource{readonly type:ShippingMethodType;name:string;scheme?:'flat'|'weight_tiered'|'external'|null;currency_code?:string|null;external_prices_url?:string|null;price_amount_cents:number;price_amount_float?:number|null;formatted_price_amount?:string|null;free_over_amount_cents?:number|null;free_over_amount_float?:number|null;formatted_free_over_amount?:string|null;use_subtotal?:boolean|null;price_amount_for_shipment_cents?:number|null;price_amount_for_shipment_float?:number|null;formatted_price_amount_for_shipment?:string|null;min_weight?:number|null;max_weight?:number|null;unit_of_weight?:'gr'|'oz'|'lb'|null;disabled_at?:string|null;circuit_state?:string|null;circuit_failure_count?:number|null;market?:Market|null;shipping_zone?:ShippingZone|null;shipping_category?:ShippingCategory|null;stock_location?:StockLocation|null;delivery_lead_time_for_shipment?:DeliveryLeadTime|null;shipping_method_tiers?:ShippingMethodTier[]|null;shipping_weight_tiers?:ShippingWeightTier[]|null;attachments?:Attachment[]|null;versions?:Version[]|null;}interface ShippingMethodCreate extends ResourceCreate{name:string;scheme?:'flat'|'weight_tiered'|'external'|null;currency_code?:string|null;external_prices_url?:string|null;price_amount_cents:number;free_over_amount_cents?:number|null;use_subtotal?:boolean|null;min_weight?:number|null;max_weight?:number|null;unit_of_weight?:'gr'|'oz'|'lb'|null;_disable?:boolean|null;_enable?:boolean|null;market?:MarketRel|null;shipping_zone?:ShippingZoneRel|null;shipping_category?:ShippingCategoryRel|null;stock_location?:StockLocationRel|null;shipping_method_tiers?:ShippingMethodTierRel[]|null;}interface ShippingMethodUpdate extends ResourceUpdate{name?:string|null;scheme?:'flat'|'weight_tiered'|'external'|null;currency_code?:string|null;external_prices_url?:string|null;price_amount_cents?:number|null;free_over_amount_cents?:number|null;use_subtotal?:boolean|null;min_weight?:number|null;max_weight?:number|null;unit_of_weight?:'gr'|'oz'|'lb'|null;_disable?:boolean|null;_enable?:boolean|null;_reset_circuit?:boolean|null;market?:MarketRel|null;shipping_zone?:ShippingZoneRel|null;shipping_category?:ShippingCategoryRel|null;stock_location?:StockLocationRel|null;shipping_method_tiers?:ShippingMethodTierRel[]|null;}declare class ShippingMethods extends ApiResource<ShippingMethod>{static readonly TYPE:ShippingMethodType;create(resource:ShippingMethodCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;update(resource:ShippingMethodUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;market(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;shipping_zone(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;shipping_category(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;stock_location(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;delivery_lead_time_for_shipment(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;shipping_method_tiers(shippingMethodId:string|ShippingMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethodTier>>;shipping_weight_tiers(shippingMethodId:string|ShippingMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingWeightTier>>;attachments(shippingMethodId:string|ShippingMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(shippingMethodId:string|ShippingMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;_disable(id:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;_enable(id:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;_reset_circuit(id:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;isShippingMethod(resource:any):resource is ShippingMethod;relationship(id:string|ResourceId|null):ShippingMethodRel;type():ShippingMethodType;}export default ShippingMethods;export type{ShippingMethod,ShippingMethodCreate,ShippingMethodUpdate,ShippingMethodType};
|
@@ -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{
|
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{SkuList,SkuListType}from'./sku_lists';import type{Sku}from'./skus';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 SkuListPromotionRuleType='sku_list_promotion_rules';type SkuListPromotionRuleRel=ResourceRel&{type:SkuListPromotionRuleType;};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 SkuListRel=ResourceRel&{type:SkuListType;};interface SkuListPromotionRule extends Resource{readonly type:SkuListPromotionRuleType;all_skus?:boolean|null;min_quantity?:number|null;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|BuyXPayYPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion|FixedAmountPromotion|null;versions?:Version[]|null;sku_list?:SkuList|null;skus?:Sku[]|null;}interface SkuListPromotionRuleCreate extends ResourceCreate{all_skus?:boolean|null;min_quantity?:number|null;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel;sku_list?:SkuListRel|null;}interface SkuListPromotionRuleUpdate extends ResourceUpdate{all_skus?:boolean|null;min_quantity?:number|null;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|BuyXPayYPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel|FixedAmountPromotionRel|null;sku_list?:SkuListRel|null;}declare class SkuListPromotionRules extends ApiResource<SkuListPromotionRule>{static readonly TYPE:SkuListPromotionRuleType;create(resource:SkuListPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;update(resource:SkuListPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;versions(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;sku_list(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isSkuListPromotionRule(resource:any):resource is SkuListPromotionRule;relationship(id:string|ResourceId|null):SkuListPromotionRuleRel;type():SkuListPromotionRuleType;}export default SkuListPromotionRules;export type{SkuListPromotionRule,SkuListPromotionRuleCreate,SkuListPromotionRuleUpdate,SkuListPromotionRuleType};
|
@@ -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{ShippingCategory,ShippingCategoryType}from'./shipping_categories';import type{Price}from'./prices';import type{StockItem}from'./stock_items';import type{StockReservation}from'./stock_reservations';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{SkuOption}from'./sku_options';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';type SkuType='skus';type SkuRel=ResourceRel&{type:SkuType;};type ShippingCategoryRel=ResourceRel&{type:ShippingCategoryType;};type TagRel=ResourceRel&{type:TagType;};interface Sku extends Resource{readonly type:SkuType;code:string;name:string;description?:string|null;image_url?:string|null;pieces_per_pack?:number|null;weight?:number|null;unit_of_weight?:'gr'|'
|
1
|
+
import{ApiResource}from'../resource';import type{Resource,ResourceCreate,ResourceUpdate,ResourceId,ResourcesConfig,ResourceRel,ListResponse}from'../resource';import type{QueryParamsRetrieve,QueryParamsList}from'../query';import type{ShippingCategory,ShippingCategoryType}from'./shipping_categories';import type{Price}from'./prices';import type{StockItem}from'./stock_items';import type{StockReservation}from'./stock_reservations';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{SkuOption}from'./sku_options';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag,TagType}from'./tags';import type{Version}from'./versions';type SkuType='skus';type SkuRel=ResourceRel&{type:SkuType;};type ShippingCategoryRel=ResourceRel&{type:ShippingCategoryType;};type TagRel=ResourceRel&{type:TagType;};interface Sku extends Resource{readonly type:SkuType;code:string;name:string;description?:string|null;image_url?:string|null;pieces_per_pack?:number|null;weight?:number|null;unit_of_weight?:'gr'|'oz'|'lb'|null;hs_tariff_number?:string|null;do_not_ship?:boolean|null;do_not_track?:boolean|null;inventory?:Record<string,any>|null;shipping_category?:ShippingCategory|null;prices?:Price[]|null;stock_items?:StockItem[]|null;stock_reservations?:StockReservation[]|null;delivery_lead_times?:DeliveryLeadTime[]|null;sku_options?:SkuOption[]|null;attachments?:Attachment[]|null;events?:Event[]|null;tags?:Tag[]|null;versions?:Version[]|null;}interface SkuCreate extends ResourceCreate{code:string;name:string;description?:string|null;image_url?:string|null;pieces_per_pack?:number|null;weight?:number|null;unit_of_weight?:'gr'|'oz'|'lb'|null;hs_tariff_number?:string|null;do_not_ship?:boolean|null;do_not_track?:boolean|null;shipping_category:ShippingCategoryRel;tags?:TagRel[]|null;}interface SkuUpdate extends ResourceUpdate{code?:string|null;name?:string|null;description?:string|null;image_url?:string|null;pieces_per_pack?:number|null;weight?:number|null;unit_of_weight?:'gr'|'oz'|'lb'|null;hs_tariff_number?:string|null;do_not_ship?:boolean|null;do_not_track?:boolean|null;shipping_category?:ShippingCategoryRel|null;tags?:TagRel[]|null;}declare class Skus extends ApiResource<Sku>{static readonly TYPE:SkuType;create(resource:SkuCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;update(resource:SkuUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;shipping_category(skuId:string|Sku,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;prices(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;stock_items(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;stock_reservations(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;delivery_lead_times(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<DeliveryLeadTime>>;sku_options(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuOption>>;attachments(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSku(resource:any):resource is Sku;relationship(id:string|ResourceId|null):SkuRel;type():SkuType;}export default Skus;export type{Sku,SkuCreate,SkuUpdate,SkuType};
|
@@ -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{Sku,SkuType}from'./skus';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{Sku,SkuType}from'./skus';import type{Attachment}from'./attachments';import type{Version}from'./versions';import type{AvalaraAccount,AvalaraAccountType}from'./avalara_accounts';import type{TaxjarAccount,TaxjarAccountType}from'./taxjar_accounts';import type{ManualTaxCalculator,ManualTaxCalculatorType}from'./manual_tax_calculators';import type{ExternalTaxCalculator,ExternalTaxCalculatorType}from'./external_tax_calculators';type TaxCategoryType='tax_categories';type TaxCategoryRel=ResourceRel&{type:TaxCategoryType;};type SkuRel=ResourceRel&{type:SkuType;};type AvalaraAccountRel=ResourceRel&{type:AvalaraAccountType;};type TaxjarAccountRel=ResourceRel&{type:TaxjarAccountType;};type ManualTaxCalculatorRel=ResourceRel&{type:ManualTaxCalculatorType;};type ExternalTaxCalculatorRel=ResourceRel&{type:ExternalTaxCalculatorType;};interface TaxCategory extends Resource{readonly type:TaxCategoryType;code:string;sku_code?:string|null;sku?:Sku|null;tax_calculator?:AvalaraAccount|TaxjarAccount|ManualTaxCalculator|ExternalTaxCalculator|null;attachments?:Attachment[]|null;versions?:Version[]|null;}interface TaxCategoryCreate extends ResourceCreate{code:string;sku_code?:string|null;sku:SkuRel;tax_calculator:AvalaraAccountRel|TaxjarAccountRel|ManualTaxCalculatorRel|ExternalTaxCalculatorRel;}interface TaxCategoryUpdate extends ResourceUpdate{code?:string|null;sku_code?:string|null;sku?:SkuRel|null;}declare class TaxCategories extends ApiResource<TaxCategory>{static readonly TYPE:TaxCategoryType;create(resource:TaxCategoryCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;update(resource:TaxCategoryUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;delete(id:string|ResourceId,options?:ResourcesConfig):Promise<void>;sku(taxCategoryId:string|TaxCategory,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;attachments(taxCategoryId:string|TaxCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(taxCategoryId:string|TaxCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isTaxCategory(resource:any):resource is TaxCategory;relationship(id:string|ResourceId|null):TaxCategoryRel;type():TaxCategoryType;}export default TaxCategories;export type{TaxCategory,TaxCategoryCreate,TaxCategoryUpdate,TaxCategoryType};
|
package/lib/cjs/util.d.ts
CHANGED
@@ -1,6 +1 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
/// <reference types="node" />
|
3
|
-
/// <reference types="node" />
|
4
|
-
/// <reference types="node" />
|
5
|
-
/// <reference types="node" />
|
6
1
|
import type{ObjectType}from"../src/common";declare const sleep:(ms:number)=>Promise<NodeJS.Timeout>;declare const sortObjectFields:(obj:ObjectType)=>ObjectType;export{sleep,sortObjectFields,};
|