@commercelayer/cli-plugin-triggers 4.10.0 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1287 -95
- package/lib/commands/address/add_tags.d.ts +9 -0
- package/lib/commands/address/add_tags.js +22 -0
- package/lib/commands/address/index.d.ts +9 -0
- package/lib/commands/address/index.js +40 -0
- package/lib/commands/address/remove_tags.d.ts +9 -0
- package/lib/commands/address/remove_tags.js +22 -0
- package/lib/commands/bundle/add_tags.d.ts +9 -0
- package/lib/commands/bundle/add_tags.js +22 -0
- package/lib/commands/bundle/remove_tags.d.ts +9 -0
- package/lib/commands/bundle/remove_tags.js +22 -0
- package/lib/commands/buy_x_pay_y_promotion/add_tags.d.ts +9 -0
- package/lib/commands/buy_x_pay_y_promotion/add_tags.js +22 -0
- package/lib/commands/buy_x_pay_y_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/buy_x_pay_y_promotion/remove_tags.js +22 -0
- package/lib/commands/coupon/add_tags.d.ts +9 -0
- package/lib/commands/coupon/add_tags.js +22 -0
- package/lib/commands/coupon/index.d.ts +9 -0
- package/lib/commands/coupon/index.js +40 -0
- package/lib/commands/coupon/remove_tags.d.ts +9 -0
- package/lib/commands/coupon/remove_tags.js +22 -0
- package/lib/commands/customer/add_tags.d.ts +9 -0
- package/lib/commands/customer/add_tags.js +22 -0
- package/lib/commands/customer/index.d.ts +9 -0
- package/lib/commands/customer/index.js +40 -0
- package/lib/commands/customer/remove_tags.d.ts +9 -0
- package/lib/commands/customer/remove_tags.js +22 -0
- package/lib/commands/easypost_pickup/index.d.ts +9 -0
- package/lib/commands/easypost_pickup/index.js +40 -0
- package/lib/commands/easypost_pickup/purchase.d.ts +9 -0
- package/lib/commands/easypost_pickup/purchase.js +22 -0
- package/lib/commands/external_promotion/add_tags.d.ts +9 -0
- package/lib/commands/external_promotion/add_tags.js +22 -0
- package/lib/commands/external_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/external_promotion/remove_tags.js +22 -0
- package/lib/commands/fixed_amount_promotion/add_tags.d.ts +9 -0
- package/lib/commands/fixed_amount_promotion/add_tags.js +22 -0
- package/lib/commands/fixed_amount_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/fixed_amount_promotion/remove_tags.js +22 -0
- package/lib/commands/fixed_price_promotion/add_tags.d.ts +9 -0
- package/lib/commands/fixed_price_promotion/add_tags.js +22 -0
- package/lib/commands/fixed_price_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/fixed_price_promotion/remove_tags.js +22 -0
- package/lib/commands/flex_promotion/add_tags.d.ts +9 -0
- package/lib/commands/flex_promotion/add_tags.js +22 -0
- package/lib/commands/flex_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/flex_promotion/remove_tags.js +22 -0
- package/lib/commands/free_gift_promotion/add_tags.d.ts +9 -0
- package/lib/commands/free_gift_promotion/add_tags.js +22 -0
- package/lib/commands/free_gift_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/free_gift_promotion/remove_tags.js +22 -0
- package/lib/commands/free_shipping_promotion/add_tags.d.ts +9 -0
- package/lib/commands/free_shipping_promotion/add_tags.js +22 -0
- package/lib/commands/free_shipping_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/free_shipping_promotion/remove_tags.js +22 -0
- package/lib/commands/gift_card/add_tags.d.ts +9 -0
- package/lib/commands/gift_card/add_tags.js +22 -0
- package/lib/commands/gift_card/remove_tags.d.ts +9 -0
- package/lib/commands/gift_card/remove_tags.js +22 -0
- package/lib/commands/line_item/add_tags.d.ts +9 -0
- package/lib/commands/line_item/add_tags.js +22 -0
- package/lib/commands/line_item/remove_tags.d.ts +9 -0
- package/lib/commands/line_item/remove_tags.js +22 -0
- package/lib/commands/line_item_option/add_tags.d.ts +9 -0
- package/lib/commands/line_item_option/add_tags.js +22 -0
- package/lib/commands/line_item_option/index.d.ts +9 -0
- package/lib/commands/line_item_option/index.js +40 -0
- package/lib/commands/line_item_option/remove_tags.d.ts +9 -0
- package/lib/commands/line_item_option/remove_tags.js +22 -0
- package/lib/commands/order/add_tags.d.ts +9 -0
- package/lib/commands/order/add_tags.js +22 -0
- package/lib/commands/order/remove_tags.d.ts +9 -0
- package/lib/commands/order/remove_tags.js +22 -0
- package/lib/commands/order_subscription/add_tags.d.ts +9 -0
- package/lib/commands/order_subscription/add_tags.js +22 -0
- package/lib/commands/order_subscription/remove_tags.d.ts +9 -0
- package/lib/commands/order_subscription/remove_tags.js +22 -0
- package/lib/commands/percentage_discount_promotion/add_tags.d.ts +9 -0
- package/lib/commands/percentage_discount_promotion/add_tags.js +22 -0
- package/lib/commands/percentage_discount_promotion/remove_tags.d.ts +9 -0
- package/lib/commands/percentage_discount_promotion/remove_tags.js +22 -0
- package/lib/commands/return/add_tags.d.ts +9 -0
- package/lib/commands/return/add_tags.js +22 -0
- package/lib/commands/return/remove_tags.d.ts +9 -0
- package/lib/commands/return/remove_tags.js +22 -0
- package/lib/commands/shipment/add_tags.d.ts +9 -0
- package/lib/commands/shipment/add_tags.js +22 -0
- package/lib/commands/shipment/remove_tags.d.ts +9 -0
- package/lib/commands/shipment/remove_tags.js +22 -0
- package/lib/commands/sku/add_tags.d.ts +9 -0
- package/lib/commands/sku/add_tags.js +22 -0
- package/lib/commands/sku/index.d.ts +9 -0
- package/lib/commands/sku/index.js +40 -0
- package/lib/commands/sku/remove_tags.d.ts +9 -0
- package/lib/commands/sku/remove_tags.js +22 -0
- package/lib/commands/sku_option/add_tags.d.ts +9 -0
- package/lib/commands/sku_option/add_tags.js +22 -0
- package/lib/commands/sku_option/index.d.ts +9 -0
- package/lib/commands/sku_option/index.js +40 -0
- package/lib/commands/sku_option/remove_tags.d.ts +9 -0
- package/lib/commands/sku_option/remove_tags.js +22 -0
- package/lib/triggers/addresses.d.ts +3 -0
- package/lib/triggers/addresses.js +15 -0
- package/lib/triggers/bundles.d.ts +1 -1
- package/lib/triggers/bundles.js +10 -0
- package/lib/triggers/buy_x_pay_y_promotions.d.ts +1 -1
- package/lib/triggers/buy_x_pay_y_promotions.js +10 -0
- package/lib/triggers/coupons.d.ts +3 -0
- package/lib/triggers/coupons.js +15 -0
- package/lib/triggers/customers.d.ts +3 -0
- package/lib/triggers/customers.js +15 -0
- package/lib/triggers/easypost_pickups.d.ts +3 -0
- package/lib/triggers/easypost_pickups.js +10 -0
- package/lib/triggers/external_promotions.d.ts +1 -1
- package/lib/triggers/external_promotions.js +10 -0
- package/lib/triggers/fixed_amount_promotions.d.ts +1 -1
- package/lib/triggers/fixed_amount_promotions.js +10 -0
- package/lib/triggers/fixed_price_promotions.d.ts +1 -1
- package/lib/triggers/fixed_price_promotions.js +10 -0
- package/lib/triggers/flex_promotions.d.ts +1 -1
- package/lib/triggers/flex_promotions.js +10 -0
- package/lib/triggers/free_gift_promotions.d.ts +1 -1
- package/lib/triggers/free_gift_promotions.js +10 -0
- package/lib/triggers/free_shipping_promotions.d.ts +1 -1
- package/lib/triggers/free_shipping_promotions.js +10 -0
- package/lib/triggers/gift_cards.d.ts +1 -1
- package/lib/triggers/gift_cards.js +10 -0
- package/lib/triggers/line_item_options.d.ts +3 -0
- package/lib/triggers/line_item_options.js +15 -0
- package/lib/triggers/line_items.d.ts +1 -1
- package/lib/triggers/line_items.js +10 -0
- package/lib/triggers/order_subscriptions.d.ts +1 -1
- package/lib/triggers/order_subscriptions.js +10 -0
- package/lib/triggers/orders.d.ts +1 -1
- package/lib/triggers/orders.js +11 -1
- package/lib/triggers/percentage_discount_promotions.d.ts +1 -1
- package/lib/triggers/percentage_discount_promotions.js +10 -0
- package/lib/triggers/returns.d.ts +1 -1
- package/lib/triggers/returns.js +10 -0
- package/lib/triggers/shipments.d.ts +1 -1
- package/lib/triggers/shipments.js +10 -0
- package/lib/triggers/sku_options.d.ts +3 -0
- package/lib/triggers/sku_options.js +15 -0
- package/lib/triggers/skus.d.ts +3 -0
- package/lib/triggers/skus.js +15 -0
- package/oclif.manifest.json +5193 -793
- package/package.json +6 -6
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FixedAmountPromotionAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const fixed_amount_promotions_1 = require("../../triggers/fixed_amount_promotions");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class FixedAmountPromotionAddTags extends base_1.default {
|
|
8
|
+
static description = fixed_amount_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FixedAmountPromotionAddTags);
|
|
15
|
+
const res = await this.executeAction('fixed_amount_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('fixed_amount_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FixedAmountPromotionAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FixedAmountPromotionRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const fixed_amount_promotions_1 = require("../../triggers/fixed_amount_promotions");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class FixedAmountPromotionRemoveTags extends base_1.default {
|
|
8
|
+
static description = fixed_amount_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FixedAmountPromotionRemoveTags);
|
|
15
|
+
const res = await this.executeAction('fixed_amount_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('fixed_amount_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FixedAmountPromotionRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FixedPricePromotionAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const fixed_price_promotions_1 = require("../../triggers/fixed_price_promotions");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class FixedPricePromotionAddTags extends base_1.default {
|
|
8
|
+
static description = fixed_price_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FixedPricePromotionAddTags);
|
|
15
|
+
const res = await this.executeAction('fixed_price_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('fixed_price_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FixedPricePromotionAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FixedPricePromotionRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const fixed_price_promotions_1 = require("../../triggers/fixed_price_promotions");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class FixedPricePromotionRemoveTags extends base_1.default {
|
|
8
|
+
static description = fixed_price_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FixedPricePromotionRemoveTags);
|
|
15
|
+
const res = await this.executeAction('fixed_price_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('fixed_price_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FixedPricePromotionRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FlexPromotionAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const flex_promotions_1 = require("../../triggers/flex_promotions");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class FlexPromotionAddTags extends base_1.default {
|
|
8
|
+
static description = flex_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FlexPromotionAddTags);
|
|
15
|
+
const res = await this.executeAction('flex_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('flex_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FlexPromotionAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FlexPromotionRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const flex_promotions_1 = require("../../triggers/flex_promotions");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class FlexPromotionRemoveTags extends base_1.default {
|
|
8
|
+
static description = flex_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FlexPromotionRemoveTags);
|
|
15
|
+
const res = await this.executeAction('flex_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('flex_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FlexPromotionRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FreeGiftPromotionAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const free_gift_promotions_1 = require("../../triggers/free_gift_promotions");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class FreeGiftPromotionAddTags extends base_1.default {
|
|
8
|
+
static description = free_gift_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FreeGiftPromotionAddTags);
|
|
15
|
+
const res = await this.executeAction('free_gift_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('free_gift_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FreeGiftPromotionAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FreeGiftPromotionRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const free_gift_promotions_1 = require("../../triggers/free_gift_promotions");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class FreeGiftPromotionRemoveTags extends base_1.default {
|
|
8
|
+
static description = free_gift_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FreeGiftPromotionRemoveTags);
|
|
15
|
+
const res = await this.executeAction('free_gift_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('free_gift_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FreeGiftPromotionRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FreeShippingPromotionAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const free_shipping_promotions_1 = require("../../triggers/free_shipping_promotions");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class FreeShippingPromotionAddTags extends base_1.default {
|
|
8
|
+
static description = free_shipping_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FreeShippingPromotionAddTags);
|
|
15
|
+
const res = await this.executeAction('free_shipping_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('free_shipping_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FreeShippingPromotionAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class FreeShippingPromotionRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const free_shipping_promotions_1 = require("../../triggers/free_shipping_promotions");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class FreeShippingPromotionRemoveTags extends base_1.default {
|
|
8
|
+
static description = free_shipping_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(FreeShippingPromotionRemoveTags);
|
|
15
|
+
const res = await this.executeAction('free_shipping_promotions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('free_shipping_promotion', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = FreeShippingPromotionRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class GiftCardAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const gift_cards_1 = require("../../triggers/gift_cards");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class GiftCardAddTags extends base_1.default {
|
|
8
|
+
static description = gift_cards_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(GiftCardAddTags);
|
|
15
|
+
const res = await this.executeAction('gift_cards', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('gift_card', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = GiftCardAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class GiftCardRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const gift_cards_1 = require("../../triggers/gift_cards");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class GiftCardRemoveTags extends base_1.default {
|
|
8
|
+
static description = gift_cards_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(GiftCardRemoveTags);
|
|
15
|
+
const res = await this.executeAction('gift_cards', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('gift_card', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = GiftCardRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class LineItemAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const line_items_1 = require("../../triggers/line_items");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class LineItemAddTags extends base_1.default {
|
|
8
|
+
static description = line_items_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(LineItemAddTags);
|
|
15
|
+
const res = await this.executeAction('line_items', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('line_item', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = LineItemAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class LineItemRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const line_items_1 = require("../../triggers/line_items");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class LineItemRemoveTags extends base_1.default {
|
|
8
|
+
static description = line_items_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(LineItemRemoveTags);
|
|
15
|
+
const res = await this.executeAction('line_items', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('line_item', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = LineItemRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class LineItemOptionAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const line_item_options_1 = require("../../triggers/line_item_options");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class LineItemOptionAddTags extends base_1.default {
|
|
8
|
+
static description = line_item_options_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(LineItemOptionAddTags);
|
|
15
|
+
const res = await this.executeAction('line_item_options', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('line_item_option', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = LineItemOptionAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class LineItemOptionIndex extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
7
|
+
const cli_core_1 = require("@commercelayer/cli-core");
|
|
8
|
+
const line_item_options_1 = require("../../triggers/line_item_options");
|
|
9
|
+
const promptAction = async (id) => {
|
|
10
|
+
const answers = await inquirer_1.default.prompt([{
|
|
11
|
+
type: 'list',
|
|
12
|
+
name: 'trigger',
|
|
13
|
+
message: `Select an action to execute on line item option ${cli_core_1.clColor.api.id(id)}:`,
|
|
14
|
+
choices: Object.keys(line_item_options_1.triggers).sort().map(a => {
|
|
15
|
+
return { name: a, value: a };
|
|
16
|
+
}),
|
|
17
|
+
loop: false,
|
|
18
|
+
pageSize: 10,
|
|
19
|
+
}]);
|
|
20
|
+
return answers.trigger;
|
|
21
|
+
};
|
|
22
|
+
class LineItemOptionIndex extends base_1.default {
|
|
23
|
+
static description = 'execute an action on a resource of type line_item_options';
|
|
24
|
+
static flags = {};
|
|
25
|
+
static args = {
|
|
26
|
+
...base_1.default.args,
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { args, flags } = await this.parse(LineItemOptionIndex);
|
|
30
|
+
const id = args.id;
|
|
31
|
+
const action = await promptAction(id);
|
|
32
|
+
const fields = [];
|
|
33
|
+
const res = await (0, exec_1.default)('line_item_options', id, action, flags, fields);
|
|
34
|
+
this.log();
|
|
35
|
+
this.printOutput(res, flags);
|
|
36
|
+
this.successMessage('line item option', action, res.id);
|
|
37
|
+
return res;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = LineItemOptionIndex;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class LineItemOptionRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const line_item_options_1 = require("../../triggers/line_item_options");
|
|
6
|
+
const TRIGGER = 'remove_tags';
|
|
7
|
+
class LineItemOptionRemoveTags extends base_1.default {
|
|
8
|
+
static description = line_item_options_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(LineItemOptionRemoveTags);
|
|
15
|
+
const res = await this.executeAction('line_item_options', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('line_item_option', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = LineItemOptionRemoveTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class OrderAddTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const orders_1 = require("../../triggers/orders");
|
|
6
|
+
const TRIGGER = 'add_tags';
|
|
7
|
+
class OrderAddTags extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(OrderAddTags);
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('order', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = OrderAddTags;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class OrderRemoveTags extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|