@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 Customers extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'customers'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Customers.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Customers.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Customers.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Customers.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Customers.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isCustomer(resource) {
|
28
|
-
return resource.type && (resource.type === Customers.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Customers.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Customers.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Customers.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Customers.TYPE = 'customers';
|
45
|
-
exports.default = Customers;
|
@@ -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 DeliveryLeadTimes extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'delivery_lead_times'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: DeliveryLeadTimes.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: DeliveryLeadTimes.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: DeliveryLeadTimes.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: DeliveryLeadTimes.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: DeliveryLeadTimes.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isDeliveryLeadTime(resource) {
|
28
|
-
return resource.type && (resource.type === DeliveryLeadTimes.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(DeliveryLeadTimes.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(DeliveryLeadTimes.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: DeliveryLeadTimes.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
DeliveryLeadTimes.TYPE = 'delivery_lead_times';
|
45
|
-
exports.default = DeliveryLeadTimes;
|
@@ -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 ExternalGateways extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'external_gateways'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ExternalGateways.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ExternalGateways.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ExternalGateways.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalGateways.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ExternalGateways.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isExternalGateway(resource) {
|
28
|
-
return resource.type && (resource.type === ExternalGateways.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ExternalGateways.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ExternalGateways.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ExternalGateways.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ExternalGateways.TYPE = 'external_gateways';
|
45
|
-
exports.default = ExternalGateways;
|
@@ -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 ExternalPayments extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'external_payments'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ExternalPayments.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ExternalPayments.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ExternalPayments.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ExternalPayments.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isExternalPayment(resource) {
|
28
|
-
return resource.type && (resource.type === ExternalPayments.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ExternalPayments.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ExternalPayments.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ExternalPayments.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ExternalPayments.TYPE = 'external_payments';
|
45
|
-
exports.default = ExternalPayments;
|
@@ -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 ExternalPromotions extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'external_promotions'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ExternalPromotions.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ExternalPromotions.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ExternalPromotions.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPromotions.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ExternalPromotions.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isExternalPromotion(resource) {
|
28
|
-
return resource.type && (resource.type === ExternalPromotions.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ExternalPromotions.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ExternalPromotions.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ExternalPromotions.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ExternalPromotions.TYPE = 'external_promotions';
|
45
|
-
exports.default = ExternalPromotions;
|
@@ -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 ExternalTaxCalculators extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'external_tax_calculators'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ExternalTaxCalculators.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ExternalTaxCalculators.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ExternalTaxCalculators.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalTaxCalculators.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ExternalTaxCalculators.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isExternalTaxCalculator(resource) {
|
28
|
-
return resource.type && (resource.type === ExternalTaxCalculators.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ExternalTaxCalculators.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ExternalTaxCalculators.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ExternalTaxCalculators.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ExternalTaxCalculators.TYPE = 'external_tax_calculators';
|
45
|
-
exports.default = ExternalTaxCalculators;
|
@@ -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 FixedAmountPromotions extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'fixed_amount_promotions'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: FixedAmountPromotions.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: FixedAmountPromotions.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: FixedAmountPromotions.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: FixedAmountPromotions.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: FixedAmountPromotions.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isFixedAmountPromotion(resource) {
|
28
|
-
return resource.type && (resource.type === FixedAmountPromotions.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(FixedAmountPromotions.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(FixedAmountPromotions.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: FixedAmountPromotions.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
FixedAmountPromotions.TYPE = 'fixed_amount_promotions';
|
45
|
-
exports.default = FixedAmountPromotions;
|
@@ -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 FreeShippingPromotions extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'free_shipping_promotions'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: FreeShippingPromotions.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: FreeShippingPromotions.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: FreeShippingPromotions.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: FreeShippingPromotions.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: FreeShippingPromotions.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isFreeShippingPromotion(resource) {
|
28
|
-
return resource.type && (resource.type === FreeShippingPromotions.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(FreeShippingPromotions.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(FreeShippingPromotions.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: FreeShippingPromotions.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
FreeShippingPromotions.TYPE = 'free_shipping_promotions';
|
45
|
-
exports.default = FreeShippingPromotions;
|
@@ -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 GiftCardRecipients extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'gift_card_recipients'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: GiftCardRecipients.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: GiftCardRecipients.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: GiftCardRecipients.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: GiftCardRecipients.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: GiftCardRecipients.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isGiftCardRecipient(resource) {
|
28
|
-
return resource.type && (resource.type === GiftCardRecipients.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(GiftCardRecipients.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(GiftCardRecipients.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: GiftCardRecipients.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
GiftCardRecipients.TYPE = 'gift_card_recipients';
|
45
|
-
exports.default = GiftCardRecipients;
|
@@ -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 GiftCards extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'gift_cards'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: GiftCards.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: GiftCards.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: GiftCards.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: GiftCards.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: GiftCards.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isGiftCard(resource) {
|
28
|
-
return resource.type && (resource.type === GiftCards.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(GiftCards.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(GiftCards.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: GiftCards.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
GiftCards.TYPE = 'gift_cards';
|
45
|
-
exports.default = GiftCards;
|
package/lib/resources/imports.js
DELETED
@@ -1,42 +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 Imports extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'imports'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Imports.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Imports.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Imports.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async delete(id, options) {
|
21
|
-
this.resources.delete({ type: Imports.TYPE, id }, options);
|
22
|
-
}
|
23
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
-
isImport(resource) {
|
25
|
-
return resource.type && (resource.type === Imports.TYPE);
|
26
|
-
}
|
27
|
-
/*
|
28
|
-
filter(): QueryBuilderRetrieve {
|
29
|
-
return new QueryBuilderRetrieve(Imports.TYPE)
|
30
|
-
}
|
31
|
-
*/
|
32
|
-
/*
|
33
|
-
filterList(): QueryBuilderList {
|
34
|
-
return new QueryBuilderList(Imports.TYPE)
|
35
|
-
}
|
36
|
-
*/
|
37
|
-
relationship(id) {
|
38
|
-
return { id, type: Imports.TYPE };
|
39
|
-
}
|
40
|
-
}
|
41
|
-
Imports.TYPE = 'imports';
|
42
|
-
exports.default = Imports;
|
@@ -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 InStockSubscriptions extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'in_stock_subscriptions'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: InStockSubscriptions.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: InStockSubscriptions.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: InStockSubscriptions.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InStockSubscriptions.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: InStockSubscriptions.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isInStockSubscription(resource) {
|
28
|
-
return resource.type && (resource.type === InStockSubscriptions.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(InStockSubscriptions.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(InStockSubscriptions.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: InStockSubscriptions.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
InStockSubscriptions.TYPE = 'in_stock_subscriptions';
|
45
|
-
exports.default = InStockSubscriptions;
|
@@ -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 InventoryModels extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'inventory_models'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: InventoryModels.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: InventoryModels.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: InventoryModels.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryModels.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: InventoryModels.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isInventoryModel(resource) {
|
28
|
-
return resource.type && (resource.type === InventoryModels.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(InventoryModels.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(InventoryModels.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: InventoryModels.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
InventoryModels.TYPE = 'inventory_models';
|
45
|
-
exports.default = InventoryModels;
|
@@ -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 InventoryReturnLocations extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'inventory_return_locations'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: InventoryReturnLocations.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: InventoryReturnLocations.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: InventoryReturnLocations.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryReturnLocations.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: InventoryReturnLocations.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isInventoryReturnLocation(resource) {
|
28
|
-
return resource.type && (resource.type === InventoryReturnLocations.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(InventoryReturnLocations.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(InventoryReturnLocations.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: InventoryReturnLocations.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
InventoryReturnLocations.TYPE = 'inventory_return_locations';
|
45
|
-
exports.default = InventoryReturnLocations;
|