@commercelayer/cli-plugin-triggers 4.2.0 → 4.4.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 +115 -0
- package/lib/base.js +1 -1
- package/lib/commands/link/disable.d.ts +9 -0
- package/lib/commands/link/disable.js +22 -0
- package/lib/commands/link/enable.d.ts +9 -0
- package/lib/commands/link/enable.js +22 -0
- package/lib/commands/link/index.d.ts +9 -0
- package/lib/commands/link/index.js +40 -0
- package/lib/commands/order/fulfill.d.ts +9 -0
- package/lib/commands/order/fulfill.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/links.d.ts +3 -0
- package/lib/triggers/links.js +15 -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 +468 -28
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -86,6 +86,9 @@ $ commercelayer plugins:install triggers
|
|
|
86
86
|
* [`commercelayer line_item:external_price ID`](#commercelayer-line_itemexternal_price-id)
|
|
87
87
|
* [`commercelayer line_item:reserve_stock ID`](#commercelayer-line_itemreserve_stock-id)
|
|
88
88
|
* [`commercelayer line_item:reset_circuit ID`](#commercelayer-line_itemreset_circuit-id)
|
|
89
|
+
* [`commercelayer link ID`](#commercelayer-link-id)
|
|
90
|
+
* [`commercelayer link:disable ID`](#commercelayer-linkdisable-id)
|
|
91
|
+
* [`commercelayer link:enable ID`](#commercelayer-linkenable-id)
|
|
89
92
|
* [`commercelayer market ID`](#commercelayer-market-id)
|
|
90
93
|
* [`commercelayer market:disable ID`](#commercelayer-marketdisable-id)
|
|
91
94
|
* [`commercelayer market:enable ID`](#commercelayer-marketenable-id)
|
|
@@ -102,6 +105,7 @@ $ commercelayer plugins:install triggers
|
|
|
102
105
|
* [`commercelayer order:commit_invoice ID`](#commercelayer-ordercommit_invoice-id)
|
|
103
106
|
* [`commercelayer order:create_subscriptions ID`](#commercelayer-ordercreate_subscriptions-id)
|
|
104
107
|
* [`commercelayer order:customer_payment_source_id ID`](#commercelayer-ordercustomer_payment_source_id-id)
|
|
108
|
+
* [`commercelayer order:fulfill ID`](#commercelayer-orderfulfill-id)
|
|
105
109
|
* [`commercelayer order:nullify_payment_source ID`](#commercelayer-ordernullify_payment_source-id)
|
|
106
110
|
* [`commercelayer order:pending ID`](#commercelayer-orderpending-id)
|
|
107
111
|
* [`commercelayer order:place ID`](#commercelayer-orderplace-id)
|
|
@@ -149,6 +153,7 @@ $ commercelayer plugins:install triggers
|
|
|
149
153
|
* [`commercelayer satispay_payment:refresh ID`](#commercelayer-satispay_paymentrefresh-id)
|
|
150
154
|
* [`commercelayer shipment ID`](#commercelayer-shipment-id)
|
|
151
155
|
* [`commercelayer shipment:decrement_stock ID`](#commercelayer-shipmentdecrement_stock-id)
|
|
156
|
+
* [`commercelayer shipment:deliver ID`](#commercelayer-shipmentdeliver-id)
|
|
152
157
|
* [`commercelayer shipment:get_rates ID`](#commercelayer-shipmentget_rates-id)
|
|
153
158
|
* [`commercelayer shipment:on_hold ID`](#commercelayer-shipmenton_hold-id)
|
|
154
159
|
* [`commercelayer shipment:packing ID`](#commercelayer-shipmentpacking-id)
|
|
@@ -1429,6 +1434,72 @@ DESCRIPTION
|
|
|
1429
1434
|
|
|
1430
1435
|
_See code: [src/commands/line_item/reset_circuit.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/line_item/reset_circuit.ts)_
|
|
1431
1436
|
|
|
1437
|
+
### `commercelayer link ID`
|
|
1438
|
+
|
|
1439
|
+
Execute an action on a resource of type links.
|
|
1440
|
+
|
|
1441
|
+
```sh-session
|
|
1442
|
+
USAGE
|
|
1443
|
+
$ commercelayer link ID [-u [-j -p]]
|
|
1444
|
+
|
|
1445
|
+
ARGUMENTS
|
|
1446
|
+
ID the unique id of the resource
|
|
1447
|
+
|
|
1448
|
+
FLAGS
|
|
1449
|
+
-j, --json print result in JSON format
|
|
1450
|
+
-p, --print print out the modified resource
|
|
1451
|
+
-u, --unformatted print JSON output without indentation
|
|
1452
|
+
|
|
1453
|
+
DESCRIPTION
|
|
1454
|
+
execute an action on a resource of type links
|
|
1455
|
+
```
|
|
1456
|
+
|
|
1457
|
+
_See code: [src/commands/link/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/link/index.ts)_
|
|
1458
|
+
|
|
1459
|
+
### `commercelayer link:disable ID`
|
|
1460
|
+
|
|
1461
|
+
Send this attribute if you want to mark this resource as disabled.
|
|
1462
|
+
|
|
1463
|
+
```sh-session
|
|
1464
|
+
USAGE
|
|
1465
|
+
$ commercelayer link:disable ID [-u [-j -p]]
|
|
1466
|
+
|
|
1467
|
+
ARGUMENTS
|
|
1468
|
+
ID the unique id of the resource
|
|
1469
|
+
|
|
1470
|
+
FLAGS
|
|
1471
|
+
-j, --json print result in JSON format
|
|
1472
|
+
-p, --print print out the modified resource
|
|
1473
|
+
-u, --unformatted print JSON output without indentation
|
|
1474
|
+
|
|
1475
|
+
DESCRIPTION
|
|
1476
|
+
Send this attribute if you want to mark this resource as disabled.
|
|
1477
|
+
```
|
|
1478
|
+
|
|
1479
|
+
_See code: [src/commands/link/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/link/disable.ts)_
|
|
1480
|
+
|
|
1481
|
+
### `commercelayer link:enable ID`
|
|
1482
|
+
|
|
1483
|
+
Send this attribute if you want to mark this resource as enabled.
|
|
1484
|
+
|
|
1485
|
+
```sh-session
|
|
1486
|
+
USAGE
|
|
1487
|
+
$ commercelayer link:enable ID [-u [-j -p]]
|
|
1488
|
+
|
|
1489
|
+
ARGUMENTS
|
|
1490
|
+
ID the unique id of the resource
|
|
1491
|
+
|
|
1492
|
+
FLAGS
|
|
1493
|
+
-j, --json print result in JSON format
|
|
1494
|
+
-p, --print print out the modified resource
|
|
1495
|
+
-u, --unformatted print JSON output without indentation
|
|
1496
|
+
|
|
1497
|
+
DESCRIPTION
|
|
1498
|
+
Send this attribute if you want to mark this resource as enabled.
|
|
1499
|
+
```
|
|
1500
|
+
|
|
1501
|
+
_See code: [src/commands/link/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/link/enable.ts)_
|
|
1502
|
+
|
|
1432
1503
|
### `commercelayer market ID`
|
|
1433
1504
|
|
|
1434
1505
|
Execute an action on a resource of type markets.
|
|
@@ -1785,6 +1856,28 @@ DESCRIPTION
|
|
|
1785
1856
|
|
|
1786
1857
|
_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)_
|
|
1787
1858
|
|
|
1859
|
+
### `commercelayer order:fulfill ID`
|
|
1860
|
+
|
|
1861
|
+
Send this attribute if you want to mark as fulfilled a shipped/delivered order.
|
|
1862
|
+
|
|
1863
|
+
```sh-session
|
|
1864
|
+
USAGE
|
|
1865
|
+
$ commercelayer order:fulfill ID [-u [-j -p]]
|
|
1866
|
+
|
|
1867
|
+
ARGUMENTS
|
|
1868
|
+
ID the unique id of the resource
|
|
1869
|
+
|
|
1870
|
+
FLAGS
|
|
1871
|
+
-j, --json print result in JSON format
|
|
1872
|
+
-p, --print print out the modified resource
|
|
1873
|
+
-u, --unformatted print JSON output without indentation
|
|
1874
|
+
|
|
1875
|
+
DESCRIPTION
|
|
1876
|
+
Send this attribute if you want to mark as fulfilled a shipped/delivered order.
|
|
1877
|
+
```
|
|
1878
|
+
|
|
1879
|
+
_See code: [src/commands/order/fulfill.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order/fulfill.ts)_
|
|
1880
|
+
|
|
1788
1881
|
### `commercelayer order:nullify_payment_source ID`
|
|
1789
1882
|
|
|
1790
1883
|
Send this attribute if you want to nullify the payment source for this order.
|
|
@@ -2829,6 +2922,28 @@ DESCRIPTION
|
|
|
2829
2922
|
|
|
2830
2923
|
_See code: [src/commands/shipment/decrement_stock.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/shipment/decrement_stock.ts)_
|
|
2831
2924
|
|
|
2925
|
+
### `commercelayer shipment:deliver ID`
|
|
2926
|
+
|
|
2927
|
+
Send this attribute if you want to mark this shipment as delivered.
|
|
2928
|
+
|
|
2929
|
+
```sh-session
|
|
2930
|
+
USAGE
|
|
2931
|
+
$ commercelayer shipment:deliver ID [-u [-j -p]]
|
|
2932
|
+
|
|
2933
|
+
ARGUMENTS
|
|
2934
|
+
ID the unique id of the resource
|
|
2935
|
+
|
|
2936
|
+
FLAGS
|
|
2937
|
+
-j, --json print result in JSON format
|
|
2938
|
+
-p, --print print out the modified resource
|
|
2939
|
+
-u, --unformatted print JSON output without indentation
|
|
2940
|
+
|
|
2941
|
+
DESCRIPTION
|
|
2942
|
+
Send this attribute if you want to mark this shipment as delivered.
|
|
2943
|
+
```
|
|
2944
|
+
|
|
2945
|
+
_See code: [src/commands/shipment/deliver.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/shipment/deliver.ts)_
|
|
2946
|
+
|
|
2832
2947
|
### `commercelayer shipment:get_rates ID`
|
|
2833
2948
|
|
|
2834
2949
|
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 LinkDisable 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 links_1 = require("../../triggers/links");
|
|
6
|
+
const TRIGGER = 'disable';
|
|
7
|
+
class LinkDisable extends base_1.default {
|
|
8
|
+
static description = links_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(LinkDisable);
|
|
15
|
+
const res = await this.executeAction('links', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('link', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = LinkDisable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class LinkEnable 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 links_1 = require("../../triggers/links");
|
|
6
|
+
const TRIGGER = 'enable';
|
|
7
|
+
class LinkEnable extends base_1.default {
|
|
8
|
+
static description = links_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(LinkEnable);
|
|
15
|
+
const res = await this.executeAction('links', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('link', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = LinkEnable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class LinkIndex extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {};
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
+
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
7
|
+
const cli_core_1 = require("@commercelayer/cli-core");
|
|
8
|
+
const links_1 = require("../../triggers/links");
|
|
9
|
+
const promptAction = async (id) => {
|
|
10
|
+
const answers = await inquirer_1.default.prompt([{
|
|
11
|
+
type: 'list',
|
|
12
|
+
name: 'trigger',
|
|
13
|
+
message: `Select an action to execute on link ${cli_core_1.clColor.api.id(id)}:`,
|
|
14
|
+
choices: Object.keys(links_1.triggers).sort().map(a => {
|
|
15
|
+
return { name: a, value: a };
|
|
16
|
+
}),
|
|
17
|
+
loop: false,
|
|
18
|
+
pageSize: 10,
|
|
19
|
+
}]);
|
|
20
|
+
return answers.trigger;
|
|
21
|
+
};
|
|
22
|
+
class LinkIndex extends base_1.default {
|
|
23
|
+
static description = 'execute an action on a resource of type links';
|
|
24
|
+
static flags = {};
|
|
25
|
+
static args = {
|
|
26
|
+
...base_1.default.args,
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { args, flags } = await this.parse(LinkIndex);
|
|
30
|
+
const id = args.id;
|
|
31
|
+
const action = await promptAction(id);
|
|
32
|
+
const fields = [];
|
|
33
|
+
const res = await (0, exec_1.default)('links', id, action, flags, fields);
|
|
34
|
+
this.log();
|
|
35
|
+
this.printOutput(res, flags);
|
|
36
|
+
this.successMessage('link', action, res.id);
|
|
37
|
+
return res;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = LinkIndex;
|
|
@@ -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 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}`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggers = void 0;
|
|
4
|
+
exports.triggers = {
|
|
5
|
+
disable: {
|
|
6
|
+
action: 'disable',
|
|
7
|
+
trigger: '_disable',
|
|
8
|
+
description: 'Send this attribute if you want to mark this resource as disabled.',
|
|
9
|
+
},
|
|
10
|
+
enable: {
|
|
11
|
+
action: 'enable',
|
|
12
|
+
trigger: '_enable',
|
|
13
|
+
description: 'Send this attribute if you want to mark this resource as enabled.',
|
|
14
|
+
},
|
|
15
|
+
};
|
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
|
+
"authorization:capture": {
|
|
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": "Send this attribute if you want to create a capture for this authorization.",
|
|
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": "authorization:capture",
|
|
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
|
+
"authorization",
|
|
284
|
+
"capture.js"
|
|
285
285
|
]
|
|
286
286
|
},
|
|
287
|
-
"
|
|
287
|
+
"authorization:capture_amount_cents": {
|
|
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": "The associated capture amount, in cents.",
|
|
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": "authorization:capture_amount_cents",
|
|
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
|
+
"authorization",
|
|
372
|
+
"capture_amount_cents.js"
|
|
373
373
|
]
|
|
374
374
|
},
|
|
375
|
-
"authorization
|
|
375
|
+
"authorization": {
|
|
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": "execute an action on a resource of type authorizations",
|
|
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",
|
|
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
|
+
"index.js"
|
|
461
461
|
]
|
|
462
462
|
},
|
|
463
|
-
"authorization:
|
|
463
|
+
"authorization:void": {
|
|
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": "Send this attribute if you want to create a void for this authorization.",
|
|
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:void",
|
|
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
|
+
"void.js"
|
|
549
549
|
]
|
|
550
550
|
},
|
|
551
|
-
"
|
|
551
|
+
"axerve_payment": {
|
|
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 axerve_payments",
|
|
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": "axerve_payment",
|
|
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
|
+
"axerve_payment",
|
|
636
636
|
"index.js"
|
|
637
637
|
]
|
|
638
638
|
},
|
|
639
|
-
"
|
|
639
|
+
"axerve_payment:update": {
|
|
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 update the payment with fresh order data.",
|
|
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": "axerve_payment:update",
|
|
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
|
+
"axerve_payment",
|
|
724
|
+
"update.js"
|
|
725
725
|
]
|
|
726
726
|
},
|
|
727
727
|
"bundle:compute_compare_at_amount": {
|
|
@@ -4948,6 +4948,270 @@
|
|
|
4948
4948
|
"reset_circuit.js"
|
|
4949
4949
|
]
|
|
4950
4950
|
},
|
|
4951
|
+
"link:disable": {
|
|
4952
|
+
"aliases": [],
|
|
4953
|
+
"args": {
|
|
4954
|
+
"id": {
|
|
4955
|
+
"description": "the unique id of the resource",
|
|
4956
|
+
"name": "id",
|
|
4957
|
+
"required": true
|
|
4958
|
+
}
|
|
4959
|
+
},
|
|
4960
|
+
"description": "Send this attribute if you want to mark this resource as disabled.",
|
|
4961
|
+
"flags": {
|
|
4962
|
+
"organization": {
|
|
4963
|
+
"char": "o",
|
|
4964
|
+
"description": "the slug of your organization",
|
|
4965
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
4966
|
+
"hidden": true,
|
|
4967
|
+
"name": "organization",
|
|
4968
|
+
"required": true,
|
|
4969
|
+
"hasDynamicHelp": false,
|
|
4970
|
+
"multiple": false,
|
|
4971
|
+
"type": "option"
|
|
4972
|
+
},
|
|
4973
|
+
"domain": {
|
|
4974
|
+
"char": "d",
|
|
4975
|
+
"dependsOn": [
|
|
4976
|
+
"organization"
|
|
4977
|
+
],
|
|
4978
|
+
"env": "CL_CLI_DOMAIN",
|
|
4979
|
+
"hidden": true,
|
|
4980
|
+
"name": "domain",
|
|
4981
|
+
"required": false,
|
|
4982
|
+
"hasDynamicHelp": false,
|
|
4983
|
+
"multiple": false,
|
|
4984
|
+
"type": "option"
|
|
4985
|
+
},
|
|
4986
|
+
"accessToken": {
|
|
4987
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
4988
|
+
"hidden": true,
|
|
4989
|
+
"name": "accessToken",
|
|
4990
|
+
"required": true,
|
|
4991
|
+
"hasDynamicHelp": false,
|
|
4992
|
+
"multiple": false,
|
|
4993
|
+
"type": "option"
|
|
4994
|
+
},
|
|
4995
|
+
"print": {
|
|
4996
|
+
"char": "p",
|
|
4997
|
+
"description": "print out the modified resource",
|
|
4998
|
+
"name": "print",
|
|
4999
|
+
"allowNo": false,
|
|
5000
|
+
"type": "boolean"
|
|
5001
|
+
},
|
|
5002
|
+
"json": {
|
|
5003
|
+
"char": "j",
|
|
5004
|
+
"dependsOn": [
|
|
5005
|
+
"print"
|
|
5006
|
+
],
|
|
5007
|
+
"description": "print result in JSON format",
|
|
5008
|
+
"name": "json",
|
|
5009
|
+
"allowNo": false,
|
|
5010
|
+
"type": "boolean"
|
|
5011
|
+
},
|
|
5012
|
+
"unformatted": {
|
|
5013
|
+
"char": "u",
|
|
5014
|
+
"dependsOn": [
|
|
5015
|
+
"json"
|
|
5016
|
+
],
|
|
5017
|
+
"description": "print JSON output without indentation",
|
|
5018
|
+
"name": "unformatted",
|
|
5019
|
+
"allowNo": false,
|
|
5020
|
+
"type": "boolean"
|
|
5021
|
+
}
|
|
5022
|
+
},
|
|
5023
|
+
"hasDynamicHelp": false,
|
|
5024
|
+
"hiddenAliases": [],
|
|
5025
|
+
"id": "link:disable",
|
|
5026
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
5027
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
5028
|
+
"pluginType": "core",
|
|
5029
|
+
"strict": true,
|
|
5030
|
+
"enableJsonFlag": false,
|
|
5031
|
+
"isESM": false,
|
|
5032
|
+
"relativePath": [
|
|
5033
|
+
"lib",
|
|
5034
|
+
"commands",
|
|
5035
|
+
"link",
|
|
5036
|
+
"disable.js"
|
|
5037
|
+
]
|
|
5038
|
+
},
|
|
5039
|
+
"link:enable": {
|
|
5040
|
+
"aliases": [],
|
|
5041
|
+
"args": {
|
|
5042
|
+
"id": {
|
|
5043
|
+
"description": "the unique id of the resource",
|
|
5044
|
+
"name": "id",
|
|
5045
|
+
"required": true
|
|
5046
|
+
}
|
|
5047
|
+
},
|
|
5048
|
+
"description": "Send this attribute if you want to mark this resource as enabled.",
|
|
5049
|
+
"flags": {
|
|
5050
|
+
"organization": {
|
|
5051
|
+
"char": "o",
|
|
5052
|
+
"description": "the slug of your organization",
|
|
5053
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
5054
|
+
"hidden": true,
|
|
5055
|
+
"name": "organization",
|
|
5056
|
+
"required": true,
|
|
5057
|
+
"hasDynamicHelp": false,
|
|
5058
|
+
"multiple": false,
|
|
5059
|
+
"type": "option"
|
|
5060
|
+
},
|
|
5061
|
+
"domain": {
|
|
5062
|
+
"char": "d",
|
|
5063
|
+
"dependsOn": [
|
|
5064
|
+
"organization"
|
|
5065
|
+
],
|
|
5066
|
+
"env": "CL_CLI_DOMAIN",
|
|
5067
|
+
"hidden": true,
|
|
5068
|
+
"name": "domain",
|
|
5069
|
+
"required": false,
|
|
5070
|
+
"hasDynamicHelp": false,
|
|
5071
|
+
"multiple": false,
|
|
5072
|
+
"type": "option"
|
|
5073
|
+
},
|
|
5074
|
+
"accessToken": {
|
|
5075
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
5076
|
+
"hidden": true,
|
|
5077
|
+
"name": "accessToken",
|
|
5078
|
+
"required": true,
|
|
5079
|
+
"hasDynamicHelp": false,
|
|
5080
|
+
"multiple": false,
|
|
5081
|
+
"type": "option"
|
|
5082
|
+
},
|
|
5083
|
+
"print": {
|
|
5084
|
+
"char": "p",
|
|
5085
|
+
"description": "print out the modified resource",
|
|
5086
|
+
"name": "print",
|
|
5087
|
+
"allowNo": false,
|
|
5088
|
+
"type": "boolean"
|
|
5089
|
+
},
|
|
5090
|
+
"json": {
|
|
5091
|
+
"char": "j",
|
|
5092
|
+
"dependsOn": [
|
|
5093
|
+
"print"
|
|
5094
|
+
],
|
|
5095
|
+
"description": "print result in JSON format",
|
|
5096
|
+
"name": "json",
|
|
5097
|
+
"allowNo": false,
|
|
5098
|
+
"type": "boolean"
|
|
5099
|
+
},
|
|
5100
|
+
"unformatted": {
|
|
5101
|
+
"char": "u",
|
|
5102
|
+
"dependsOn": [
|
|
5103
|
+
"json"
|
|
5104
|
+
],
|
|
5105
|
+
"description": "print JSON output without indentation",
|
|
5106
|
+
"name": "unformatted",
|
|
5107
|
+
"allowNo": false,
|
|
5108
|
+
"type": "boolean"
|
|
5109
|
+
}
|
|
5110
|
+
},
|
|
5111
|
+
"hasDynamicHelp": false,
|
|
5112
|
+
"hiddenAliases": [],
|
|
5113
|
+
"id": "link:enable",
|
|
5114
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
5115
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
5116
|
+
"pluginType": "core",
|
|
5117
|
+
"strict": true,
|
|
5118
|
+
"enableJsonFlag": false,
|
|
5119
|
+
"isESM": false,
|
|
5120
|
+
"relativePath": [
|
|
5121
|
+
"lib",
|
|
5122
|
+
"commands",
|
|
5123
|
+
"link",
|
|
5124
|
+
"enable.js"
|
|
5125
|
+
]
|
|
5126
|
+
},
|
|
5127
|
+
"link": {
|
|
5128
|
+
"aliases": [],
|
|
5129
|
+
"args": {
|
|
5130
|
+
"id": {
|
|
5131
|
+
"description": "the unique id of the resource",
|
|
5132
|
+
"name": "id",
|
|
5133
|
+
"required": true
|
|
5134
|
+
}
|
|
5135
|
+
},
|
|
5136
|
+
"description": "execute an action on a resource of type links",
|
|
5137
|
+
"flags": {
|
|
5138
|
+
"organization": {
|
|
5139
|
+
"char": "o",
|
|
5140
|
+
"description": "the slug of your organization",
|
|
5141
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
5142
|
+
"hidden": true,
|
|
5143
|
+
"name": "organization",
|
|
5144
|
+
"required": true,
|
|
5145
|
+
"hasDynamicHelp": false,
|
|
5146
|
+
"multiple": false,
|
|
5147
|
+
"type": "option"
|
|
5148
|
+
},
|
|
5149
|
+
"domain": {
|
|
5150
|
+
"char": "d",
|
|
5151
|
+
"dependsOn": [
|
|
5152
|
+
"organization"
|
|
5153
|
+
],
|
|
5154
|
+
"env": "CL_CLI_DOMAIN",
|
|
5155
|
+
"hidden": true,
|
|
5156
|
+
"name": "domain",
|
|
5157
|
+
"required": false,
|
|
5158
|
+
"hasDynamicHelp": false,
|
|
5159
|
+
"multiple": false,
|
|
5160
|
+
"type": "option"
|
|
5161
|
+
},
|
|
5162
|
+
"accessToken": {
|
|
5163
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
5164
|
+
"hidden": true,
|
|
5165
|
+
"name": "accessToken",
|
|
5166
|
+
"required": true,
|
|
5167
|
+
"hasDynamicHelp": false,
|
|
5168
|
+
"multiple": false,
|
|
5169
|
+
"type": "option"
|
|
5170
|
+
},
|
|
5171
|
+
"print": {
|
|
5172
|
+
"char": "p",
|
|
5173
|
+
"description": "print out the modified resource",
|
|
5174
|
+
"name": "print",
|
|
5175
|
+
"allowNo": false,
|
|
5176
|
+
"type": "boolean"
|
|
5177
|
+
},
|
|
5178
|
+
"json": {
|
|
5179
|
+
"char": "j",
|
|
5180
|
+
"dependsOn": [
|
|
5181
|
+
"print"
|
|
5182
|
+
],
|
|
5183
|
+
"description": "print result in JSON format",
|
|
5184
|
+
"name": "json",
|
|
5185
|
+
"allowNo": false,
|
|
5186
|
+
"type": "boolean"
|
|
5187
|
+
},
|
|
5188
|
+
"unformatted": {
|
|
5189
|
+
"char": "u",
|
|
5190
|
+
"dependsOn": [
|
|
5191
|
+
"json"
|
|
5192
|
+
],
|
|
5193
|
+
"description": "print JSON output without indentation",
|
|
5194
|
+
"name": "unformatted",
|
|
5195
|
+
"allowNo": false,
|
|
5196
|
+
"type": "boolean"
|
|
5197
|
+
}
|
|
5198
|
+
},
|
|
5199
|
+
"hasDynamicHelp": false,
|
|
5200
|
+
"hiddenAliases": [],
|
|
5201
|
+
"id": "link",
|
|
5202
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
5203
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
5204
|
+
"pluginType": "core",
|
|
5205
|
+
"strict": true,
|
|
5206
|
+
"enableJsonFlag": false,
|
|
5207
|
+
"isESM": false,
|
|
5208
|
+
"relativePath": [
|
|
5209
|
+
"lib",
|
|
5210
|
+
"commands",
|
|
5211
|
+
"link",
|
|
5212
|
+
"index.js"
|
|
5213
|
+
]
|
|
5214
|
+
},
|
|
4951
5215
|
"market:disable": {
|
|
4952
5216
|
"aliases": [],
|
|
4953
5217
|
"args": {
|
|
@@ -6286,6 +6550,94 @@
|
|
|
6286
6550
|
"customer_payment_source_id.js"
|
|
6287
6551
|
]
|
|
6288
6552
|
},
|
|
6553
|
+
"order:fulfill": {
|
|
6554
|
+
"aliases": [],
|
|
6555
|
+
"args": {
|
|
6556
|
+
"id": {
|
|
6557
|
+
"description": "the unique id of the resource",
|
|
6558
|
+
"name": "id",
|
|
6559
|
+
"required": true
|
|
6560
|
+
}
|
|
6561
|
+
},
|
|
6562
|
+
"description": "Send this attribute if you want to mark as fulfilled a shipped/delivered order.",
|
|
6563
|
+
"flags": {
|
|
6564
|
+
"organization": {
|
|
6565
|
+
"char": "o",
|
|
6566
|
+
"description": "the slug of your organization",
|
|
6567
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
6568
|
+
"hidden": true,
|
|
6569
|
+
"name": "organization",
|
|
6570
|
+
"required": true,
|
|
6571
|
+
"hasDynamicHelp": false,
|
|
6572
|
+
"multiple": false,
|
|
6573
|
+
"type": "option"
|
|
6574
|
+
},
|
|
6575
|
+
"domain": {
|
|
6576
|
+
"char": "d",
|
|
6577
|
+
"dependsOn": [
|
|
6578
|
+
"organization"
|
|
6579
|
+
],
|
|
6580
|
+
"env": "CL_CLI_DOMAIN",
|
|
6581
|
+
"hidden": true,
|
|
6582
|
+
"name": "domain",
|
|
6583
|
+
"required": false,
|
|
6584
|
+
"hasDynamicHelp": false,
|
|
6585
|
+
"multiple": false,
|
|
6586
|
+
"type": "option"
|
|
6587
|
+
},
|
|
6588
|
+
"accessToken": {
|
|
6589
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
6590
|
+
"hidden": true,
|
|
6591
|
+
"name": "accessToken",
|
|
6592
|
+
"required": true,
|
|
6593
|
+
"hasDynamicHelp": false,
|
|
6594
|
+
"multiple": false,
|
|
6595
|
+
"type": "option"
|
|
6596
|
+
},
|
|
6597
|
+
"print": {
|
|
6598
|
+
"char": "p",
|
|
6599
|
+
"description": "print out the modified resource",
|
|
6600
|
+
"name": "print",
|
|
6601
|
+
"allowNo": false,
|
|
6602
|
+
"type": "boolean"
|
|
6603
|
+
},
|
|
6604
|
+
"json": {
|
|
6605
|
+
"char": "j",
|
|
6606
|
+
"dependsOn": [
|
|
6607
|
+
"print"
|
|
6608
|
+
],
|
|
6609
|
+
"description": "print result in JSON format",
|
|
6610
|
+
"name": "json",
|
|
6611
|
+
"allowNo": false,
|
|
6612
|
+
"type": "boolean"
|
|
6613
|
+
},
|
|
6614
|
+
"unformatted": {
|
|
6615
|
+
"char": "u",
|
|
6616
|
+
"dependsOn": [
|
|
6617
|
+
"json"
|
|
6618
|
+
],
|
|
6619
|
+
"description": "print JSON output without indentation",
|
|
6620
|
+
"name": "unformatted",
|
|
6621
|
+
"allowNo": false,
|
|
6622
|
+
"type": "boolean"
|
|
6623
|
+
}
|
|
6624
|
+
},
|
|
6625
|
+
"hasDynamicHelp": false,
|
|
6626
|
+
"hiddenAliases": [],
|
|
6627
|
+
"id": "order:fulfill",
|
|
6628
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
6629
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
6630
|
+
"pluginType": "core",
|
|
6631
|
+
"strict": true,
|
|
6632
|
+
"enableJsonFlag": false,
|
|
6633
|
+
"isESM": false,
|
|
6634
|
+
"relativePath": [
|
|
6635
|
+
"lib",
|
|
6636
|
+
"commands",
|
|
6637
|
+
"order",
|
|
6638
|
+
"fulfill.js"
|
|
6639
|
+
]
|
|
6640
|
+
},
|
|
6289
6641
|
"order": {
|
|
6290
6642
|
"aliases": [],
|
|
6291
6643
|
"args": {
|
|
@@ -10431,6 +10783,94 @@
|
|
|
10431
10783
|
"decrement_stock.js"
|
|
10432
10784
|
]
|
|
10433
10785
|
},
|
|
10786
|
+
"shipment:deliver": {
|
|
10787
|
+
"aliases": [],
|
|
10788
|
+
"args": {
|
|
10789
|
+
"id": {
|
|
10790
|
+
"description": "the unique id of the resource",
|
|
10791
|
+
"name": "id",
|
|
10792
|
+
"required": true
|
|
10793
|
+
}
|
|
10794
|
+
},
|
|
10795
|
+
"description": "Send this attribute if you want to mark this shipment as delivered.",
|
|
10796
|
+
"flags": {
|
|
10797
|
+
"organization": {
|
|
10798
|
+
"char": "o",
|
|
10799
|
+
"description": "the slug of your organization",
|
|
10800
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
10801
|
+
"hidden": true,
|
|
10802
|
+
"name": "organization",
|
|
10803
|
+
"required": true,
|
|
10804
|
+
"hasDynamicHelp": false,
|
|
10805
|
+
"multiple": false,
|
|
10806
|
+
"type": "option"
|
|
10807
|
+
},
|
|
10808
|
+
"domain": {
|
|
10809
|
+
"char": "d",
|
|
10810
|
+
"dependsOn": [
|
|
10811
|
+
"organization"
|
|
10812
|
+
],
|
|
10813
|
+
"env": "CL_CLI_DOMAIN",
|
|
10814
|
+
"hidden": true,
|
|
10815
|
+
"name": "domain",
|
|
10816
|
+
"required": false,
|
|
10817
|
+
"hasDynamicHelp": false,
|
|
10818
|
+
"multiple": false,
|
|
10819
|
+
"type": "option"
|
|
10820
|
+
},
|
|
10821
|
+
"accessToken": {
|
|
10822
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
10823
|
+
"hidden": true,
|
|
10824
|
+
"name": "accessToken",
|
|
10825
|
+
"required": true,
|
|
10826
|
+
"hasDynamicHelp": false,
|
|
10827
|
+
"multiple": false,
|
|
10828
|
+
"type": "option"
|
|
10829
|
+
},
|
|
10830
|
+
"print": {
|
|
10831
|
+
"char": "p",
|
|
10832
|
+
"description": "print out the modified resource",
|
|
10833
|
+
"name": "print",
|
|
10834
|
+
"allowNo": false,
|
|
10835
|
+
"type": "boolean"
|
|
10836
|
+
},
|
|
10837
|
+
"json": {
|
|
10838
|
+
"char": "j",
|
|
10839
|
+
"dependsOn": [
|
|
10840
|
+
"print"
|
|
10841
|
+
],
|
|
10842
|
+
"description": "print result in JSON format",
|
|
10843
|
+
"name": "json",
|
|
10844
|
+
"allowNo": false,
|
|
10845
|
+
"type": "boolean"
|
|
10846
|
+
},
|
|
10847
|
+
"unformatted": {
|
|
10848
|
+
"char": "u",
|
|
10849
|
+
"dependsOn": [
|
|
10850
|
+
"json"
|
|
10851
|
+
],
|
|
10852
|
+
"description": "print JSON output without indentation",
|
|
10853
|
+
"name": "unformatted",
|
|
10854
|
+
"allowNo": false,
|
|
10855
|
+
"type": "boolean"
|
|
10856
|
+
}
|
|
10857
|
+
},
|
|
10858
|
+
"hasDynamicHelp": false,
|
|
10859
|
+
"hiddenAliases": [],
|
|
10860
|
+
"id": "shipment:deliver",
|
|
10861
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
10862
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
10863
|
+
"pluginType": "core",
|
|
10864
|
+
"strict": true,
|
|
10865
|
+
"enableJsonFlag": false,
|
|
10866
|
+
"isESM": false,
|
|
10867
|
+
"relativePath": [
|
|
10868
|
+
"lib",
|
|
10869
|
+
"commands",
|
|
10870
|
+
"shipment",
|
|
10871
|
+
"deliver.js"
|
|
10872
|
+
]
|
|
10873
|
+
},
|
|
10434
10874
|
"shipment:get_rates": {
|
|
10435
10875
|
"aliases": [],
|
|
10436
10876
|
"args": {
|
|
@@ -13688,5 +14128,5 @@
|
|
|
13688
14128
|
]
|
|
13689
14129
|
}
|
|
13690
14130
|
},
|
|
13691
|
-
"version": "4.
|
|
14131
|
+
"version": "4.4.0"
|
|
13692
14132
|
}
|
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.4.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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@commercelayer/cli-dev": "^3.0.5",
|
|
58
58
|
"@commercelayer/eslint-config-ts": "^1.4.5",
|
|
59
|
-
"@oclif/plugin-help": "^6.0
|
|
59
|
+
"@oclif/plugin-help": "^6.2.0",
|
|
60
60
|
"@oclif/test": "^3.2.15",
|
|
61
61
|
"@semantic-release/changelog": "^6.0.3",
|
|
62
62
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -64,24 +64,24 @@
|
|
|
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.
|
|
67
|
+
"@types/node": "^20.14.2",
|
|
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.13.0",
|
|
75
75
|
"semantic-release": "^22.0.12",
|
|
76
|
-
"tsx": "^4.
|
|
76
|
+
"tsx": "^4.12.0",
|
|
77
77
|
"typescript": "5.3.2"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@commercelayer/cli-core": "^5.0.
|
|
81
|
-
"@commercelayer/sdk": "^6.
|
|
82
|
-
"@oclif/core": "^3.
|
|
80
|
+
"@commercelayer/cli-core": "^5.0.5",
|
|
81
|
+
"@commercelayer/sdk": "^6.6.0",
|
|
82
|
+
"@oclif/core": "^3.27.0",
|
|
83
83
|
"inquirer": "^8.2.6",
|
|
84
|
-
"tslib": "^2.6.
|
|
84
|
+
"tslib": "^2.6.3"
|
|
85
85
|
},
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|