@commercelayer/sdk 4.18.0 → 4.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/api.d.ts +1 -1
- package/lib/cjs/client.d.ts +1 -1
- package/lib/cjs/client.js +1 -1
- package/lib/cjs/commercelayer.d.ts +1 -1
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.js +1 -1
- package/lib/cjs/debug.d.ts +1 -1
- package/lib/cjs/error.js +1 -1
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/interceptor.d.ts +1 -1
- package/lib/cjs/query.d.ts +1 -1
- package/lib/cjs/resource.d.ts +1 -1
- package/lib/cjs/resources/addresses.d.ts +1 -1
- package/lib/cjs/resources/adjustments.d.ts +1 -1
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -1
- package/lib/cjs/resources/adyen_payments.d.ts +1 -1
- package/lib/cjs/resources/application.d.ts +1 -1
- package/lib/cjs/resources/attachments.d.ts +1 -1
- package/lib/cjs/resources/authorizations.d.ts +1 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -1
- package/lib/cjs/resources/avalara_accounts.js +1 -1
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -1
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -1
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -1
- package/lib/cjs/resources/braintree_payments.d.ts +1 -1
- package/lib/cjs/resources/bundles.d.ts +1 -1
- package/lib/cjs/resources/captures.d.ts +1 -1
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -1
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -1
- package/lib/cjs/resources/cleanups.d.ts +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -1
- package/lib/cjs/resources/coupons.d.ts +1 -1
- package/lib/cjs/resources/customer_addresses.d.ts +1 -1
- package/lib/cjs/resources/customer_groups.d.ts +1 -1
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -1
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -1
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -1
- package/lib/cjs/resources/customers.d.ts +1 -1
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -1
- package/lib/cjs/resources/event_callbacks.d.ts +1 -1
- package/lib/cjs/resources/events.d.ts +1 -1
- package/lib/cjs/resources/exports.d.ts +1 -1
- package/lib/cjs/resources/external_gateways.d.ts +1 -1
- package/lib/cjs/resources/external_payments.d.ts +1 -1
- package/lib/cjs/resources/external_promotions.d.ts +1 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -1
- package/lib/cjs/resources/external_tax_calculators.js +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/gift_card_recipients.d.ts +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +1 -1
- package/lib/cjs/resources/google_geocoders.d.ts +1 -1
- package/lib/cjs/resources/imports.d.ts +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/cjs/resources/inventory_models.d.ts +1 -1
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -1
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -1
- package/lib/cjs/resources/klarna_payments.d.ts +1 -1
- package/lib/cjs/resources/line_item_options.d.ts +1 -1
- package/lib/cjs/resources/line_items.d.ts +1 -1
- package/lib/cjs/resources/manual_gateways.d.ts +1 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/cjs/resources/manual_tax_calculators.js +1 -1
- package/lib/cjs/resources/markets.d.ts +1 -1
- package/lib/cjs/resources/merchants.d.ts +1 -1
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/order_copies.d.ts +1 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -1
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -1
- package/lib/cjs/resources/orders.d.ts +1 -1
- package/lib/cjs/resources/organization.d.ts +1 -1
- package/lib/cjs/resources/packages.d.ts +1 -1
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -1
- package/lib/cjs/resources/parcels.d.ts +1 -1
- package/lib/cjs/resources/payment_gateways.d.ts +1 -1
- package/lib/cjs/resources/payment_methods.d.ts +1 -1
- package/lib/cjs/resources/paypal_gateways.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/price_lists.d.ts +1 -1
- package/lib/cjs/resources/price_tiers.d.ts +1 -1
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -1
- package/lib/cjs/resources/prices.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/return_line_items.d.ts +1 -1
- package/lib/cjs/resources/returns.d.ts +1 -1
- package/lib/cjs/resources/shipments.d.ts +1 -1
- package/lib/cjs/resources/shipping_categories.d.ts +1 -1
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -1
- package/lib/cjs/resources/shipping_methods.d.ts +1 -1
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -1
- package/lib/cjs/resources/shipping_zones.d.ts +1 -1
- package/lib/cjs/resources/sku_list_items.d.ts +1 -1
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/cjs/resources/sku_lists.d.ts +1 -1
- package/lib/cjs/resources/sku_lists.js +1 -1
- package/lib/cjs/resources/sku_options.d.ts +1 -1
- package/lib/cjs/resources/skus.d.ts +1 -1
- package/lib/cjs/resources/stock_items.d.ts +1 -1
- package/lib/cjs/resources/stock_line_items.d.ts +1 -1
- package/lib/cjs/resources/stock_locations.d.ts +1 -1
- package/lib/cjs/resources/stock_transfers.d.ts +1 -1
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -1
- package/lib/cjs/resources/stripe_payments.d.ts +1 -1
- package/lib/cjs/resources/tax_calculators.d.ts +1 -1
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +1 -1
- package/lib/cjs/resources/tax_rules.d.ts +1 -1
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -1
- package/lib/cjs/resources/taxjar_accounts.js +1 -1
- package/lib/cjs/resources/transactions.d.ts +1 -1
- package/lib/cjs/resources/voids.d.ts +1 -1
- package/lib/cjs/resources/webhooks.d.ts +1 -1
- package/lib/cjs/resources/wire_transfers.d.ts +1 -1
- package/lib/cjs/util.d.ts +1 -1
- package/lib/esm/api.d.ts +1 -1
- package/lib/esm/client.d.ts +1 -1
- package/lib/esm/client.js +1 -1
- package/lib/esm/commercelayer.d.ts +1 -1
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +1 -1
- package/lib/esm/debug.d.ts +1 -1
- package/lib/esm/error.js +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/interceptor.d.ts +1 -1
- package/lib/esm/query.d.ts +1 -1
- package/lib/esm/resource.d.ts +1 -1
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.d.ts +1 -1
- package/lib/esm/resources/adjustments.d.ts +1 -1
- package/lib/esm/resources/adyen_gateways.d.ts +1 -1
- package/lib/esm/resources/adyen_payments.d.ts +1 -1
- package/lib/esm/resources/application.d.ts +1 -1
- package/lib/esm/resources/attachments.d.ts +1 -1
- package/lib/esm/resources/authorizations.d.ts +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +1 -1
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -1
- package/lib/esm/resources/bing_geocoders.d.ts +1 -1
- package/lib/esm/resources/braintree_gateways.d.ts +1 -1
- package/lib/esm/resources/braintree_payments.d.ts +1 -1
- package/lib/esm/resources/bundles.d.ts +1 -1
- package/lib/esm/resources/captures.d.ts +1 -1
- package/lib/esm/resources/carrier_accounts.d.ts +1 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -1
- package/lib/esm/resources/cleanups.d.ts +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/coupon_recipients.d.ts +1 -1
- package/lib/esm/resources/coupons.d.ts +1 -1
- package/lib/esm/resources/customer_addresses.d.ts +1 -1
- package/lib/esm/resources/customer_groups.d.ts +1 -1
- package/lib/esm/resources/customer_password_resets.d.ts +1 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -1
- package/lib/esm/resources/customers.d.ts +1 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -1
- package/lib/esm/resources/event_callbacks.d.ts +1 -1
- package/lib/esm/resources/events.d.ts +1 -1
- package/lib/esm/resources/exports.d.ts +1 -1
- package/lib/esm/resources/external_gateways.d.ts +1 -1
- package/lib/esm/resources/external_payments.d.ts +1 -1
- package/lib/esm/resources/external_promotions.d.ts +1 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -1
- package/lib/esm/resources/external_tax_calculators.js +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/gift_card_recipients.d.ts +1 -1
- package/lib/esm/resources/gift_cards.d.ts +1 -1
- package/lib/esm/resources/google_geocoders.d.ts +1 -1
- package/lib/esm/resources/imports.d.ts +1 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/esm/resources/inventory_models.d.ts +1 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/esm/resources/klarna_gateways.d.ts +1 -1
- package/lib/esm/resources/klarna_payments.d.ts +1 -1
- package/lib/esm/resources/line_item_options.d.ts +1 -1
- package/lib/esm/resources/line_items.d.ts +1 -1
- package/lib/esm/resources/manual_gateways.d.ts +1 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.d.ts +1 -1
- package/lib/esm/resources/merchants.d.ts +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/order_copies.d.ts +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +1 -1
- package/lib/esm/resources/order_validation_rules.d.ts +1 -1
- package/lib/esm/resources/orders.d.ts +1 -1
- package/lib/esm/resources/organization.d.ts +1 -1
- package/lib/esm/resources/packages.d.ts +1 -1
- package/lib/esm/resources/parcel_line_items.d.ts +1 -1
- package/lib/esm/resources/parcels.d.ts +1 -1
- package/lib/esm/resources/payment_gateways.d.ts +1 -1
- package/lib/esm/resources/payment_methods.d.ts +1 -1
- package/lib/esm/resources/paypal_gateways.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/price_lists.d.ts +1 -1
- package/lib/esm/resources/price_tiers.d.ts +1 -1
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -1
- package/lib/esm/resources/prices.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/return_line_items.d.ts +1 -1
- package/lib/esm/resources/returns.d.ts +1 -1
- package/lib/esm/resources/shipments.d.ts +1 -1
- package/lib/esm/resources/shipping_categories.d.ts +1 -1
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -1
- package/lib/esm/resources/shipping_methods.d.ts +1 -1
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -1
- package/lib/esm/resources/shipping_zones.d.ts +1 -1
- package/lib/esm/resources/sku_list_items.d.ts +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -1
- package/lib/esm/resources/sku_lists.d.ts +1 -1
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.d.ts +1 -1
- package/lib/esm/resources/skus.d.ts +1 -1
- package/lib/esm/resources/stock_items.d.ts +1 -1
- package/lib/esm/resources/stock_line_items.d.ts +1 -1
- package/lib/esm/resources/stock_locations.d.ts +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +1 -1
- package/lib/esm/resources/stripe_gateways.d.ts +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +1 -1
- package/lib/esm/resources/tax_calculators.d.ts +1 -1
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.d.ts +1 -1
- package/lib/esm/resources/tax_rules.d.ts +1 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -1
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/transactions.d.ts +1 -1
- package/lib/esm/resources/voids.d.ts +1 -1
- package/lib/esm/resources/webhooks.d.ts +1 -1
- package/lib/esm/resources/wire_transfers.d.ts +1 -1
- package/lib/esm/util.d.ts +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Shipment}from'./shipments';import type{LineItem}from'./line_items';import type{StockItem}from'./stock_items';
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Shipment}from'./shipments';import type{LineItem}from'./line_items';import type{StockItem}from'./stock_items';type StockLineItemRel=ResourceRel&{type:typeof StockLineItems.TYPE;};interface StockLineItem extends Resource{sku_code?:string;bundle_code?:string;quantity?:number;shipment?:Shipment;line_item?:LineItem;stock_item?:StockItem;}declare class StockLineItems extends ApiResource{static readonly TYPE:'stock_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;shipment(stockLineItemId:string|StockLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;line_item(stockLineItemId:string|StockLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;stock_item(stockLineItemId:string|StockLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;isStockLineItem(resource:any):resource is StockLineItem;relationship(id:string|ResourceId|null):StockLineItemRel;type():string;}export default StockLineItems;export{StockLineItem};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{InventoryStockLocation}from'./inventory_stock_locations';import type{InventoryReturnLocation}from'./inventory_return_locations';import type{StockItem}from'./stock_items';import type{StockTransfer}from'./stock_transfers';import type{Attachment}from'./attachments';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Address}from'./addresses';import type{InventoryStockLocation}from'./inventory_stock_locations';import type{InventoryReturnLocation}from'./inventory_return_locations';import type{StockItem}from'./stock_items';import type{StockTransfer}from'./stock_transfers';import type{Attachment}from'./attachments';type StockLocationRel=ResourceRel&{type:typeof StockLocations.TYPE;};type AddressRel=ResourceRel&{type:'addresses';};interface StockLocation extends Resource{number?:number;name?:string;label_format?:string;suppress_etd?:boolean;address?:Address;inventory_stock_locations?:InventoryStockLocation[];inventory_return_locations?:InventoryReturnLocation[];stock_items?:StockItem[];stock_transfers?:StockTransfer[];attachments?:Attachment[];}interface StockLocationCreate extends ResourceCreate{name:string;label_format?:string;suppress_etd?:boolean;address:AddressRel;}interface StockLocationUpdate extends ResourceUpdate{name?:string;label_format?:string;suppress_etd?:boolean;address?:AddressRel;}declare class StockLocations extends ApiResource{static readonly TYPE:'stock_locations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLocation>>;create(resource:StockLocationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;update(resource:StockLocationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;delete(id:string,options?:ResourcesConfig):Promise<void>;address(stockLocationId:string|StockLocation,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;inventory_stock_locations(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryStockLocation>>;inventory_return_locations(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryReturnLocation>>;stock_items(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;stock_transfers(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;attachments(stockLocationId:string|StockLocation,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isStockLocation(resource:any):resource is StockLocation;relationship(id:string|ResourceId|null):StockLocationRel;type():string;}export default StockLocations;export{StockLocation,StockLocationCreate,StockLocationUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Sku}from'./skus';import type{StockLocation}from'./stock_locations';import type{Shipment}from'./shipments';import type{LineItem}from'./line_items';import type{Event}from'./events';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Sku}from'./skus';import type{StockLocation}from'./stock_locations';import type{Shipment}from'./shipments';import type{LineItem}from'./line_items';import type{Event}from'./events';type StockTransferRel=ResourceRel&{type:typeof StockTransfers.TYPE;};type SkuRel=ResourceRel&{type:'skus';};type StockLocationRel=ResourceRel&{type:'stock_locations';};type ShipmentRel=ResourceRel&{type:'shipments';};type LineItemRel=ResourceRel&{type:'line_items';};interface StockTransfer extends Resource{sku_code?:string;status?:string;quantity?:number;completed_at?:string;cancelled_at?:string;sku?:Sku;origin_stock_location?:StockLocation;destination_stock_location?:StockLocation;shipment?:Shipment;line_item?:LineItem;events?:Event[];}interface StockTransferCreate extends ResourceCreate{sku_code?:string;quantity:number;sku:SkuRel;origin_stock_location:StockLocationRel;destination_stock_location:StockLocationRel;shipment?:ShipmentRel;line_item?:LineItemRel;}interface StockTransferUpdate extends ResourceUpdate{sku_code?:string;_upcoming?:boolean;_picking?:boolean;_in_transit?:boolean;_complete?:boolean;_cancel?:boolean;sku?:SkuRel;origin_stock_location?:StockLocationRel;destination_stock_location?:StockLocationRel;}declare class StockTransfers extends ApiResource{static readonly TYPE:'stock_transfers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;create(resource:StockTransferCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;update(resource:StockTransferUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;origin_stock_location(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;destination_stock_location(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;shipment(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;line_item(stockTransferId:string|StockTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;events(stockTransferId:string|StockTransfer,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;isStockTransfer(resource:any):resource is StockTransfer;relationship(id:string|ResourceId|null):StockTransferRel;type():string;}export default StockTransfers;export{StockTransfer,StockTransferCreate,StockTransferUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{StripePayment}from'./stripe_payments';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{StripePayment}from'./stripe_payments';type StripeGatewayRel=ResourceRel&{type:typeof StripeGateways.TYPE;};interface StripeGateway extends Resource{name?:string;webhook_endpoint_id?:string;webhook_endpoint_secret?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];stripe_payments?:StripePayment[];}interface StripeGatewayCreate extends ResourceCreate{name:string;login:string;publishable_key?:string;}interface StripeGatewayUpdate extends ResourceUpdate{name?:string;}declare class StripeGateways extends ApiResource{static readonly TYPE:'stripe_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripeGateway>>;create(resource:StripeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;update(resource:StripeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;stripe_payments(stripeGatewayId:string|StripeGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripePayment>>;isStripeGateway(resource:any):resource is StripeGateway;relationship(id:string|ResourceId|null):StripeGatewayRel;type():string;}export default StripeGateways;export{StripeGateway,StripeGatewayCreate,StripeGatewayUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';type StripePaymentRel=ResourceRel&{type:typeof StripePayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface StripePayment extends Resource{client_secret?:string;publishable_key?:string;options?:object;payment_method?:object;mismatched_amounts?:boolean;intent_amount_cents?:number;intent_amount_float?:number;formatted_intent_amount?:string;order?:Order;payment_gateway?:PaymentGateway;}interface StripePaymentCreate extends ResourceCreate{options?:object;order:OrderRel;}interface StripePaymentUpdate extends ResourceUpdate{options?:object;_refresh?:boolean;order?:OrderRel;}declare class StripePayments extends ApiResource{static readonly TYPE:'stripe_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripePayment>>;create(resource:StripePaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;update(resource:StripePaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(stripePaymentId:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(stripePaymentId:string|StripePayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isStripePayment(resource:any):resource is StripePayment;relationship(id:string|ResourceId|null):StripePaymentRel;type():string;}export default StripePayments;export{StripePayment,StripePaymentCreate,StripePaymentUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';type TaxCalculatorRel=ResourceRel&{type:typeof TaxCalculators.TYPE;};interface TaxCalculator extends Resource{name?:string;markets?:Market[];attachments?:Attachment[];}declare class TaxCalculators extends ApiResource{static readonly TYPE:'tax_calculators';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCalculator>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCalculator>;markets(taxCalculatorId:string|TaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(taxCalculatorId:string|TaxCalculator,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isTaxCalculator(resource:any):resource is TaxCalculator;relationship(id:string|ResourceId|null):TaxCalculatorRel;type():string;}export default TaxCalculators;export{TaxCalculator};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},t,r)}async
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},t,r)}async markets(e,t,r){const s=e.id||e;return this.resources.fetch({type:"markets"},`tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`tax_calculators/${s}/attachments`,t,r)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators",exports.default=TaxCalculators;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Sku}from'./skus';import type{AvalaraAccount}from'./avalara_accounts';import type{TaxjarAccount}from'./taxjar_accounts';import type{ManualTaxCalculator}from'./manual_tax_calculators';import type{ExternalTaxCalculator}from'./external_tax_calculators';import type{Attachment}from'./attachments';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Sku}from'./skus';import type{AvalaraAccount}from'./avalara_accounts';import type{TaxjarAccount}from'./taxjar_accounts';import type{ManualTaxCalculator}from'./manual_tax_calculators';import type{ExternalTaxCalculator}from'./external_tax_calculators';import type{Attachment}from'./attachments';type TaxCategoryRel=ResourceRel&{type:typeof TaxCategories.TYPE;};type SkuRel=ResourceRel&{type:'skus';};type AvalaraAccountRel=ResourceRel&{type:'avalara_accounts';};type TaxjarAccountRel=ResourceRel&{type:'taxjar_accounts';};type ManualTaxCalculatorRel=ResourceRel&{type:'manual_tax_calculators';};type ExternalTaxCalculatorRel=ResourceRel&{type:'external_tax_calculators';};interface TaxCategory extends Resource{code?:string;sku_code?:string;sku?:Sku;tax_calculator?:AvalaraAccount|TaxjarAccount|ManualTaxCalculator|ExternalTaxCalculator;attachments?:Attachment[];}interface TaxCategoryCreate extends ResourceCreate{code:string;sku_code?:string;sku:SkuRel;tax_calculator:AvalaraAccountRel|TaxjarAccountRel|ManualTaxCalculatorRel|ExternalTaxCalculatorRel;}interface TaxCategoryUpdate extends ResourceUpdate{code?:string;sku_code?:string;sku?:SkuRel;}declare class TaxCategories extends ApiResource{static readonly TYPE:'tax_categories';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;create(resource:TaxCategoryCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;update(resource:TaxCategoryUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;delete(id:string,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>>;isTaxCategory(resource:any):resource is TaxCategory;relationship(id:string|ResourceId|null):TaxCategoryRel;type():string;}export default TaxCategories;export{TaxCategory,TaxCategoryCreate,TaxCategoryUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{ManualTaxCalculator}from'./manual_tax_calculators';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{ManualTaxCalculator}from'./manual_tax_calculators';type TaxRuleRel=ResourceRel&{type:typeof TaxRules.TYPE;};type ManualTaxCalculatorRel=ResourceRel&{type:'manual_tax_calculators';};interface TaxRule extends Resource{name?:string;tax_rate?:number;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;freight_taxable?:boolean;payment_method_taxable?:boolean;gift_card_taxable?:boolean;adjustment_taxable?:boolean;breakdown?:object;manual_tax_calculator?:ManualTaxCalculator;}interface TaxRuleCreate extends ResourceCreate{name:string;tax_rate?:number;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;freight_taxable?:boolean;payment_method_taxable?:boolean;gift_card_taxable?:boolean;adjustment_taxable?:boolean;manual_tax_calculator:ManualTaxCalculatorRel;}interface TaxRuleUpdate extends ResourceUpdate{name?:string;tax_rate?:number;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;freight_taxable?:boolean;payment_method_taxable?:boolean;gift_card_taxable?:boolean;adjustment_taxable?:boolean;manual_tax_calculator?:ManualTaxCalculatorRel;}declare class TaxRules extends ApiResource{static readonly TYPE:'tax_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxRule>>;create(resource:TaxRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxRule>;update(resource:TaxRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;manual_tax_calculator(taxRuleId:string|TaxRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;isTaxRule(resource:any):resource is TaxRule;relationship(id:string|ResourceId|null):TaxRuleRel;type():string;}export default TaxRules;export{TaxRule,TaxRuleCreate,TaxRuleUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';import type{TaxCategory}from'./tax_categories';type TaxjarAccountRel=ResourceRel&{type:typeof TaxjarAccounts.TYPE;};type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface TaxjarAccount extends Resource{name?:string;markets?:Market[];attachments?:Attachment[];tax_categories?:TaxCategory[];}interface TaxjarAccountCreate extends ResourceCreate{name:string;api_key:string;tax_categories?:TaxCategoryRel[];}interface TaxjarAccountUpdate extends ResourceUpdate{name?:string;api_key?:string;tax_categories?:TaxCategoryRel[];}declare class TaxjarAccounts extends ApiResource{static readonly TYPE:'taxjar_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxjarAccount>>;create(resource:TaxjarAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;update(resource:TaxjarAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;markets(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;tax_categories(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;isTaxjarAccount(resource:any):resource is TaxjarAccount;relationship(id:string|ResourceId|null):TaxjarAccountRel;type():string;}export default TaxjarAccounts;export{TaxjarAccount,TaxjarAccountCreate,TaxjarAccountUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}async
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`taxjar_accounts/${r}/markets`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`taxjar_accounts/${r}/attachments`,t,s)}async tax_categories(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${r}/tax_categories`,t,s)}isTaxjarAccount(e){return e.type&&e.type===TaxjarAccounts.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxjarAccounts.TYPE}:{id:e.id,type:TaxjarAccounts.TYPE}}type(){return TaxjarAccounts.TYPE}}TaxjarAccounts.TYPE="taxjar_accounts",exports.default=TaxjarAccounts;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';type TransactionRel=ResourceRel&{type:typeof Transactions.TYPE;};interface Transaction extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;}declare class Transactions extends ApiResource{static readonly TYPE:'transactions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Transaction>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Transaction>;order(transactionId:string|Transaction,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isTransaction(resource:any):resource is Transaction;relationship(id:string|ResourceId|null):TransactionRel;type():string;}export default Transactions;export{Transaction};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Authorization}from'./authorizations';
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Authorization}from'./authorizations';type VoidRel=ResourceRel&{type:typeof Voids.TYPE;};interface Void extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;reference_authorization?:Authorization;}declare class Voids extends ApiResource{static readonly TYPE:'voids';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Void>;order(voidId:string|Void,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_authorization(voidId:string|Void,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;isVoid(resource:any):resource is Void;relationship(id:string|ResourceId|null):VoidRel;type():string;}export default Voids;export{Void};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{EventCallback}from'./event_callbacks';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{EventCallback}from'./event_callbacks';type WebhookRel=ResourceRel&{type:typeof Webhooks.TYPE;};interface Webhook extends Resource{name?:string;topic?:string;callback_url?:string;include_resources?:string[];circuit_state?:string;circuit_failure_count?:number;shared_secret?:string;last_event_callbacks?:EventCallback[];}interface WebhookCreate extends ResourceCreate{name?:string;topic:string;callback_url:string;include_resources?:string[];}interface WebhookUpdate extends ResourceUpdate{name?:string;topic?:string;callback_url?:string;include_resources?:string[];_reset_circuit?:boolean;}declare class Webhooks extends ApiResource{static readonly TYPE:'webhooks';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Webhook>>;create(resource:WebhookCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;update(resource:WebhookUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;delete(id:string,options?:ResourcesConfig):Promise<void>;last_event_callbacks(webhookId:string|Webhook,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<EventCallback>>;isWebhook(resource:any):resource is Webhook;relationship(id:string|ResourceId|null):WebhookRel;type():string;}export default Webhooks;export{Webhook,WebhookCreate,WebhookUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';type WireTransferRel=ResourceRel&{type:typeof WireTransfers.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface WireTransfer extends Resource{order?:Order;}interface WireTransferCreate extends ResourceCreate{order:OrderRel;}interface WireTransferUpdate extends ResourceUpdate{order?:OrderRel;}declare class WireTransfers extends ApiResource{static readonly TYPE:'wire_transfers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<WireTransfer>>;create(resource:WireTransferCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;update(resource:WireTransferUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(wireTransferId:string|WireTransfer,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isWireTransfer(resource:any):resource is WireTransfer;relationship(id:string|ResourceId|null):WireTransferRel;type():string;}export default WireTransfers;export{WireTransfer,WireTransferCreate,WireTransferUpdate};
|
package/lib/cjs/util.d.ts
CHANGED
@@ -2,4 +2,4 @@
|
|
2
2
|
/// <reference types="node" />
|
3
3
|
/// <reference types="node" />
|
4
4
|
/// <reference types="node" />
|
5
|
-
|
5
|
+
type ObjectType={[key:string]:any;};declare const sleep:(ms:number)=>Promise<NodeJS.Timeout>;declare const sortObjectFields:(obj:ObjectType)=>ObjectType;export{sleep,sortObjectFields};
|
package/lib/esm/api.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export{default as Addresses}from'./resources/addresses';export{default as Adjustments}from'./resources/adjustments';export{default as AdyenGateways}from'./resources/adyen_gateways';export{default as AdyenPayments}from'./resources/adyen_payments';export{default as Applications}from'./resources/application';export{default as Attachments}from'./resources/attachments';export{default as Authorizations}from'./resources/authorizations';export{default as AvalaraAccounts}from'./resources/avalara_accounts';export{default as BillingInfoValidationRules}from'./resources/billing_info_validation_rules';export{default as BingGeocoders}from'./resources/bing_geocoders';export{default as BraintreeGateways}from'./resources/braintree_gateways';export{default as BraintreePayments}from'./resources/braintree_payments';export{default as Bundles}from'./resources/bundles';export{default as Captures}from'./resources/captures';export{default as CarrierAccounts}from'./resources/carrier_accounts';export{default as CheckoutComGateways}from'./resources/checkout_com_gateways';export{default as CheckoutComPayments}from'./resources/checkout_com_payments';export{default as Cleanups}from'./resources/cleanups';export{default as CouponCodesPromotionRules}from'./resources/coupon_codes_promotion_rules';export{default as CouponRecipients}from'./resources/coupon_recipients';export{default as Coupons}from'./resources/coupons';export{default as CustomerAddresses}from'./resources/customer_addresses';export{default as CustomerGroups}from'./resources/customer_groups';export{default as CustomerPasswordResets}from'./resources/customer_password_resets';export{default as CustomerPaymentSources}from'./resources/customer_payment_sources';export{default as CustomerSubscriptions}from'./resources/customer_subscriptions';export{default as Customers}from'./resources/customers';export{default as DeliveryLeadTimes}from'./resources/delivery_lead_times';export{default as EventCallbacks}from'./resources/event_callbacks';export{default as Events}from'./resources/events';export{default as Exports}from'./resources/exports';export{default as ExternalGateways}from'./resources/external_gateways';export{default as ExternalPayments}from'./resources/external_payments';export{default as ExternalPromotions}from'./resources/external_promotions';export{default as ExternalTaxCalculators}from'./resources/external_tax_calculators';export{default as FixedAmountPromotions}from'./resources/fixed_amount_promotions';export{default as FixedPricePromotions}from'./resources/fixed_price_promotions';export{default as FreeGiftPromotions}from'./resources/free_gift_promotions';export{default as FreeShippingPromotions}from'./resources/free_shipping_promotions';export{default as Geocoders}from'./resources/geocoders';export{default as GiftCardRecipients}from'./resources/gift_card_recipients';export{default as GiftCards}from'./resources/gift_cards';export{default as GoogleGeocoders}from'./resources/google_geocoders';export{default as Imports}from'./resources/imports';export{default as InStockSubscriptions}from'./resources/in_stock_subscriptions';export{default as InventoryModels}from'./resources/inventory_models';export{default as InventoryReturnLocations}from'./resources/inventory_return_locations';export{default as InventoryStockLocations}from'./resources/inventory_stock_locations';export{default as KlarnaGateways}from'./resources/klarna_gateways';export{default as KlarnaPayments}from'./resources/klarna_payments';export{default as LineItemOptions}from'./resources/line_item_options';export{default as LineItems}from'./resources/line_items';export{default as ManualGateways}from'./resources/manual_gateways';export{default as ManualTaxCalculators}from'./resources/manual_tax_calculators';export{default as Markets}from'./resources/markets';export{default as Merchants}from'./resources/merchants';export{default as OrderAmountPromotionRules}from'./resources/order_amount_promotion_rules';export{default as OrderCopies}from'./resources/order_copies';export{default as OrderSubscriptions}from'./resources/order_subscriptions';export{default as OrderValidationRules}from'./resources/order_validation_rules';export{default as Orders}from'./resources/orders';export{default as Organizations}from'./resources/organization';export{default as Packages}from'./resources/packages';export{default as ParcelLineItems}from'./resources/parcel_line_items';export{default as Parcels}from'./resources/parcels';export{default as PaymentGateways}from'./resources/payment_gateways';export{default as PaymentMethods}from'./resources/payment_methods';export{default as PaypalGateways}from'./resources/paypal_gateways';export{default as PaypalPayments}from'./resources/paypal_payments';export{default as PercentageDiscountPromotions}from'./resources/percentage_discount_promotions';export{default as PriceLists}from'./resources/price_lists';export{default as PriceTiers}from'./resources/price_tiers';export{default as PriceVolumeTiers}from'./resources/price_volume_tiers';export{default as Prices}from'./resources/prices';export{default as PromotionRules}from'./resources/promotion_rules';export{default as Promotions}from'./resources/promotions';export{default as Refunds}from'./resources/refunds';export{default as ReturnLineItems}from'./resources/return_line_items';export{default as Returns}from'./resources/returns';export{default as Shipments}from'./resources/shipments';export{default as ShippingCategories}from'./resources/shipping_categories';export{default as ShippingMethodTiers}from'./resources/shipping_method_tiers';export{default as ShippingMethods}from'./resources/shipping_methods';export{default as ShippingWeightTiers}from'./resources/shipping_weight_tiers';export{default as ShippingZones}from'./resources/shipping_zones';export{default as SkuListItems}from'./resources/sku_list_items';export{default as SkuListPromotionRules}from'./resources/sku_list_promotion_rules';export{default as SkuLists}from'./resources/sku_lists';export{default as SkuOptions}from'./resources/sku_options';export{default as Skus}from'./resources/skus';export{default as StockItems}from'./resources/stock_items';export{default as StockLineItems}from'./resources/stock_line_items';export{default as StockLocations}from'./resources/stock_locations';export{default as StockTransfers}from'./resources/stock_transfers';export{default as StripeGateways}from'./resources/stripe_gateways';export{default as StripePayments}from'./resources/stripe_payments';export{default as TaxCalculators}from'./resources/tax_calculators';export{default as TaxCategories}from'./resources/tax_categories';export{default as TaxRules}from'./resources/tax_rules';export{default as TaxjarAccounts}from'./resources/taxjar_accounts';export{default as Transactions}from'./resources/transactions';export{default as Voids}from'./resources/voids';export{default as Webhooks}from'./resources/webhooks';export{default as WireTransfers}from'./resources/wire_transfers';export declare type ResourceTypeLock='addresses'|'adjustments'|'adyen_gateways'|'adyen_payments'|'application'|'attachments'|'authorizations'|'avalara_accounts'|'billing_info_validation_rules'|'bing_geocoders'|'braintree_gateways'|'braintree_payments'|'bundles'|'captures'|'carrier_accounts'|'checkout_com_gateways'|'checkout_com_payments'|'cleanups'|'coupon_codes_promotion_rules'|'coupon_recipients'|'coupons'|'customer_addresses'|'customer_groups'|'customer_password_resets'|'customer_payment_sources'|'customer_subscriptions'|'customers'|'delivery_lead_times'|'event_callbacks'|'events'|'exports'|'external_gateways'|'external_payments'|'external_promotions'|'external_tax_calculators'|'fixed_amount_promotions'|'fixed_price_promotions'|'free_gift_promotions'|'free_shipping_promotions'|'geocoders'|'gift_card_recipients'|'gift_cards'|'google_geocoders'|'imports'|'in_stock_subscriptions'|'inventory_models'|'inventory_return_locations'|'inventory_stock_locations'|'klarna_gateways'|'klarna_payments'|'line_item_options'|'line_items'|'manual_gateways'|'manual_tax_calculators'|'markets'|'merchants'|'order_amount_promotion_rules'|'order_copies'|'order_subscriptions'|'order_validation_rules'|'orders'|'organization'|'packages'|'parcel_line_items'|'parcels'|'payment_gateways'|'payment_methods'|'paypal_gateways'|'paypal_payments'|'percentage_discount_promotions'|'price_lists'|'price_tiers'|'price_volume_tiers'|'prices'|'promotion_rules'|'promotions'|'refunds'|'return_line_items'|'returns'|'shipments'|'shipping_categories'|'shipping_method_tiers'|'shipping_methods'|'shipping_weight_tiers'|'shipping_zones'|'sku_list_items'|'sku_list_promotion_rules'|'sku_lists'|'sku_options'|'skus'|'stock_items'|'stock_line_items'|'stock_locations'|'stock_transfers'|'stripe_gateways'|'stripe_payments'|'tax_calculators'|'tax_categories'|'tax_rules'|'taxjar_accounts'|'transactions'|'voids'|'webhooks'|'wire_transfers';export declare const resourceList:readonly["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","cleanups","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","events","exports","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","price_tiers","price_volume_tiers","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_method_tiers","shipping_methods","shipping_weight_tiers","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
|
1
|
+
export{default as Addresses}from'./resources/addresses';export{default as Adjustments}from'./resources/adjustments';export{default as AdyenGateways}from'./resources/adyen_gateways';export{default as AdyenPayments}from'./resources/adyen_payments';export{default as Applications}from'./resources/application';export{default as Attachments}from'./resources/attachments';export{default as Authorizations}from'./resources/authorizations';export{default as AvalaraAccounts}from'./resources/avalara_accounts';export{default as BillingInfoValidationRules}from'./resources/billing_info_validation_rules';export{default as BingGeocoders}from'./resources/bing_geocoders';export{default as BraintreeGateways}from'./resources/braintree_gateways';export{default as BraintreePayments}from'./resources/braintree_payments';export{default as Bundles}from'./resources/bundles';export{default as Captures}from'./resources/captures';export{default as CarrierAccounts}from'./resources/carrier_accounts';export{default as CheckoutComGateways}from'./resources/checkout_com_gateways';export{default as CheckoutComPayments}from'./resources/checkout_com_payments';export{default as Cleanups}from'./resources/cleanups';export{default as CouponCodesPromotionRules}from'./resources/coupon_codes_promotion_rules';export{default as CouponRecipients}from'./resources/coupon_recipients';export{default as Coupons}from'./resources/coupons';export{default as CustomerAddresses}from'./resources/customer_addresses';export{default as CustomerGroups}from'./resources/customer_groups';export{default as CustomerPasswordResets}from'./resources/customer_password_resets';export{default as CustomerPaymentSources}from'./resources/customer_payment_sources';export{default as CustomerSubscriptions}from'./resources/customer_subscriptions';export{default as Customers}from'./resources/customers';export{default as DeliveryLeadTimes}from'./resources/delivery_lead_times';export{default as EventCallbacks}from'./resources/event_callbacks';export{default as Events}from'./resources/events';export{default as Exports}from'./resources/exports';export{default as ExternalGateways}from'./resources/external_gateways';export{default as ExternalPayments}from'./resources/external_payments';export{default as ExternalPromotions}from'./resources/external_promotions';export{default as ExternalTaxCalculators}from'./resources/external_tax_calculators';export{default as FixedAmountPromotions}from'./resources/fixed_amount_promotions';export{default as FixedPricePromotions}from'./resources/fixed_price_promotions';export{default as FreeGiftPromotions}from'./resources/free_gift_promotions';export{default as FreeShippingPromotions}from'./resources/free_shipping_promotions';export{default as Geocoders}from'./resources/geocoders';export{default as GiftCardRecipients}from'./resources/gift_card_recipients';export{default as GiftCards}from'./resources/gift_cards';export{default as GoogleGeocoders}from'./resources/google_geocoders';export{default as Imports}from'./resources/imports';export{default as InStockSubscriptions}from'./resources/in_stock_subscriptions';export{default as InventoryModels}from'./resources/inventory_models';export{default as InventoryReturnLocations}from'./resources/inventory_return_locations';export{default as InventoryStockLocations}from'./resources/inventory_stock_locations';export{default as KlarnaGateways}from'./resources/klarna_gateways';export{default as KlarnaPayments}from'./resources/klarna_payments';export{default as LineItemOptions}from'./resources/line_item_options';export{default as LineItems}from'./resources/line_items';export{default as ManualGateways}from'./resources/manual_gateways';export{default as ManualTaxCalculators}from'./resources/manual_tax_calculators';export{default as Markets}from'./resources/markets';export{default as Merchants}from'./resources/merchants';export{default as OrderAmountPromotionRules}from'./resources/order_amount_promotion_rules';export{default as OrderCopies}from'./resources/order_copies';export{default as OrderSubscriptions}from'./resources/order_subscriptions';export{default as OrderValidationRules}from'./resources/order_validation_rules';export{default as Orders}from'./resources/orders';export{default as Organizations}from'./resources/organization';export{default as Packages}from'./resources/packages';export{default as ParcelLineItems}from'./resources/parcel_line_items';export{default as Parcels}from'./resources/parcels';export{default as PaymentGateways}from'./resources/payment_gateways';export{default as PaymentMethods}from'./resources/payment_methods';export{default as PaypalGateways}from'./resources/paypal_gateways';export{default as PaypalPayments}from'./resources/paypal_payments';export{default as PercentageDiscountPromotions}from'./resources/percentage_discount_promotions';export{default as PriceLists}from'./resources/price_lists';export{default as PriceTiers}from'./resources/price_tiers';export{default as PriceVolumeTiers}from'./resources/price_volume_tiers';export{default as Prices}from'./resources/prices';export{default as PromotionRules}from'./resources/promotion_rules';export{default as Promotions}from'./resources/promotions';export{default as Refunds}from'./resources/refunds';export{default as ReturnLineItems}from'./resources/return_line_items';export{default as Returns}from'./resources/returns';export{default as Shipments}from'./resources/shipments';export{default as ShippingCategories}from'./resources/shipping_categories';export{default as ShippingMethodTiers}from'./resources/shipping_method_tiers';export{default as ShippingMethods}from'./resources/shipping_methods';export{default as ShippingWeightTiers}from'./resources/shipping_weight_tiers';export{default as ShippingZones}from'./resources/shipping_zones';export{default as SkuListItems}from'./resources/sku_list_items';export{default as SkuListPromotionRules}from'./resources/sku_list_promotion_rules';export{default as SkuLists}from'./resources/sku_lists';export{default as SkuOptions}from'./resources/sku_options';export{default as Skus}from'./resources/skus';export{default as StockItems}from'./resources/stock_items';export{default as StockLineItems}from'./resources/stock_line_items';export{default as StockLocations}from'./resources/stock_locations';export{default as StockTransfers}from'./resources/stock_transfers';export{default as StripeGateways}from'./resources/stripe_gateways';export{default as StripePayments}from'./resources/stripe_payments';export{default as TaxCalculators}from'./resources/tax_calculators';export{default as TaxCategories}from'./resources/tax_categories';export{default as TaxRules}from'./resources/tax_rules';export{default as TaxjarAccounts}from'./resources/taxjar_accounts';export{default as Transactions}from'./resources/transactions';export{default as Voids}from'./resources/voids';export{default as Webhooks}from'./resources/webhooks';export{default as WireTransfers}from'./resources/wire_transfers';export type ResourceTypeLock='addresses'|'adjustments'|'adyen_gateways'|'adyen_payments'|'application'|'attachments'|'authorizations'|'avalara_accounts'|'billing_info_validation_rules'|'bing_geocoders'|'braintree_gateways'|'braintree_payments'|'bundles'|'captures'|'carrier_accounts'|'checkout_com_gateways'|'checkout_com_payments'|'cleanups'|'coupon_codes_promotion_rules'|'coupon_recipients'|'coupons'|'customer_addresses'|'customer_groups'|'customer_password_resets'|'customer_payment_sources'|'customer_subscriptions'|'customers'|'delivery_lead_times'|'event_callbacks'|'events'|'exports'|'external_gateways'|'external_payments'|'external_promotions'|'external_tax_calculators'|'fixed_amount_promotions'|'fixed_price_promotions'|'free_gift_promotions'|'free_shipping_promotions'|'geocoders'|'gift_card_recipients'|'gift_cards'|'google_geocoders'|'imports'|'in_stock_subscriptions'|'inventory_models'|'inventory_return_locations'|'inventory_stock_locations'|'klarna_gateways'|'klarna_payments'|'line_item_options'|'line_items'|'manual_gateways'|'manual_tax_calculators'|'markets'|'merchants'|'order_amount_promotion_rules'|'order_copies'|'order_subscriptions'|'order_validation_rules'|'orders'|'organization'|'packages'|'parcel_line_items'|'parcels'|'payment_gateways'|'payment_methods'|'paypal_gateways'|'paypal_payments'|'percentage_discount_promotions'|'price_lists'|'price_tiers'|'price_volume_tiers'|'prices'|'promotion_rules'|'promotions'|'refunds'|'return_line_items'|'returns'|'shipments'|'shipping_categories'|'shipping_method_tiers'|'shipping_methods'|'shipping_weight_tiers'|'shipping_zones'|'sku_list_items'|'sku_list_promotion_rules'|'sku_lists'|'sku_options'|'skus'|'stock_items'|'stock_line_items'|'stock_locations'|'stock_transfers'|'stripe_gateways'|'stripe_payments'|'tax_calculators'|'tax_categories'|'tax_rules'|'taxjar_accounts'|'transactions'|'voids'|'webhooks'|'wire_transfers';export declare const resourceList:readonly["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","cleanups","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","events","exports","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","price_tiers","price_volume_tiers","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_method_tiers","shipping_methods","shipping_weight_tiers","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
|
package/lib/esm/client.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="node" />
|
3
|
-
import{AxiosProxyConfig,Method}from'axios';import type{InterceptorManager}from'./interceptor';import type{Agent as HttpAgent}from'http';import type{Agent as HttpsAgent}from'https';
|
3
|
+
import{AxiosProxyConfig,Method}from'axios';import type{InterceptorManager}from'./interceptor';import type{Agent as HttpAgent}from'http';import type{Agent as HttpsAgent}from'https';type ProxyConfig=AxiosProxyConfig|false;type RequestConfig={timeout?:number;params?:{[key:string]:string|number|boolean;};httpAgent?:HttpAgent;httpsAgent?:HttpsAgent;proxy?:ProxyConfig;};type ApiClientInitConfig={organization:string;domain?:string;accessToken:string;}&RequestConfig;type ApiClientConfig=Partial<ApiClientInitConfig>;declare class ApiClient{#private;static create(options:ApiClientInitConfig):ApiClient;baseUrl:string;interceptors:InterceptorManager;private constructor();config(config:ApiClientConfig):void;request(method:Method,path:string,body?:any,options?:ApiClientConfig):Promise<any>;}export default ApiClient;export{ApiClientInitConfig,ApiClientConfig,RequestConfig};
|
package/lib/esm/client.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var d=
|
1
|
+
var d=function(r,e,t,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(r,t):a?a.value=t:e.set(r,t),t},n=function(r,e,t,s){if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?s:t==="a"?s.call(r):s?s.value:e.get(r)},o,i;import u from"axios";import{SdkError as T,ApiError as b,ErrorType as p}from"./error";import f from"./config";import z from"./debug";const c=z("client"),m=(r,e)=>`https://${r.toLowerCase()}.${e||f.default.domain}/api`,k=r=>{let e=new T({message:r.message});if(u.isAxiosError(r))if(r.response){const t=new b(e);t.type=p.RESPONSE,t.status=r.response.status,t.code=String(t.status),t.errors=r.response.data.errors,e=t}else r.request?(e.type=p.REQUEST,e.request=r.request):e.type=p.CLIENT;else u.isCancel(r)?e.type=p.CANCEL:e.source=r;throw e};class l{static create(e){if(!e?.organization)throw new Error("Undefined 'organization' parameter");if(!e?.accessToken)throw new Error("Undefined 'accessToken' parameter");return new l(e)}constructor(e){o.set(this,void 0),i.set(this,void 0),c("new client instance %O",e),this.baseUrl=m(e.organization,e.domain),d(this,o,e.accessToken,"f");const t={timeout:e.timeout||f.client.timeout,proxy:e.proxy,httpAgent:e.httpAgent,httpsAgent:e.httpsAgent},s=Object.assign({baseURL:this.baseUrl,timeout:f.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+n(this,o,"f")}},t);c("axios options: %O",s),d(this,i,u.create(s),"f"),this.interceptors=n(this,i,"f").interceptors}config(e){c("config %o",e);const t=n(this,i,"f").defaults;e.timeout&&(t.timeout=e.timeout),e.proxy&&(t.proxy=e.proxy),e.httpAgent&&(t.httpAgent=e.httpAgent),e.httpsAgent&&(t.httpsAgent=e.httpsAgent),e.organization&&(this.baseUrl=m(e.organization,e.domain)),e.accessToken&&(d(this,o,e.accessToken,"f"),t.headers.common.Authorization="Bearer "+n(this,o,"f"))}async request(e,t,s,a){c("request %s %s, %O, %O",e,t,s||{},a||{});const y=s?{data:s}:void 0,A=t,E=a?.organization?m(a.organization,a.domain):void 0,w=a?.accessToken||n(this,o,"f"),v=w?{Authorization:"Bearer "+w}:void 0,g=Object.assign({method:e,baseURL:E,url:A,data:y,headers:v},a);return c("request params: %O",g),n(this,i,"f").request(g).then(h=>h.data).catch(h=>k(h))}}o=new WeakMap,i=new WeakMap;export default l;
|
@@ -1 +1 @@
|
|
1
|
-
import*as api from'./api';import{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{ResourcesInitConfig}from'./resource';
|
1
|
+
import*as api from'./api';import{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{ResourcesInitConfig}from'./resource';type SdkConfig={};type CommerceLayerInitConfig=SdkConfig&ResourcesInitConfig;type CommerceLayerConfig=Partial<CommerceLayerInitConfig>;declare class CommerceLayerClient{#private;static get openApiSchemaVersion():string;readonly openApiSchemaVersion="3.0.3";addresses:api.Addresses;adjustments:api.Adjustments;adyen_gateways:api.AdyenGateways;adyen_payments:api.AdyenPayments;application:api.Applications;attachments:api.Attachments;authorizations:api.Authorizations;avalara_accounts:api.AvalaraAccounts;billing_info_validation_rules:api.BillingInfoValidationRules;bing_geocoders:api.BingGeocoders;braintree_gateways:api.BraintreeGateways;braintree_payments:api.BraintreePayments;bundles:api.Bundles;captures:api.Captures;carrier_accounts:api.CarrierAccounts;checkout_com_gateways:api.CheckoutComGateways;checkout_com_payments:api.CheckoutComPayments;cleanups:api.Cleanups;coupon_codes_promotion_rules:api.CouponCodesPromotionRules;coupon_recipients:api.CouponRecipients;coupons:api.Coupons;customer_addresses:api.CustomerAddresses;customer_groups:api.CustomerGroups;customer_password_resets:api.CustomerPasswordResets;customer_payment_sources:api.CustomerPaymentSources;customer_subscriptions:api.CustomerSubscriptions;customers:api.Customers;delivery_lead_times:api.DeliveryLeadTimes;event_callbacks:api.EventCallbacks;events:api.Events;exports:api.Exports;external_gateways:api.ExternalGateways;external_payments:api.ExternalPayments;external_promotions:api.ExternalPromotions;external_tax_calculators:api.ExternalTaxCalculators;fixed_amount_promotions:api.FixedAmountPromotions;fixed_price_promotions:api.FixedPricePromotions;free_gift_promotions:api.FreeGiftPromotions;free_shipping_promotions:api.FreeShippingPromotions;geocoders:api.Geocoders;gift_card_recipients:api.GiftCardRecipients;gift_cards:api.GiftCards;google_geocoders:api.GoogleGeocoders;imports:api.Imports;in_stock_subscriptions:api.InStockSubscriptions;inventory_models:api.InventoryModels;inventory_return_locations:api.InventoryReturnLocations;inventory_stock_locations:api.InventoryStockLocations;klarna_gateways:api.KlarnaGateways;klarna_payments:api.KlarnaPayments;line_item_options:api.LineItemOptions;line_items:api.LineItems;manual_gateways:api.ManualGateways;manual_tax_calculators:api.ManualTaxCalculators;markets:api.Markets;merchants:api.Merchants;order_amount_promotion_rules:api.OrderAmountPromotionRules;order_copies:api.OrderCopies;order_subscriptions:api.OrderSubscriptions;order_validation_rules:api.OrderValidationRules;orders:api.Orders;organization:api.Organizations;packages:api.Packages;parcel_line_items:api.ParcelLineItems;parcels:api.Parcels;payment_gateways:api.PaymentGateways;payment_methods:api.PaymentMethods;paypal_gateways:api.PaypalGateways;paypal_payments:api.PaypalPayments;percentage_discount_promotions:api.PercentageDiscountPromotions;price_lists:api.PriceLists;price_tiers:api.PriceTiers;price_volume_tiers:api.PriceVolumeTiers;prices:api.Prices;promotion_rules:api.PromotionRules;promotions:api.Promotions;refunds:api.Refunds;return_line_items:api.ReturnLineItems;returns:api.Returns;shipments:api.Shipments;shipping_categories:api.ShippingCategories;shipping_method_tiers:api.ShippingMethodTiers;shipping_methods:api.ShippingMethods;shipping_weight_tiers:api.ShippingWeightTiers;shipping_zones:api.ShippingZones;sku_list_items:api.SkuListItems;sku_list_promotion_rules:api.SkuListPromotionRules;sku_lists:api.SkuLists;sku_options:api.SkuOptions;skus:api.Skus;stock_items:api.StockItems;stock_line_items:api.StockLineItems;stock_locations:api.StockLocations;stock_transfers:api.StockTransfers;stripe_gateways:api.StripeGateways;stripe_payments:api.StripePayments;tax_calculators:api.TaxCalculators;tax_categories:api.TaxCategories;tax_rules:api.TaxRules;taxjar_accounts:api.TaxjarAccounts;transactions:api.Transactions;voids:api.Voids;webhooks:api.Webhooks;wire_transfers:api.WireTransfers;constructor(config:CommerceLayerInitConfig);get currentOrganization():string;private localConfig;config(config:CommerceLayerConfig):void;resources():readonly string[];isApiError(error:any):error is ApiError;addRequestInterceptor(onFulfilled?:RequestInterceptor,onRejected?:ErrorInterceptor):number;addResponseInterceptor(onFulfilled?:ResponseInterceptor,onRejected?:ErrorInterceptor):number;removeInterceptor(type:InterceptorType,id:number):void;addRawResponseReader(options?:{headers:boolean;}):RawResponseReader;removeRawResponseReader(reader:number|RawResponseReader):void;}declare const CommerceLayer:(config:CommerceLayerInitConfig)=>CommerceLayerClient;export default CommerceLayer;export{CommerceLayer};export type{CommerceLayerClient,CommerceLayerConfig,CommerceLayerInitConfig};
|
package/lib/esm/commercelayer.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var f=
|
1
|
+
var f=function(r,i,n,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?r!==i||!a:!i.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(r,n):a?a.value=n:i.set(r,n),n},s=function(r,i,n,o){if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?r!==i||!o:!i.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?o:n==="a"?o.call(r):o?o.value:i.get(r)},t,h;import*as e from"./api";import{CommerceLayerStatic as w}from"./static";import l from"./resource";import _ from"./debug";const p=_("commercelayer"),u="3.0.3";class d{static get openApiSchemaVersion(){return u}constructor(i){this.openApiSchemaVersion=u,t.set(this,void 0),h.set(this,void 0),p("new commercelayer instance %O",i),f(this,t,new l(i),"f"),f(this,h,i.organization,"f"),this.addresses=new e.Addresses(s(this,t,"f")),this.adjustments=new e.Adjustments(s(this,t,"f")),this.adyen_gateways=new e.AdyenGateways(s(this,t,"f")),this.adyen_payments=new e.AdyenPayments(s(this,t,"f")),this.application=new e.Applications(s(this,t,"f")),this.attachments=new e.Attachments(s(this,t,"f")),this.authorizations=new e.Authorizations(s(this,t,"f")),this.avalara_accounts=new e.AvalaraAccounts(s(this,t,"f")),this.billing_info_validation_rules=new e.BillingInfoValidationRules(s(this,t,"f")),this.bing_geocoders=new e.BingGeocoders(s(this,t,"f")),this.braintree_gateways=new e.BraintreeGateways(s(this,t,"f")),this.braintree_payments=new e.BraintreePayments(s(this,t,"f")),this.bundles=new e.Bundles(s(this,t,"f")),this.captures=new e.Captures(s(this,t,"f")),this.carrier_accounts=new e.CarrierAccounts(s(this,t,"f")),this.checkout_com_gateways=new e.CheckoutComGateways(s(this,t,"f")),this.checkout_com_payments=new e.CheckoutComPayments(s(this,t,"f")),this.cleanups=new e.Cleanups(s(this,t,"f")),this.coupon_codes_promotion_rules=new e.CouponCodesPromotionRules(s(this,t,"f")),this.coupon_recipients=new e.CouponRecipients(s(this,t,"f")),this.coupons=new e.Coupons(s(this,t,"f")),this.customer_addresses=new e.CustomerAddresses(s(this,t,"f")),this.customer_groups=new e.CustomerGroups(s(this,t,"f")),this.customer_password_resets=new e.CustomerPasswordResets(s(this,t,"f")),this.customer_payment_sources=new e.CustomerPaymentSources(s(this,t,"f")),this.customer_subscriptions=new e.CustomerSubscriptions(s(this,t,"f")),this.customers=new e.Customers(s(this,t,"f")),this.delivery_lead_times=new e.DeliveryLeadTimes(s(this,t,"f")),this.event_callbacks=new e.EventCallbacks(s(this,t,"f")),this.events=new e.Events(s(this,t,"f")),this.exports=new e.Exports(s(this,t,"f")),this.external_gateways=new e.ExternalGateways(s(this,t,"f")),this.external_payments=new e.ExternalPayments(s(this,t,"f")),this.external_promotions=new e.ExternalPromotions(s(this,t,"f")),this.external_tax_calculators=new e.ExternalTaxCalculators(s(this,t,"f")),this.fixed_amount_promotions=new e.FixedAmountPromotions(s(this,t,"f")),this.fixed_price_promotions=new e.FixedPricePromotions(s(this,t,"f")),this.free_gift_promotions=new e.FreeGiftPromotions(s(this,t,"f")),this.free_shipping_promotions=new e.FreeShippingPromotions(s(this,t,"f")),this.geocoders=new e.Geocoders(s(this,t,"f")),this.gift_card_recipients=new e.GiftCardRecipients(s(this,t,"f")),this.gift_cards=new e.GiftCards(s(this,t,"f")),this.google_geocoders=new e.GoogleGeocoders(s(this,t,"f")),this.imports=new e.Imports(s(this,t,"f")),this.in_stock_subscriptions=new e.InStockSubscriptions(s(this,t,"f")),this.inventory_models=new e.InventoryModels(s(this,t,"f")),this.inventory_return_locations=new e.InventoryReturnLocations(s(this,t,"f")),this.inventory_stock_locations=new e.InventoryStockLocations(s(this,t,"f")),this.klarna_gateways=new e.KlarnaGateways(s(this,t,"f")),this.klarna_payments=new e.KlarnaPayments(s(this,t,"f")),this.line_item_options=new e.LineItemOptions(s(this,t,"f")),this.line_items=new e.LineItems(s(this,t,"f")),this.manual_gateways=new e.ManualGateways(s(this,t,"f")),this.manual_tax_calculators=new e.ManualTaxCalculators(s(this,t,"f")),this.markets=new e.Markets(s(this,t,"f")),this.merchants=new e.Merchants(s(this,t,"f")),this.order_amount_promotion_rules=new e.OrderAmountPromotionRules(s(this,t,"f")),this.order_copies=new e.OrderCopies(s(this,t,"f")),this.order_subscriptions=new e.OrderSubscriptions(s(this,t,"f")),this.order_validation_rules=new e.OrderValidationRules(s(this,t,"f")),this.orders=new e.Orders(s(this,t,"f")),this.organization=new e.Organizations(s(this,t,"f")),this.packages=new e.Packages(s(this,t,"f")),this.parcel_line_items=new e.ParcelLineItems(s(this,t,"f")),this.parcels=new e.Parcels(s(this,t,"f")),this.payment_gateways=new e.PaymentGateways(s(this,t,"f")),this.payment_methods=new e.PaymentMethods(s(this,t,"f")),this.paypal_gateways=new e.PaypalGateways(s(this,t,"f")),this.paypal_payments=new e.PaypalPayments(s(this,t,"f")),this.percentage_discount_promotions=new e.PercentageDiscountPromotions(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.price_tiers=new e.PriceTiers(s(this,t,"f")),this.price_volume_tiers=new e.PriceVolumeTiers(s(this,t,"f")),this.prices=new e.Prices(s(this,t,"f")),this.promotion_rules=new e.PromotionRules(s(this,t,"f")),this.promotions=new e.Promotions(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.return_line_items=new e.ReturnLineItems(s(this,t,"f")),this.returns=new e.Returns(s(this,t,"f")),this.shipments=new e.Shipments(s(this,t,"f")),this.shipping_categories=new e.ShippingCategories(s(this,t,"f")),this.shipping_method_tiers=new e.ShippingMethodTiers(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_weight_tiers=new e.ShippingWeightTiers(s(this,t,"f")),this.shipping_zones=new e.ShippingZones(s(this,t,"f")),this.sku_list_items=new e.SkuListItems(s(this,t,"f")),this.sku_list_promotion_rules=new e.SkuListPromotionRules(s(this,t,"f")),this.sku_lists=new e.SkuLists(s(this,t,"f")),this.sku_options=new e.SkuOptions(s(this,t,"f")),this.skus=new e.Skus(s(this,t,"f")),this.stock_items=new e.StockItems(s(this,t,"f")),this.stock_line_items=new e.StockLineItems(s(this,t,"f")),this.stock_locations=new e.StockLocations(s(this,t,"f")),this.stock_transfers=new e.StockTransfers(s(this,t,"f")),this.stripe_gateways=new e.StripeGateways(s(this,t,"f")),this.stripe_payments=new e.StripePayments(s(this,t,"f")),this.tax_calculators=new e.TaxCalculators(s(this,t,"f")),this.tax_categories=new e.TaxCategories(s(this,t,"f")),this.tax_rules=new e.TaxRules(s(this,t,"f")),this.taxjar_accounts=new e.TaxjarAccounts(s(this,t,"f")),this.transactions=new e.Transactions(s(this,t,"f")),this.voids=new e.Voids(s(this,t,"f")),this.webhooks=new e.Webhooks(s(this,t,"f")),this.wire_transfers=new e.WireTransfers(s(this,t,"f"))}get currentOrganization(){return s(this,h,"f")}localConfig(i){i.organization&&f(this,h,i.organization,"f")}config(i){p("config %o",i),this.localConfig(i),i.organization||(i.organization=this.currentOrganization),s(this,t,"f").config(i)}resources(){return w.resources()}isApiError(i){return w.isApiError(i)}addRequestInterceptor(i,n){return s(this,t,"f").interceptors.request.use(i,n)}addResponseInterceptor(i,n){return s(this,t,"f").interceptors.response.use(i,n)}removeInterceptor(i,n){return s(this,t,"f").interceptors[i].eject(n)}addRawResponseReader(i){const n={id:void 0,rawResponse:void 0,headers:void 0};function o(c){return n.rawResponse=c?.data,i?.headers&&(n.headers=c.headers),c}const a=this.addResponseInterceptor(o);return n.id=a,n}removeRawResponseReader(i){const n=typeof i=="number"?i:i?.id;if(n&&n>=0)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const m=r=>new d(r);export default m;export{m as CommerceLayer};
|
package/lib/esm/common.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{resourceList as e}from"./api";const p=s=>s
|
1
|
+
import{resourceList as e}from"./api";const p=s=>s?.type&&s.id&&e.includes(s.type),t=s=>s&&typeof s.type<"u"&&s.type&&e.includes(s.type);export{p as isResourceId,t as isResourceType};
|
package/lib/esm/debug.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
type Debugger=(pattern:string,...args:any[])=>void;declare const debug:(namespace:string)=>Debugger;export default debug;
|
package/lib/esm/error.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var e;(function(E){E.CLIENT="client",E.REQUEST="request",E.RESPONSE="response",E.GENERIC="generic",E.CANCEL="cancel"})(e||(e={}));class s extends Error{
|
1
|
+
var e;(function(E){E.CLIENT="client",E.REQUEST="request",E.RESPONSE="response",E.GENERIC="generic",E.CANCEL="cancel"})(e||(e={}));class s extends Error{static isSdkError(r){return r&&[s.NAME,t.NAME].includes(r.name)&&Object.values(e).includes(r.type)}constructor(r){super(r.message),this.name=s.NAME,this.type=r.type||e.GENERIC}}s.NAME="SdkError";class t extends s{static isApiError(r){return s.isSdkError(r)&&r.name===t.NAME&&r.type===e.RESPONSE}constructor(r){super(Object.assign(Object.assign({},r),{type:e.RESPONSE})),this.errors=[],this.name=t.NAME}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}t.NAME="ApiError";export{s as SdkError,t as ApiError,e as ErrorType};
|
package/lib/esm/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export{default}from'./commercelayer';export type{CommerceLayerClient}from'./commercelayer';export{CommerceLayerStatic}from'./static';export type{QueryParamsRetrieve,QueryParamsList,QueryParams}from'./query';export*from'./model';export type{RequestObj,ResponseObj,ErrorObj,HeadersObj}from'./interceptor';export type{SdkError,ApiError,ErrorType}from'./error';
|
1
|
+
export{default,CommerceLayer}from'./commercelayer';export type{CommerceLayerClient}from'./commercelayer';export{CommerceLayerStatic}from'./static';export type{QueryParamsRetrieve,QueryParamsList,QueryParams}from'./query';export*from'./model';export type{RequestObj,ResponseObj,ErrorObj,HeadersObj}from'./interceptor';export type{SdkError,ApiError,ErrorType}from'./error';
|
package/lib/esm/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export{default}from"./commercelayer";export{CommerceLayerStatic}from"./static";export*from"./model";
|
1
|
+
export{default,CommerceLayer}from"./commercelayer";export{CommerceLayerStatic}from"./static";export*from"./model";
|
package/lib/esm/interceptor.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{AxiosError,AxiosInterceptorManager,AxiosRequestConfig,AxiosResponse,AxiosResponseHeaders,RawAxiosResponseHeaders}from'axios';
|
1
|
+
import{AxiosError,AxiosInterceptorManager,AxiosRequestConfig,AxiosResponse,AxiosResponseHeaders,RawAxiosResponseHeaders}from'axios';type InterceptorManager={request:AxiosInterceptorManager<AxiosRequestConfig>;response:AxiosInterceptorManager<any>;};type RequestObj=AxiosRequestConfig;type RequestInterceptor=(request:RequestObj)=>RequestObj|Promise<RequestObj>;type ResponseObj=AxiosResponse;type ResponseInterceptor=(response:ResponseObj)=>ResponseObj;type HeadersObj=AxiosResponseHeaders|RawAxiosResponseHeaders;type ErrorObj=AxiosError;type ErrorInterceptor=(error:ErrorObj)=>ErrorObj;type InterceptorType='request'|'response';export type{InterceptorManager,RequestInterceptor,ResponseInterceptor,ErrorInterceptor,InterceptorType};export type{RequestObj,ResponseObj,ErrorObj,HeadersObj};type RawResponseReader={id:number|undefined;rawResponse:ResponseObj|undefined;headers:HeadersObj|undefined;};export type{RawResponseReader};
|
package/lib/esm/query.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{ResourceType}from"./resource";interface QueryParamsRetrieve{include?:string[];fields?:string[]|{[key:string]:string[];};}interface QueryParamsList extends QueryParamsRetrieve{sort?:string[]|{[key:string]:'asc'|'desc';};filters?:{[key:string]:string|number|boolean;};pageNumber?:number;pageSize?:number;}
|
1
|
+
import{ResourceType}from"./resource";interface QueryParamsRetrieve{include?:string[];fields?:string[]|{[key:string]:string[];};}interface QueryParamsList extends QueryParamsRetrieve{sort?:string[]|{[key:string]:'asc'|'desc';};filters?:{[key:string]:string|number|boolean;};pageNumber?:number;pageSize?:number;}type QueryParams=QueryParamsRetrieve|QueryParamsList;export{QueryParamsRetrieve,QueryParamsList,QueryParams};declare const generateQueryStringParams:(params:QueryParamsRetrieve|QueryParamsList|undefined,res:string|ResourceType)=>{[key:string]:string;};export{generateQueryStringParams};
|
package/lib/esm/resource.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{ApiClientInitConfig}from'./client';import{QueryParamsRetrieve,QueryParamsList}from'./query';import{ResourceTypeLock}from'./api';import{InterceptorManager}from'./interceptor';import{QueryParams}from'.';
|
1
|
+
import{ApiClientInitConfig}from'./client';import{QueryParamsRetrieve,QueryParamsList}from'./query';import{ResourceTypeLock}from'./api';import{InterceptorManager}from'./interceptor';import{QueryParams}from'.';type ResourceNull={id:null;}&ResourceType;type ResourceRel=ResourceId|ResourceNull;type Metadata={[key:string]:any;};interface ResourceType{readonly type:ResourceTypeLock;}interface ResourceId extends ResourceType{readonly id:string;}interface Resource extends ResourceId{reference?:string;reference_origin?:string;metadata?:Metadata;readonly created_at:string;readonly updated_at:string;}interface ResourceCreate{reference?:string;reference_origin?:string;metadata?:Metadata;}interface ResourceUpdate{readonly id:string;reference?:string;reference_origin?:string;metadata?:Metadata;}type ListMeta={readonly pageCount:number;readonly recordCount:number;readonly currentPage:number;readonly recordsPerPage:number;};declare class ListResponse<R>extends Array<R>{readonly meta:ListMeta;constructor(meta:ListMeta,data:R[]);first():R|undefined;last():R|undefined;get(index:number):R|undefined;}export type{Metadata,ResourceType,ResourceId,Resource,ResourceCreate,ResourceUpdate,ListResponse,ResourceRel};type ResourceAdapterConfig={};type ResourcesInitConfig=ResourceAdapterConfig&ApiClientInitConfig;type ResourcesConfig=Partial<ResourcesInitConfig>;declare class ResourceAdapter{#private;constructor(config:ResourcesInitConfig);get interceptors():InterceptorManager;private localConfig;config(config:ResourcesConfig):void;singleton<R extends Resource>(resource:ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;retrieve<R extends Resource>(resource:ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;list<R extends Resource>(resource:ResourceType,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<R>>;create<C extends ResourceCreate,R extends Resource>(resource:C&ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;update<U extends ResourceUpdate,R extends Resource>(resource:U&ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;delete(resource:ResourceId,options?:ResourcesConfig):Promise<void>;fetch<R extends Resource>(resource:string|ResourceType,path:string,params?:QueryParams,options?:ResourcesConfig):Promise<R|ListResponse<R>>;}declare abstract class ApiResource{static readonly TYPE:ResourceTypeLock;protected resources:ResourceAdapter;constructor(adapter:ResourceAdapter);abstract relationship(id:string|ResourceId|null):ResourceRel;abstract type():string;}export default ResourceAdapter;export{ApiResource,ResourcesConfig,ResourcesInitConfig};
|
package/lib/esm/resource.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var y=
|
1
|
+
var y=function(o,e,a,t,s){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!s:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?s.call(o,a):s?s.value=a:e.set(o,a),a},c=function(o,e,a,t){if(a==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!t:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?t:a==="a"?t.call(o):t?t.value:e.get(o)},n,b;import j from"./client";import{denormalize as g,normalize as O}from"./jsonapi";import{generateQueryStringParams as m}from"./query";import f from"./config";import P from"./debug";const u=P("resource");class w extends Array{constructor(e,a){super(...a||[]),this.meta=e}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]:void 0}}class C{constructor(e){n.set(this,void 0),b.set(this,{}),y(this,n,j.create(e),"f"),this.localConfig(e)}get interceptors(){return c(this,n,"f").interceptors}localConfig(e){}config(e){u("config %o",e),this.localConfig(e),c(this,n,"f").config(e)}async singleton(e,a,t){u("singleton: %o, %O, %O",e,a||{},t||{});const s=m(a,e);t?.params&&Object.assign(s,t?.params);const r=await c(this,n,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:s}));return g(r)}async retrieve(e,a,t){u("retrieve: %o, %O, %O",e,a||{},t||{});const s=m(a,e);t?.params&&Object.assign(s,t?.params);const r=await c(this,n,"f").request("get",`${e.type}/${e.id}`,void 0,Object.assign(Object.assign({},t),{params:s}));return g(r)}async list(e,a,t){var s,r;u("list: %o, %O, %O",e,a||{},t||{});const i=m(a,e);t?.params&&Object.assign(i,t?.params);const p=await c(this,n,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:i})),d=g(p),l={pageCount:Number((s=p.meta)===null||s===void 0?void 0:s.page_count),recordCount:Number((r=p.meta)===null||r===void 0?void 0:r.record_count),currentPage:a?.pageNumber||f.default.pageNumber,recordsPerPage:a?.pageSize||f.default.pageSize};return new w(l,d)}async create(e,a,t){u("create: %o, %O, %O",e,a||{},t||{});const s=m(a,e);t?.params&&Object.assign(s,t?.params);const r=O(e),i=await c(this,n,"f").request("post",e.type,r,Object.assign(Object.assign({},t),{params:s}));return g(i)}async update(e,a,t){u("update: %o, %O, %O",e,a||{},t||{});const s=m(a,e);t?.params&&Object.assign(s,t?.params);const r=O(e),i=await c(this,n,"f").request("patch",`${e.type}/${e.id}`,r,Object.assign(Object.assign({},t),{params:s}));return g(i)}async delete(e,a){u("delete: %o, %O",e,a||{}),await c(this,n,"f").request("delete",`${e.type}/${e.id}`,void 0,a)}async fetch(e,a,t,s){var r,i;u("fetch: %o, %O, %O",a,t||{},s||{});const p=m(t,e);s?.params&&Object.assign(p,s?.params);const d=await c(this,n,"f").request("get",a,void 0,Object.assign(Object.assign({},s),{params:p})),l=g(d);if(Array.isArray(l)){const h=t,v={pageCount:Number((r=d.meta)===null||r===void 0?void 0:r.page_count),recordCount:Number((i=d.meta)===null||i===void 0?void 0:i.record_count),currentPage:h?.pageNumber||f.default.pageNumber,recordsPerPage:h?.pageSize||f.default.pageSize};return new w(v,l)}else return l}}n=new WeakMap,b=new WeakMap;class q{constructor(e){u("new resource instance: %s",this.type()),this.resources=e}}export default C;export{q as ApiResource};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Geocoder}from'./geocoders';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Geocoder}from'./geocoders';type AddressRel=ResourceRel&{type:typeof Addresses.TYPE;};type GeocoderRel=ResourceRel&{type:'geocoders';};interface Address extends Resource{business?:boolean;first_name?:string;last_name?:string;company?:string;full_name?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;full_address?:string;name?:string;email?:string;notes?:string;lat?:number;lng?:number;is_localized?:boolean;is_geocoded?:boolean;provider_name?:string;map_url?:string;static_map_url?:string;billing_info?:string;geocoder?:Geocoder;}interface AddressCreate extends ResourceCreate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1:string;line_2?:string;city:string;zip_code?:string;state_code:string;country_code:string;phone:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}interface AddressUpdate extends ResourceUpdate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}declare class Addresses extends ApiResource{static readonly TYPE:'addresses';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;create(resource:AddressCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;update(resource:AddressUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;delete(id:string,options?:ResourcesConfig):Promise<void>;geocoder(addressId:string|Address,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Geocoder>;isAddress(resource:any):resource is Address;relationship(id:string|ResourceId|null):AddressRel;type():string;}export default Addresses;export{Address,AddressCreate,AddressUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';type AdjustmentRel=ResourceRel&{type:typeof Adjustments.TYPE;};interface Adjustment extends Resource{name?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;}interface AdjustmentCreate extends ResourceCreate{name:string;currency_code:string;amount_cents:number;}interface AdjustmentUpdate extends ResourceUpdate{name?:string;currency_code?:string;amount_cents?:number;}declare class Adjustments extends ApiResource{static readonly TYPE:'adjustments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Adjustment>>;create(resource:AdjustmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;update(resource:AdjustmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAdjustment(resource:any):resource is Adjustment;relationship(id:string|ResourceId|null):AdjustmentRel;type():string;}export default Adjustments;export{Adjustment,AdjustmentCreate,AdjustmentUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{AdyenPayment}from'./adyen_payments';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PaymentMethod}from'./payment_methods';import type{AdyenPayment}from'./adyen_payments';type AdyenGatewayRel=ResourceRel&{type:typeof AdyenGateways.TYPE;};type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};interface AdyenGateway extends Resource{name?:string;live_url_prefix?:string;payment_methods?:PaymentMethod[];adyen_payments?:AdyenPayment[];}interface AdyenGatewayCreate extends ResourceCreate{name:string;merchant_account:string;api_key:string;public_key?:string;live_url_prefix:string;adyen_payments?:AdyenPaymentRel[];}interface AdyenGatewayUpdate extends ResourceUpdate{name?:string;merchant_account?:string;api_key?:string;public_key?:string;live_url_prefix?:string;adyen_payments?:AdyenPaymentRel[];}declare class AdyenGateways extends ApiResource{static readonly TYPE:'adyen_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenGateway>>;create(resource:AdyenGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;update(resource:AdyenGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;adyen_payments(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;isAdyenGateway(resource:any):resource is AdyenGateway;relationship(id:string|ResourceId|null):AdyenGatewayRel;type():string;}export default AdyenGateways;export{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{PaymentGateway}from'./payment_gateways';type AdyenPaymentRel=ResourceRel&{type:typeof AdyenPayments.TYPE;};type OrderRel=ResourceRel&{type:'orders';};interface AdyenPayment extends Resource{public_key?:string;payment_methods?:object;payment_request_data?:object;payment_request_details?:object;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface AdyenPaymentCreate extends ResourceCreate{order:OrderRel;}interface AdyenPaymentUpdate extends ResourceUpdate{payment_request_data?:object;payment_request_details?:object;payment_response?:object;_details?:boolean;order?:OrderRel;}declare class AdyenPayments extends ApiResource{static readonly TYPE:'adyen_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;create(resource:AdyenPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;update(resource:AdyenPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isAdyenPayment(resource:any):resource is AdyenPayment;relationship(id:string|ResourceId|null):AdyenPaymentRel;type():string;}export default AdyenPayments;export{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';type ApplicationRel=ResourceRel&{type:typeof Applications.TYPE;};interface Application extends Resource{name?:string;kind?:string;public_access?:boolean;redirect_uri?:string;scopes?:string;}declare class Applications extends ApiResource{static readonly TYPE:'application';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Application>;isApplication(resource:any):resource is Application;relationship(id:string|ResourceId|null):ApplicationRel;type():string;}export default Applications;export{Application};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Bundle}from'./bundles';import type{CarrierAccount}from'./carrier_accounts';import type{CustomerGroup}from'./customer_groups';import type{Customer}from'./customers';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Geocoder}from'./geocoders';import type{GiftCardRecipient}from'./gift_card_recipients';import type{GiftCard}from'./gift_cards';import type{InventoryModel}from'./inventory_models';import type{Market}from'./markets';import type{Merchant}from'./merchants';import type{BillingInfoValidationRule}from'./billing_info_validation_rules';import type{Order}from'./orders';import type{Package}from'./packages';import type{Parcel}from'./parcels';import type{PaymentMethod}from'./payment_methods';import type{PriceList}from'./price_lists';import type{Price}from'./prices';import type{Promotion}from'./promotions';import type{Return}from'./returns';import type{Shipment}from'./shipments';import type{ShippingCategory}from'./shipping_categories';import type{ShippingMethod}from'./shipping_methods';import type{ShippingZone}from'./shipping_zones';import type{SkuOption}from'./sku_options';import type{Sku}from'./skus';import type{StockItem}from'./stock_items';import type{StockLocation}from'./stock_locations';import type{TaxCalculator}from'./tax_calculators';import type{TaxCategory}from'./tax_categories';
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Bundle}from'./bundles';import type{CarrierAccount}from'./carrier_accounts';import type{CustomerGroup}from'./customer_groups';import type{Customer}from'./customers';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Geocoder}from'./geocoders';import type{GiftCardRecipient}from'./gift_card_recipients';import type{GiftCard}from'./gift_cards';import type{InventoryModel}from'./inventory_models';import type{Market}from'./markets';import type{Merchant}from'./merchants';import type{BillingInfoValidationRule}from'./billing_info_validation_rules';import type{Order}from'./orders';import type{Package}from'./packages';import type{Parcel}from'./parcels';import type{PaymentMethod}from'./payment_methods';import type{PriceList}from'./price_lists';import type{Price}from'./prices';import type{Promotion}from'./promotions';import type{Return}from'./returns';import type{Shipment}from'./shipments';import type{ShippingCategory}from'./shipping_categories';import type{ShippingMethod}from'./shipping_methods';import type{ShippingZone}from'./shipping_zones';import type{SkuOption}from'./sku_options';import type{Sku}from'./skus';import type{StockItem}from'./stock_items';import type{StockLocation}from'./stock_locations';import type{TaxCalculator}from'./tax_calculators';import type{TaxCategory}from'./tax_categories';type AttachmentRel=ResourceRel&{type:typeof Attachments.TYPE;};type BundleRel=ResourceRel&{type:'bundles';};type CarrierAccountRel=ResourceRel&{type:'carrier_accounts';};type CustomerGroupRel=ResourceRel&{type:'customer_groups';};type CustomerRel=ResourceRel&{type:'customers';};type DeliveryLeadTimeRel=ResourceRel&{type:'delivery_lead_times';};type GeocoderRel=ResourceRel&{type:'geocoders';};type GiftCardRecipientRel=ResourceRel&{type:'gift_card_recipients';};type GiftCardRel=ResourceRel&{type:'gift_cards';};type InventoryModelRel=ResourceRel&{type:'inventory_models';};type MarketRel=ResourceRel&{type:'markets';};type MerchantRel=ResourceRel&{type:'merchants';};type BillingInfoValidationRuleRel=ResourceRel&{type:'billing_info_validation_rules';};type OrderRel=ResourceRel&{type:'orders';};type PackageRel=ResourceRel&{type:'packages';};type ParcelRel=ResourceRel&{type:'parcels';};type PaymentMethodRel=ResourceRel&{type:'payment_methods';};type PriceListRel=ResourceRel&{type:'price_lists';};type PriceRel=ResourceRel&{type:'prices';};type PromotionRel=ResourceRel&{type:'promotions';};type ReturnRel=ResourceRel&{type:'returns';};type ShipmentRel=ResourceRel&{type:'shipments';};type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};type SkuOptionRel=ResourceRel&{type:'sku_options';};type SkuRel=ResourceRel&{type:'skus';};type StockItemRel=ResourceRel&{type:'stock_items';};type StockLocationRel=ResourceRel&{type:'stock_locations';};type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface Attachment extends Resource{name?:string;description?:string;url?:string;attachable?:Bundle|CarrierAccount|CustomerGroup|Customer|DeliveryLeadTime|Geocoder|GiftCardRecipient|GiftCard|InventoryModel|Market|Merchant|BillingInfoValidationRule|Order|Package|Parcel|PaymentMethod|PriceList|Price|Promotion|Return|Shipment|ShippingCategory|ShippingMethod|ShippingZone|SkuOption|Sku|StockItem|StockLocation|TaxCalculator|TaxCategory;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string;url?:string;attachable:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string;description?:string;url?:string;attachable?:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}declare class Attachments extends ApiResource{static readonly TYPE:'attachments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():string;}export default Attachments;export{Attachment,AttachmentCreate,AttachmentUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';import type{Void}from'./voids';
|
1
|
+
import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';import type{Void}from'./voids';type AuthorizationRel=ResourceRel&{type:typeof Authorizations.TYPE;};interface Authorization extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;cvv_code?:string;cvv_message?:string;avs_code?:string;avs_message?:string;fraud_review?:string;capture_amount_cents?:number;capture_amount_float?:number;formatted_capture_amount?:string;capture_balance_cents?:number;capture_balance_float?:number;formatted_capture_balance?:string;void_balance_cents?:number;void_balance_float?:number;formatted_void_balance?:string;order?:Order;captures?:Capture[];voids?:Void[];}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean;_capture_amount_cents?:number;_void?:boolean;}declare class Authorizations extends ApiResource{static readonly TYPE:'authorizations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():string;}export default Authorizations;export{Authorization,AuthorizationUpdate};
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';import type{TaxCategory}from'./tax_categories';type AvalaraAccountRel=ResourceRel&{type:typeof AvalaraAccounts.TYPE;};type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface AvalaraAccount extends Resource{name?:string;username?:string;company_code?:string;commit_invoice?:string;ddp?:string;markets?:Market[];attachments?:Attachment[];tax_categories?:TaxCategory[];}interface AvalaraAccountCreate extends ResourceCreate{name:string;username:string;password:string;company_code:string;commit_invoice?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}interface AvalaraAccountUpdate extends ResourceUpdate{name?:string;username?:string;password?:string;company_code?:string;commit_invoice?:string;ddp?:string;tax_categories?:TaxCategoryRel[];}declare class AvalaraAccounts extends ApiResource{static readonly TYPE:'avalara_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AvalaraAccount>>;create(resource:AvalaraAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;update(resource:AvalaraAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AvalaraAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;markets(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;tax_categories(avalaraAccountId:string|AvalaraAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;isAvalaraAccount(resource:any):resource is AvalaraAccount;relationship(id:string|ResourceId|null):AvalaraAccountRel;type():string;}export default AvalaraAccounts;export{AvalaraAccount,AvalaraAccountCreate,AvalaraAccountUpdate};
|