@commercelayer/sdk 2.0.4 → 2.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/api.d.ts +10 -3
- package/lib/client.d.ts +2 -0
- package/lib/commercelayer.d.ts +9 -1
- package/lib/index.d.ts +4 -2
- package/lib/interceptor.d.ts +10 -0
- package/lib/model.d.ts +94 -0
- package/lib/resource.d.ts +6 -3
- package/lib/resources/addresses.d.ts +1 -2
- package/lib/resources/adjustments.d.ts +1 -2
- package/lib/resources/adyen_gateways.d.ts +1 -2
- package/lib/resources/adyen_payments.d.ts +1 -2
- package/lib/resources/application.d.ts +1 -2
- package/lib/resources/attachments.d.ts +1 -2
- package/lib/resources/authorizations.d.ts +1 -2
- package/lib/resources/avalara_accounts.d.ts +1 -2
- package/lib/resources/billing_info_validation_rules.d.ts +1 -2
- package/lib/resources/bing_geocoders.d.ts +1 -2
- package/lib/resources/braintree_gateways.d.ts +1 -2
- package/lib/resources/braintree_payments.d.ts +1 -2
- package/lib/resources/bundles.d.ts +1 -2
- package/lib/resources/captures.d.ts +1 -2
- package/lib/resources/carrier_accounts.d.ts +1 -2
- package/lib/resources/checkout_com_gateways.d.ts +1 -2
- package/lib/resources/checkout_com_payments.d.ts +1 -2
- package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -2
- package/lib/resources/coupons.d.ts +1 -2
- package/lib/resources/customer_addresses.d.ts +1 -2
- package/lib/resources/customer_groups.d.ts +1 -2
- package/lib/resources/customer_password_resets.d.ts +1 -2
- package/lib/resources/customer_payment_sources.d.ts +1 -2
- package/lib/resources/customer_subscriptions.d.ts +1 -2
- package/lib/resources/customers.d.ts +3 -2
- package/lib/resources/delivery_lead_times.d.ts +1 -2
- package/lib/resources/external_gateways.d.ts +1 -2
- package/lib/resources/external_payments.d.ts +1 -2
- package/lib/resources/external_promotions.d.ts +1 -2
- package/lib/resources/external_tax_calculators.d.ts +1 -2
- package/lib/resources/fixed_amount_promotions.d.ts +1 -2
- package/lib/resources/free_shipping_promotions.d.ts +1 -2
- package/lib/resources/geocoders.d.ts +1 -2
- package/lib/resources/gift_card_recipients.d.ts +1 -2
- package/lib/resources/gift_cards.d.ts +1 -2
- package/lib/resources/google_geocoders.d.ts +1 -2
- package/lib/resources/imports.d.ts +2 -3
- package/lib/resources/in_stock_subscriptions.d.ts +1 -2
- package/lib/resources/inventory_models.d.ts +1 -2
- package/lib/resources/inventory_return_locations.d.ts +1 -2
- package/lib/resources/inventory_stock_locations.d.ts +1 -2
- package/lib/resources/line_item_options.d.ts +1 -2
- package/lib/resources/line_items.d.ts +1 -2
- package/lib/resources/manual_gateways.d.ts +1 -2
- package/lib/resources/manual_tax_calculators.d.ts +1 -2
- package/lib/resources/markets.d.ts +1 -2
- package/lib/resources/merchants.d.ts +1 -2
- package/lib/resources/order_amount_promotion_rules.d.ts +1 -2
- package/lib/resources/order_copies.d.ts +1 -2
- package/lib/resources/order_subscriptions.d.ts +3 -2
- package/lib/resources/orders.d.ts +2 -2
- package/lib/resources/organization.d.ts +1 -2
- package/lib/resources/packages.d.ts +1 -2
- package/lib/resources/parcel_line_items.d.ts +1 -2
- package/lib/resources/parcels.d.ts +1 -2
- package/lib/resources/payment_gateways.d.ts +1 -2
- package/lib/resources/payment_methods.d.ts +1 -2
- package/lib/resources/paypal_gateways.d.ts +1 -2
- package/lib/resources/paypal_payments.d.ts +1 -2
- package/lib/resources/percentage_discount_promotions.d.ts +1 -2
- package/lib/resources/price_lists.d.ts +1 -2
- package/lib/resources/prices.d.ts +1 -2
- package/lib/resources/promotion_rules.d.ts +1 -2
- package/lib/resources/promotions.d.ts +1 -2
- package/lib/resources/refunds.d.ts +1 -2
- package/lib/resources/return_line_items.d.ts +1 -2
- package/lib/resources/returns.d.ts +1 -2
- package/lib/resources/shipments.d.ts +1 -2
- package/lib/resources/shipping_categories.d.ts +1 -2
- package/lib/resources/shipping_methods.d.ts +1 -2
- package/lib/resources/shipping_zones.d.ts +1 -2
- package/lib/resources/sku_list_items.d.ts +1 -2
- package/lib/resources/sku_list_promotion_rules.d.ts +1 -2
- package/lib/resources/sku_lists.d.ts +1 -2
- package/lib/resources/sku_options.d.ts +1 -2
- package/lib/resources/skus.d.ts +1 -2
- package/lib/resources/stock_items.d.ts +1 -2
- package/lib/resources/stock_line_items.d.ts +1 -2
- package/lib/resources/stock_locations.d.ts +1 -2
- package/lib/resources/stock_transfers.d.ts +1 -2
- package/lib/resources/stripe_gateways.d.ts +1 -2
- package/lib/resources/stripe_payments.d.ts +2 -2
- package/lib/resources/tax_calculators.d.ts +1 -2
- package/lib/resources/tax_categories.d.ts +1 -2
- package/lib/resources/tax_rules.d.ts +1 -2
- package/lib/resources/taxjar_accounts.d.ts +1 -2
- package/lib/resources/transactions.d.ts +1 -2
- package/lib/resources/voids.d.ts +1 -2
- package/lib/resources/webhooks.d.ts +1 -2
- package/lib/resources/wire_transfers.d.ts +1 -2
- package/lib/sdk.cjs.development.js +808 -274
- package/lib/sdk.cjs.development.js.map +1 -1
- package/lib/sdk.cjs.production.min.js +1 -1
- package/lib/sdk.cjs.production.min.js.map +1 -1
- package/lib/sdk.esm.js +808 -274
- package/lib/sdk.esm.js.map +1 -1
- package/package.json +7 -4
- package/lib/.DS_Store +0 -0
- package/lib/api.js +0 -271
- package/lib/client.js +0 -132
- package/lib/commercelayer.js +0 -163
- package/lib/error.js +0 -25
- package/lib/jsonapi.js +0 -83
- package/lib/poly.d.ts +0 -9
- package/lib/poly.js +0 -2
- package/lib/query.js +0 -172
- package/lib/resource.js +0 -94
- package/lib/resources/addresses.js +0 -45
- package/lib/resources/adjustments.js +0 -45
- package/lib/resources/adyen_gateways.js +0 -45
- package/lib/resources/adyen_payments.js +0 -45
- package/lib/resources/application.js +0 -33
- package/lib/resources/attachments.js +0 -45
- package/lib/resources/authorizations.js +0 -45
- package/lib/resources/avalara_accounts.js +0 -45
- package/lib/resources/billing_info_validation_rules.js +0 -45
- package/lib/resources/braintree_gateways.js +0 -45
- package/lib/resources/braintree_payments.js +0 -45
- package/lib/resources/captures.js +0 -39
- package/lib/resources/carrier_accounts.js +0 -36
- package/lib/resources/checkout_com_gateways.js +0 -45
- package/lib/resources/checkout_com_payments.js +0 -45
- package/lib/resources/coupon_codes_promotion_rules.js +0 -45
- package/lib/resources/coupons.js +0 -45
- package/lib/resources/customer_addresses.js +0 -45
- package/lib/resources/customer_groups.js +0 -45
- package/lib/resources/customer_password_resets.js +0 -45
- package/lib/resources/customer_payment_sources.js +0 -45
- package/lib/resources/customer_subscriptions.js +0 -45
- package/lib/resources/customers.js +0 -45
- package/lib/resources/delivery_lead_times.js +0 -45
- package/lib/resources/external_gateways.js +0 -45
- package/lib/resources/external_payments.js +0 -45
- package/lib/resources/external_promotions.js +0 -45
- package/lib/resources/external_tax_calculators.js +0 -45
- package/lib/resources/fixed_amount_promotions.js +0 -45
- package/lib/resources/free_shipping_promotions.js +0 -45
- package/lib/resources/gift_card_recipients.js +0 -45
- package/lib/resources/gift_cards.js +0 -45
- package/lib/resources/imports.js +0 -42
- package/lib/resources/in_stock_subscriptions.js +0 -45
- package/lib/resources/inventory_models.js +0 -45
- package/lib/resources/inventory_return_locations.js +0 -45
- package/lib/resources/inventory_stock_locations.js +0 -45
- package/lib/resources/line_item_options.js +0 -45
- package/lib/resources/line_items.js +0 -45
- package/lib/resources/manual_gateways.js +0 -45
- package/lib/resources/manual_tax_calculators.js +0 -45
- package/lib/resources/markets.js +0 -45
- package/lib/resources/merchants.js +0 -45
- package/lib/resources/order_amount_promotion_rules.js +0 -45
- package/lib/resources/orders.js +0 -45
- package/lib/resources/organization.js +0 -33
- package/lib/resources/packages.js +0 -45
- package/lib/resources/parcel_line_items.js +0 -45
- package/lib/resources/parcels.js +0 -45
- package/lib/resources/payment_gateways.js +0 -45
- package/lib/resources/payment_methods.js +0 -45
- package/lib/resources/paypal_gateways.js +0 -45
- package/lib/resources/paypal_payments.js +0 -45
- package/lib/resources/percentage_discount_promotions.js +0 -45
- package/lib/resources/price_lists.js +0 -45
- package/lib/resources/prices.js +0 -45
- package/lib/resources/promotion_rules.js +0 -33
- package/lib/resources/promotions.js +0 -33
- package/lib/resources/refunds.js +0 -36
- package/lib/resources/return_line_items.js +0 -45
- package/lib/resources/returns.js +0 -45
- package/lib/resources/shipments.js +0 -39
- package/lib/resources/shipping_categories.js +0 -45
- package/lib/resources/shipping_methods.js +0 -45
- package/lib/resources/shipping_zones.js +0 -45
- package/lib/resources/sku_list_items.js +0 -45
- package/lib/resources/sku_list_promotion_rules.js +0 -45
- package/lib/resources/sku_lists.js +0 -45
- package/lib/resources/sku_options.js +0 -45
- package/lib/resources/skus.js +0 -45
- package/lib/resources/stock_items.js +0 -45
- package/lib/resources/stock_line_items.js +0 -36
- package/lib/resources/stock_locations.js +0 -45
- package/lib/resources/stock_transfers.js +0 -45
- package/lib/resources/stripe_gateways.js +0 -45
- package/lib/resources/stripe_payments.js +0 -45
- package/lib/resources/tax_calculators.js +0 -33
- package/lib/resources/tax_categories.js +0 -45
- package/lib/resources/tax_rules.js +0 -45
- package/lib/resources/taxjar_accounts.js +0 -45
- package/lib/resources/transactions.js +0 -33
- package/lib/resources/voids.js +0 -36
- package/lib/resources/webhooks.js +0 -45
- package/lib/resources/wire_transfers.js +0 -45
- package/lib/util.js +0 -7
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class InventoryStockLocations extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'inventory_stock_locations'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: InventoryStockLocations.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: InventoryStockLocations.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: InventoryStockLocations.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryStockLocations.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: InventoryStockLocations.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isInventoryStockLocation(resource) {
|
28
|
-
return resource.type && (resource.type === InventoryStockLocations.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(InventoryStockLocations.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(InventoryStockLocations.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: InventoryStockLocations.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
InventoryStockLocations.TYPE = 'inventory_stock_locations';
|
45
|
-
exports.default = InventoryStockLocations;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class LineItemOptions extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'line_item_options'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: LineItemOptions.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: LineItemOptions.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: LineItemOptions.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: LineItemOptions.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isLineItemOption(resource) {
|
28
|
-
return resource.type && (resource.type === LineItemOptions.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(LineItemOptions.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(LineItemOptions.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: LineItemOptions.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
LineItemOptions.TYPE = 'line_item_options';
|
45
|
-
exports.default = LineItemOptions;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class LineItems extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'line_items'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: LineItems.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: LineItems.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: LineItems.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: LineItems.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isLineItem(resource) {
|
28
|
-
return resource.type && (resource.type === LineItems.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(LineItems.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(LineItems.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: LineItems.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
LineItems.TYPE = 'line_items';
|
45
|
-
exports.default = LineItems;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class ManualGateways extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'manual_gateways'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ManualGateways.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ManualGateways.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ManualGateways.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ManualGateways.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isManualGateway(resource) {
|
28
|
-
return resource.type && (resource.type === ManualGateways.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ManualGateways.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ManualGateways.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ManualGateways.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ManualGateways.TYPE = 'manual_gateways';
|
45
|
-
exports.default = ManualGateways;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class ManualTaxCalculators extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'manual_tax_calculators'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ManualTaxCalculators.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ManualTaxCalculators.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ManualTaxCalculators.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualTaxCalculators.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ManualTaxCalculators.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isManualTaxCalculator(resource) {
|
28
|
-
return resource.type && (resource.type === ManualTaxCalculators.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ManualTaxCalculators.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ManualTaxCalculators.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ManualTaxCalculators.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ManualTaxCalculators.TYPE = 'manual_tax_calculators';
|
45
|
-
exports.default = ManualTaxCalculators;
|
package/lib/resources/markets.js
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class Markets extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'markets'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Markets.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Markets.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Markets.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Markets.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Markets.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isMarket(resource) {
|
28
|
-
return resource.type && (resource.type === Markets.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Markets.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Markets.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Markets.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Markets.TYPE = 'markets';
|
45
|
-
exports.default = Markets;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class Merchants extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'merchants'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Merchants.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Merchants.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Merchants.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Merchants.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Merchants.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isMerchant(resource) {
|
28
|
-
return resource.type && (resource.type === Merchants.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Merchants.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Merchants.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Merchants.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Merchants.TYPE = 'merchants';
|
45
|
-
exports.default = Merchants;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class OrderAmountPromotionRules extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'order_amount_promotion_rules'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: OrderAmountPromotionRules.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: OrderAmountPromotionRules.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: OrderAmountPromotionRules.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: OrderAmountPromotionRules.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: OrderAmountPromotionRules.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isOrderAmountPromotionRule(resource) {
|
28
|
-
return resource.type && (resource.type === OrderAmountPromotionRules.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(OrderAmountPromotionRules.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(OrderAmountPromotionRules.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: OrderAmountPromotionRules.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
OrderAmountPromotionRules.TYPE = 'order_amount_promotion_rules';
|
45
|
-
exports.default = OrderAmountPromotionRules;
|
package/lib/resources/orders.js
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class Orders extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'orders'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Orders.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Orders.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Orders.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Orders.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Orders.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isOrder(resource) {
|
28
|
-
return resource.type && (resource.type === Orders.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Orders.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Orders.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Orders.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Orders.TYPE = 'orders';
|
45
|
-
exports.default = Orders;
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class Organizations extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'organization'
|
11
|
-
async retrieve(params, options) {
|
12
|
-
return this.resources.singleton({ type: Organizations.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
15
|
-
isOrganization(resource) {
|
16
|
-
return resource.type && (resource.type === Organizations.TYPE);
|
17
|
-
}
|
18
|
-
/*
|
19
|
-
filter(): QueryBuilderRetrieve {
|
20
|
-
return new QueryBuilderRetrieve(Organizations.TYPE)
|
21
|
-
}
|
22
|
-
*/
|
23
|
-
/*
|
24
|
-
filterList(): QueryBuilderList {
|
25
|
-
return new QueryBuilderList(Organizations.TYPE)
|
26
|
-
}
|
27
|
-
*/
|
28
|
-
relationship(id) {
|
29
|
-
return { id, type: Organizations.TYPE };
|
30
|
-
}
|
31
|
-
}
|
32
|
-
Organizations.TYPE = 'organization';
|
33
|
-
exports.default = Organizations;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class Packages extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'packages'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Packages.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Packages.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Packages.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Packages.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Packages.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPackage(resource) {
|
28
|
-
return resource.type && (resource.type === Packages.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Packages.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Packages.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Packages.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Packages.TYPE = 'packages';
|
45
|
-
exports.default = Packages;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class ParcelLineItems extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'parcel_line_items'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ParcelLineItems.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ParcelLineItems.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ParcelLineItems.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ParcelLineItems.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ParcelLineItems.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isParcelLineItem(resource) {
|
28
|
-
return resource.type && (resource.type === ParcelLineItems.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ParcelLineItems.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ParcelLineItems.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ParcelLineItems.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ParcelLineItems.TYPE = 'parcel_line_items';
|
45
|
-
exports.default = ParcelLineItems;
|
package/lib/resources/parcels.js
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class Parcels extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'parcels'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Parcels.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Parcels.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Parcels.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Parcels.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Parcels.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isParcel(resource) {
|
28
|
-
return resource.type && (resource.type === Parcels.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Parcels.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Parcels.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Parcels.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Parcels.TYPE = 'parcels';
|
45
|
-
exports.default = Parcels;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class PaymentGateways extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'payment_gateways'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: PaymentGateways.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: PaymentGateways.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: PaymentGateways.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaymentGateways.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: PaymentGateways.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPaymentGateway(resource) {
|
28
|
-
return resource.type && (resource.type === PaymentGateways.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(PaymentGateways.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(PaymentGateways.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: PaymentGateways.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
PaymentGateways.TYPE = 'payment_gateways';
|
45
|
-
exports.default = PaymentGateways;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* ©2021 Commerce Layer Inc.
|
4
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.3.0
|
5
|
-
* Generation date: 22-07-2021
|
6
|
-
**/
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
-
const resource_1 = require("../resource");
|
9
|
-
class PaymentMethods extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'payment_methods'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: PaymentMethods.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: PaymentMethods.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: PaymentMethods.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaymentMethods.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: PaymentMethods.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPaymentMethod(resource) {
|
28
|
-
return resource.type && (resource.type === PaymentMethods.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(PaymentMethods.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(PaymentMethods.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: PaymentMethods.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
PaymentMethods.TYPE = 'payment_methods';
|
45
|
-
exports.default = PaymentMethods;
|