@commercelayer/sdk 4.7.4 → 4.8.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/README.md +37 -24
- package/lib/cjs/api.d.ts +1 -103
- package/lib/cjs/client.d.ts +1 -31
- package/lib/cjs/commercelayer.d.ts +1 -122
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.d.ts +1 -4
- package/lib/cjs/config.d.ts +1 -11
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/error.d.ts +1 -26
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/interceptor.d.ts +1 -19
- package/lib/cjs/jsonapi.d.ts +1 -5
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/model.d.ts +1 -101
- package/lib/cjs/query.d.ts +1 -23
- package/lib/cjs/resource.d.ts +1 -76
- package/lib/cjs/resources/addresses.d.ts +1 -88
- package/lib/cjs/resources/adjustments.d.ts +1 -35
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -47
- package/lib/cjs/resources/adyen_payments.d.ts +1 -44
- package/lib/cjs/resources/application.d.ts +1 -21
- package/lib/cjs/resources/attachments.d.ts +1 -156
- package/lib/cjs/resources/authorizations.d.ts +1 -57
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -52
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -32
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -56
- package/lib/cjs/resources/braintree_payments.d.ts +1 -47
- package/lib/cjs/resources/bundles.d.ts +1 -74
- package/lib/cjs/resources/captures.d.ts +1 -48
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -26
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -45
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -51
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -59
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -44
- package/lib/cjs/resources/coupons.d.ts +1 -45
- package/lib/cjs/resources/customer_addresses.d.ts +1 -41
- package/lib/cjs/resources/customer_groups.d.ts +1 -36
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -33
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -70
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -28
- package/lib/cjs/resources/customers.d.ts +1 -60
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -51
- package/lib/cjs/resources/event_callbacks.d.ts +1 -24
- package/lib/cjs/resources/external_gateways.d.ts +1 -49
- package/lib/cjs/resources/external_payments.d.ts +1 -43
- package/lib/cjs/resources/external_promotions.d.ts +1 -86
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -44
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -88
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -99
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -97
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -83
- package/lib/cjs/resources/geocoders.d.ts +1 -24
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -44
- package/lib/cjs/resources/gift_cards.d.ts +1 -82
- package/lib/cjs/resources/google_geocoders.d.ts +1 -35
- package/lib/cjs/resources/imports.d.ts +1 -40
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -59
- package/lib/cjs/resources/inventory_models.d.ts +1 -42
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -43
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -46
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -44
- package/lib/cjs/resources/klarna_payments.d.ts +1 -41
- package/lib/cjs/resources/line_item_options.d.ts +1 -57
- package/lib/cjs/resources/line_items.d.ts +1 -125
- package/lib/cjs/resources/manual_gateways.d.ts +1 -33
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -49
- package/lib/cjs/resources/markets.d.ts +1 -81
- package/lib/cjs/resources/merchants.d.ts +1 -38
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -56
- package/lib/cjs/resources/order_copies.d.ts +1 -45
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -67
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -20
- package/lib/cjs/resources/orders.d.ts +1 -271
- package/lib/cjs/resources/organization.d.ts +1 -32
- package/lib/cjs/resources/packages.d.ts +1 -56
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -49
- package/lib/cjs/resources/parcels.d.ts +1 -108
- package/lib/cjs/resources/payment_gateways.d.ts +1 -21
- package/lib/cjs/resources/payment_methods.d.ts +1 -59
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -39
- package/lib/cjs/resources/paypal_payments.d.ts +1 -49
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -97
- package/lib/cjs/resources/price_lists.d.ts +1 -39
- package/lib/cjs/resources/prices.d.ts +1 -57
- package/lib/cjs/resources/promotion_rules.d.ts +1 -24
- package/lib/cjs/resources/promotions.d.ts +1 -41
- package/lib/cjs/resources/refunds.d.ts +1 -34
- package/lib/cjs/resources/return_line_items.d.ts +1 -49
- package/lib/cjs/resources/returns.d.ts +1 -72
- package/lib/cjs/resources/shipments.d.ts +1 -89
- package/lib/cjs/resources/shipping_categories.d.ts +1 -33
- package/lib/cjs/resources/shipping_methods.d.ts +1 -74
- package/lib/cjs/resources/shipping_zones.d.ts +1 -48
- package/lib/cjs/resources/sku_list_items.d.ts +1 -47
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -68
- package/lib/cjs/resources/sku_lists.d.ts +1 -49
- package/lib/cjs/resources/sku_options.d.ts +1 -56
- package/lib/cjs/resources/skus.d.ts +1 -78
- package/lib/cjs/resources/stock_items.d.ts +1 -49
- package/lib/cjs/resources/stock_line_items.d.ts +1 -29
- package/lib/cjs/resources/stock_locations.d.ts +1 -57
- package/lib/cjs/resources/stock_transfers.d.ts +1 -71
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -38
- package/lib/cjs/resources/stripe_payments.d.ts +1 -42
- package/lib/cjs/resources/tax_calculators.d.ts +1 -27
- package/lib/cjs/resources/tax_categories.d.ts +1 -59
- package/lib/cjs/resources/tax_rules.d.ts +1 -69
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -43
- package/lib/cjs/resources/transactions.d.ts +1 -31
- package/lib/cjs/resources/voids.d.ts +1 -34
- package/lib/cjs/resources/webhooks.d.ts +1 -42
- package/lib/cjs/resources/wire_transfers.d.ts +1 -32
- package/lib/cjs/static.d.ts +1 -6
- package/lib/cjs/util.d.ts +1 -2
- package/lib/esm/api.d.ts +1 -103
- package/lib/esm/client.d.ts +1 -31
- package/lib/esm/commercelayer.d.ts +1 -122
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.d.ts +1 -4
- package/lib/esm/config.d.ts +1 -11
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/error.d.ts +1 -26
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/interceptor.d.ts +1 -19
- package/lib/esm/jsonapi.d.ts +1 -5
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +1 -101
- package/lib/esm/query.d.ts +1 -23
- package/lib/esm/resource.d.ts +1 -76
- package/lib/esm/resources/addresses.d.ts +1 -88
- package/lib/esm/resources/adjustments.d.ts +1 -35
- package/lib/esm/resources/adyen_gateways.d.ts +1 -47
- package/lib/esm/resources/adyen_payments.d.ts +1 -44
- package/lib/esm/resources/application.d.ts +1 -21
- package/lib/esm/resources/attachments.d.ts +1 -156
- package/lib/esm/resources/authorizations.d.ts +1 -57
- package/lib/esm/resources/avalara_accounts.d.ts +1 -52
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -32
- package/lib/esm/resources/bing_geocoders.d.ts +1 -35
- package/lib/esm/resources/braintree_gateways.d.ts +1 -56
- package/lib/esm/resources/braintree_payments.d.ts +1 -47
- package/lib/esm/resources/bundles.d.ts +1 -74
- package/lib/esm/resources/captures.d.ts +1 -48
- package/lib/esm/resources/carrier_accounts.d.ts +1 -26
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -45
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -51
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -59
- package/lib/esm/resources/coupon_recipients.d.ts +1 -44
- package/lib/esm/resources/coupons.d.ts +1 -45
- package/lib/esm/resources/customer_addresses.d.ts +1 -41
- package/lib/esm/resources/customer_groups.d.ts +1 -36
- package/lib/esm/resources/customer_password_resets.d.ts +1 -33
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -70
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -28
- package/lib/esm/resources/customers.d.ts +1 -60
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -51
- package/lib/esm/resources/event_callbacks.d.ts +1 -24
- package/lib/esm/resources/external_gateways.d.ts +1 -49
- package/lib/esm/resources/external_payments.d.ts +1 -43
- package/lib/esm/resources/external_promotions.d.ts +1 -86
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -44
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -88
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -99
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -97
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -83
- package/lib/esm/resources/geocoders.d.ts +1 -24
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -44
- package/lib/esm/resources/gift_cards.d.ts +1 -82
- package/lib/esm/resources/google_geocoders.d.ts +1 -35
- package/lib/esm/resources/imports.d.ts +1 -40
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -59
- package/lib/esm/resources/inventory_models.d.ts +1 -42
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -43
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -46
- package/lib/esm/resources/klarna_gateways.d.ts +1 -44
- package/lib/esm/resources/klarna_payments.d.ts +1 -41
- package/lib/esm/resources/line_item_options.d.ts +1 -57
- package/lib/esm/resources/line_items.d.ts +1 -125
- package/lib/esm/resources/manual_gateways.d.ts +1 -33
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -49
- package/lib/esm/resources/markets.d.ts +1 -81
- package/lib/esm/resources/merchants.d.ts +1 -38
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -56
- package/lib/esm/resources/order_copies.d.ts +1 -45
- package/lib/esm/resources/order_subscriptions.d.ts +1 -67
- package/lib/esm/resources/order_validation_rules.d.ts +1 -20
- package/lib/esm/resources/orders.d.ts +1 -271
- package/lib/esm/resources/organization.d.ts +1 -32
- package/lib/esm/resources/packages.d.ts +1 -56
- package/lib/esm/resources/parcel_line_items.d.ts +1 -49
- package/lib/esm/resources/parcels.d.ts +1 -108
- package/lib/esm/resources/payment_gateways.d.ts +1 -21
- package/lib/esm/resources/payment_methods.d.ts +1 -59
- package/lib/esm/resources/paypal_gateways.d.ts +1 -39
- package/lib/esm/resources/paypal_payments.d.ts +1 -49
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -97
- package/lib/esm/resources/price_lists.d.ts +1 -39
- package/lib/esm/resources/prices.d.ts +1 -57
- package/lib/esm/resources/promotion_rules.d.ts +1 -24
- package/lib/esm/resources/promotions.d.ts +1 -41
- package/lib/esm/resources/refunds.d.ts +1 -34
- package/lib/esm/resources/return_line_items.d.ts +1 -49
- package/lib/esm/resources/returns.d.ts +1 -72
- package/lib/esm/resources/shipments.d.ts +1 -89
- package/lib/esm/resources/shipping_categories.d.ts +1 -33
- package/lib/esm/resources/shipping_methods.d.ts +1 -74
- package/lib/esm/resources/shipping_zones.d.ts +1 -48
- package/lib/esm/resources/sku_list_items.d.ts +1 -47
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -68
- package/lib/esm/resources/sku_lists.d.ts +1 -49
- package/lib/esm/resources/sku_options.d.ts +1 -56
- package/lib/esm/resources/skus.d.ts +1 -78
- package/lib/esm/resources/stock_items.d.ts +1 -49
- package/lib/esm/resources/stock_line_items.d.ts +1 -29
- package/lib/esm/resources/stock_locations.d.ts +1 -57
- package/lib/esm/resources/stock_transfers.d.ts +1 -71
- package/lib/esm/resources/stripe_gateways.d.ts +1 -38
- package/lib/esm/resources/stripe_payments.d.ts +1 -42
- package/lib/esm/resources/tax_calculators.d.ts +1 -27
- package/lib/esm/resources/tax_categories.d.ts +1 -59
- package/lib/esm/resources/tax_rules.d.ts +1 -69
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -43
- package/lib/esm/resources/transactions.d.ts +1 -31
- package/lib/esm/resources/voids.d.ts +1 -34
- package/lib/esm/resources/webhooks.d.ts +1 -42
- package/lib/esm/resources/wire_transfers.d.ts +1 -32
- package/lib/esm/static.d.ts +1 -6
- package/lib/esm/util.d.ts +1 -2
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -5
@@ -1,43 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { TaxCategory } from './tax_categories';
|
4
|
-
import type { Market } from './markets';
|
5
|
-
import type { Attachment } from './attachments';
|
6
|
-
declare type TaxjarAccountRel = ResourceRel & {
|
7
|
-
type: typeof TaxjarAccounts.TYPE;
|
8
|
-
};
|
9
|
-
declare type TaxCategoryRel = ResourceRel & {
|
10
|
-
type: 'tax_categories';
|
11
|
-
};
|
12
|
-
interface TaxjarAccount extends Resource {
|
13
|
-
name?: string;
|
14
|
-
tax_categories?: TaxCategory[];
|
15
|
-
markets?: Market[];
|
16
|
-
attachments?: Attachment[];
|
17
|
-
}
|
18
|
-
interface TaxjarAccountCreate extends ResourceCreate {
|
19
|
-
name: string;
|
20
|
-
api_key: string;
|
21
|
-
tax_categories?: TaxCategoryRel[];
|
22
|
-
}
|
23
|
-
interface TaxjarAccountUpdate extends ResourceUpdate {
|
24
|
-
name?: string;
|
25
|
-
api_key?: string;
|
26
|
-
tax_categories?: TaxCategoryRel[];
|
27
|
-
}
|
28
|
-
declare class TaxjarAccounts extends ApiResource {
|
29
|
-
static readonly TYPE: 'taxjar_accounts';
|
30
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxjarAccount>>;
|
31
|
-
create(resource: TaxjarAccountCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
32
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
33
|
-
update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
|
34
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
35
|
-
tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
|
36
|
-
markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
|
37
|
-
attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
38
|
-
isTaxjarAccount(resource: any): resource is TaxjarAccount;
|
39
|
-
relationship(id: string | ResourceId | null): TaxjarAccountRel;
|
40
|
-
type(): string;
|
41
|
-
}
|
42
|
-
export default TaxjarAccounts;
|
43
|
-
export { TaxjarAccount, TaxjarAccountCreate, TaxjarAccountUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{TaxCategory}from'./tax_categories';import type{Market}from'./markets';import type{Attachment}from'./attachments';declare type TaxjarAccountRel=ResourceRel&{type:typeof TaxjarAccounts.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface TaxjarAccount extends Resource{name?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}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>;tax_categories(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(taxjarAccountId:string|TaxjarAccount,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isTaxjarAccount(resource:any):resource is TaxjarAccount;relationship(id:string|ResourceId|null):TaxjarAccountRel;type():string;}export default TaxjarAccounts;export{TaxjarAccount,TaxjarAccountCreate,TaxjarAccountUpdate};
|
@@ -1,31 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
declare type TransactionRel = ResourceRel & {
|
5
|
-
type: typeof Transactions.TYPE;
|
6
|
-
};
|
7
|
-
interface Transaction extends Resource {
|
8
|
-
number?: string;
|
9
|
-
currency_code?: string;
|
10
|
-
amount_cents?: number;
|
11
|
-
amount_float?: number;
|
12
|
-
formatted_amount?: string;
|
13
|
-
succeeded?: boolean;
|
14
|
-
message?: string;
|
15
|
-
error_code?: string;
|
16
|
-
error_detail?: string;
|
17
|
-
token?: string;
|
18
|
-
gateway_transaction_id?: string;
|
19
|
-
order?: Order;
|
20
|
-
}
|
21
|
-
declare class Transactions extends ApiResource {
|
22
|
-
static readonly TYPE: 'transactions';
|
23
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
24
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
|
25
|
-
order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
26
|
-
isTransaction(resource: any): resource is Transaction;
|
27
|
-
relationship(id: string | ResourceId | null): TransactionRel;
|
28
|
-
type(): string;
|
29
|
-
}
|
30
|
-
export default Transactions;
|
31
|
-
export { Transaction };
|
1
|
+
import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';declare 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,34 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
import type { Authorization } from './authorizations';
|
5
|
-
declare type VoidRel = ResourceRel & {
|
6
|
-
type: typeof Voids.TYPE;
|
7
|
-
};
|
8
|
-
interface Void extends Resource {
|
9
|
-
number?: string;
|
10
|
-
currency_code?: string;
|
11
|
-
amount_cents?: number;
|
12
|
-
amount_float?: number;
|
13
|
-
formatted_amount?: string;
|
14
|
-
succeeded?: boolean;
|
15
|
-
message?: string;
|
16
|
-
error_code?: string;
|
17
|
-
error_detail?: string;
|
18
|
-
token?: string;
|
19
|
-
gateway_transaction_id?: string;
|
20
|
-
order?: Order;
|
21
|
-
reference_authorization?: Authorization;
|
22
|
-
}
|
23
|
-
declare class Voids extends ApiResource {
|
24
|
-
static readonly TYPE: 'voids';
|
25
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
|
26
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Void>;
|
27
|
-
order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
28
|
-
reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
|
29
|
-
isVoid(resource: any): resource is Void;
|
30
|
-
relationship(id: string | ResourceId | null): VoidRel;
|
31
|
-
type(): string;
|
32
|
-
}
|
33
|
-
export default Voids;
|
34
|
-
export { Void };
|
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';declare 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,42 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { EventCallback } from './event_callbacks';
|
4
|
-
declare type WebhookRel = ResourceRel & {
|
5
|
-
type: typeof Webhooks.TYPE;
|
6
|
-
};
|
7
|
-
interface Webhook extends Resource {
|
8
|
-
name?: string;
|
9
|
-
topic?: string;
|
10
|
-
callback_url?: string;
|
11
|
-
include_resources?: string[];
|
12
|
-
circuit_state?: string;
|
13
|
-
circuit_failure_count?: number;
|
14
|
-
last_event_callbacks?: EventCallback[];
|
15
|
-
}
|
16
|
-
interface WebhookCreate extends ResourceCreate {
|
17
|
-
name?: string;
|
18
|
-
topic: string;
|
19
|
-
callback_url: string;
|
20
|
-
include_resources?: string[];
|
21
|
-
}
|
22
|
-
interface WebhookUpdate extends ResourceUpdate {
|
23
|
-
name?: string;
|
24
|
-
topic?: string;
|
25
|
-
callback_url?: string;
|
26
|
-
include_resources?: string[];
|
27
|
-
_reset_circuit?: boolean;
|
28
|
-
}
|
29
|
-
declare class Webhooks extends ApiResource {
|
30
|
-
static readonly TYPE: 'webhooks';
|
31
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Webhook>>;
|
32
|
-
create(resource: WebhookCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
33
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
34
|
-
update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
|
35
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
|
-
last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
37
|
-
isWebhook(resource: any): resource is Webhook;
|
38
|
-
relationship(id: string | ResourceId | null): WebhookRel;
|
39
|
-
type(): string;
|
40
|
-
}
|
41
|
-
export default Webhooks;
|
42
|
-
export { Webhook, WebhookCreate, WebhookUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{EventCallback}from'./event_callbacks';declare 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;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,32 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Order } from './orders';
|
4
|
-
declare type WireTransferRel = ResourceRel & {
|
5
|
-
type: typeof WireTransfers.TYPE;
|
6
|
-
};
|
7
|
-
declare type OrderRel = ResourceRel & {
|
8
|
-
type: 'orders';
|
9
|
-
};
|
10
|
-
interface WireTransfer extends Resource {
|
11
|
-
order?: Order;
|
12
|
-
}
|
13
|
-
interface WireTransferCreate extends ResourceCreate {
|
14
|
-
order: OrderRel;
|
15
|
-
}
|
16
|
-
interface WireTransferUpdate extends ResourceUpdate {
|
17
|
-
order?: OrderRel;
|
18
|
-
}
|
19
|
-
declare class WireTransfers extends ApiResource {
|
20
|
-
static readonly TYPE: 'wire_transfers';
|
21
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<WireTransfer>>;
|
22
|
-
create(resource: WireTransferCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
23
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
24
|
-
update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
|
25
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
26
|
-
order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
27
|
-
isWireTransfer(resource: any): resource is WireTransfer;
|
28
|
-
relationship(id: string | ResourceId | null): WireTransferRel;
|
29
|
-
type(): string;
|
30
|
-
}
|
31
|
-
export default WireTransfers;
|
32
|
-
export { WireTransfer, WireTransferCreate, WireTransferUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';declare type WireTransferRel=ResourceRel&{type:typeof WireTransfers.TYPE;};declare 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/static.d.ts
CHANGED
@@ -1,6 +1 @@
|
|
1
|
-
import
|
2
|
-
export declare const CommerceLayerStatic: {
|
3
|
-
resources: () => readonly string[];
|
4
|
-
isSdkError: (error: unknown) => error is SdkError;
|
5
|
-
isApiError: (error: unknown) => error is ApiError;
|
6
|
-
};
|
1
|
+
import{SdkError,ApiError}from'./error';export declare const CommerceLayerStatic:{resources:()=>readonly string[];isSdkError:(error:unknown)=>error is SdkError;isApiError:(error:unknown)=>error is ApiError;};
|
package/lib/cjs/util.d.ts
CHANGED
package/lib/esm/api.d.ts
CHANGED
@@ -1,103 +1 @@
|
|
1
|
-
/**
|
2
|
-
* ©2022 Commerce Layer Inc.
|
3
|
-
* OpenAPI schema, version 2.9.0
|
4
|
-
**/
|
5
|
-
export { default as Addresses } from './resources/addresses';
|
6
|
-
export { default as Adjustments } from './resources/adjustments';
|
7
|
-
export { default as AdyenGateways } from './resources/adyen_gateways';
|
8
|
-
export { default as AdyenPayments } from './resources/adyen_payments';
|
9
|
-
export { default as Applications } from './resources/application';
|
10
|
-
export { default as Attachments } from './resources/attachments';
|
11
|
-
export { default as Authorizations } from './resources/authorizations';
|
12
|
-
export { default as AvalaraAccounts } from './resources/avalara_accounts';
|
13
|
-
export { default as BillingInfoValidationRules } from './resources/billing_info_validation_rules';
|
14
|
-
export { default as BingGeocoders } from './resources/bing_geocoders';
|
15
|
-
export { default as BraintreeGateways } from './resources/braintree_gateways';
|
16
|
-
export { default as BraintreePayments } from './resources/braintree_payments';
|
17
|
-
export { default as Bundles } from './resources/bundles';
|
18
|
-
export { default as Captures } from './resources/captures';
|
19
|
-
export { default as CarrierAccounts } from './resources/carrier_accounts';
|
20
|
-
export { default as CheckoutComGateways } from './resources/checkout_com_gateways';
|
21
|
-
export { default as CheckoutComPayments } from './resources/checkout_com_payments';
|
22
|
-
export { default as CouponCodesPromotionRules } from './resources/coupon_codes_promotion_rules';
|
23
|
-
export { default as CouponRecipients } from './resources/coupon_recipients';
|
24
|
-
export { default as Coupons } from './resources/coupons';
|
25
|
-
export { default as CustomerAddresses } from './resources/customer_addresses';
|
26
|
-
export { default as CustomerGroups } from './resources/customer_groups';
|
27
|
-
export { default as CustomerPasswordResets } from './resources/customer_password_resets';
|
28
|
-
export { default as CustomerPaymentSources } from './resources/customer_payment_sources';
|
29
|
-
export { default as CustomerSubscriptions } from './resources/customer_subscriptions';
|
30
|
-
export { default as Customers } from './resources/customers';
|
31
|
-
export { default as DeliveryLeadTimes } from './resources/delivery_lead_times';
|
32
|
-
export { default as EventCallbacks } from './resources/event_callbacks';
|
33
|
-
export { default as ExternalGateways } from './resources/external_gateways';
|
34
|
-
export { default as ExternalPayments } from './resources/external_payments';
|
35
|
-
export { default as ExternalPromotions } from './resources/external_promotions';
|
36
|
-
export { default as ExternalTaxCalculators } from './resources/external_tax_calculators';
|
37
|
-
export { default as FixedAmountPromotions } from './resources/fixed_amount_promotions';
|
38
|
-
export { default as FixedPricePromotions } from './resources/fixed_price_promotions';
|
39
|
-
export { default as FreeGiftPromotions } from './resources/free_gift_promotions';
|
40
|
-
export { default as FreeShippingPromotions } from './resources/free_shipping_promotions';
|
41
|
-
export { default as Geocoders } from './resources/geocoders';
|
42
|
-
export { default as GiftCardRecipients } from './resources/gift_card_recipients';
|
43
|
-
export { default as GiftCards } from './resources/gift_cards';
|
44
|
-
export { default as GoogleGeocoders } from './resources/google_geocoders';
|
45
|
-
export { default as Imports } from './resources/imports';
|
46
|
-
export { default as InStockSubscriptions } from './resources/in_stock_subscriptions';
|
47
|
-
export { default as InventoryModels } from './resources/inventory_models';
|
48
|
-
export { default as InventoryReturnLocations } from './resources/inventory_return_locations';
|
49
|
-
export { default as InventoryStockLocations } from './resources/inventory_stock_locations';
|
50
|
-
export { default as KlarnaGateways } from './resources/klarna_gateways';
|
51
|
-
export { default as KlarnaPayments } from './resources/klarna_payments';
|
52
|
-
export { default as LineItemOptions } from './resources/line_item_options';
|
53
|
-
export { default as LineItems } from './resources/line_items';
|
54
|
-
export { default as ManualGateways } from './resources/manual_gateways';
|
55
|
-
export { default as ManualTaxCalculators } from './resources/manual_tax_calculators';
|
56
|
-
export { default as Markets } from './resources/markets';
|
57
|
-
export { default as Merchants } from './resources/merchants';
|
58
|
-
export { default as OrderAmountPromotionRules } from './resources/order_amount_promotion_rules';
|
59
|
-
export { default as OrderCopies } from './resources/order_copies';
|
60
|
-
export { default as OrderSubscriptions } from './resources/order_subscriptions';
|
61
|
-
export { default as OrderValidationRules } from './resources/order_validation_rules';
|
62
|
-
export { default as Orders } from './resources/orders';
|
63
|
-
export { default as Organizations } from './resources/organization';
|
64
|
-
export { default as Packages } from './resources/packages';
|
65
|
-
export { default as ParcelLineItems } from './resources/parcel_line_items';
|
66
|
-
export { default as Parcels } from './resources/parcels';
|
67
|
-
export { default as PaymentGateways } from './resources/payment_gateways';
|
68
|
-
export { default as PaymentMethods } from './resources/payment_methods';
|
69
|
-
export { default as PaypalGateways } from './resources/paypal_gateways';
|
70
|
-
export { default as PaypalPayments } from './resources/paypal_payments';
|
71
|
-
export { default as PercentageDiscountPromotions } from './resources/percentage_discount_promotions';
|
72
|
-
export { default as PriceLists } from './resources/price_lists';
|
73
|
-
export { default as Prices } from './resources/prices';
|
74
|
-
export { default as PromotionRules } from './resources/promotion_rules';
|
75
|
-
export { default as Promotions } from './resources/promotions';
|
76
|
-
export { default as Refunds } from './resources/refunds';
|
77
|
-
export { default as ReturnLineItems } from './resources/return_line_items';
|
78
|
-
export { default as Returns } from './resources/returns';
|
79
|
-
export { default as Shipments } from './resources/shipments';
|
80
|
-
export { default as ShippingCategories } from './resources/shipping_categories';
|
81
|
-
export { default as ShippingMethods } from './resources/shipping_methods';
|
82
|
-
export { default as ShippingZones } from './resources/shipping_zones';
|
83
|
-
export { default as SkuListItems } from './resources/sku_list_items';
|
84
|
-
export { default as SkuListPromotionRules } from './resources/sku_list_promotion_rules';
|
85
|
-
export { default as SkuLists } from './resources/sku_lists';
|
86
|
-
export { default as SkuOptions } from './resources/sku_options';
|
87
|
-
export { default as Skus } from './resources/skus';
|
88
|
-
export { default as StockItems } from './resources/stock_items';
|
89
|
-
export { default as StockLineItems } from './resources/stock_line_items';
|
90
|
-
export { default as StockLocations } from './resources/stock_locations';
|
91
|
-
export { default as StockTransfers } from './resources/stock_transfers';
|
92
|
-
export { default as StripeGateways } from './resources/stripe_gateways';
|
93
|
-
export { default as StripePayments } from './resources/stripe_payments';
|
94
|
-
export { default as TaxCalculators } from './resources/tax_calculators';
|
95
|
-
export { default as TaxCategories } from './resources/tax_categories';
|
96
|
-
export { default as TaxRules } from './resources/tax_rules';
|
97
|
-
export { default as TaxjarAccounts } from './resources/taxjar_accounts';
|
98
|
-
export { default as Transactions } from './resources/transactions';
|
99
|
-
export { default as Voids } from './resources/voids';
|
100
|
-
export { default as Webhooks } from './resources/webhooks';
|
101
|
-
export { default as WireTransfers } from './resources/wire_transfers';
|
102
|
-
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' | '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' | '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' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'return_line_items' | 'returns' | 'shipments' | 'shipping_categories' | 'shipping_methods' | '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';
|
103
|
-
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", "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", "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", "prices", "promotion_rules", "promotions", "refunds", "return_line_items", "returns", "shipments", "shipping_categories", "shipping_methods", "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 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 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 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 ShippingMethods}from'./resources/shipping_methods';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'|'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'|'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'|'prices'|'promotion_rules'|'promotions'|'refunds'|'return_line_items'|'returns'|'shipments'|'shipping_categories'|'shipping_methods'|'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","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","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","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_methods","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,32 +1,2 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import
|
3
|
-
import type { InterceptorManager } from './interceptor';
|
4
|
-
import type { Agent as HttpAgent } from 'http';
|
5
|
-
import type { Agent as HttpsAgent } from 'https';
|
6
|
-
declare type ProxyConfig = AxiosProxyConfig | false;
|
7
|
-
declare type RequestConfig = {
|
8
|
-
timeout?: number;
|
9
|
-
params?: {
|
10
|
-
[key: string]: string | number | boolean;
|
11
|
-
};
|
12
|
-
httpAgent?: HttpAgent;
|
13
|
-
httpsAgent?: HttpsAgent;
|
14
|
-
proxy?: ProxyConfig;
|
15
|
-
};
|
16
|
-
declare type ApiClientInitConfig = {
|
17
|
-
organization: string;
|
18
|
-
domain?: string;
|
19
|
-
accessToken: string;
|
20
|
-
} & RequestConfig;
|
21
|
-
declare type ApiClientConfig = Partial<ApiClientInitConfig>;
|
22
|
-
declare class ApiClient {
|
23
|
-
#private;
|
24
|
-
static create(options: ApiClientInitConfig): ApiClient;
|
25
|
-
baseUrl: string;
|
26
|
-
interceptors: InterceptorManager;
|
27
|
-
private constructor();
|
28
|
-
config(config: ApiClientConfig): void;
|
29
|
-
request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<any>;
|
30
|
-
}
|
31
|
-
export default ApiClient;
|
32
|
-
export { ApiClientInitConfig, ApiClientConfig, RequestConfig };
|
2
|
+
import{AxiosProxyConfig,Method}from'axios';import type{InterceptorManager}from'./interceptor';import type{Agent as HttpAgent}from'http';import type{Agent as HttpsAgent}from'https';declare type ProxyConfig=AxiosProxyConfig|false;declare type RequestConfig={timeout?:number;params?:{[key:string]:string|number|boolean;};httpAgent?:HttpAgent;httpsAgent?:HttpsAgent;proxy?:ProxyConfig;};declare type ApiClientInitConfig={organization:string;domain?:string;accessToken:string;}&RequestConfig;declare 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};
|
@@ -1,122 +1 @@
|
|
1
|
-
import
|
2
|
-
import { ApiError } from './error';
|
3
|
-
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
|
-
import { ResourcesInitConfig } from './resource';
|
5
|
-
declare type SdkConfig = {};
|
6
|
-
declare type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
7
|
-
declare type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
8
|
-
declare class CommerceLayerClient {
|
9
|
-
#private;
|
10
|
-
static get openApiSchemaVersion(): string;
|
11
|
-
addresses: api.Addresses;
|
12
|
-
adjustments: api.Adjustments;
|
13
|
-
adyen_gateways: api.AdyenGateways;
|
14
|
-
adyen_payments: api.AdyenPayments;
|
15
|
-
application: api.Applications;
|
16
|
-
attachments: api.Attachments;
|
17
|
-
authorizations: api.Authorizations;
|
18
|
-
avalara_accounts: api.AvalaraAccounts;
|
19
|
-
billing_info_validation_rules: api.BillingInfoValidationRules;
|
20
|
-
bing_geocoders: api.BingGeocoders;
|
21
|
-
braintree_gateways: api.BraintreeGateways;
|
22
|
-
braintree_payments: api.BraintreePayments;
|
23
|
-
bundles: api.Bundles;
|
24
|
-
captures: api.Captures;
|
25
|
-
carrier_accounts: api.CarrierAccounts;
|
26
|
-
checkout_com_gateways: api.CheckoutComGateways;
|
27
|
-
checkout_com_payments: api.CheckoutComPayments;
|
28
|
-
coupon_codes_promotion_rules: api.CouponCodesPromotionRules;
|
29
|
-
coupon_recipients: api.CouponRecipients;
|
30
|
-
coupons: api.Coupons;
|
31
|
-
customer_addresses: api.CustomerAddresses;
|
32
|
-
customer_groups: api.CustomerGroups;
|
33
|
-
customer_password_resets: api.CustomerPasswordResets;
|
34
|
-
customer_payment_sources: api.CustomerPaymentSources;
|
35
|
-
customer_subscriptions: api.CustomerSubscriptions;
|
36
|
-
customers: api.Customers;
|
37
|
-
delivery_lead_times: api.DeliveryLeadTimes;
|
38
|
-
event_callbacks: api.EventCallbacks;
|
39
|
-
external_gateways: api.ExternalGateways;
|
40
|
-
external_payments: api.ExternalPayments;
|
41
|
-
external_promotions: api.ExternalPromotions;
|
42
|
-
external_tax_calculators: api.ExternalTaxCalculators;
|
43
|
-
fixed_amount_promotions: api.FixedAmountPromotions;
|
44
|
-
fixed_price_promotions: api.FixedPricePromotions;
|
45
|
-
free_gift_promotions: api.FreeGiftPromotions;
|
46
|
-
free_shipping_promotions: api.FreeShippingPromotions;
|
47
|
-
geocoders: api.Geocoders;
|
48
|
-
gift_card_recipients: api.GiftCardRecipients;
|
49
|
-
gift_cards: api.GiftCards;
|
50
|
-
google_geocoders: api.GoogleGeocoders;
|
51
|
-
imports: api.Imports;
|
52
|
-
in_stock_subscriptions: api.InStockSubscriptions;
|
53
|
-
inventory_models: api.InventoryModels;
|
54
|
-
inventory_return_locations: api.InventoryReturnLocations;
|
55
|
-
inventory_stock_locations: api.InventoryStockLocations;
|
56
|
-
klarna_gateways: api.KlarnaGateways;
|
57
|
-
klarna_payments: api.KlarnaPayments;
|
58
|
-
line_item_options: api.LineItemOptions;
|
59
|
-
line_items: api.LineItems;
|
60
|
-
manual_gateways: api.ManualGateways;
|
61
|
-
manual_tax_calculators: api.ManualTaxCalculators;
|
62
|
-
markets: api.Markets;
|
63
|
-
merchants: api.Merchants;
|
64
|
-
order_amount_promotion_rules: api.OrderAmountPromotionRules;
|
65
|
-
order_copies: api.OrderCopies;
|
66
|
-
order_subscriptions: api.OrderSubscriptions;
|
67
|
-
order_validation_rules: api.OrderValidationRules;
|
68
|
-
orders: api.Orders;
|
69
|
-
organization: api.Organizations;
|
70
|
-
packages: api.Packages;
|
71
|
-
parcel_line_items: api.ParcelLineItems;
|
72
|
-
parcels: api.Parcels;
|
73
|
-
payment_gateways: api.PaymentGateways;
|
74
|
-
payment_methods: api.PaymentMethods;
|
75
|
-
paypal_gateways: api.PaypalGateways;
|
76
|
-
paypal_payments: api.PaypalPayments;
|
77
|
-
percentage_discount_promotions: api.PercentageDiscountPromotions;
|
78
|
-
price_lists: api.PriceLists;
|
79
|
-
prices: api.Prices;
|
80
|
-
promotion_rules: api.PromotionRules;
|
81
|
-
promotions: api.Promotions;
|
82
|
-
refunds: api.Refunds;
|
83
|
-
return_line_items: api.ReturnLineItems;
|
84
|
-
returns: api.Returns;
|
85
|
-
shipments: api.Shipments;
|
86
|
-
shipping_categories: api.ShippingCategories;
|
87
|
-
shipping_methods: api.ShippingMethods;
|
88
|
-
shipping_zones: api.ShippingZones;
|
89
|
-
sku_list_items: api.SkuListItems;
|
90
|
-
sku_list_promotion_rules: api.SkuListPromotionRules;
|
91
|
-
sku_lists: api.SkuLists;
|
92
|
-
sku_options: api.SkuOptions;
|
93
|
-
skus: api.Skus;
|
94
|
-
stock_items: api.StockItems;
|
95
|
-
stock_line_items: api.StockLineItems;
|
96
|
-
stock_locations: api.StockLocations;
|
97
|
-
stock_transfers: api.StockTransfers;
|
98
|
-
stripe_gateways: api.StripeGateways;
|
99
|
-
stripe_payments: api.StripePayments;
|
100
|
-
tax_calculators: api.TaxCalculators;
|
101
|
-
tax_categories: api.TaxCategories;
|
102
|
-
tax_rules: api.TaxRules;
|
103
|
-
taxjar_accounts: api.TaxjarAccounts;
|
104
|
-
transactions: api.Transactions;
|
105
|
-
voids: api.Voids;
|
106
|
-
webhooks: api.Webhooks;
|
107
|
-
wire_transfers: api.WireTransfers;
|
108
|
-
constructor(config: CommerceLayerInitConfig);
|
109
|
-
get currentOrganization(): string;
|
110
|
-
private localConfig;
|
111
|
-
config(config: CommerceLayerConfig): void;
|
112
|
-
resources(): readonly string[];
|
113
|
-
isApiError(error: any): error is ApiError;
|
114
|
-
addRequestInterceptor(onFulfilled?: RequestInterceptor, onRejected?: ErrorInterceptor): number;
|
115
|
-
addResponseInterceptor(onFulfilled?: ResponseInterceptor, onRejected?: ErrorInterceptor): number;
|
116
|
-
removeInterceptor(type: InterceptorType, id: number): void;
|
117
|
-
addRawResponseReader(): RawResponseReader;
|
118
|
-
removeRawResponseReader(reader: number | RawResponseReader): void;
|
119
|
-
}
|
120
|
-
declare const CommerceLayer: (config: CommerceLayerInitConfig) => CommerceLayerClient;
|
121
|
-
export default CommerceLayer;
|
122
|
-
export type { CommerceLayerClient, CommerceLayerConfig, CommerceLayerInitConfig };
|
1
|
+
import*as api from'./api';import{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{ResourcesInitConfig}from'./resource';declare type SdkConfig={};declare type CommerceLayerInitConfig=SdkConfig&ResourcesInitConfig;declare type CommerceLayerConfig=Partial<CommerceLayerInitConfig>;declare class CommerceLayerClient{#private;static get openApiSchemaVersion():string;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;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;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;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_methods:api.ShippingMethods;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():RawResponseReader;removeRawResponseReader(reader:number|RawResponseReader):void;}declare const CommerceLayer:(config:CommerceLayerInitConfig)=>CommerceLayerClient;export default CommerceLayer;export type{CommerceLayerClient,CommerceLayerConfig,CommerceLayerInitConfig};
|
package/lib/esm/commercelayer.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import p from"./resource";import u from"./debug";const w=u("commercelayer"),m="2.9.
|
1
|
+
var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import p from"./resource";import u from"./debug";const w=u("commercelayer"),m="2.9.1";class l{constructor(i){t.set(this,void 0),h.set(this,void 0),w("new commercelayer instance %O",i),c(this,t,new p(i),"f"),c(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.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.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.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_methods=new e.ShippingMethods(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"))}static get openApiSchemaVersion(){return m}get currentOrganization(){return s(this,h,"f")}localConfig(i){i.organization&&c(this,h,i.organization,"f")}config(i){w("config %o",i),this.localConfig(i),s(this,t,"f").config(i)}resources(){return f.resources()}isApiError(i){return f.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(){const i={id:void 0,rawResponse:void 0};function n(a){return i.rawResponse=a==null?void 0:a.data,a}const r=this.addResponseInterceptor(n);return i.id=r,i}removeRawResponseReader(i){const n=typeof i=="number"?i:i.id;if(n)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const _=o=>new l(o);export default _;
|
package/lib/esm/common.d.ts
CHANGED
@@ -1,4 +1 @@
|
|
1
|
-
import type
|
2
|
-
declare const isResourceId: (resource: any) => resource is ResourceId;
|
3
|
-
declare const isResourceType: (resource: any) => resource is ResourceType;
|
4
|
-
export { isResourceId, isResourceType };
|
1
|
+
import type{ResourceId,ResourceType}from'./resource';declare const isResourceId:(resource:any)=>resource is ResourceId;declare const isResourceType:(resource:any)=>resource is ResourceType;export{isResourceId,isResourceType};
|
package/lib/esm/config.d.ts
CHANGED
@@ -1,11 +1 @@
|
|
1
|
-
declare const config: {
|
2
|
-
readonly default: {
|
3
|
-
readonly domain: "commercelayer.io";
|
4
|
-
readonly pageNumber: 1;
|
5
|
-
readonly pageSize: 10;
|
6
|
-
};
|
7
|
-
readonly client: {
|
8
|
-
readonly timeout: 15000;
|
9
|
-
};
|
10
|
-
};
|
11
|
-
export default config;
|
1
|
+
declare const config:{readonly default:{readonly domain:"commercelayer.io";readonly pageNumber:1;readonly pageSize:10;};readonly client:{readonly timeout:15000;};};export default config;
|
package/lib/esm/debug.d.ts
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
declare type Debugger
|
2
|
-
declare const debug: (namespace: string) => Debugger;
|
3
|
-
export default debug;
|
1
|
+
declare type Debugger=(pattern:string,...args:any[])=>void;declare const debug:(namespace:string)=>Debugger;export default debug;
|