@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 PaypalGateways extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'paypal_gateways'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: PaypalGateways.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: PaypalGateways.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: PaypalGateways.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaypalGateways.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: PaypalGateways.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPaypalGateway(resource) {
|
28
|
-
return resource.type && (resource.type === PaypalGateways.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(PaypalGateways.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(PaypalGateways.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: PaypalGateways.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
PaypalGateways.TYPE = 'paypal_gateways';
|
45
|
-
exports.default = PaypalGateways;
|
@@ -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 PaypalPayments extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'paypal_payments'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: PaypalPayments.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: PaypalPayments.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: PaypalPayments.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: PaypalPayments.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: PaypalPayments.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPaypalPayment(resource) {
|
28
|
-
return resource.type && (resource.type === PaypalPayments.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(PaypalPayments.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(PaypalPayments.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: PaypalPayments.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
PaypalPayments.TYPE = 'paypal_payments';
|
45
|
-
exports.default = PaypalPayments;
|
@@ -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 PercentageDiscountPromotions extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'percentage_discount_promotions'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: PercentageDiscountPromotions.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: PercentageDiscountPromotions.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: PercentageDiscountPromotions.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: PercentageDiscountPromotions.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: PercentageDiscountPromotions.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPercentageDiscountPromotion(resource) {
|
28
|
-
return resource.type && (resource.type === PercentageDiscountPromotions.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(PercentageDiscountPromotions.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(PercentageDiscountPromotions.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: PercentageDiscountPromotions.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
PercentageDiscountPromotions.TYPE = 'percentage_discount_promotions';
|
45
|
-
exports.default = PercentageDiscountPromotions;
|
@@ -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 PriceLists extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'price_lists'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: PriceLists.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: PriceLists.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: PriceLists.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: PriceLists.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: PriceLists.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPriceList(resource) {
|
28
|
-
return resource.type && (resource.type === PriceLists.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(PriceLists.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(PriceLists.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: PriceLists.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
PriceLists.TYPE = 'price_lists';
|
45
|
-
exports.default = PriceLists;
|
package/lib/resources/prices.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 Prices extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'prices'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Prices.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Prices.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Prices.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Prices.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Prices.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isPrice(resource) {
|
28
|
-
return resource.type && (resource.type === Prices.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Prices.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Prices.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Prices.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Prices.TYPE = 'prices';
|
45
|
-
exports.default = Prices;
|
@@ -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 PromotionRules extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'promotion_rules'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: PromotionRules.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
15
|
-
isPromotionRule(resource) {
|
16
|
-
return resource.type && (resource.type === PromotionRules.TYPE);
|
17
|
-
}
|
18
|
-
/*
|
19
|
-
filter(): QueryBuilderRetrieve {
|
20
|
-
return new QueryBuilderRetrieve(PromotionRules.TYPE)
|
21
|
-
}
|
22
|
-
*/
|
23
|
-
/*
|
24
|
-
filterList(): QueryBuilderList {
|
25
|
-
return new QueryBuilderList(PromotionRules.TYPE)
|
26
|
-
}
|
27
|
-
*/
|
28
|
-
relationship(id) {
|
29
|
-
return { id, type: PromotionRules.TYPE };
|
30
|
-
}
|
31
|
-
}
|
32
|
-
PromotionRules.TYPE = 'promotion_rules';
|
33
|
-
exports.default = PromotionRules;
|
@@ -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 Promotions extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'promotions'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Promotions.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
15
|
-
isPromotion(resource) {
|
16
|
-
return resource.type && (resource.type === Promotions.TYPE);
|
17
|
-
}
|
18
|
-
/*
|
19
|
-
filter(): QueryBuilderRetrieve {
|
20
|
-
return new QueryBuilderRetrieve(Promotions.TYPE)
|
21
|
-
}
|
22
|
-
*/
|
23
|
-
/*
|
24
|
-
filterList(): QueryBuilderList {
|
25
|
-
return new QueryBuilderList(Promotions.TYPE)
|
26
|
-
}
|
27
|
-
*/
|
28
|
-
relationship(id) {
|
29
|
-
return { id, type: Promotions.TYPE };
|
30
|
-
}
|
31
|
-
}
|
32
|
-
Promotions.TYPE = 'promotions';
|
33
|
-
exports.default = Promotions;
|
package/lib/resources/refunds.js
DELETED
@@ -1,36 +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 Refunds extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'refunds'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Refunds.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async retrieve(id, params, options) {
|
15
|
-
return this.resources.retrieve({ type: Refunds.TYPE, id }, params, options);
|
16
|
-
}
|
17
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
18
|
-
isRefund(resource) {
|
19
|
-
return resource.type && (resource.type === Refunds.TYPE);
|
20
|
-
}
|
21
|
-
/*
|
22
|
-
filter(): QueryBuilderRetrieve {
|
23
|
-
return new QueryBuilderRetrieve(Refunds.TYPE)
|
24
|
-
}
|
25
|
-
*/
|
26
|
-
/*
|
27
|
-
filterList(): QueryBuilderList {
|
28
|
-
return new QueryBuilderList(Refunds.TYPE)
|
29
|
-
}
|
30
|
-
*/
|
31
|
-
relationship(id) {
|
32
|
-
return { id, type: Refunds.TYPE };
|
33
|
-
}
|
34
|
-
}
|
35
|
-
Refunds.TYPE = 'refunds';
|
36
|
-
exports.default = Refunds;
|
@@ -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 ReturnLineItems extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'return_line_items'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ReturnLineItems.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ReturnLineItems.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ReturnLineItems.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ReturnLineItems.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ReturnLineItems.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isReturnLineItem(resource) {
|
28
|
-
return resource.type && (resource.type === ReturnLineItems.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ReturnLineItems.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ReturnLineItems.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ReturnLineItems.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ReturnLineItems.TYPE = 'return_line_items';
|
45
|
-
exports.default = ReturnLineItems;
|
package/lib/resources/returns.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 Returns extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'returns'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Returns.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: Returns.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: Returns.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Returns.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: Returns.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isReturn(resource) {
|
28
|
-
return resource.type && (resource.type === Returns.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(Returns.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(Returns.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: Returns.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
Returns.TYPE = 'returns';
|
45
|
-
exports.default = Returns;
|
@@ -1,39 +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 Shipments extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'shipments'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: Shipments.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async retrieve(id, params, options) {
|
15
|
-
return this.resources.retrieve({ type: Shipments.TYPE, id }, params, options);
|
16
|
-
}
|
17
|
-
async update(resource, options) {
|
18
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Shipments.TYPE }), options);
|
19
|
-
}
|
20
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
21
|
-
isShipment(resource) {
|
22
|
-
return resource.type && (resource.type === Shipments.TYPE);
|
23
|
-
}
|
24
|
-
/*
|
25
|
-
filter(): QueryBuilderRetrieve {
|
26
|
-
return new QueryBuilderRetrieve(Shipments.TYPE)
|
27
|
-
}
|
28
|
-
*/
|
29
|
-
/*
|
30
|
-
filterList(): QueryBuilderList {
|
31
|
-
return new QueryBuilderList(Shipments.TYPE)
|
32
|
-
}
|
33
|
-
*/
|
34
|
-
relationship(id) {
|
35
|
-
return { id, type: Shipments.TYPE };
|
36
|
-
}
|
37
|
-
}
|
38
|
-
Shipments.TYPE = 'shipments';
|
39
|
-
exports.default = Shipments;
|
@@ -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 ShippingCategories extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'shipping_categories'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ShippingCategories.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ShippingCategories.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ShippingCategories.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ShippingCategories.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ShippingCategories.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isShippingCategory(resource) {
|
28
|
-
return resource.type && (resource.type === ShippingCategories.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ShippingCategories.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ShippingCategories.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ShippingCategories.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ShippingCategories.TYPE = 'shipping_categories';
|
45
|
-
exports.default = ShippingCategories;
|
@@ -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 ShippingMethods extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'shipping_methods'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ShippingMethods.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ShippingMethods.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ShippingMethods.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ShippingMethods.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ShippingMethods.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isShippingMethod(resource) {
|
28
|
-
return resource.type && (resource.type === ShippingMethods.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ShippingMethods.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ShippingMethods.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ShippingMethods.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ShippingMethods.TYPE = 'shipping_methods';
|
45
|
-
exports.default = ShippingMethods;
|
@@ -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 ShippingZones extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'shipping_zones'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: ShippingZones.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: ShippingZones.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: ShippingZones.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ShippingZones.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: ShippingZones.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isShippingZone(resource) {
|
28
|
-
return resource.type && (resource.type === ShippingZones.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(ShippingZones.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(ShippingZones.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: ShippingZones.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
ShippingZones.TYPE = 'shipping_zones';
|
45
|
-
exports.default = ShippingZones;
|
@@ -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 SkuListItems extends resource_1.ApiResource {
|
10
|
-
// static readonly PATH = 'sku_list_items'
|
11
|
-
async list(params, options) {
|
12
|
-
return this.resources.list({ type: SkuListItems.TYPE }, params, options);
|
13
|
-
}
|
14
|
-
async create(resource, options) {
|
15
|
-
return this.resources.create(Object.assign(resource, { type: SkuListItems.TYPE }), options);
|
16
|
-
}
|
17
|
-
async retrieve(id, params, options) {
|
18
|
-
return this.resources.retrieve({ type: SkuListItems.TYPE, id }, params, options);
|
19
|
-
}
|
20
|
-
async update(resource, options) {
|
21
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: SkuListItems.TYPE }), options);
|
22
|
-
}
|
23
|
-
async delete(id, options) {
|
24
|
-
this.resources.delete({ type: SkuListItems.TYPE, id }, options);
|
25
|
-
}
|
26
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
27
|
-
isSkuListItem(resource) {
|
28
|
-
return resource.type && (resource.type === SkuListItems.TYPE);
|
29
|
-
}
|
30
|
-
/*
|
31
|
-
filter(): QueryBuilderRetrieve {
|
32
|
-
return new QueryBuilderRetrieve(SkuListItems.TYPE)
|
33
|
-
}
|
34
|
-
*/
|
35
|
-
/*
|
36
|
-
filterList(): QueryBuilderList {
|
37
|
-
return new QueryBuilderList(SkuListItems.TYPE)
|
38
|
-
}
|
39
|
-
*/
|
40
|
-
relationship(id) {
|
41
|
-
return { id, type: SkuListItems.TYPE };
|
42
|
-
}
|
43
|
-
}
|
44
|
-
SkuListItems.TYPE = 'sku_list_items';
|
45
|
-
exports.default = SkuListItems;
|