@commercelayer/cli-plugin-triggers 3.14.0 → 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.
- package/README.md +167 -2
- package/lib/base.d.ts +1 -0
- package/lib/base.js +5 -0
- package/lib/commands/adyen_payment/details.js +1 -2
- package/lib/commands/authorization/capture.js +1 -2
- package/lib/commands/authorization/capture_amount_cents.js +1 -2
- package/lib/commands/authorization/void.js +1 -2
- package/lib/commands/axerve_payment/update.js +1 -2
- package/lib/commands/bundle/compute_compare_at_amount.js +1 -2
- package/lib/commands/bundle/compute_price_amount.js +1 -2
- package/lib/commands/buy_x_pay_y_promotion/disable.js +1 -2
- package/lib/commands/buy_x_pay_y_promotion/enable.js +1 -2
- package/lib/commands/capture/refund.js +1 -2
- package/lib/commands/capture/refund_amount_cents.js +1 -2
- package/lib/commands/checkout_com_payment/details.js +1 -2
- package/lib/commands/checkout_com_payment/refresh.js +1 -2
- package/lib/commands/customer_password_reset/reset_password_token.js +1 -2
- package/lib/commands/external_promotion/disable.js +1 -2
- package/lib/commands/external_promotion/enable.js +1 -2
- package/lib/commands/fixed_amount_promotion/disable.js +1 -2
- package/lib/commands/fixed_amount_promotion/enable.js +1 -2
- package/lib/commands/fixed_price_promotion/disable.js +1 -2
- package/lib/commands/fixed_price_promotion/enable.js +1 -2
- package/lib/commands/free_gift_promotion/disable.js +1 -2
- package/lib/commands/free_gift_promotion/enable.js +1 -2
- package/lib/commands/free_shipping_promotion/disable.js +1 -2
- package/lib/commands/free_shipping_promotion/enable.js +1 -2
- package/lib/commands/gift_card/activate.js +1 -2
- package/lib/commands/gift_card/balance_change_cents.js +1 -2
- package/lib/commands/gift_card/deactivate.js +1 -2
- package/lib/commands/gift_card/purchase.js +1 -2
- package/lib/commands/in_stock_subscription/activate.js +1 -2
- package/lib/commands/in_stock_subscription/deactivate.js +1 -2
- package/lib/commands/klarna_payment/update.js +1 -2
- package/lib/commands/line_item/external_price.js +1 -2
- package/lib/commands/line_item/reserve_stock.js +1 -2
- package/lib/commands/market/disable.js +1 -2
- package/lib/commands/market/enable.js +1 -2
- package/lib/commands/order/approve.js +1 -2
- package/lib/commands/order/approve_and_capture.js +1 -2
- package/lib/commands/order/archive.js +1 -2
- package/lib/commands/order/authorization_amount_cents.js +1 -2
- package/lib/commands/order/authorize.js +1 -2
- package/lib/commands/order/billing_address_clone_id.js +1 -2
- package/lib/commands/order/billing_address_same_as_shipping.js +1 -2
- package/lib/commands/order/cancel.js +1 -2
- package/lib/commands/order/capture.js +1 -2
- package/lib/commands/order/commit_invoice.js +1 -2
- package/lib/commands/order/create_subscriptions.js +1 -2
- package/lib/commands/order/customer_payment_source_id.js +1 -2
- package/lib/commands/order/nullify_payment_source.js +1 -2
- package/lib/commands/order/place.js +1 -2
- package/lib/commands/order/refresh.js +1 -2
- package/lib/commands/order/refund.js +1 -2
- package/lib/commands/order/refund_invoice.js +1 -2
- package/lib/commands/order/save_billing_address_to_customer_address_book.js +1 -2
- package/lib/commands/order/save_payment_source_to_customer_wallet.js +1 -2
- package/lib/commands/order/save_shipping_address_to_customer_address_book.js +1 -2
- package/lib/commands/order/shipping_address_clone_id.js +1 -2
- package/lib/commands/order/shipping_address_same_as_billing.js +1 -2
- package/lib/commands/order/start_editing.js +1 -2
- package/lib/commands/order/stop_editing.js +1 -2
- package/lib/commands/order/unarchive.js +1 -2
- package/lib/commands/order/update_taxes.js +1 -2
- package/lib/commands/order/validate.js +1 -2
- package/lib/commands/order_subscription/activate.js +1 -2
- package/lib/commands/order_subscription/cancel.js +1 -2
- package/lib/commands/order_subscription/deactivate.js +1 -2
- package/lib/commands/payment_method/disable.js +1 -2
- package/lib/commands/payment_method/enable.js +1 -2
- package/lib/commands/percentage_discount_promotion/disable.js +1 -2
- package/lib/commands/percentage_discount_promotion/enable.js +1 -2
- package/lib/commands/return/approve.js +1 -2
- package/lib/commands/return/archive.js +1 -2
- package/lib/commands/return/cancel.js +1 -2
- package/lib/commands/return/receive.js +1 -2
- package/lib/commands/return/reject.js +1 -2
- package/lib/commands/return/request.js +1 -2
- package/lib/commands/return/restock.js +1 -2
- package/lib/commands/return/ship.js +1 -2
- package/lib/commands/return/unarchive.js +1 -2
- package/lib/commands/return_line_item/restock.js +1 -2
- package/lib/commands/satispay_payment/refresh.js +1 -2
- package/lib/commands/shipment/decrement_stock.d.ts +9 -0
- package/lib/commands/shipment/decrement_stock.js +20 -0
- package/lib/commands/shipment/get_rates.js +1 -2
- package/lib/commands/shipment/on_hold.js +1 -2
- package/lib/commands/shipment/packing.js +1 -2
- package/lib/commands/shipment/picking.js +1 -2
- package/lib/commands/shipment/purchase.js +1 -2
- package/lib/commands/shipment/ready_to_ship.js +1 -2
- package/lib/commands/shipment/release_stock.d.ts +9 -0
- package/lib/commands/shipment/release_stock.js +20 -0
- package/lib/commands/shipment/reserve_stock.d.ts +9 -0
- package/lib/commands/shipment/reserve_stock.js +20 -0
- package/lib/commands/shipment/ship.js +1 -2
- package/lib/commands/shipment/upcoming.d.ts +9 -0
- package/lib/commands/shipment/upcoming.js +20 -0
- package/lib/commands/shipping_method/disable.js +1 -2
- package/lib/commands/shipping_method/enable.js +1 -2
- package/lib/commands/stock_reservation/index.d.ts +9 -0
- package/lib/commands/stock_reservation/index.js +38 -0
- package/lib/commands/stock_reservation/pending.d.ts +9 -0
- package/lib/commands/stock_reservation/pending.js +20 -0
- package/lib/commands/stock_transfer/cancel.js +1 -2
- package/lib/commands/stock_transfer/complete.js +1 -2
- package/lib/commands/stock_transfer/in_transit.js +1 -2
- package/lib/commands/stock_transfer/on_hold.d.ts +9 -0
- package/lib/commands/stock_transfer/on_hold.js +20 -0
- package/lib/commands/stock_transfer/picking.js +1 -2
- package/lib/commands/stock_transfer/upcoming.js +1 -2
- package/lib/commands/stripe_payment/refresh.js +1 -2
- package/lib/commands/stripe_payment/update.js +1 -2
- package/lib/commands/webhook/reset_circuit.js +1 -2
- package/lib/exec.d.ts +3 -2
- package/lib/exec.js +7 -4
- package/lib/triggers/line_items.js +1 -1
- package/lib/triggers/shipments.d.ts +1 -1
- package/lib/triggers/shipments.js +20 -0
- package/lib/triggers/stock_reservations.d.ts +3 -0
- package/lib/triggers/stock_reservations.js +10 -0
- package/lib/triggers/stock_transfers.d.ts +1 -1
- package/lib/triggers/stock_transfers.js +5 -0
- package/oclif.manifest.json +6889 -4364
- package/package.json +11 -11
|
@@ -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 free_shipping_promotions_1 = require("../../triggers/free_shipping_promotions");
|
|
7
6
|
const TRIGGER = 'enable';
|
|
8
7
|
class FreeShippingPromotionEnable extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(FreeShippingPromotionEnable);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('free_shipping_promotions', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('free_shipping_promotion', 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 = '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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 = 'customer_payment_source_id';
|
|
8
7
|
class OrderCustomerPaymentSourceId extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderCustomerPaymentSourceId);
|
|
11
|
-
const res = await
|
|
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 = 'nullify_payment_source';
|
|
8
7
|
class OrderNullifyPaymentSource extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderNullifyPaymentSource);
|
|
11
|
-
const res = await
|
|
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 = 'place';
|
|
8
7
|
class OrderPlace extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderPlace);
|
|
11
|
-
const res = await
|
|
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 = 'refresh';
|
|
8
7
|
class OrderRefresh extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderRefresh);
|
|
11
|
-
const res = await
|
|
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 = 'refund';
|
|
8
7
|
class OrderRefund extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderRefund);
|
|
11
|
-
const res = await
|
|
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 = 'refund_invoice';
|
|
8
7
|
class OrderRefundInvoice extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderRefundInvoice);
|
|
11
|
-
const res = await
|
|
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 = 'save_billing_address_to_customer_address_book';
|
|
8
7
|
class OrderSaveBillingAddressToCustomerAddressBook extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderSaveBillingAddressToCustomerAddressBook);
|
|
11
|
-
const res = await
|
|
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 = 'save_payment_source_to_customer_wallet';
|
|
8
7
|
class OrderSavePaymentSourceToCustomerWallet extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderSavePaymentSourceToCustomerWallet);
|
|
11
|
-
const res = await
|
|
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 = 'save_shipping_address_to_customer_address_book';
|
|
8
7
|
class OrderSaveShippingAddressToCustomerAddressBook extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderSaveShippingAddressToCustomerAddressBook);
|
|
11
|
-
const res = await
|
|
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 = 'shipping_address_clone_id';
|
|
8
7
|
class OrderShippingAddressCloneId extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderShippingAddressCloneId);
|
|
11
|
-
const res = await
|
|
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 = 'shipping_address_same_as_billing';
|
|
8
7
|
class OrderShippingAddressSameAsBilling extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderShippingAddressSameAsBilling);
|
|
11
|
-
const res = await
|
|
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 = 'start_editing';
|
|
8
7
|
class OrderStartEditing extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderStartEditing);
|
|
11
|
-
const res = await
|
|
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 = 'stop_editing';
|
|
8
7
|
class OrderStopEditing extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderStopEditing);
|
|
11
|
-
const res = await
|
|
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 = 'unarchive';
|
|
8
7
|
class OrderUnarchive extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderUnarchive);
|
|
11
|
-
const res = await
|
|
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 = 'update_taxes';
|
|
8
7
|
class OrderUpdateTaxes extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(OrderUpdateTaxes);
|
|
11
|
-
const res = await
|
|
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);
|