@commercelayer/cli-plugin-triggers 4.1.0 → 4.3.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 +70 -0
- package/lib/base.js +1 -1
- package/lib/commands/order/fulfill.d.ts +9 -0
- package/lib/commands/order/fulfill.js +22 -0
- package/lib/commands/order_subscription/convert.d.ts +9 -0
- package/lib/commands/order_subscription/convert.js +22 -0
- package/lib/commands/shipment/deliver.d.ts +9 -0
- package/lib/commands/shipment/deliver.js +22 -0
- package/lib/exec.js +8 -4
- package/lib/triggers/order_subscriptions.d.ts +1 -1
- package/lib/triggers/order_subscriptions.js +5 -0
- package/lib/triggers/orders.d.ts +1 -1
- package/lib/triggers/orders.js +5 -0
- package/lib/triggers/shipments.d.ts +1 -1
- package/lib/triggers/shipments.js +5 -0
- package/oclif.manifest.json +292 -28
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -102,6 +102,7 @@ $ commercelayer plugins:install triggers
|
|
|
102
102
|
* [`commercelayer order:commit_invoice ID`](#commercelayer-ordercommit_invoice-id)
|
|
103
103
|
* [`commercelayer order:create_subscriptions ID`](#commercelayer-ordercreate_subscriptions-id)
|
|
104
104
|
* [`commercelayer order:customer_payment_source_id ID`](#commercelayer-ordercustomer_payment_source_id-id)
|
|
105
|
+
* [`commercelayer order:fulfill ID`](#commercelayer-orderfulfill-id)
|
|
105
106
|
* [`commercelayer order:nullify_payment_source ID`](#commercelayer-ordernullify_payment_source-id)
|
|
106
107
|
* [`commercelayer order:pending ID`](#commercelayer-orderpending-id)
|
|
107
108
|
* [`commercelayer order:place ID`](#commercelayer-orderplace-id)
|
|
@@ -122,6 +123,7 @@ $ commercelayer plugins:install triggers
|
|
|
122
123
|
* [`commercelayer order_subscription ID`](#commercelayer-order_subscription-id)
|
|
123
124
|
* [`commercelayer order_subscription:activate ID`](#commercelayer-order_subscriptionactivate-id)
|
|
124
125
|
* [`commercelayer order_subscription:cancel ID`](#commercelayer-order_subscriptioncancel-id)
|
|
126
|
+
* [`commercelayer order_subscription:convert ID`](#commercelayer-order_subscriptionconvert-id)
|
|
125
127
|
* [`commercelayer order_subscription:deactivate ID`](#commercelayer-order_subscriptiondeactivate-id)
|
|
126
128
|
* [`commercelayer payment_method ID`](#commercelayer-payment_method-id)
|
|
127
129
|
* [`commercelayer payment_method:disable ID`](#commercelayer-payment_methoddisable-id)
|
|
@@ -148,6 +150,7 @@ $ commercelayer plugins:install triggers
|
|
|
148
150
|
* [`commercelayer satispay_payment:refresh ID`](#commercelayer-satispay_paymentrefresh-id)
|
|
149
151
|
* [`commercelayer shipment ID`](#commercelayer-shipment-id)
|
|
150
152
|
* [`commercelayer shipment:decrement_stock ID`](#commercelayer-shipmentdecrement_stock-id)
|
|
153
|
+
* [`commercelayer shipment:deliver ID`](#commercelayer-shipmentdeliver-id)
|
|
151
154
|
* [`commercelayer shipment:get_rates ID`](#commercelayer-shipmentget_rates-id)
|
|
152
155
|
* [`commercelayer shipment:on_hold ID`](#commercelayer-shipmenton_hold-id)
|
|
153
156
|
* [`commercelayer shipment:packing ID`](#commercelayer-shipmentpacking-id)
|
|
@@ -1784,6 +1787,28 @@ DESCRIPTION
|
|
|
1784
1787
|
|
|
1785
1788
|
_See code: [src/commands/order/customer_payment_source_id.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order/customer_payment_source_id.ts)_
|
|
1786
1789
|
|
|
1790
|
+
### `commercelayer order:fulfill ID`
|
|
1791
|
+
|
|
1792
|
+
Send this attribute if you want to mark as fulfilled a shipped/delivered order.
|
|
1793
|
+
|
|
1794
|
+
```sh-session
|
|
1795
|
+
USAGE
|
|
1796
|
+
$ commercelayer order:fulfill ID [-u [-j -p]]
|
|
1797
|
+
|
|
1798
|
+
ARGUMENTS
|
|
1799
|
+
ID the unique id of the resource
|
|
1800
|
+
|
|
1801
|
+
FLAGS
|
|
1802
|
+
-j, --json print result in JSON format
|
|
1803
|
+
-p, --print print out the modified resource
|
|
1804
|
+
-u, --unformatted print JSON output without indentation
|
|
1805
|
+
|
|
1806
|
+
DESCRIPTION
|
|
1807
|
+
Send this attribute if you want to mark as fulfilled a shipped/delivered order.
|
|
1808
|
+
```
|
|
1809
|
+
|
|
1810
|
+
_See code: [src/commands/order/fulfill.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order/fulfill.ts)_
|
|
1811
|
+
|
|
1787
1812
|
### `commercelayer order:nullify_payment_source ID`
|
|
1788
1813
|
|
|
1789
1814
|
Send this attribute if you want to nullify the payment source for this order.
|
|
@@ -2232,6 +2257,29 @@ DESCRIPTION
|
|
|
2232
2257
|
|
|
2233
2258
|
_See code: [src/commands/order_subscription/cancel.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order_subscription/cancel.ts)_
|
|
2234
2259
|
|
|
2260
|
+
### `commercelayer order_subscription:convert ID`
|
|
2261
|
+
|
|
2262
|
+
Send this attribute if you want to convert a manual subscription to an automatic one. A subscription model is required before conversion.
|
|
2263
|
+
|
|
2264
|
+
```sh-session
|
|
2265
|
+
USAGE
|
|
2266
|
+
$ commercelayer order_subscription:convert ID [-u [-j -p]]
|
|
2267
|
+
|
|
2268
|
+
ARGUMENTS
|
|
2269
|
+
ID the unique id of the resource
|
|
2270
|
+
|
|
2271
|
+
FLAGS
|
|
2272
|
+
-j, --json print result in JSON format
|
|
2273
|
+
-p, --print print out the modified resource
|
|
2274
|
+
-u, --unformatted print JSON output without indentation
|
|
2275
|
+
|
|
2276
|
+
DESCRIPTION
|
|
2277
|
+
Send this attribute if you want to convert a manual subscription to an automatic one. A subscription model is required
|
|
2278
|
+
before conversion.
|
|
2279
|
+
```
|
|
2280
|
+
|
|
2281
|
+
_See code: [src/commands/order_subscription/convert.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order_subscription/convert.ts)_
|
|
2282
|
+
|
|
2235
2283
|
### `commercelayer order_subscription:deactivate ID`
|
|
2236
2284
|
|
|
2237
2285
|
Send this attribute if you want to mark this subscription as inactive.
|
|
@@ -2805,6 +2853,28 @@ DESCRIPTION
|
|
|
2805
2853
|
|
|
2806
2854
|
_See code: [src/commands/shipment/decrement_stock.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/shipment/decrement_stock.ts)_
|
|
2807
2855
|
|
|
2856
|
+
### `commercelayer shipment:deliver ID`
|
|
2857
|
+
|
|
2858
|
+
Send this attribute if you want to mark this shipment as delivered.
|
|
2859
|
+
|
|
2860
|
+
```sh-session
|
|
2861
|
+
USAGE
|
|
2862
|
+
$ commercelayer shipment:deliver ID [-u [-j -p]]
|
|
2863
|
+
|
|
2864
|
+
ARGUMENTS
|
|
2865
|
+
ID the unique id of the resource
|
|
2866
|
+
|
|
2867
|
+
FLAGS
|
|
2868
|
+
-j, --json print result in JSON format
|
|
2869
|
+
-p, --print print out the modified resource
|
|
2870
|
+
-u, --unformatted print JSON output without indentation
|
|
2871
|
+
|
|
2872
|
+
DESCRIPTION
|
|
2873
|
+
Send this attribute if you want to mark this shipment as delivered.
|
|
2874
|
+
```
|
|
2875
|
+
|
|
2876
|
+
_See code: [src/commands/shipment/deliver.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/shipment/deliver.ts)_
|
|
2877
|
+
|
|
2808
2878
|
### `commercelayer shipment:get_rates ID`
|
|
2809
2879
|
|
|
2810
2880
|
Send this attribute if you want get the shipping rates from the associated carrier accounts.
|
package/lib/base.js
CHANGED
|
@@ -88,7 +88,7 @@ class default_1 extends core_1.Command {
|
|
|
88
88
|
this.log(cli_core_1.clOutput.formatOutput(res, flags));
|
|
89
89
|
}
|
|
90
90
|
successMessage(resource, action, id) {
|
|
91
|
-
this.log(`\nAction ${cli_core_1.clColor.api.trigger(action)} executed without errors on ${
|
|
91
|
+
this.log(`\nAction ${cli_core_1.clColor.api.trigger(action)} executed without errors on ${cli_core_1.clApi.humanizeResource(resource)} ${cli_core_1.clColor.api.id(id)}\n`);
|
|
92
92
|
}
|
|
93
93
|
async executeAction(resourceType, id, action, flags, fields) {
|
|
94
94
|
return await (0, exec_1.default)(resourceType, id, action, flags, fields, this.config);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class OrderFulfill extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const orders_1 = require("../../triggers/orders");
|
|
6
|
+
const TRIGGER = 'fulfill';
|
|
7
|
+
class OrderFulfill extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(OrderFulfill);
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('order', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = OrderFulfill;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class OrderSubscriptionConvert extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const order_subscriptions_1 = require("../../triggers/order_subscriptions");
|
|
6
|
+
const TRIGGER = 'convert';
|
|
7
|
+
class OrderSubscriptionConvert extends base_1.default {
|
|
8
|
+
static description = order_subscriptions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(OrderSubscriptionConvert);
|
|
15
|
+
const res = await this.executeAction('order_subscriptions', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('order_subscription', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = OrderSubscriptionConvert;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class ShipmentDeliver extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const shipments_1 = require("../../triggers/shipments");
|
|
6
|
+
const TRIGGER = 'deliver';
|
|
7
|
+
class ShipmentDeliver extends base_1.default {
|
|
8
|
+
static description = shipments_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(ShipmentDeliver);
|
|
15
|
+
const res = await this.executeAction('shipments', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('shipment', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = ShipmentDeliver;
|
package/lib/exec.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const cli_core_1 = require("@commercelayer/cli-core");
|
|
5
5
|
const sdk_1 = tslib_1.__importStar(require("@commercelayer/sdk"));
|
|
6
|
+
const errors_1 = require("@oclif/core/lib/errors");
|
|
6
7
|
const commercelayerInit = (flags, config) => {
|
|
7
8
|
const organization = flags.organization;
|
|
8
9
|
const domain = flags.domain;
|
|
@@ -17,15 +18,18 @@ const commercelayerInit = (flags, config) => {
|
|
|
17
18
|
};
|
|
18
19
|
const exec = async (resourceType, id, action, flags, fields, config) => {
|
|
19
20
|
const cl = commercelayerInit(flags, config);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const resSdk = cl[resourceType];
|
|
22
|
+
await cl.orders.retrieve(id).catch(err => {
|
|
23
|
+
const resource = cli_core_1.clApi.humanizeResource(cli_core_1.clText.singularize(resourceType));
|
|
24
|
+
if (cl.isApiError(err) && (err.status === 404))
|
|
25
|
+
throw new errors_1.CLIError(`Invalid ${resource} or ${resource} not found: ${cli_core_1.clColor.msg.error(id)}`);
|
|
26
|
+
});
|
|
27
|
+
const res = { id, [`_${action}`]: flags.value || true };
|
|
23
28
|
const params = {};
|
|
24
29
|
if (fields && (fields.length > 0)) {
|
|
25
30
|
params.fields = {};
|
|
26
31
|
params.fields[resourceType] = fields;
|
|
27
32
|
}
|
|
28
|
-
const resSdk = cl[resourceType];
|
|
29
33
|
const result = resSdk.update(res, params).catch((error) => {
|
|
30
34
|
if (sdk_1.CommerceLayerStatic.isApiError(error))
|
|
31
35
|
error.code = `RES_${resourceType}_${id}`;
|
|
@@ -17,4 +17,9 @@ exports.triggers = {
|
|
|
17
17
|
trigger: '_cancel',
|
|
18
18
|
description: 'Send this attribute if you want to mark this subscription as cancelled.',
|
|
19
19
|
},
|
|
20
|
+
convert: {
|
|
21
|
+
action: 'convert',
|
|
22
|
+
trigger: '_convert',
|
|
23
|
+
description: 'Send this attribute if you want to convert a manual subscription to an automatic one. A subscription model is required before conversion.',
|
|
24
|
+
},
|
|
20
25
|
};
|
package/lib/triggers/orders.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Trigger } from '../common';
|
|
2
2
|
export declare const triggers: Record<string, Trigger>;
|
|
3
|
-
export type ActionType = 'archive' | 'unarchive' | 'pending' | 'place' | 'cancel' | 'approve' | 'approve_and_capture' | 'authorize' | 'authorization_amount_cents' | 'capture' | 'refund' | 'update_taxes' | 'nullify_payment_source' | 'billing_address_clone_id' | 'shipping_address_clone_id' | 'customer_payment_source_id' | 'shipping_address_same_as_billing' | 'billing_address_same_as_shipping' | 'commit_invoice' | 'refund_invoice' | 'save_payment_source_to_customer_wallet' | 'save_shipping_address_to_customer_address_book' | 'save_billing_address_to_customer_address_book' | 'refresh' | 'validate' | 'create_subscriptions' | 'start_editing' | 'stop_editing' | 'reset_circuit';
|
|
3
|
+
export type ActionType = 'archive' | 'unarchive' | 'pending' | 'place' | 'cancel' | 'approve' | 'approve_and_capture' | 'authorize' | 'authorization_amount_cents' | 'capture' | 'refund' | 'fulfill' | 'update_taxes' | 'nullify_payment_source' | 'billing_address_clone_id' | 'shipping_address_clone_id' | 'customer_payment_source_id' | 'shipping_address_same_as_billing' | 'billing_address_same_as_shipping' | 'commit_invoice' | 'refund_invoice' | 'save_payment_source_to_customer_wallet' | 'save_shipping_address_to_customer_address_book' | 'save_billing_address_to_customer_address_book' | 'refresh' | 'validate' | 'create_subscriptions' | 'start_editing' | 'stop_editing' | 'reset_circuit';
|
package/lib/triggers/orders.js
CHANGED
|
@@ -57,6 +57,11 @@ exports.triggers = {
|
|
|
57
57
|
trigger: '_refund',
|
|
58
58
|
description: 'Send this attribute if you want to refund a captured order.',
|
|
59
59
|
},
|
|
60
|
+
fulfill: {
|
|
61
|
+
action: 'fulfill',
|
|
62
|
+
trigger: '_fulfill',
|
|
63
|
+
description: 'Send this attribute if you want to mark as fulfilled a shipped/delivered order.',
|
|
64
|
+
},
|
|
60
65
|
update_taxes: {
|
|
61
66
|
action: 'update_taxes',
|
|
62
67
|
trigger: '_update_taxes',
|
|
@@ -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' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'ship' | 'reserve_stock' | 'release_stock' | 'decrement_stock' | 'get_rates' | 'purchase';
|
|
3
|
+
export type ActionType = 'upcoming' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'ship' | 'deliver' | 'reserve_stock' | 'release_stock' | 'decrement_stock' | 'get_rates' | 'purchase';
|
|
@@ -32,6 +32,11 @@ exports.triggers = {
|
|
|
32
32
|
trigger: '_ship',
|
|
33
33
|
description: 'Send this attribute if you want to mark this shipment as shipped.',
|
|
34
34
|
},
|
|
35
|
+
deliver: {
|
|
36
|
+
action: 'deliver',
|
|
37
|
+
trigger: '_deliver',
|
|
38
|
+
description: 'Send this attribute if you want to mark this shipment as delivered.',
|
|
39
|
+
},
|
|
35
40
|
reserve_stock: {
|
|
36
41
|
action: 'reserve_stock',
|
|
37
42
|
trigger: '_reserve_stock',
|
package/oclif.manifest.json
CHANGED
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"index.js"
|
|
197
197
|
]
|
|
198
198
|
},
|
|
199
|
-
"
|
|
199
|
+
"axerve_payment": {
|
|
200
200
|
"aliases": [],
|
|
201
201
|
"args": {
|
|
202
202
|
"id": {
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"required": true
|
|
206
206
|
}
|
|
207
207
|
},
|
|
208
|
-
"description": "
|
|
208
|
+
"description": "execute an action on a resource of type axerve_payments",
|
|
209
209
|
"flags": {
|
|
210
210
|
"organization": {
|
|
211
211
|
"char": "o",
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
},
|
|
271
271
|
"hasDynamicHelp": false,
|
|
272
272
|
"hiddenAliases": [],
|
|
273
|
-
"id": "
|
|
273
|
+
"id": "axerve_payment",
|
|
274
274
|
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
275
275
|
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
276
276
|
"pluginType": "core",
|
|
@@ -280,11 +280,11 @@
|
|
|
280
280
|
"relativePath": [
|
|
281
281
|
"lib",
|
|
282
282
|
"commands",
|
|
283
|
-
"
|
|
284
|
-
"
|
|
283
|
+
"axerve_payment",
|
|
284
|
+
"index.js"
|
|
285
285
|
]
|
|
286
286
|
},
|
|
287
|
-
"
|
|
287
|
+
"axerve_payment:update": {
|
|
288
288
|
"aliases": [],
|
|
289
289
|
"args": {
|
|
290
290
|
"id": {
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"required": true
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
|
-
"description": "
|
|
296
|
+
"description": "Send this attribute if you want to update the payment with fresh order data.",
|
|
297
297
|
"flags": {
|
|
298
298
|
"organization": {
|
|
299
299
|
"char": "o",
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
},
|
|
359
359
|
"hasDynamicHelp": false,
|
|
360
360
|
"hiddenAliases": [],
|
|
361
|
-
"id": "
|
|
361
|
+
"id": "axerve_payment:update",
|
|
362
362
|
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
363
363
|
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
364
364
|
"pluginType": "core",
|
|
@@ -368,11 +368,11 @@
|
|
|
368
368
|
"relativePath": [
|
|
369
369
|
"lib",
|
|
370
370
|
"commands",
|
|
371
|
-
"
|
|
372
|
-
"
|
|
371
|
+
"axerve_payment",
|
|
372
|
+
"update.js"
|
|
373
373
|
]
|
|
374
374
|
},
|
|
375
|
-
"authorization": {
|
|
375
|
+
"authorization:capture": {
|
|
376
376
|
"aliases": [],
|
|
377
377
|
"args": {
|
|
378
378
|
"id": {
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
"required": true
|
|
382
382
|
}
|
|
383
383
|
},
|
|
384
|
-
"description": "
|
|
384
|
+
"description": "Send this attribute if you want to create a capture for this authorization.",
|
|
385
385
|
"flags": {
|
|
386
386
|
"organization": {
|
|
387
387
|
"char": "o",
|
|
@@ -446,7 +446,7 @@
|
|
|
446
446
|
},
|
|
447
447
|
"hasDynamicHelp": false,
|
|
448
448
|
"hiddenAliases": [],
|
|
449
|
-
"id": "authorization",
|
|
449
|
+
"id": "authorization:capture",
|
|
450
450
|
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
451
451
|
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
452
452
|
"pluginType": "core",
|
|
@@ -457,10 +457,10 @@
|
|
|
457
457
|
"lib",
|
|
458
458
|
"commands",
|
|
459
459
|
"authorization",
|
|
460
|
-
"
|
|
460
|
+
"capture.js"
|
|
461
461
|
]
|
|
462
462
|
},
|
|
463
|
-
"authorization:
|
|
463
|
+
"authorization:capture_amount_cents": {
|
|
464
464
|
"aliases": [],
|
|
465
465
|
"args": {
|
|
466
466
|
"id": {
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
"required": true
|
|
470
470
|
}
|
|
471
471
|
},
|
|
472
|
-
"description": "
|
|
472
|
+
"description": "The associated capture amount, in cents.",
|
|
473
473
|
"flags": {
|
|
474
474
|
"organization": {
|
|
475
475
|
"char": "o",
|
|
@@ -534,7 +534,7 @@
|
|
|
534
534
|
},
|
|
535
535
|
"hasDynamicHelp": false,
|
|
536
536
|
"hiddenAliases": [],
|
|
537
|
-
"id": "authorization:
|
|
537
|
+
"id": "authorization:capture_amount_cents",
|
|
538
538
|
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
539
539
|
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
540
540
|
"pluginType": "core",
|
|
@@ -545,10 +545,10 @@
|
|
|
545
545
|
"lib",
|
|
546
546
|
"commands",
|
|
547
547
|
"authorization",
|
|
548
|
-
"
|
|
548
|
+
"capture_amount_cents.js"
|
|
549
549
|
]
|
|
550
550
|
},
|
|
551
|
-
"
|
|
551
|
+
"authorization": {
|
|
552
552
|
"aliases": [],
|
|
553
553
|
"args": {
|
|
554
554
|
"id": {
|
|
@@ -557,7 +557,7 @@
|
|
|
557
557
|
"required": true
|
|
558
558
|
}
|
|
559
559
|
},
|
|
560
|
-
"description": "execute an action on a resource of type
|
|
560
|
+
"description": "execute an action on a resource of type authorizations",
|
|
561
561
|
"flags": {
|
|
562
562
|
"organization": {
|
|
563
563
|
"char": "o",
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
},
|
|
623
623
|
"hasDynamicHelp": false,
|
|
624
624
|
"hiddenAliases": [],
|
|
625
|
-
"id": "
|
|
625
|
+
"id": "authorization",
|
|
626
626
|
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
627
627
|
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
628
628
|
"pluginType": "core",
|
|
@@ -632,11 +632,11 @@
|
|
|
632
632
|
"relativePath": [
|
|
633
633
|
"lib",
|
|
634
634
|
"commands",
|
|
635
|
-
"
|
|
635
|
+
"authorization",
|
|
636
636
|
"index.js"
|
|
637
637
|
]
|
|
638
638
|
},
|
|
639
|
-
"
|
|
639
|
+
"authorization:void": {
|
|
640
640
|
"aliases": [],
|
|
641
641
|
"args": {
|
|
642
642
|
"id": {
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
"required": true
|
|
646
646
|
}
|
|
647
647
|
},
|
|
648
|
-
"description": "Send this attribute if you want to
|
|
648
|
+
"description": "Send this attribute if you want to create a void for this authorization.",
|
|
649
649
|
"flags": {
|
|
650
650
|
"organization": {
|
|
651
651
|
"char": "o",
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
},
|
|
711
711
|
"hasDynamicHelp": false,
|
|
712
712
|
"hiddenAliases": [],
|
|
713
|
-
"id": "
|
|
713
|
+
"id": "authorization:void",
|
|
714
714
|
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
715
715
|
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
716
716
|
"pluginType": "core",
|
|
@@ -720,8 +720,8 @@
|
|
|
720
720
|
"relativePath": [
|
|
721
721
|
"lib",
|
|
722
722
|
"commands",
|
|
723
|
-
"
|
|
724
|
-
"
|
|
723
|
+
"authorization",
|
|
724
|
+
"void.js"
|
|
725
725
|
]
|
|
726
726
|
},
|
|
727
727
|
"bundle:compute_compare_at_amount": {
|
|
@@ -6286,6 +6286,94 @@
|
|
|
6286
6286
|
"customer_payment_source_id.js"
|
|
6287
6287
|
]
|
|
6288
6288
|
},
|
|
6289
|
+
"order:fulfill": {
|
|
6290
|
+
"aliases": [],
|
|
6291
|
+
"args": {
|
|
6292
|
+
"id": {
|
|
6293
|
+
"description": "the unique id of the resource",
|
|
6294
|
+
"name": "id",
|
|
6295
|
+
"required": true
|
|
6296
|
+
}
|
|
6297
|
+
},
|
|
6298
|
+
"description": "Send this attribute if you want to mark as fulfilled a shipped/delivered order.",
|
|
6299
|
+
"flags": {
|
|
6300
|
+
"organization": {
|
|
6301
|
+
"char": "o",
|
|
6302
|
+
"description": "the slug of your organization",
|
|
6303
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
6304
|
+
"hidden": true,
|
|
6305
|
+
"name": "organization",
|
|
6306
|
+
"required": true,
|
|
6307
|
+
"hasDynamicHelp": false,
|
|
6308
|
+
"multiple": false,
|
|
6309
|
+
"type": "option"
|
|
6310
|
+
},
|
|
6311
|
+
"domain": {
|
|
6312
|
+
"char": "d",
|
|
6313
|
+
"dependsOn": [
|
|
6314
|
+
"organization"
|
|
6315
|
+
],
|
|
6316
|
+
"env": "CL_CLI_DOMAIN",
|
|
6317
|
+
"hidden": true,
|
|
6318
|
+
"name": "domain",
|
|
6319
|
+
"required": false,
|
|
6320
|
+
"hasDynamicHelp": false,
|
|
6321
|
+
"multiple": false,
|
|
6322
|
+
"type": "option"
|
|
6323
|
+
},
|
|
6324
|
+
"accessToken": {
|
|
6325
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
6326
|
+
"hidden": true,
|
|
6327
|
+
"name": "accessToken",
|
|
6328
|
+
"required": true,
|
|
6329
|
+
"hasDynamicHelp": false,
|
|
6330
|
+
"multiple": false,
|
|
6331
|
+
"type": "option"
|
|
6332
|
+
},
|
|
6333
|
+
"print": {
|
|
6334
|
+
"char": "p",
|
|
6335
|
+
"description": "print out the modified resource",
|
|
6336
|
+
"name": "print",
|
|
6337
|
+
"allowNo": false,
|
|
6338
|
+
"type": "boolean"
|
|
6339
|
+
},
|
|
6340
|
+
"json": {
|
|
6341
|
+
"char": "j",
|
|
6342
|
+
"dependsOn": [
|
|
6343
|
+
"print"
|
|
6344
|
+
],
|
|
6345
|
+
"description": "print result in JSON format",
|
|
6346
|
+
"name": "json",
|
|
6347
|
+
"allowNo": false,
|
|
6348
|
+
"type": "boolean"
|
|
6349
|
+
},
|
|
6350
|
+
"unformatted": {
|
|
6351
|
+
"char": "u",
|
|
6352
|
+
"dependsOn": [
|
|
6353
|
+
"json"
|
|
6354
|
+
],
|
|
6355
|
+
"description": "print JSON output without indentation",
|
|
6356
|
+
"name": "unformatted",
|
|
6357
|
+
"allowNo": false,
|
|
6358
|
+
"type": "boolean"
|
|
6359
|
+
}
|
|
6360
|
+
},
|
|
6361
|
+
"hasDynamicHelp": false,
|
|
6362
|
+
"hiddenAliases": [],
|
|
6363
|
+
"id": "order:fulfill",
|
|
6364
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
6365
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
6366
|
+
"pluginType": "core",
|
|
6367
|
+
"strict": true,
|
|
6368
|
+
"enableJsonFlag": false,
|
|
6369
|
+
"isESM": false,
|
|
6370
|
+
"relativePath": [
|
|
6371
|
+
"lib",
|
|
6372
|
+
"commands",
|
|
6373
|
+
"order",
|
|
6374
|
+
"fulfill.js"
|
|
6375
|
+
]
|
|
6376
|
+
},
|
|
6289
6377
|
"order": {
|
|
6290
6378
|
"aliases": [],
|
|
6291
6379
|
"args": {
|
|
@@ -8055,6 +8143,94 @@
|
|
|
8055
8143
|
"cancel.js"
|
|
8056
8144
|
]
|
|
8057
8145
|
},
|
|
8146
|
+
"order_subscription:convert": {
|
|
8147
|
+
"aliases": [],
|
|
8148
|
+
"args": {
|
|
8149
|
+
"id": {
|
|
8150
|
+
"description": "the unique id of the resource",
|
|
8151
|
+
"name": "id",
|
|
8152
|
+
"required": true
|
|
8153
|
+
}
|
|
8154
|
+
},
|
|
8155
|
+
"description": "Send this attribute if you want to convert a manual subscription to an automatic one. A subscription model is required before conversion.",
|
|
8156
|
+
"flags": {
|
|
8157
|
+
"organization": {
|
|
8158
|
+
"char": "o",
|
|
8159
|
+
"description": "the slug of your organization",
|
|
8160
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
8161
|
+
"hidden": true,
|
|
8162
|
+
"name": "organization",
|
|
8163
|
+
"required": true,
|
|
8164
|
+
"hasDynamicHelp": false,
|
|
8165
|
+
"multiple": false,
|
|
8166
|
+
"type": "option"
|
|
8167
|
+
},
|
|
8168
|
+
"domain": {
|
|
8169
|
+
"char": "d",
|
|
8170
|
+
"dependsOn": [
|
|
8171
|
+
"organization"
|
|
8172
|
+
],
|
|
8173
|
+
"env": "CL_CLI_DOMAIN",
|
|
8174
|
+
"hidden": true,
|
|
8175
|
+
"name": "domain",
|
|
8176
|
+
"required": false,
|
|
8177
|
+
"hasDynamicHelp": false,
|
|
8178
|
+
"multiple": false,
|
|
8179
|
+
"type": "option"
|
|
8180
|
+
},
|
|
8181
|
+
"accessToken": {
|
|
8182
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
8183
|
+
"hidden": true,
|
|
8184
|
+
"name": "accessToken",
|
|
8185
|
+
"required": true,
|
|
8186
|
+
"hasDynamicHelp": false,
|
|
8187
|
+
"multiple": false,
|
|
8188
|
+
"type": "option"
|
|
8189
|
+
},
|
|
8190
|
+
"print": {
|
|
8191
|
+
"char": "p",
|
|
8192
|
+
"description": "print out the modified resource",
|
|
8193
|
+
"name": "print",
|
|
8194
|
+
"allowNo": false,
|
|
8195
|
+
"type": "boolean"
|
|
8196
|
+
},
|
|
8197
|
+
"json": {
|
|
8198
|
+
"char": "j",
|
|
8199
|
+
"dependsOn": [
|
|
8200
|
+
"print"
|
|
8201
|
+
],
|
|
8202
|
+
"description": "print result in JSON format",
|
|
8203
|
+
"name": "json",
|
|
8204
|
+
"allowNo": false,
|
|
8205
|
+
"type": "boolean"
|
|
8206
|
+
},
|
|
8207
|
+
"unformatted": {
|
|
8208
|
+
"char": "u",
|
|
8209
|
+
"dependsOn": [
|
|
8210
|
+
"json"
|
|
8211
|
+
],
|
|
8212
|
+
"description": "print JSON output without indentation",
|
|
8213
|
+
"name": "unformatted",
|
|
8214
|
+
"allowNo": false,
|
|
8215
|
+
"type": "boolean"
|
|
8216
|
+
}
|
|
8217
|
+
},
|
|
8218
|
+
"hasDynamicHelp": false,
|
|
8219
|
+
"hiddenAliases": [],
|
|
8220
|
+
"id": "order_subscription:convert",
|
|
8221
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
8222
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
8223
|
+
"pluginType": "core",
|
|
8224
|
+
"strict": true,
|
|
8225
|
+
"enableJsonFlag": false,
|
|
8226
|
+
"isESM": false,
|
|
8227
|
+
"relativePath": [
|
|
8228
|
+
"lib",
|
|
8229
|
+
"commands",
|
|
8230
|
+
"order_subscription",
|
|
8231
|
+
"convert.js"
|
|
8232
|
+
]
|
|
8233
|
+
},
|
|
8058
8234
|
"order_subscription:deactivate": {
|
|
8059
8235
|
"aliases": [],
|
|
8060
8236
|
"args": {
|
|
@@ -10343,6 +10519,94 @@
|
|
|
10343
10519
|
"decrement_stock.js"
|
|
10344
10520
|
]
|
|
10345
10521
|
},
|
|
10522
|
+
"shipment:deliver": {
|
|
10523
|
+
"aliases": [],
|
|
10524
|
+
"args": {
|
|
10525
|
+
"id": {
|
|
10526
|
+
"description": "the unique id of the resource",
|
|
10527
|
+
"name": "id",
|
|
10528
|
+
"required": true
|
|
10529
|
+
}
|
|
10530
|
+
},
|
|
10531
|
+
"description": "Send this attribute if you want to mark this shipment as delivered.",
|
|
10532
|
+
"flags": {
|
|
10533
|
+
"organization": {
|
|
10534
|
+
"char": "o",
|
|
10535
|
+
"description": "the slug of your organization",
|
|
10536
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
10537
|
+
"hidden": true,
|
|
10538
|
+
"name": "organization",
|
|
10539
|
+
"required": true,
|
|
10540
|
+
"hasDynamicHelp": false,
|
|
10541
|
+
"multiple": false,
|
|
10542
|
+
"type": "option"
|
|
10543
|
+
},
|
|
10544
|
+
"domain": {
|
|
10545
|
+
"char": "d",
|
|
10546
|
+
"dependsOn": [
|
|
10547
|
+
"organization"
|
|
10548
|
+
],
|
|
10549
|
+
"env": "CL_CLI_DOMAIN",
|
|
10550
|
+
"hidden": true,
|
|
10551
|
+
"name": "domain",
|
|
10552
|
+
"required": false,
|
|
10553
|
+
"hasDynamicHelp": false,
|
|
10554
|
+
"multiple": false,
|
|
10555
|
+
"type": "option"
|
|
10556
|
+
},
|
|
10557
|
+
"accessToken": {
|
|
10558
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
10559
|
+
"hidden": true,
|
|
10560
|
+
"name": "accessToken",
|
|
10561
|
+
"required": true,
|
|
10562
|
+
"hasDynamicHelp": false,
|
|
10563
|
+
"multiple": false,
|
|
10564
|
+
"type": "option"
|
|
10565
|
+
},
|
|
10566
|
+
"print": {
|
|
10567
|
+
"char": "p",
|
|
10568
|
+
"description": "print out the modified resource",
|
|
10569
|
+
"name": "print",
|
|
10570
|
+
"allowNo": false,
|
|
10571
|
+
"type": "boolean"
|
|
10572
|
+
},
|
|
10573
|
+
"json": {
|
|
10574
|
+
"char": "j",
|
|
10575
|
+
"dependsOn": [
|
|
10576
|
+
"print"
|
|
10577
|
+
],
|
|
10578
|
+
"description": "print result in JSON format",
|
|
10579
|
+
"name": "json",
|
|
10580
|
+
"allowNo": false,
|
|
10581
|
+
"type": "boolean"
|
|
10582
|
+
},
|
|
10583
|
+
"unformatted": {
|
|
10584
|
+
"char": "u",
|
|
10585
|
+
"dependsOn": [
|
|
10586
|
+
"json"
|
|
10587
|
+
],
|
|
10588
|
+
"description": "print JSON output without indentation",
|
|
10589
|
+
"name": "unformatted",
|
|
10590
|
+
"allowNo": false,
|
|
10591
|
+
"type": "boolean"
|
|
10592
|
+
}
|
|
10593
|
+
},
|
|
10594
|
+
"hasDynamicHelp": false,
|
|
10595
|
+
"hiddenAliases": [],
|
|
10596
|
+
"id": "shipment:deliver",
|
|
10597
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
10598
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
10599
|
+
"pluginType": "core",
|
|
10600
|
+
"strict": true,
|
|
10601
|
+
"enableJsonFlag": false,
|
|
10602
|
+
"isESM": false,
|
|
10603
|
+
"relativePath": [
|
|
10604
|
+
"lib",
|
|
10605
|
+
"commands",
|
|
10606
|
+
"shipment",
|
|
10607
|
+
"deliver.js"
|
|
10608
|
+
]
|
|
10609
|
+
},
|
|
10346
10610
|
"shipment:get_rates": {
|
|
10347
10611
|
"aliases": [],
|
|
10348
10612
|
"args": {
|
|
@@ -13600,5 +13864,5 @@
|
|
|
13600
13864
|
]
|
|
13601
13865
|
}
|
|
13602
13866
|
},
|
|
13603
|
-
"version": "4.
|
|
13867
|
+
"version": "4.3.0"
|
|
13604
13868
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercelayer/cli-plugin-triggers",
|
|
3
3
|
"description": "Commerce Layer CLI Triggers plugin",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.3.0",
|
|
5
5
|
"author": "Pierluigi Viti <pierluigi@commercelayer.io>",
|
|
6
6
|
"homepage": "https://github.com/commercelayer/commercelayer-cli-plugin-triggers",
|
|
7
7
|
"repository": "commercelayer/commercelayer-cli-plugin-triggers",
|
|
@@ -64,21 +64,21 @@
|
|
|
64
64
|
"@types/inquirer": "^8.2.10",
|
|
65
65
|
"@types/lodash.snakecase": "^4.1.9",
|
|
66
66
|
"@types/mocha": "^10.0.6",
|
|
67
|
-
"@types/node": "^20.12.
|
|
67
|
+
"@types/node": "^20.12.13",
|
|
68
68
|
"chai": "^4.4.1",
|
|
69
69
|
"eslint": "^8.57.0",
|
|
70
70
|
"inflector-js": "^1.0.1",
|
|
71
71
|
"lodash.snakecase": "^4.1.1",
|
|
72
72
|
"mocha": "^10.4.0",
|
|
73
73
|
"nyc": "^15.1.0",
|
|
74
|
-
"oclif": "^4.
|
|
74
|
+
"oclif": "^4.11.3",
|
|
75
75
|
"semantic-release": "^22.0.12",
|
|
76
|
-
"tsx": "^4.
|
|
76
|
+
"tsx": "^4.11.0",
|
|
77
77
|
"typescript": "5.3.2"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@commercelayer/cli-core": "^5.0.
|
|
81
|
-
"@commercelayer/sdk": "^6.
|
|
80
|
+
"@commercelayer/cli-core": "^5.0.4",
|
|
81
|
+
"@commercelayer/sdk": "^6.4.0",
|
|
82
82
|
"@oclif/core": "^3.26.6",
|
|
83
83
|
"inquirer": "^8.2.6",
|
|
84
84
|
"tslib": "^2.6.2"
|