@commercelayer/cli-plugin-triggers 3.13.1 → 3.15.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.
Files changed (168) hide show
  1. package/README.md +653 -5
  2. package/lib/base.d.ts +1 -0
  3. package/lib/base.js +5 -0
  4. package/lib/commands/adyen_payment/details.js +1 -2
  5. package/lib/commands/authorization/capture.js +1 -2
  6. package/lib/commands/authorization/capture_amount_cents.js +1 -2
  7. package/lib/commands/authorization/void.js +1 -2
  8. package/lib/commands/axerve_payment/update.js +1 -2
  9. package/lib/commands/bundle/compute_compare_at_amount.js +1 -2
  10. package/lib/commands/bundle/compute_price_amount.js +1 -2
  11. package/lib/commands/buy_x_pay_y_promotion/disable.d.ts +9 -0
  12. package/lib/commands/buy_x_pay_y_promotion/disable.js +20 -0
  13. package/lib/commands/buy_x_pay_y_promotion/enable.d.ts +9 -0
  14. package/lib/commands/buy_x_pay_y_promotion/enable.js +20 -0
  15. package/lib/commands/buy_x_pay_y_promotion/index.d.ts +9 -0
  16. package/lib/commands/buy_x_pay_y_promotion/index.js +38 -0
  17. package/lib/commands/capture/refund.js +1 -2
  18. package/lib/commands/capture/refund_amount_cents.js +1 -2
  19. package/lib/commands/checkout_com_payment/details.js +1 -2
  20. package/lib/commands/checkout_com_payment/refresh.js +1 -2
  21. package/lib/commands/customer_password_reset/reset_password_token.js +1 -2
  22. package/lib/commands/external_promotion/disable.d.ts +9 -0
  23. package/lib/commands/external_promotion/disable.js +20 -0
  24. package/lib/commands/external_promotion/enable.d.ts +9 -0
  25. package/lib/commands/external_promotion/enable.js +20 -0
  26. package/lib/commands/external_promotion/index.d.ts +9 -0
  27. package/lib/commands/external_promotion/index.js +38 -0
  28. package/lib/commands/fixed_amount_promotion/disable.d.ts +9 -0
  29. package/lib/commands/fixed_amount_promotion/disable.js +20 -0
  30. package/lib/commands/fixed_amount_promotion/enable.d.ts +9 -0
  31. package/lib/commands/fixed_amount_promotion/enable.js +20 -0
  32. package/lib/commands/fixed_amount_promotion/index.d.ts +9 -0
  33. package/lib/commands/fixed_amount_promotion/index.js +38 -0
  34. package/lib/commands/fixed_price_promotion/disable.d.ts +9 -0
  35. package/lib/commands/fixed_price_promotion/disable.js +20 -0
  36. package/lib/commands/fixed_price_promotion/enable.d.ts +9 -0
  37. package/lib/commands/fixed_price_promotion/enable.js +20 -0
  38. package/lib/commands/fixed_price_promotion/index.d.ts +9 -0
  39. package/lib/commands/fixed_price_promotion/index.js +38 -0
  40. package/lib/commands/free_gift_promotion/disable.d.ts +9 -0
  41. package/lib/commands/free_gift_promotion/disable.js +20 -0
  42. package/lib/commands/free_gift_promotion/enable.d.ts +9 -0
  43. package/lib/commands/free_gift_promotion/enable.js +20 -0
  44. package/lib/commands/free_gift_promotion/index.d.ts +9 -0
  45. package/lib/commands/free_gift_promotion/index.js +38 -0
  46. package/lib/commands/free_shipping_promotion/disable.d.ts +9 -0
  47. package/lib/commands/free_shipping_promotion/disable.js +20 -0
  48. package/lib/commands/free_shipping_promotion/enable.d.ts +9 -0
  49. package/lib/commands/free_shipping_promotion/enable.js +20 -0
  50. package/lib/commands/free_shipping_promotion/index.d.ts +9 -0
  51. package/lib/commands/free_shipping_promotion/index.js +38 -0
  52. package/lib/commands/gift_card/activate.js +1 -2
  53. package/lib/commands/gift_card/balance_change_cents.js +1 -2
  54. package/lib/commands/gift_card/deactivate.js +1 -2
  55. package/lib/commands/gift_card/purchase.js +1 -2
  56. package/lib/commands/in_stock_subscription/activate.js +1 -2
  57. package/lib/commands/in_stock_subscription/deactivate.js +1 -2
  58. package/lib/commands/klarna_payment/update.js +1 -2
  59. package/lib/commands/line_item/external_price.js +1 -2
  60. package/lib/commands/line_item/reserve_stock.js +1 -2
  61. package/lib/commands/market/disable.js +1 -2
  62. package/lib/commands/market/enable.js +1 -2
  63. package/lib/commands/order/approve.js +1 -2
  64. package/lib/commands/order/approve_and_capture.js +1 -2
  65. package/lib/commands/order/archive.js +1 -2
  66. package/lib/commands/order/authorization_amount_cents.js +1 -2
  67. package/lib/commands/order/authorize.js +1 -2
  68. package/lib/commands/order/billing_address_clone_id.js +1 -2
  69. package/lib/commands/order/billing_address_same_as_shipping.js +1 -2
  70. package/lib/commands/order/cancel.js +1 -2
  71. package/lib/commands/order/capture.js +1 -2
  72. package/lib/commands/order/commit_invoice.js +1 -2
  73. package/lib/commands/order/create_subscriptions.js +1 -2
  74. package/lib/commands/order/customer_payment_source_id.js +1 -2
  75. package/lib/commands/order/nullify_payment_source.js +1 -2
  76. package/lib/commands/order/place.js +1 -2
  77. package/lib/commands/order/refresh.js +1 -2
  78. package/lib/commands/order/refund.js +1 -2
  79. package/lib/commands/order/refund_invoice.js +1 -2
  80. package/lib/commands/order/save_billing_address_to_customer_address_book.js +1 -2
  81. package/lib/commands/order/save_payment_source_to_customer_wallet.js +1 -2
  82. package/lib/commands/order/save_shipping_address_to_customer_address_book.js +1 -2
  83. package/lib/commands/order/shipping_address_clone_id.js +1 -2
  84. package/lib/commands/order/shipping_address_same_as_billing.js +1 -2
  85. package/lib/commands/order/start_editing.js +1 -2
  86. package/lib/commands/order/stop_editing.js +1 -2
  87. package/lib/commands/order/unarchive.js +1 -2
  88. package/lib/commands/order/update_taxes.js +1 -2
  89. package/lib/commands/order/validate.js +1 -2
  90. package/lib/commands/order_subscription/activate.js +1 -2
  91. package/lib/commands/order_subscription/cancel.js +1 -2
  92. package/lib/commands/order_subscription/deactivate.js +1 -2
  93. package/lib/commands/payment_method/disable.js +1 -2
  94. package/lib/commands/payment_method/enable.js +1 -2
  95. package/lib/commands/percentage_discount_promotion/disable.d.ts +9 -0
  96. package/lib/commands/percentage_discount_promotion/disable.js +20 -0
  97. package/lib/commands/percentage_discount_promotion/enable.d.ts +9 -0
  98. package/lib/commands/percentage_discount_promotion/enable.js +20 -0
  99. package/lib/commands/percentage_discount_promotion/index.d.ts +9 -0
  100. package/lib/commands/percentage_discount_promotion/index.js +38 -0
  101. package/lib/commands/return/approve.js +1 -2
  102. package/lib/commands/return/archive.js +1 -2
  103. package/lib/commands/return/cancel.js +1 -2
  104. package/lib/commands/return/receive.js +1 -2
  105. package/lib/commands/return/reject.js +1 -2
  106. package/lib/commands/return/request.js +1 -2
  107. package/lib/commands/return/restock.js +1 -2
  108. package/lib/commands/return/ship.js +1 -2
  109. package/lib/commands/return/unarchive.js +1 -2
  110. package/lib/commands/return_line_item/restock.js +1 -2
  111. package/lib/commands/satispay_payment/refresh.js +1 -2
  112. package/lib/commands/shipment/decrement_stock.d.ts +9 -0
  113. package/lib/commands/shipment/decrement_stock.js +20 -0
  114. package/lib/commands/shipment/get_rates.js +1 -2
  115. package/lib/commands/shipment/on_hold.js +1 -2
  116. package/lib/commands/shipment/packing.js +1 -2
  117. package/lib/commands/shipment/picking.js +1 -2
  118. package/lib/commands/shipment/purchase.js +1 -2
  119. package/lib/commands/shipment/ready_to_ship.js +1 -2
  120. package/lib/commands/shipment/release_stock.d.ts +9 -0
  121. package/lib/commands/shipment/release_stock.js +20 -0
  122. package/lib/commands/shipment/reserve_stock.d.ts +9 -0
  123. package/lib/commands/shipment/reserve_stock.js +20 -0
  124. package/lib/commands/shipment/ship.js +1 -2
  125. package/lib/commands/shipment/upcoming.d.ts +9 -0
  126. package/lib/commands/shipment/upcoming.js +20 -0
  127. package/lib/commands/shipping_method/disable.js +1 -2
  128. package/lib/commands/shipping_method/enable.js +1 -2
  129. package/lib/commands/stock_reservation/index.d.ts +9 -0
  130. package/lib/commands/stock_reservation/index.js +38 -0
  131. package/lib/commands/stock_reservation/pending.d.ts +9 -0
  132. package/lib/commands/stock_reservation/pending.js +20 -0
  133. package/lib/commands/stock_transfer/cancel.js +1 -2
  134. package/lib/commands/stock_transfer/complete.js +1 -2
  135. package/lib/commands/stock_transfer/in_transit.js +1 -2
  136. package/lib/commands/stock_transfer/on_hold.d.ts +9 -0
  137. package/lib/commands/stock_transfer/on_hold.js +20 -0
  138. package/lib/commands/stock_transfer/picking.js +1 -2
  139. package/lib/commands/stock_transfer/upcoming.js +1 -2
  140. package/lib/commands/stripe_payment/refresh.js +1 -2
  141. package/lib/commands/stripe_payment/update.js +1 -2
  142. package/lib/commands/webhook/reset_circuit.js +1 -2
  143. package/lib/exec.d.ts +3 -2
  144. package/lib/exec.js +7 -4
  145. package/lib/triggers/buy_x_pay_y_promotions.d.ts +3 -0
  146. package/lib/triggers/buy_x_pay_y_promotions.js +15 -0
  147. package/lib/triggers/external_promotions.d.ts +3 -0
  148. package/lib/triggers/external_promotions.js +15 -0
  149. package/lib/triggers/fixed_amount_promotions.d.ts +3 -0
  150. package/lib/triggers/fixed_amount_promotions.js +15 -0
  151. package/lib/triggers/fixed_price_promotions.d.ts +3 -0
  152. package/lib/triggers/fixed_price_promotions.js +15 -0
  153. package/lib/triggers/free_gift_promotions.d.ts +3 -0
  154. package/lib/triggers/free_gift_promotions.js +15 -0
  155. package/lib/triggers/free_shipping_promotions.d.ts +3 -0
  156. package/lib/triggers/free_shipping_promotions.js +15 -0
  157. package/lib/triggers/line_items.js +1 -1
  158. package/lib/triggers/orders.js +1 -1
  159. package/lib/triggers/percentage_discount_promotions.d.ts +3 -0
  160. package/lib/triggers/percentage_discount_promotions.js +15 -0
  161. package/lib/triggers/shipments.d.ts +1 -1
  162. package/lib/triggers/shipments.js +20 -0
  163. package/lib/triggers/stock_reservations.d.ts +3 -0
  164. package/lib/triggers/stock_reservations.js +10 -0
  165. package/lib/triggers/stock_transfers.d.ts +1 -1
  166. package/lib/triggers/stock_transfers.js +5 -0
  167. package/oclif.manifest.json +7757 -3720
  168. package/package.json +17 -17
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class FixedPricePromotionIndex extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,38 @@
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 fixed_price_promotions_1 = require("../../triggers/fixed_price_promotions");
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 fixed price promotion ${cli_core_1.clColor.api.id(id)}:`,
14
+ choices: Object.keys(fixed_price_promotions_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 FixedPricePromotionIndex extends base_1.default {
23
+ async run() {
24
+ const { args, flags } = await this.parse(FixedPricePromotionIndex);
25
+ const id = args.id;
26
+ const action = await promptAction(id);
27
+ const fields = [];
28
+ const res = await (0, exec_1.default)('fixed_price_promotions', id, action, flags, fields);
29
+ this.log();
30
+ this.printOutput(res, flags);
31
+ this.successMessage('fixed price promotion', action, res.id);
32
+ return res;
33
+ }
34
+ }
35
+ FixedPricePromotionIndex.description = 'execute an action on a resource of type fixed_price_promotions';
36
+ FixedPricePromotionIndex.flags = {};
37
+ FixedPricePromotionIndex.args = Object.assign({}, base_1.default.args);
38
+ exports.default = FixedPricePromotionIndex;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class FreeGiftPromotionDisable extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,20 @@
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 = 'disable';
7
+ class FreeGiftPromotionDisable extends base_1.default {
8
+ async run() {
9
+ const { args, flags } = await this.parse(FreeGiftPromotionDisable);
10
+ const res = await this.executeAction('free_gift_promotions', args.id, TRIGGER, flags);
11
+ if (flags.print)
12
+ this.printOutput(res, flags);
13
+ this.successMessage('free_gift_promotion', TRIGGER, res.id);
14
+ return res;
15
+ }
16
+ }
17
+ FreeGiftPromotionDisable.description = free_gift_promotions_1.triggers[TRIGGER].description;
18
+ FreeGiftPromotionDisable.flags = {};
19
+ FreeGiftPromotionDisable.args = Object.assign({}, base_1.default.args);
20
+ exports.default = FreeGiftPromotionDisable;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class FreeGiftPromotionEnable extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,20 @@
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 = 'enable';
7
+ class FreeGiftPromotionEnable extends base_1.default {
8
+ async run() {
9
+ const { args, flags } = await this.parse(FreeGiftPromotionEnable);
10
+ const res = await this.executeAction('free_gift_promotions', args.id, TRIGGER, flags);
11
+ if (flags.print)
12
+ this.printOutput(res, flags);
13
+ this.successMessage('free_gift_promotion', TRIGGER, res.id);
14
+ return res;
15
+ }
16
+ }
17
+ FreeGiftPromotionEnable.description = free_gift_promotions_1.triggers[TRIGGER].description;
18
+ FreeGiftPromotionEnable.flags = {};
19
+ FreeGiftPromotionEnable.args = Object.assign({}, base_1.default.args);
20
+ exports.default = FreeGiftPromotionEnable;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class FreeGiftPromotionIndex extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,38 @@
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 free_gift_promotions_1 = require("../../triggers/free_gift_promotions");
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 free gift promotion ${cli_core_1.clColor.api.id(id)}:`,
14
+ choices: Object.keys(free_gift_promotions_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 FreeGiftPromotionIndex extends base_1.default {
23
+ async run() {
24
+ const { args, flags } = await this.parse(FreeGiftPromotionIndex);
25
+ const id = args.id;
26
+ const action = await promptAction(id);
27
+ const fields = [];
28
+ const res = await (0, exec_1.default)('free_gift_promotions', id, action, flags, fields);
29
+ this.log();
30
+ this.printOutput(res, flags);
31
+ this.successMessage('free gift promotion', action, res.id);
32
+ return res;
33
+ }
34
+ }
35
+ FreeGiftPromotionIndex.description = 'execute an action on a resource of type free_gift_promotions';
36
+ FreeGiftPromotionIndex.flags = {};
37
+ FreeGiftPromotionIndex.args = Object.assign({}, base_1.default.args);
38
+ exports.default = FreeGiftPromotionIndex;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class FreeShippingPromotionDisable extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,20 @@
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 = 'disable';
7
+ class FreeShippingPromotionDisable extends base_1.default {
8
+ async run() {
9
+ const { args, flags } = await this.parse(FreeShippingPromotionDisable);
10
+ const res = await this.executeAction('free_shipping_promotions', args.id, TRIGGER, flags);
11
+ if (flags.print)
12
+ this.printOutput(res, flags);
13
+ this.successMessage('free_shipping_promotion', TRIGGER, res.id);
14
+ return res;
15
+ }
16
+ }
17
+ FreeShippingPromotionDisable.description = free_shipping_promotions_1.triggers[TRIGGER].description;
18
+ FreeShippingPromotionDisable.flags = {};
19
+ FreeShippingPromotionDisable.args = Object.assign({}, base_1.default.args);
20
+ exports.default = FreeShippingPromotionDisable;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class FreeShippingPromotionEnable extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,20 @@
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 = 'enable';
7
+ class FreeShippingPromotionEnable extends base_1.default {
8
+ async run() {
9
+ const { args, flags } = await this.parse(FreeShippingPromotionEnable);
10
+ const res = await this.executeAction('free_shipping_promotions', args.id, TRIGGER, flags);
11
+ if (flags.print)
12
+ this.printOutput(res, flags);
13
+ this.successMessage('free_shipping_promotion', TRIGGER, res.id);
14
+ return res;
15
+ }
16
+ }
17
+ FreeShippingPromotionEnable.description = free_shipping_promotions_1.triggers[TRIGGER].description;
18
+ FreeShippingPromotionEnable.flags = {};
19
+ FreeShippingPromotionEnable.args = Object.assign({}, base_1.default.args);
20
+ exports.default = FreeShippingPromotionEnable;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class FreeShippingPromotionIndex extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,38 @@
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 free_shipping_promotions_1 = require("../../triggers/free_shipping_promotions");
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 free shipping promotion ${cli_core_1.clColor.api.id(id)}:`,
14
+ choices: Object.keys(free_shipping_promotions_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 FreeShippingPromotionIndex extends base_1.default {
23
+ async run() {
24
+ const { args, flags } = await this.parse(FreeShippingPromotionIndex);
25
+ const id = args.id;
26
+ const action = await promptAction(id);
27
+ const fields = [];
28
+ const res = await (0, exec_1.default)('free_shipping_promotions', id, action, flags, fields);
29
+ this.log();
30
+ this.printOutput(res, flags);
31
+ this.successMessage('free shipping promotion', action, res.id);
32
+ return res;
33
+ }
34
+ }
35
+ FreeShippingPromotionIndex.description = 'execute an action on a resource of type free_shipping_promotions';
36
+ FreeShippingPromotionIndex.flags = {};
37
+ FreeShippingPromotionIndex.args = Object.assign({}, base_1.default.args);
38
+ exports.default = FreeShippingPromotionIndex;
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const gift_cards_1 = require("../../triggers/gift_cards");
7
6
  const TRIGGER = 'activate';
8
7
  class GiftCardActivate extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(GiftCardActivate);
11
- const res = await (0, exec_1.default)('gift_cards', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('gift_cards', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('gift_card', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const gift_cards_1 = require("../../triggers/gift_cards");
7
6
  const TRIGGER = 'balance_change_cents';
8
7
  class GiftCardBalanceChangeCents extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(GiftCardBalanceChangeCents);
11
- const res = await (0, exec_1.default)('gift_cards', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('gift_cards', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('gift_card', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const gift_cards_1 = require("../../triggers/gift_cards");
7
6
  const TRIGGER = 'deactivate';
8
7
  class GiftCardDeactivate extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(GiftCardDeactivate);
11
- const res = await (0, exec_1.default)('gift_cards', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('gift_cards', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('gift_card', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const gift_cards_1 = require("../../triggers/gift_cards");
7
6
  const TRIGGER = 'purchase';
8
7
  class GiftCardPurchase extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(GiftCardPurchase);
11
- const res = await (0, exec_1.default)('gift_cards', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('gift_cards', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('gift_card', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const in_stock_subscriptions_1 = require("../../triggers/in_stock_subscriptions");
7
6
  const TRIGGER = 'activate';
8
7
  class InStockSubscriptionActivate extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(InStockSubscriptionActivate);
11
- const res = await (0, exec_1.default)('in_stock_subscriptions', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('in_stock_subscriptions', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('in_stock_subscription', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const in_stock_subscriptions_1 = require("../../triggers/in_stock_subscriptions");
7
6
  const TRIGGER = 'deactivate';
8
7
  class InStockSubscriptionDeactivate extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(InStockSubscriptionDeactivate);
11
- const res = await (0, exec_1.default)('in_stock_subscriptions', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('in_stock_subscriptions', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('in_stock_subscription', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const klarna_payments_1 = require("../../triggers/klarna_payments");
7
6
  const TRIGGER = 'update';
8
7
  class KlarnaPaymentUpdate extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(KlarnaPaymentUpdate);
11
- const res = await (0, exec_1.default)('klarna_payments', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('klarna_payments', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('klarna_payment', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const line_items_1 = require("../../triggers/line_items");
7
6
  const TRIGGER = 'external_price';
8
7
  class LineItemExternalPrice extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(LineItemExternalPrice);
11
- const res = await (0, exec_1.default)('line_items', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('line_items', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('line_item', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const line_items_1 = require("../../triggers/line_items");
7
6
  const TRIGGER = 'reserve_stock';
8
7
  class LineItemReserveStock extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(LineItemReserveStock);
11
- const res = await (0, exec_1.default)('line_items', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('line_items', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('line_item', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const markets_1 = require("../../triggers/markets");
7
6
  const TRIGGER = 'disable';
8
7
  class MarketDisable extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(MarketDisable);
11
- const res = await (0, exec_1.default)('markets', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('markets', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('market', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const markets_1 = require("../../triggers/markets");
7
6
  const TRIGGER = 'enable';
8
7
  class MarketEnable extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(MarketEnable);
11
- const res = await (0, exec_1.default)('markets', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('markets', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('market', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'approve';
8
7
  class OrderApprove extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderApprove);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'approve_and_capture';
8
7
  class OrderApproveAndCapture extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderApproveAndCapture);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'archive';
8
7
  class OrderArchive extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderArchive);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'authorization_amount_cents';
8
7
  class OrderAuthorizationAmountCents extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderAuthorizationAmountCents);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'authorize';
8
7
  class OrderAuthorize extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderAuthorize);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importStar(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'billing_address_clone_id';
8
7
  class OrderBillingAddressCloneId extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderBillingAddressCloneId);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'billing_address_same_as_shipping';
8
7
  class OrderBillingAddressSameAsShipping extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderBillingAddressSameAsShipping);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'cancel';
8
7
  class OrderCancel extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderCancel);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'capture';
8
7
  class OrderCapture extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderCapture);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'commit_invoice';
8
7
  class OrderCommitInvoice extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderCommitInvoice);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);
@@ -2,13 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const base_1 = tslib_1.__importDefault(require("../../base"));
5
- const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
5
  const orders_1 = require("../../triggers/orders");
7
6
  const TRIGGER = 'create_subscriptions';
8
7
  class OrderCreateSubscriptions extends base_1.default {
9
8
  async run() {
10
9
  const { args, flags } = await this.parse(OrderCreateSubscriptions);
11
- const res = await (0, exec_1.default)('orders', args.id, TRIGGER, flags);
10
+ const res = await this.executeAction('orders', args.id, TRIGGER, flags);
12
11
  if (flags.print)
13
12
  this.printOutput(res, flags);
14
13
  this.successMessage('order', TRIGGER, res.id);