@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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class StockReservationPending 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 stock_reservations_1 = require("../../triggers/stock_reservations");
|
|
6
|
+
const TRIGGER = 'pending';
|
|
7
|
+
class StockReservationPending extends base_1.default {
|
|
8
|
+
async run() {
|
|
9
|
+
const { args, flags } = await this.parse(StockReservationPending);
|
|
10
|
+
const res = await this.executeAction('stock_reservations', args.id, TRIGGER, flags);
|
|
11
|
+
if (flags.print)
|
|
12
|
+
this.printOutput(res, flags);
|
|
13
|
+
this.successMessage('stock_reservation', TRIGGER, res.id);
|
|
14
|
+
return res;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
StockReservationPending.description = stock_reservations_1.triggers[TRIGGER].description;
|
|
18
|
+
StockReservationPending.flags = {};
|
|
19
|
+
StockReservationPending.args = Object.assign({}, base_1.default.args);
|
|
20
|
+
exports.default = StockReservationPending;
|
|
@@ -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 stock_transfers_1 = require("../../triggers/stock_transfers");
|
|
7
6
|
const TRIGGER = 'cancel';
|
|
8
7
|
class StockTransferCancel extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(StockTransferCancel);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('stock_transfers', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('stock_transfer', 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 stock_transfers_1 = require("../../triggers/stock_transfers");
|
|
7
6
|
const TRIGGER = 'complete';
|
|
8
7
|
class StockTransferComplete extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(StockTransferComplete);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('stock_transfers', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('stock_transfer', 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 stock_transfers_1 = require("../../triggers/stock_transfers");
|
|
7
6
|
const TRIGGER = 'in_transit';
|
|
8
7
|
class StockTransferInTransit extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(StockTransferInTransit);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('stock_transfers', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('stock_transfer', TRIGGER, res.id);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class StockTransferOnHold 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 stock_transfers_1 = require("../../triggers/stock_transfers");
|
|
6
|
+
const TRIGGER = 'on_hold';
|
|
7
|
+
class StockTransferOnHold extends base_1.default {
|
|
8
|
+
async run() {
|
|
9
|
+
const { args, flags } = await this.parse(StockTransferOnHold);
|
|
10
|
+
const res = await this.executeAction('stock_transfers', args.id, TRIGGER, flags);
|
|
11
|
+
if (flags.print)
|
|
12
|
+
this.printOutput(res, flags);
|
|
13
|
+
this.successMessage('stock_transfer', TRIGGER, res.id);
|
|
14
|
+
return res;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
StockTransferOnHold.description = stock_transfers_1.triggers[TRIGGER].description;
|
|
18
|
+
StockTransferOnHold.flags = {};
|
|
19
|
+
StockTransferOnHold.args = Object.assign({}, base_1.default.args);
|
|
20
|
+
exports.default = StockTransferOnHold;
|
|
@@ -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 stock_transfers_1 = require("../../triggers/stock_transfers");
|
|
7
6
|
const TRIGGER = 'picking';
|
|
8
7
|
class StockTransferPicking extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(StockTransferPicking);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('stock_transfers', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('stock_transfer', 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 stock_transfers_1 = require("../../triggers/stock_transfers");
|
|
7
6
|
const TRIGGER = 'upcoming';
|
|
8
7
|
class StockTransferUpcoming extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(StockTransferUpcoming);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('stock_transfers', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('stock_transfer', 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 stripe_payments_1 = require("../../triggers/stripe_payments");
|
|
7
6
|
const TRIGGER = 'refresh';
|
|
8
7
|
class StripePaymentRefresh extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(StripePaymentRefresh);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('stripe_payments', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('stripe_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 stripe_payments_1 = require("../../triggers/stripe_payments");
|
|
7
6
|
const TRIGGER = 'update';
|
|
8
7
|
class StripePaymentUpdate extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(StripePaymentUpdate);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('stripe_payments', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('stripe_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 webhooks_1 = require("../../triggers/webhooks");
|
|
7
6
|
const TRIGGER = 'reset_circuit';
|
|
8
7
|
class WebhookResetCircuit extends base_1.default {
|
|
9
8
|
async run() {
|
|
10
9
|
const { args, flags } = await this.parse(WebhookResetCircuit);
|
|
11
|
-
const res = await
|
|
10
|
+
const res = await this.executeAction('webhooks', args.id, TRIGGER, flags);
|
|
12
11
|
if (flags.print)
|
|
13
12
|
this.printOutput(res, flags);
|
|
14
13
|
this.successMessage('webhook', TRIGGER, res.id);
|
package/lib/exec.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { type Config } from '@oclif/core/lib/interfaces';
|
|
2
|
+
declare const exec: (resourceType: string, id: string, action: string, flags: any, fields?: string[], config?: Config) => Promise<any>;
|
|
3
|
+
export default exec;
|
package/lib/exec.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
const cli_core_1 = require("@commercelayer/cli-core");
|
|
4
5
|
const sdk_1 = tslib_1.__importStar(require("@commercelayer/sdk"));
|
|
5
|
-
const commercelayerInit = (flags) => {
|
|
6
|
+
const commercelayerInit = (flags, config) => {
|
|
6
7
|
const organization = flags.organization;
|
|
7
8
|
const domain = flags.domain;
|
|
8
9
|
const accessToken = flags.accessToken;
|
|
10
|
+
const userAgent = config ? cli_core_1.clUtil.userAgent(config) : undefined;
|
|
9
11
|
return (0, sdk_1.default)({
|
|
10
12
|
organization,
|
|
11
13
|
domain,
|
|
12
14
|
accessToken,
|
|
15
|
+
userAgent
|
|
13
16
|
});
|
|
14
17
|
};
|
|
15
|
-
const
|
|
16
|
-
const cl = commercelayerInit(flags);
|
|
18
|
+
const exec = async (resourceType, id, action, flags, fields, config) => {
|
|
19
|
+
const cl = commercelayerInit(flags, config);
|
|
17
20
|
const res = { id };
|
|
18
21
|
const trigger = `_${action}`;
|
|
19
22
|
res[trigger] = flags.value || true;
|
|
@@ -31,4 +34,4 @@ const executeAction = async (resourceType, id, action, flags, fields) => {
|
|
|
31
34
|
});
|
|
32
35
|
return result;
|
|
33
36
|
};
|
|
34
|
-
exports.default =
|
|
37
|
+
exports.default = exec;
|
|
@@ -5,7 +5,7 @@ exports.triggers = {
|
|
|
5
5
|
external_price: {
|
|
6
6
|
action: 'external_price',
|
|
7
7
|
trigger: '_external_price',
|
|
8
|
-
description: 'When creating or updating a new line item, set this attribute to \'1\' if you want to inject the unit_amount_cents price from an external source.',
|
|
8
|
+
description: 'When creating or updating a new line item, set this attribute to \'1\' if you want to inject the unit_amount_cents price from an external source. Any successive price computation will be done externally, until the attribute is reset to \'0\'.',
|
|
9
9
|
},
|
|
10
10
|
reserve_stock: {
|
|
11
11
|
action: 'reserve_stock',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Trigger } from '../common';
|
|
2
2
|
export declare const triggers: Record<string, Trigger>;
|
|
3
|
-
export type ActionType = 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'ship' | 'get_rates' | 'purchase';
|
|
3
|
+
export type ActionType = 'upcoming' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'ship' | 'reserve_stock' | 'release_stock' | 'decrement_stock' | 'get_rates' | 'purchase';
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.triggers = void 0;
|
|
4
4
|
exports.triggers = {
|
|
5
|
+
upcoming: {
|
|
6
|
+
action: 'upcoming',
|
|
7
|
+
trigger: '_upcoming',
|
|
8
|
+
description: 'Send this attribute if you want to mark this shipment as upcoming.',
|
|
9
|
+
},
|
|
5
10
|
on_hold: {
|
|
6
11
|
action: 'on_hold',
|
|
7
12
|
trigger: '_on_hold',
|
|
@@ -27,6 +32,21 @@ exports.triggers = {
|
|
|
27
32
|
trigger: '_ship',
|
|
28
33
|
description: 'Send this attribute if you want to mark this shipment as shipped.',
|
|
29
34
|
},
|
|
35
|
+
reserve_stock: {
|
|
36
|
+
action: 'reserve_stock',
|
|
37
|
+
trigger: '_reserve_stock',
|
|
38
|
+
description: 'Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress.',
|
|
39
|
+
},
|
|
40
|
+
release_stock: {
|
|
41
|
+
action: 'release_stock',
|
|
42
|
+
trigger: '_release_stock',
|
|
43
|
+
description: 'Send this attribute if you want to automatically release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress.',
|
|
44
|
+
},
|
|
45
|
+
decrement_stock: {
|
|
46
|
+
action: 'decrement_stock',
|
|
47
|
+
trigger: '_decrement_stock',
|
|
48
|
+
description: 'Send this attribute if you want to automatically decrement and release the stock for each of the associated stock line item. Can be done only when fulfillment is in progress.',
|
|
49
|
+
},
|
|
30
50
|
get_rates: {
|
|
31
51
|
action: 'get_rates',
|
|
32
52
|
trigger: '_get_rates',
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggers = void 0;
|
|
4
|
+
exports.triggers = {
|
|
5
|
+
pending: {
|
|
6
|
+
action: 'pending',
|
|
7
|
+
trigger: '_pending',
|
|
8
|
+
description: 'Send this attribute if you want to mark this stock reservation as pending.',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Trigger } from '../common';
|
|
2
2
|
export declare const triggers: Record<string, Trigger>;
|
|
3
|
-
export type ActionType = 'upcoming' | 'picking' | 'in_transit' | 'complete' | 'cancel';
|
|
3
|
+
export type ActionType = 'upcoming' | 'on_hold' | 'picking' | 'in_transit' | 'complete' | 'cancel';
|
|
@@ -7,6 +7,11 @@ exports.triggers = {
|
|
|
7
7
|
trigger: '_upcoming',
|
|
8
8
|
description: 'Send this attribute if you want to mark this stock transfer as upcoming.',
|
|
9
9
|
},
|
|
10
|
+
on_hold: {
|
|
11
|
+
action: 'on_hold',
|
|
12
|
+
trigger: '_on_hold',
|
|
13
|
+
description: 'Send this attribute if you want to put this stock transfer on hold.',
|
|
14
|
+
},
|
|
10
15
|
picking: {
|
|
11
16
|
action: 'picking',
|
|
12
17
|
trigger: '_picking',
|