@commercelayer/sdk 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api.d.ts +6 -3
- package/lib/commercelayer.d.ts +3 -0
- package/lib/model.d.ts +4 -1
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/application.d.ts +1 -1
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/billing_info_validation_rules.d.ts +1 -1
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/resources/checkout_com_payments.d.ts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +12 -4
- package/lib/resources/coupon_recipients.d.ts +46 -0
- package/lib/resources/coupons.d.ts +4 -1
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_password_resets.d.ts +1 -1
- package/lib/resources/customer_payment_sources.d.ts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/delivery_lead_times.d.ts +1 -1
- package/lib/resources/event_callbacks.d.ts +3 -2
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_tax_calculators.d.ts +1 -1
- package/lib/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/resources/fixed_price_promotions.d.ts +93 -0
- package/lib/resources/free_gift_promotions.d.ts +91 -0
- package/lib/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/gift_card_recipients.d.ts +1 -1
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_return_locations.d.ts +1 -1
- package/lib/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/resources/line_item_options.d.ts +1 -1
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +12 -4
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/order_validation_rules.d.ts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/organization.d.ts +1 -1
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/parcel_line_items.d.ts +1 -1
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/promotion_rules.d.ts +4 -2
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/return_line_items.d.ts +1 -1
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/sku_list_items.d.ts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +15 -4
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_line_items.d.ts +1 -1
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/webhooks.d.ts +2 -2
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/sdk.cjs.development.js +558 -1
- 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 +558 -1
- package/lib/sdk.esm.js.map +1 -1
- package/package.json +2 -3
package/lib/sdk.esm.js
CHANGED
@@ -4382,6 +4382,182 @@ var CouponCodesPromotionRules = /*#__PURE__*/function (_ApiResource) {
|
|
4382
4382
|
|
4383
4383
|
CouponCodesPromotionRules.TYPE = 'coupon_codes_promotion_rules';
|
4384
4384
|
|
4385
|
+
var CouponRecipients = /*#__PURE__*/function (_ApiResource) {
|
4386
|
+
_inheritsLoose(CouponRecipients, _ApiResource);
|
4387
|
+
|
4388
|
+
function CouponRecipients() {
|
4389
|
+
return _ApiResource.apply(this, arguments) || this;
|
4390
|
+
}
|
4391
|
+
|
4392
|
+
var _proto = CouponRecipients.prototype;
|
4393
|
+
|
4394
|
+
// static readonly PATH = 'coupon_recipients'
|
4395
|
+
_proto.list =
|
4396
|
+
/*#__PURE__*/
|
4397
|
+
function () {
|
4398
|
+
var _list = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(params, options) {
|
4399
|
+
return runtime_1.wrap(function _callee$(_context) {
|
4400
|
+
while (1) {
|
4401
|
+
switch (_context.prev = _context.next) {
|
4402
|
+
case 0:
|
4403
|
+
return _context.abrupt("return", this.resources.list({
|
4404
|
+
type: CouponRecipients.TYPE
|
4405
|
+
}, params, options));
|
4406
|
+
|
4407
|
+
case 1:
|
4408
|
+
case "end":
|
4409
|
+
return _context.stop();
|
4410
|
+
}
|
4411
|
+
}
|
4412
|
+
}, _callee, this);
|
4413
|
+
}));
|
4414
|
+
|
4415
|
+
function list(_x, _x2) {
|
4416
|
+
return _list.apply(this, arguments);
|
4417
|
+
}
|
4418
|
+
|
4419
|
+
return list;
|
4420
|
+
}();
|
4421
|
+
|
4422
|
+
_proto.create = /*#__PURE__*/function () {
|
4423
|
+
var _create = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(resource, options) {
|
4424
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
4425
|
+
while (1) {
|
4426
|
+
switch (_context2.prev = _context2.next) {
|
4427
|
+
case 0:
|
4428
|
+
return _context2.abrupt("return", this.resources.create(_extends({}, resource, {
|
4429
|
+
type: CouponRecipients.TYPE
|
4430
|
+
}), options));
|
4431
|
+
|
4432
|
+
case 1:
|
4433
|
+
case "end":
|
4434
|
+
return _context2.stop();
|
4435
|
+
}
|
4436
|
+
}
|
4437
|
+
}, _callee2, this);
|
4438
|
+
}));
|
4439
|
+
|
4440
|
+
function create(_x3, _x4) {
|
4441
|
+
return _create.apply(this, arguments);
|
4442
|
+
}
|
4443
|
+
|
4444
|
+
return create;
|
4445
|
+
}();
|
4446
|
+
|
4447
|
+
_proto.retrieve = /*#__PURE__*/function () {
|
4448
|
+
var _retrieve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(id, params, options) {
|
4449
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
4450
|
+
while (1) {
|
4451
|
+
switch (_context3.prev = _context3.next) {
|
4452
|
+
case 0:
|
4453
|
+
return _context3.abrupt("return", this.resources.retrieve({
|
4454
|
+
type: CouponRecipients.TYPE,
|
4455
|
+
id: id
|
4456
|
+
}, params, options));
|
4457
|
+
|
4458
|
+
case 1:
|
4459
|
+
case "end":
|
4460
|
+
return _context3.stop();
|
4461
|
+
}
|
4462
|
+
}
|
4463
|
+
}, _callee3, this);
|
4464
|
+
}));
|
4465
|
+
|
4466
|
+
function retrieve(_x5, _x6, _x7) {
|
4467
|
+
return _retrieve.apply(this, arguments);
|
4468
|
+
}
|
4469
|
+
|
4470
|
+
return retrieve;
|
4471
|
+
}();
|
4472
|
+
|
4473
|
+
_proto.update = /*#__PURE__*/function () {
|
4474
|
+
var _update = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(resource, options) {
|
4475
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
4476
|
+
while (1) {
|
4477
|
+
switch (_context4.prev = _context4.next) {
|
4478
|
+
case 0:
|
4479
|
+
return _context4.abrupt("return", this.resources.update(_extends({}, resource, {
|
4480
|
+
type: CouponRecipients.TYPE
|
4481
|
+
}), options));
|
4482
|
+
|
4483
|
+
case 1:
|
4484
|
+
case "end":
|
4485
|
+
return _context4.stop();
|
4486
|
+
}
|
4487
|
+
}
|
4488
|
+
}, _callee4, this);
|
4489
|
+
}));
|
4490
|
+
|
4491
|
+
function update(_x8, _x9) {
|
4492
|
+
return _update.apply(this, arguments);
|
4493
|
+
}
|
4494
|
+
|
4495
|
+
return update;
|
4496
|
+
}();
|
4497
|
+
|
4498
|
+
_proto["delete"] = /*#__PURE__*/function () {
|
4499
|
+
var _delete2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(id, options) {
|
4500
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
4501
|
+
while (1) {
|
4502
|
+
switch (_context5.prev = _context5.next) {
|
4503
|
+
case 0:
|
4504
|
+
_context5.next = 2;
|
4505
|
+
return this.resources["delete"]({
|
4506
|
+
type: CouponRecipients.TYPE,
|
4507
|
+
id: id
|
4508
|
+
}, options);
|
4509
|
+
|
4510
|
+
case 2:
|
4511
|
+
case "end":
|
4512
|
+
return _context5.stop();
|
4513
|
+
}
|
4514
|
+
}
|
4515
|
+
}, _callee5, this);
|
4516
|
+
}));
|
4517
|
+
|
4518
|
+
function _delete(_x10, _x11) {
|
4519
|
+
return _delete2.apply(this, arguments);
|
4520
|
+
}
|
4521
|
+
|
4522
|
+
return _delete;
|
4523
|
+
}() // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
4524
|
+
;
|
4525
|
+
|
4526
|
+
_proto.isCouponRecipient = function isCouponRecipient(resource) {
|
4527
|
+
return resource.type && resource.type === CouponRecipients.TYPE;
|
4528
|
+
}
|
4529
|
+
/*
|
4530
|
+
filter(): QueryBuilderRetrieve {
|
4531
|
+
return new QueryBuilderRetrieve(CouponRecipients.TYPE)
|
4532
|
+
}
|
4533
|
+
*/
|
4534
|
+
|
4535
|
+
/*
|
4536
|
+
filterList(): QueryBuilderList {
|
4537
|
+
return new QueryBuilderList(CouponRecipients.TYPE)
|
4538
|
+
}
|
4539
|
+
*/
|
4540
|
+
;
|
4541
|
+
|
4542
|
+
_proto.relationship = function relationship(id) {
|
4543
|
+
return typeof id === 'string' ? {
|
4544
|
+
id: id,
|
4545
|
+
type: CouponRecipients.TYPE
|
4546
|
+
} : {
|
4547
|
+
id: id.id,
|
4548
|
+
type: CouponRecipients.TYPE
|
4549
|
+
};
|
4550
|
+
};
|
4551
|
+
|
4552
|
+
_proto.type = function type() {
|
4553
|
+
return CouponRecipients.TYPE;
|
4554
|
+
};
|
4555
|
+
|
4556
|
+
return CouponRecipients;
|
4557
|
+
}(ApiResource);
|
4558
|
+
|
4559
|
+
CouponRecipients.TYPE = 'coupon_recipients';
|
4560
|
+
|
4385
4561
|
var Coupons = /*#__PURE__*/function (_ApiResource) {
|
4386
4562
|
_inheritsLoose(Coupons, _ApiResource);
|
4387
4563
|
|
@@ -5825,6 +6001,32 @@ var EventCallbacks = /*#__PURE__*/function (_ApiResource) {
|
|
5825
6001
|
}
|
5826
6002
|
|
5827
6003
|
return list;
|
6004
|
+
}();
|
6005
|
+
|
6006
|
+
_proto.retrieve = /*#__PURE__*/function () {
|
6007
|
+
var _retrieve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(id, params, options) {
|
6008
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
6009
|
+
while (1) {
|
6010
|
+
switch (_context2.prev = _context2.next) {
|
6011
|
+
case 0:
|
6012
|
+
return _context2.abrupt("return", this.resources.retrieve({
|
6013
|
+
type: EventCallbacks.TYPE,
|
6014
|
+
id: id
|
6015
|
+
}, params, options));
|
6016
|
+
|
6017
|
+
case 1:
|
6018
|
+
case "end":
|
6019
|
+
return _context2.stop();
|
6020
|
+
}
|
6021
|
+
}
|
6022
|
+
}, _callee2, this);
|
6023
|
+
}));
|
6024
|
+
|
6025
|
+
function retrieve(_x3, _x4, _x5) {
|
6026
|
+
return _retrieve.apply(this, arguments);
|
6027
|
+
}
|
6028
|
+
|
6029
|
+
return retrieve;
|
5828
6030
|
}() // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
5829
6031
|
;
|
5830
6032
|
|
@@ -6743,6 +6945,358 @@ var FixedAmountPromotions = /*#__PURE__*/function (_ApiResource) {
|
|
6743
6945
|
|
6744
6946
|
FixedAmountPromotions.TYPE = 'fixed_amount_promotions';
|
6745
6947
|
|
6948
|
+
var FixedPricePromotions = /*#__PURE__*/function (_ApiResource) {
|
6949
|
+
_inheritsLoose(FixedPricePromotions, _ApiResource);
|
6950
|
+
|
6951
|
+
function FixedPricePromotions() {
|
6952
|
+
return _ApiResource.apply(this, arguments) || this;
|
6953
|
+
}
|
6954
|
+
|
6955
|
+
var _proto = FixedPricePromotions.prototype;
|
6956
|
+
|
6957
|
+
// static readonly PATH = 'fixed_price_promotions'
|
6958
|
+
_proto.list =
|
6959
|
+
/*#__PURE__*/
|
6960
|
+
function () {
|
6961
|
+
var _list = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(params, options) {
|
6962
|
+
return runtime_1.wrap(function _callee$(_context) {
|
6963
|
+
while (1) {
|
6964
|
+
switch (_context.prev = _context.next) {
|
6965
|
+
case 0:
|
6966
|
+
return _context.abrupt("return", this.resources.list({
|
6967
|
+
type: FixedPricePromotions.TYPE
|
6968
|
+
}, params, options));
|
6969
|
+
|
6970
|
+
case 1:
|
6971
|
+
case "end":
|
6972
|
+
return _context.stop();
|
6973
|
+
}
|
6974
|
+
}
|
6975
|
+
}, _callee, this);
|
6976
|
+
}));
|
6977
|
+
|
6978
|
+
function list(_x, _x2) {
|
6979
|
+
return _list.apply(this, arguments);
|
6980
|
+
}
|
6981
|
+
|
6982
|
+
return list;
|
6983
|
+
}();
|
6984
|
+
|
6985
|
+
_proto.create = /*#__PURE__*/function () {
|
6986
|
+
var _create = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(resource, options) {
|
6987
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
6988
|
+
while (1) {
|
6989
|
+
switch (_context2.prev = _context2.next) {
|
6990
|
+
case 0:
|
6991
|
+
return _context2.abrupt("return", this.resources.create(_extends({}, resource, {
|
6992
|
+
type: FixedPricePromotions.TYPE
|
6993
|
+
}), options));
|
6994
|
+
|
6995
|
+
case 1:
|
6996
|
+
case "end":
|
6997
|
+
return _context2.stop();
|
6998
|
+
}
|
6999
|
+
}
|
7000
|
+
}, _callee2, this);
|
7001
|
+
}));
|
7002
|
+
|
7003
|
+
function create(_x3, _x4) {
|
7004
|
+
return _create.apply(this, arguments);
|
7005
|
+
}
|
7006
|
+
|
7007
|
+
return create;
|
7008
|
+
}();
|
7009
|
+
|
7010
|
+
_proto.retrieve = /*#__PURE__*/function () {
|
7011
|
+
var _retrieve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(id, params, options) {
|
7012
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
7013
|
+
while (1) {
|
7014
|
+
switch (_context3.prev = _context3.next) {
|
7015
|
+
case 0:
|
7016
|
+
return _context3.abrupt("return", this.resources.retrieve({
|
7017
|
+
type: FixedPricePromotions.TYPE,
|
7018
|
+
id: id
|
7019
|
+
}, params, options));
|
7020
|
+
|
7021
|
+
case 1:
|
7022
|
+
case "end":
|
7023
|
+
return _context3.stop();
|
7024
|
+
}
|
7025
|
+
}
|
7026
|
+
}, _callee3, this);
|
7027
|
+
}));
|
7028
|
+
|
7029
|
+
function retrieve(_x5, _x6, _x7) {
|
7030
|
+
return _retrieve.apply(this, arguments);
|
7031
|
+
}
|
7032
|
+
|
7033
|
+
return retrieve;
|
7034
|
+
}();
|
7035
|
+
|
7036
|
+
_proto.update = /*#__PURE__*/function () {
|
7037
|
+
var _update = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(resource, options) {
|
7038
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
7039
|
+
while (1) {
|
7040
|
+
switch (_context4.prev = _context4.next) {
|
7041
|
+
case 0:
|
7042
|
+
return _context4.abrupt("return", this.resources.update(_extends({}, resource, {
|
7043
|
+
type: FixedPricePromotions.TYPE
|
7044
|
+
}), options));
|
7045
|
+
|
7046
|
+
case 1:
|
7047
|
+
case "end":
|
7048
|
+
return _context4.stop();
|
7049
|
+
}
|
7050
|
+
}
|
7051
|
+
}, _callee4, this);
|
7052
|
+
}));
|
7053
|
+
|
7054
|
+
function update(_x8, _x9) {
|
7055
|
+
return _update.apply(this, arguments);
|
7056
|
+
}
|
7057
|
+
|
7058
|
+
return update;
|
7059
|
+
}();
|
7060
|
+
|
7061
|
+
_proto["delete"] = /*#__PURE__*/function () {
|
7062
|
+
var _delete2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(id, options) {
|
7063
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
7064
|
+
while (1) {
|
7065
|
+
switch (_context5.prev = _context5.next) {
|
7066
|
+
case 0:
|
7067
|
+
_context5.next = 2;
|
7068
|
+
return this.resources["delete"]({
|
7069
|
+
type: FixedPricePromotions.TYPE,
|
7070
|
+
id: id
|
7071
|
+
}, options);
|
7072
|
+
|
7073
|
+
case 2:
|
7074
|
+
case "end":
|
7075
|
+
return _context5.stop();
|
7076
|
+
}
|
7077
|
+
}
|
7078
|
+
}, _callee5, this);
|
7079
|
+
}));
|
7080
|
+
|
7081
|
+
function _delete(_x10, _x11) {
|
7082
|
+
return _delete2.apply(this, arguments);
|
7083
|
+
}
|
7084
|
+
|
7085
|
+
return _delete;
|
7086
|
+
}() // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
7087
|
+
;
|
7088
|
+
|
7089
|
+
_proto.isFixedPricePromotion = function isFixedPricePromotion(resource) {
|
7090
|
+
return resource.type && resource.type === FixedPricePromotions.TYPE;
|
7091
|
+
}
|
7092
|
+
/*
|
7093
|
+
filter(): QueryBuilderRetrieve {
|
7094
|
+
return new QueryBuilderRetrieve(FixedPricePromotions.TYPE)
|
7095
|
+
}
|
7096
|
+
*/
|
7097
|
+
|
7098
|
+
/*
|
7099
|
+
filterList(): QueryBuilderList {
|
7100
|
+
return new QueryBuilderList(FixedPricePromotions.TYPE)
|
7101
|
+
}
|
7102
|
+
*/
|
7103
|
+
;
|
7104
|
+
|
7105
|
+
_proto.relationship = function relationship(id) {
|
7106
|
+
return typeof id === 'string' ? {
|
7107
|
+
id: id,
|
7108
|
+
type: FixedPricePromotions.TYPE
|
7109
|
+
} : {
|
7110
|
+
id: id.id,
|
7111
|
+
type: FixedPricePromotions.TYPE
|
7112
|
+
};
|
7113
|
+
};
|
7114
|
+
|
7115
|
+
_proto.type = function type() {
|
7116
|
+
return FixedPricePromotions.TYPE;
|
7117
|
+
};
|
7118
|
+
|
7119
|
+
return FixedPricePromotions;
|
7120
|
+
}(ApiResource);
|
7121
|
+
|
7122
|
+
FixedPricePromotions.TYPE = 'fixed_price_promotions';
|
7123
|
+
|
7124
|
+
var FreeGiftPromotions = /*#__PURE__*/function (_ApiResource) {
|
7125
|
+
_inheritsLoose(FreeGiftPromotions, _ApiResource);
|
7126
|
+
|
7127
|
+
function FreeGiftPromotions() {
|
7128
|
+
return _ApiResource.apply(this, arguments) || this;
|
7129
|
+
}
|
7130
|
+
|
7131
|
+
var _proto = FreeGiftPromotions.prototype;
|
7132
|
+
|
7133
|
+
// static readonly PATH = 'free_gift_promotions'
|
7134
|
+
_proto.list =
|
7135
|
+
/*#__PURE__*/
|
7136
|
+
function () {
|
7137
|
+
var _list = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(params, options) {
|
7138
|
+
return runtime_1.wrap(function _callee$(_context) {
|
7139
|
+
while (1) {
|
7140
|
+
switch (_context.prev = _context.next) {
|
7141
|
+
case 0:
|
7142
|
+
return _context.abrupt("return", this.resources.list({
|
7143
|
+
type: FreeGiftPromotions.TYPE
|
7144
|
+
}, params, options));
|
7145
|
+
|
7146
|
+
case 1:
|
7147
|
+
case "end":
|
7148
|
+
return _context.stop();
|
7149
|
+
}
|
7150
|
+
}
|
7151
|
+
}, _callee, this);
|
7152
|
+
}));
|
7153
|
+
|
7154
|
+
function list(_x, _x2) {
|
7155
|
+
return _list.apply(this, arguments);
|
7156
|
+
}
|
7157
|
+
|
7158
|
+
return list;
|
7159
|
+
}();
|
7160
|
+
|
7161
|
+
_proto.create = /*#__PURE__*/function () {
|
7162
|
+
var _create = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(resource, options) {
|
7163
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
7164
|
+
while (1) {
|
7165
|
+
switch (_context2.prev = _context2.next) {
|
7166
|
+
case 0:
|
7167
|
+
return _context2.abrupt("return", this.resources.create(_extends({}, resource, {
|
7168
|
+
type: FreeGiftPromotions.TYPE
|
7169
|
+
}), options));
|
7170
|
+
|
7171
|
+
case 1:
|
7172
|
+
case "end":
|
7173
|
+
return _context2.stop();
|
7174
|
+
}
|
7175
|
+
}
|
7176
|
+
}, _callee2, this);
|
7177
|
+
}));
|
7178
|
+
|
7179
|
+
function create(_x3, _x4) {
|
7180
|
+
return _create.apply(this, arguments);
|
7181
|
+
}
|
7182
|
+
|
7183
|
+
return create;
|
7184
|
+
}();
|
7185
|
+
|
7186
|
+
_proto.retrieve = /*#__PURE__*/function () {
|
7187
|
+
var _retrieve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(id, params, options) {
|
7188
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
7189
|
+
while (1) {
|
7190
|
+
switch (_context3.prev = _context3.next) {
|
7191
|
+
case 0:
|
7192
|
+
return _context3.abrupt("return", this.resources.retrieve({
|
7193
|
+
type: FreeGiftPromotions.TYPE,
|
7194
|
+
id: id
|
7195
|
+
}, params, options));
|
7196
|
+
|
7197
|
+
case 1:
|
7198
|
+
case "end":
|
7199
|
+
return _context3.stop();
|
7200
|
+
}
|
7201
|
+
}
|
7202
|
+
}, _callee3, this);
|
7203
|
+
}));
|
7204
|
+
|
7205
|
+
function retrieve(_x5, _x6, _x7) {
|
7206
|
+
return _retrieve.apply(this, arguments);
|
7207
|
+
}
|
7208
|
+
|
7209
|
+
return retrieve;
|
7210
|
+
}();
|
7211
|
+
|
7212
|
+
_proto.update = /*#__PURE__*/function () {
|
7213
|
+
var _update = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(resource, options) {
|
7214
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
7215
|
+
while (1) {
|
7216
|
+
switch (_context4.prev = _context4.next) {
|
7217
|
+
case 0:
|
7218
|
+
return _context4.abrupt("return", this.resources.update(_extends({}, resource, {
|
7219
|
+
type: FreeGiftPromotions.TYPE
|
7220
|
+
}), options));
|
7221
|
+
|
7222
|
+
case 1:
|
7223
|
+
case "end":
|
7224
|
+
return _context4.stop();
|
7225
|
+
}
|
7226
|
+
}
|
7227
|
+
}, _callee4, this);
|
7228
|
+
}));
|
7229
|
+
|
7230
|
+
function update(_x8, _x9) {
|
7231
|
+
return _update.apply(this, arguments);
|
7232
|
+
}
|
7233
|
+
|
7234
|
+
return update;
|
7235
|
+
}();
|
7236
|
+
|
7237
|
+
_proto["delete"] = /*#__PURE__*/function () {
|
7238
|
+
var _delete2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(id, options) {
|
7239
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
7240
|
+
while (1) {
|
7241
|
+
switch (_context5.prev = _context5.next) {
|
7242
|
+
case 0:
|
7243
|
+
_context5.next = 2;
|
7244
|
+
return this.resources["delete"]({
|
7245
|
+
type: FreeGiftPromotions.TYPE,
|
7246
|
+
id: id
|
7247
|
+
}, options);
|
7248
|
+
|
7249
|
+
case 2:
|
7250
|
+
case "end":
|
7251
|
+
return _context5.stop();
|
7252
|
+
}
|
7253
|
+
}
|
7254
|
+
}, _callee5, this);
|
7255
|
+
}));
|
7256
|
+
|
7257
|
+
function _delete(_x10, _x11) {
|
7258
|
+
return _delete2.apply(this, arguments);
|
7259
|
+
}
|
7260
|
+
|
7261
|
+
return _delete;
|
7262
|
+
}() // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
7263
|
+
;
|
7264
|
+
|
7265
|
+
_proto.isFreeGiftPromotion = function isFreeGiftPromotion(resource) {
|
7266
|
+
return resource.type && resource.type === FreeGiftPromotions.TYPE;
|
7267
|
+
}
|
7268
|
+
/*
|
7269
|
+
filter(): QueryBuilderRetrieve {
|
7270
|
+
return new QueryBuilderRetrieve(FreeGiftPromotions.TYPE)
|
7271
|
+
}
|
7272
|
+
*/
|
7273
|
+
|
7274
|
+
/*
|
7275
|
+
filterList(): QueryBuilderList {
|
7276
|
+
return new QueryBuilderList(FreeGiftPromotions.TYPE)
|
7277
|
+
}
|
7278
|
+
*/
|
7279
|
+
;
|
7280
|
+
|
7281
|
+
_proto.relationship = function relationship(id) {
|
7282
|
+
return typeof id === 'string' ? {
|
7283
|
+
id: id,
|
7284
|
+
type: FreeGiftPromotions.TYPE
|
7285
|
+
} : {
|
7286
|
+
id: id.id,
|
7287
|
+
type: FreeGiftPromotions.TYPE
|
7288
|
+
};
|
7289
|
+
};
|
7290
|
+
|
7291
|
+
_proto.type = function type() {
|
7292
|
+
return FreeGiftPromotions.TYPE;
|
7293
|
+
};
|
7294
|
+
|
7295
|
+
return FreeGiftPromotions;
|
7296
|
+
}(ApiResource);
|
7297
|
+
|
7298
|
+
FreeGiftPromotions.TYPE = 'free_gift_promotions';
|
7299
|
+
|
6746
7300
|
var FreeShippingPromotions = /*#__PURE__*/function (_ApiResource) {
|
6747
7301
|
_inheritsLoose(FreeShippingPromotions, _ApiResource);
|
6748
7302
|
|
@@ -16252,7 +16806,7 @@ WireTransfers.TYPE = 'wire_transfers';
|
|
16252
16806
|
// ##__API_RESOURCES_START__##
|
16253
16807
|
|
16254
16808
|
var resourceList = [// ##__API_RESOURCE_LIST_START__##
|
16255
|
-
'addresses', 'adjustments', 'adyen_gateways', 'adyen_payments', 'application', 'attachments', 'authorizations', 'avalara_accounts', 'billing_info_validation_rules', 'bing_geocoders', 'braintree_gateways', 'braintree_payments', 'bundles', 'captures', 'carrier_accounts', 'checkout_com_gateways', 'checkout_com_payments', 'coupon_codes_promotion_rules', 'coupons', 'customer_addresses', 'customer_groups', 'customer_password_resets', 'customer_payment_sources', 'customer_subscriptions', 'customers', 'delivery_lead_times', 'event_callbacks', 'external_gateways', 'external_payments', 'external_promotions', 'external_tax_calculators', 'fixed_amount_promotions', 'free_shipping_promotions', 'geocoders', 'gift_card_recipients', 'gift_cards', 'google_geocoders', 'imports', 'in_stock_subscriptions', 'inventory_models', 'inventory_return_locations', 'inventory_stock_locations', 'line_item_options', 'line_items', 'manual_gateways', 'manual_tax_calculators', 'markets', 'merchants', 'order_amount_promotion_rules', 'order_copies', 'order_subscriptions', 'order_validation_rules', 'orders', 'organization', 'packages', 'parcel_line_items', 'parcels', 'payment_gateways', 'payment_methods', 'paypal_gateways', 'paypal_payments', 'percentage_discount_promotions', 'price_lists', 'prices', 'promotion_rules', 'promotions', 'refunds', 'return_line_items', 'returns', 'shipments', 'shipping_categories', 'shipping_methods', 'shipping_zones', 'sku_list_items', 'sku_list_promotion_rules', 'sku_lists', 'sku_options', 'skus', 'stock_items', 'stock_line_items', 'stock_locations', 'stock_transfers', 'stripe_gateways', 'stripe_payments', 'tax_calculators', 'tax_categories', 'tax_rules', 'taxjar_accounts', 'transactions', 'voids', 'webhooks', 'wire_transfers' // ##__API_RESOURCE_LIST_STOP__##
|
16809
|
+
'addresses', 'adjustments', 'adyen_gateways', 'adyen_payments', 'application', 'attachments', 'authorizations', 'avalara_accounts', 'billing_info_validation_rules', 'bing_geocoders', 'braintree_gateways', 'braintree_payments', 'bundles', 'captures', 'carrier_accounts', 'checkout_com_gateways', 'checkout_com_payments', 'coupon_codes_promotion_rules', 'coupon_recipients', 'coupons', 'customer_addresses', 'customer_groups', 'customer_password_resets', 'customer_payment_sources', 'customer_subscriptions', 'customers', 'delivery_lead_times', 'event_callbacks', 'external_gateways', 'external_payments', 'external_promotions', 'external_tax_calculators', 'fixed_amount_promotions', 'fixed_price_promotions', 'free_gift_promotions', 'free_shipping_promotions', 'geocoders', 'gift_card_recipients', 'gift_cards', 'google_geocoders', 'imports', 'in_stock_subscriptions', 'inventory_models', 'inventory_return_locations', 'inventory_stock_locations', 'line_item_options', 'line_items', 'manual_gateways', 'manual_tax_calculators', 'markets', 'merchants', 'order_amount_promotion_rules', 'order_copies', 'order_subscriptions', 'order_validation_rules', 'orders', 'organization', 'packages', 'parcel_line_items', 'parcels', 'payment_gateways', 'payment_methods', 'paypal_gateways', 'paypal_payments', 'percentage_discount_promotions', 'price_lists', 'prices', 'promotion_rules', 'promotions', 'refunds', 'return_line_items', 'returns', 'shipments', 'shipping_categories', 'shipping_methods', 'shipping_zones', 'sku_list_items', 'sku_list_promotion_rules', 'sku_lists', 'sku_options', 'skus', 'stock_items', 'stock_line_items', 'stock_locations', 'stock_transfers', 'stripe_gateways', 'stripe_payments', 'tax_calculators', 'tax_categories', 'tax_rules', 'taxjar_accounts', 'transactions', 'voids', 'webhooks', 'wire_transfers' // ##__API_RESOURCE_LIST_STOP__##
|
16256
16810
|
];
|
16257
16811
|
/*
|
16258
16812
|
type ResourceInfo = {
|
@@ -16407,6 +16961,7 @@ var CommerceLayerClient = /*#__PURE__*/function () {
|
|
16407
16961
|
this.checkout_com_gateways = new CheckoutComGateways(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16408
16962
|
this.checkout_com_payments = new CheckoutComPayments(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16409
16963
|
this.coupon_codes_promotion_rules = new CouponCodesPromotionRules(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16964
|
+
this.coupon_recipients = new CouponRecipients(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16410
16965
|
this.coupons = new Coupons(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16411
16966
|
this.customer_addresses = new CustomerAddresses(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16412
16967
|
this.customer_groups = new CustomerGroups(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
@@ -16421,6 +16976,8 @@ var CommerceLayerClient = /*#__PURE__*/function () {
|
|
16421
16976
|
this.external_promotions = new ExternalPromotions(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16422
16977
|
this.external_tax_calculators = new ExternalTaxCalculators(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16423
16978
|
this.fixed_amount_promotions = new FixedAmountPromotions(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16979
|
+
this.fixed_price_promotions = new FixedPricePromotions(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16980
|
+
this.free_gift_promotions = new FreeGiftPromotions(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16424
16981
|
this.free_shipping_promotions = new FreeShippingPromotions(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16425
16982
|
this.geocoders = new Geocoders(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|
16426
16983
|
this.gift_card_recipients = new GiftCardRecipients(_classPrivateFieldLooseBase(this, _adapter)[_adapter]);
|