@commercelayer/cli-plugin-triggers 4.4.0 → 4.6.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 +123 -6
- package/lib/commands/authorization/forward.d.ts +9 -0
- package/lib/commands/authorization/forward.js +22 -0
- package/lib/commands/capture/forward.d.ts +9 -0
- package/lib/commands/capture/forward.js +22 -0
- package/lib/commands/return/refund.d.ts +9 -0
- package/lib/commands/return/refund.js +22 -0
- package/lib/commands/return/refund_amount_cents.d.ts +9 -0
- package/lib/commands/return/refund_amount_cents.js +22 -0
- package/lib/commands/shipment/cancel.d.ts +9 -0
- package/lib/commands/shipment/cancel.js +22 -0
- package/lib/exec.js +4 -3
- package/lib/triggers/authorizations.d.ts +1 -1
- package/lib/triggers/authorizations.js +6 -1
- package/lib/triggers/captures.d.ts +1 -1
- package/lib/triggers/captures.js +6 -1
- package/lib/triggers/orders.js +1 -1
- package/lib/triggers/returns.d.ts +1 -1
- package/lib/triggers/returns.js +10 -0
- package/lib/triggers/shipments.d.ts +1 -1
- package/lib/triggers/shipments.js +5 -0
- package/oclif.manifest.json +444 -4
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ $ commercelayer plugins:install triggers
|
|
|
35
35
|
* [`commercelayer authorization ID`](#commercelayer-authorization-id)
|
|
36
36
|
* [`commercelayer authorization:capture ID`](#commercelayer-authorizationcapture-id)
|
|
37
37
|
* [`commercelayer authorization:capture_amount_cents ID`](#commercelayer-authorizationcapture_amount_cents-id)
|
|
38
|
+
* [`commercelayer authorization:forward ID`](#commercelayer-authorizationforward-id)
|
|
38
39
|
* [`commercelayer authorization:void ID`](#commercelayer-authorizationvoid-id)
|
|
39
40
|
* [`commercelayer axerve_payment ID`](#commercelayer-axerve_payment-id)
|
|
40
41
|
* [`commercelayer axerve_payment:update ID`](#commercelayer-axerve_paymentupdate-id)
|
|
@@ -45,6 +46,7 @@ $ commercelayer plugins:install triggers
|
|
|
45
46
|
* [`commercelayer buy_x_pay_y_promotion:disable ID`](#commercelayer-buy_x_pay_y_promotiondisable-id)
|
|
46
47
|
* [`commercelayer buy_x_pay_y_promotion:enable ID`](#commercelayer-buy_x_pay_y_promotionenable-id)
|
|
47
48
|
* [`commercelayer capture ID`](#commercelayer-capture-id)
|
|
49
|
+
* [`commercelayer capture:forward ID`](#commercelayer-captureforward-id)
|
|
48
50
|
* [`commercelayer capture:refund ID`](#commercelayer-capturerefund-id)
|
|
49
51
|
* [`commercelayer capture:refund_amount_cents ID`](#commercelayer-capturerefund_amount_cents-id)
|
|
50
52
|
* [`commercelayer checkout_com_payment ID`](#commercelayer-checkout_com_payment-id)
|
|
@@ -142,6 +144,8 @@ $ commercelayer plugins:install triggers
|
|
|
142
144
|
* [`commercelayer return:archive ID`](#commercelayer-returnarchive-id)
|
|
143
145
|
* [`commercelayer return:cancel ID`](#commercelayer-returncancel-id)
|
|
144
146
|
* [`commercelayer return:receive ID`](#commercelayer-returnreceive-id)
|
|
147
|
+
* [`commercelayer return:refund ID`](#commercelayer-returnrefund-id)
|
|
148
|
+
* [`commercelayer return:refund_amount_cents ID`](#commercelayer-returnrefund_amount_cents-id)
|
|
145
149
|
* [`commercelayer return:reject ID`](#commercelayer-returnreject-id)
|
|
146
150
|
* [`commercelayer return:request ID`](#commercelayer-returnrequest-id)
|
|
147
151
|
* [`commercelayer return:restock ID`](#commercelayer-returnrestock-id)
|
|
@@ -152,6 +156,7 @@ $ commercelayer plugins:install triggers
|
|
|
152
156
|
* [`commercelayer satispay_payment ID`](#commercelayer-satispay_payment-id)
|
|
153
157
|
* [`commercelayer satispay_payment:refresh ID`](#commercelayer-satispay_paymentrefresh-id)
|
|
154
158
|
* [`commercelayer shipment ID`](#commercelayer-shipment-id)
|
|
159
|
+
* [`commercelayer shipment:cancel ID`](#commercelayer-shipmentcancel-id)
|
|
155
160
|
* [`commercelayer shipment:decrement_stock ID`](#commercelayer-shipmentdecrement_stock-id)
|
|
156
161
|
* [`commercelayer shipment:deliver ID`](#commercelayer-shipmentdeliver-id)
|
|
157
162
|
* [`commercelayer shipment:get_rates ID`](#commercelayer-shipmentget_rates-id)
|
|
@@ -281,7 +286,7 @@ _See code: [src/commands/authorization/capture.ts](https://github.com/commercela
|
|
|
281
286
|
|
|
282
287
|
### `commercelayer authorization:capture_amount_cents ID`
|
|
283
288
|
|
|
284
|
-
|
|
289
|
+
Send this attribute as a value in cents if you want to overwrite the amount to be captured.
|
|
285
290
|
|
|
286
291
|
```sh-session
|
|
287
292
|
USAGE
|
|
@@ -296,11 +301,34 @@ FLAGS
|
|
|
296
301
|
-u, --unformatted print JSON output without indentation
|
|
297
302
|
|
|
298
303
|
DESCRIPTION
|
|
299
|
-
|
|
304
|
+
Send this attribute as a value in cents if you want to overwrite the amount to be captured.
|
|
300
305
|
```
|
|
301
306
|
|
|
302
307
|
_See code: [src/commands/authorization/capture_amount_cents.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/authorization/capture_amount_cents.ts)_
|
|
303
308
|
|
|
309
|
+
### `commercelayer authorization:forward ID`
|
|
310
|
+
|
|
311
|
+
Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states accordingly.
|
|
312
|
+
|
|
313
|
+
```sh-session
|
|
314
|
+
USAGE
|
|
315
|
+
$ commercelayer authorization:forward ID [-u [-j -p]]
|
|
316
|
+
|
|
317
|
+
ARGUMENTS
|
|
318
|
+
ID the unique id of the resource
|
|
319
|
+
|
|
320
|
+
FLAGS
|
|
321
|
+
-j, --json print result in JSON format
|
|
322
|
+
-p, --print print out the modified resource
|
|
323
|
+
-u, --unformatted print JSON output without indentation
|
|
324
|
+
|
|
325
|
+
DESCRIPTION
|
|
326
|
+
Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states
|
|
327
|
+
accordingly.
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
_See code: [src/commands/authorization/forward.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/authorization/forward.ts)_
|
|
331
|
+
|
|
304
332
|
### `commercelayer authorization:void ID`
|
|
305
333
|
|
|
306
334
|
Send this attribute if you want to create a void for this authorization.
|
|
@@ -523,6 +551,29 @@ DESCRIPTION
|
|
|
523
551
|
|
|
524
552
|
_See code: [src/commands/capture/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/capture/index.ts)_
|
|
525
553
|
|
|
554
|
+
### `commercelayer capture:forward ID`
|
|
555
|
+
|
|
556
|
+
Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states accordingly.
|
|
557
|
+
|
|
558
|
+
```sh-session
|
|
559
|
+
USAGE
|
|
560
|
+
$ commercelayer capture:forward ID [-u [-j -p]]
|
|
561
|
+
|
|
562
|
+
ARGUMENTS
|
|
563
|
+
ID the unique id of the resource
|
|
564
|
+
|
|
565
|
+
FLAGS
|
|
566
|
+
-j, --json print result in JSON format
|
|
567
|
+
-p, --print print out the modified resource
|
|
568
|
+
-u, --unformatted print JSON output without indentation
|
|
569
|
+
|
|
570
|
+
DESCRIPTION
|
|
571
|
+
Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states
|
|
572
|
+
accordingly.
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
_See code: [src/commands/capture/forward.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/capture/forward.ts)_
|
|
576
|
+
|
|
526
577
|
### `commercelayer capture:refund ID`
|
|
527
578
|
|
|
528
579
|
Send this attribute if you want to create a refund for this capture.
|
|
@@ -547,7 +598,7 @@ _See code: [src/commands/capture/refund.ts](https://github.com/commercelayer/com
|
|
|
547
598
|
|
|
548
599
|
### `commercelayer capture:refund_amount_cents ID`
|
|
549
600
|
|
|
550
|
-
|
|
601
|
+
Send this attribute as a value in cents if you want to overwrite the amount to be refunded.
|
|
551
602
|
|
|
552
603
|
```sh-session
|
|
553
604
|
USAGE
|
|
@@ -562,7 +613,7 @@ FLAGS
|
|
|
562
613
|
-u, --unformatted print JSON output without indentation
|
|
563
614
|
|
|
564
615
|
DESCRIPTION
|
|
565
|
-
|
|
616
|
+
Send this attribute as a value in cents if you want to overwrite the amount to be refunded.
|
|
566
617
|
```
|
|
567
618
|
|
|
568
619
|
_See code: [src/commands/capture/refund_amount_cents.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/capture/refund_amount_cents.ts)_
|
|
@@ -1656,7 +1707,7 @@ _See code: [src/commands/order/archive.ts](https://github.com/commercelayer/comm
|
|
|
1656
1707
|
|
|
1657
1708
|
### `commercelayer order:authorization_amount_cents ID`
|
|
1658
1709
|
|
|
1659
|
-
|
|
1710
|
+
Send this attribute as a value in cents if you want to overwrite the amount to be authorized.
|
|
1660
1711
|
|
|
1661
1712
|
```sh-session
|
|
1662
1713
|
USAGE
|
|
@@ -1671,7 +1722,7 @@ FLAGS
|
|
|
1671
1722
|
-u, --unformatted print JSON output without indentation
|
|
1672
1723
|
|
|
1673
1724
|
DESCRIPTION
|
|
1674
|
-
|
|
1725
|
+
Send this attribute as a value in cents if you want to overwrite the amount to be authorized.
|
|
1675
1726
|
```
|
|
1676
1727
|
|
|
1677
1728
|
_See code: [src/commands/order/authorization_amount_cents.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order/authorization_amount_cents.ts)_
|
|
@@ -2679,6 +2730,50 @@ DESCRIPTION
|
|
|
2679
2730
|
|
|
2680
2731
|
_See code: [src/commands/return/receive.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/return/receive.ts)_
|
|
2681
2732
|
|
|
2733
|
+
### `commercelayer return:refund ID`
|
|
2734
|
+
|
|
2735
|
+
Send this attribute if you want to create a refund for this return.
|
|
2736
|
+
|
|
2737
|
+
```sh-session
|
|
2738
|
+
USAGE
|
|
2739
|
+
$ commercelayer return:refund ID [-u [-j -p]]
|
|
2740
|
+
|
|
2741
|
+
ARGUMENTS
|
|
2742
|
+
ID the unique id of the resource
|
|
2743
|
+
|
|
2744
|
+
FLAGS
|
|
2745
|
+
-j, --json print result in JSON format
|
|
2746
|
+
-p, --print print out the modified resource
|
|
2747
|
+
-u, --unformatted print JSON output without indentation
|
|
2748
|
+
|
|
2749
|
+
DESCRIPTION
|
|
2750
|
+
Send this attribute if you want to create a refund for this return.
|
|
2751
|
+
```
|
|
2752
|
+
|
|
2753
|
+
_See code: [src/commands/return/refund.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/return/refund.ts)_
|
|
2754
|
+
|
|
2755
|
+
### `commercelayer return:refund_amount_cents ID`
|
|
2756
|
+
|
|
2757
|
+
Send this attribute as a value in cents to specify the amount to be refunded.
|
|
2758
|
+
|
|
2759
|
+
```sh-session
|
|
2760
|
+
USAGE
|
|
2761
|
+
$ commercelayer return:refund_amount_cents ID [-u [-j -p]]
|
|
2762
|
+
|
|
2763
|
+
ARGUMENTS
|
|
2764
|
+
ID the unique id of the resource
|
|
2765
|
+
|
|
2766
|
+
FLAGS
|
|
2767
|
+
-j, --json print result in JSON format
|
|
2768
|
+
-p, --print print out the modified resource
|
|
2769
|
+
-u, --unformatted print JSON output without indentation
|
|
2770
|
+
|
|
2771
|
+
DESCRIPTION
|
|
2772
|
+
Send this attribute as a value in cents to specify the amount to be refunded.
|
|
2773
|
+
```
|
|
2774
|
+
|
|
2775
|
+
_See code: [src/commands/return/refund_amount_cents.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/return/refund_amount_cents.ts)_
|
|
2776
|
+
|
|
2682
2777
|
### `commercelayer return:reject ID`
|
|
2683
2778
|
|
|
2684
2779
|
Send this attribute if you want to mark this return as rejected.
|
|
@@ -2899,6 +2994,28 @@ DESCRIPTION
|
|
|
2899
2994
|
|
|
2900
2995
|
_See code: [src/commands/shipment/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/shipment/index.ts)_
|
|
2901
2996
|
|
|
2997
|
+
### `commercelayer shipment:cancel ID`
|
|
2998
|
+
|
|
2999
|
+
Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered).
|
|
3000
|
+
|
|
3001
|
+
```sh-session
|
|
3002
|
+
USAGE
|
|
3003
|
+
$ commercelayer shipment:cancel ID [-u [-j -p]]
|
|
3004
|
+
|
|
3005
|
+
ARGUMENTS
|
|
3006
|
+
ID the unique id of the resource
|
|
3007
|
+
|
|
3008
|
+
FLAGS
|
|
3009
|
+
-j, --json print result in JSON format
|
|
3010
|
+
-p, --print print out the modified resource
|
|
3011
|
+
-u, --unformatted print JSON output without indentation
|
|
3012
|
+
|
|
3013
|
+
DESCRIPTION
|
|
3014
|
+
Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered).
|
|
3015
|
+
```
|
|
3016
|
+
|
|
3017
|
+
_See code: [src/commands/shipment/cancel.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/shipment/cancel.ts)_
|
|
3018
|
+
|
|
2902
3019
|
### `commercelayer shipment:decrement_stock ID`
|
|
2903
3020
|
|
|
2904
3021
|
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.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class AuthorizationForward 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 authorizations_1 = require("../../triggers/authorizations");
|
|
6
|
+
const TRIGGER = 'forward';
|
|
7
|
+
class AuthorizationForward extends base_1.default {
|
|
8
|
+
static description = authorizations_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(AuthorizationForward);
|
|
15
|
+
const res = await this.executeAction('authorizations', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('authorization', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = AuthorizationForward;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class CaptureForward 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 captures_1 = require("../../triggers/captures");
|
|
6
|
+
const TRIGGER = 'forward';
|
|
7
|
+
class CaptureForward extends base_1.default {
|
|
8
|
+
static description = captures_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(CaptureForward);
|
|
15
|
+
const res = await this.executeAction('captures', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('capture', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = CaptureForward;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class ReturnRefund 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 returns_1 = require("../../triggers/returns");
|
|
6
|
+
const TRIGGER = 'refund';
|
|
7
|
+
class ReturnRefund extends base_1.default {
|
|
8
|
+
static description = returns_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(ReturnRefund);
|
|
15
|
+
const res = await this.executeAction('returns', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('return', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = ReturnRefund;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class ReturnRefundAmountCents 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 returns_1 = require("../../triggers/returns");
|
|
6
|
+
const TRIGGER = 'refund_amount_cents';
|
|
7
|
+
class ReturnRefundAmountCents extends base_1.default {
|
|
8
|
+
static description = returns_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(ReturnRefundAmountCents);
|
|
15
|
+
const res = await this.executeAction('returns', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('return', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = ReturnRefundAmountCents;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class ShipmentCancel 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 = 'cancel';
|
|
7
|
+
class ShipmentCancel 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(ShipmentCancel);
|
|
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 = ShipmentCancel;
|
package/lib/exec.js
CHANGED
|
@@ -19,10 +19,11 @@ const commercelayerInit = (flags, config) => {
|
|
|
19
19
|
const exec = async (resourceType, id, action, flags, fields, config) => {
|
|
20
20
|
const cl = commercelayerInit(flags, config);
|
|
21
21
|
const resSdk = cl[resourceType];
|
|
22
|
-
await
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
await resSdk.retrieve(id).catch((err) => {
|
|
23
|
+
if (cl.isApiError(err) && (err.status === 404)) {
|
|
24
|
+
const resource = cli_core_1.clApi.humanizeResource(cli_core_1.clText.singularize(resourceType));
|
|
25
25
|
throw new errors_1.CLIError(`Invalid ${resource} or ${resource} not found: ${cli_core_1.clColor.msg.error(id)}`);
|
|
26
|
+
}
|
|
26
27
|
});
|
|
27
28
|
const res = { id, [`_${action}`]: flags.value || true };
|
|
28
29
|
const params = {};
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.triggers = void 0;
|
|
4
4
|
exports.triggers = {
|
|
5
|
+
forward: {
|
|
6
|
+
action: 'forward',
|
|
7
|
+
trigger: '_forward',
|
|
8
|
+
description: 'Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states accordingly.',
|
|
9
|
+
},
|
|
5
10
|
capture: {
|
|
6
11
|
action: 'capture',
|
|
7
12
|
trigger: '_capture',
|
|
@@ -10,7 +15,7 @@ exports.triggers = {
|
|
|
10
15
|
capture_amount_cents: {
|
|
11
16
|
action: 'capture_amount_cents',
|
|
12
17
|
trigger: '_capture_amount_cents',
|
|
13
|
-
description: '
|
|
18
|
+
description: 'Send this attribute as a value in cents if you want to overwrite the amount to be captured.',
|
|
14
19
|
},
|
|
15
20
|
void: {
|
|
16
21
|
action: 'void',
|
package/lib/triggers/captures.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.triggers = void 0;
|
|
4
4
|
exports.triggers = {
|
|
5
|
+
forward: {
|
|
6
|
+
action: 'forward',
|
|
7
|
+
trigger: '_forward',
|
|
8
|
+
description: 'Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states accordingly.',
|
|
9
|
+
},
|
|
5
10
|
refund: {
|
|
6
11
|
action: 'refund',
|
|
7
12
|
trigger: '_refund',
|
|
@@ -10,6 +15,6 @@ exports.triggers = {
|
|
|
10
15
|
refund_amount_cents: {
|
|
11
16
|
action: 'refund_amount_cents',
|
|
12
17
|
trigger: '_refund_amount_cents',
|
|
13
|
-
description: '
|
|
18
|
+
description: 'Send this attribute as a value in cents if you want to overwrite the amount to be refunded.',
|
|
14
19
|
},
|
|
15
20
|
};
|
package/lib/triggers/orders.js
CHANGED
|
@@ -45,7 +45,7 @@ exports.triggers = {
|
|
|
45
45
|
authorization_amount_cents: {
|
|
46
46
|
action: 'authorization_amount_cents',
|
|
47
47
|
trigger: '_authorization_amount_cents',
|
|
48
|
-
description: '
|
|
48
|
+
description: 'Send this attribute as a value in cents if you want to overwrite the amount to be authorized.',
|
|
49
49
|
},
|
|
50
50
|
capture: {
|
|
51
51
|
action: 'capture',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Trigger } from '../common';
|
|
2
2
|
export declare const triggers: Record<string, Trigger>;
|
|
3
|
-
export type ActionType = 'request' | 'approve' | 'cancel' | 'ship' | 'reject' | 'receive' | 'restock' | 'archive' | 'unarchive';
|
|
3
|
+
export type ActionType = 'request' | 'approve' | 'cancel' | 'ship' | 'reject' | 'receive' | 'restock' | 'archive' | 'unarchive' | 'refund' | 'refund_amount_cents';
|
package/lib/triggers/returns.js
CHANGED
|
@@ -47,4 +47,14 @@ exports.triggers = {
|
|
|
47
47
|
trigger: '_unarchive',
|
|
48
48
|
description: 'Send this attribute if you want to unarchive the return.',
|
|
49
49
|
},
|
|
50
|
+
refund: {
|
|
51
|
+
action: 'refund',
|
|
52
|
+
trigger: '_refund',
|
|
53
|
+
description: 'Send this attribute if you want to create a refund for this return.',
|
|
54
|
+
},
|
|
55
|
+
refund_amount_cents: {
|
|
56
|
+
action: 'refund_amount_cents',
|
|
57
|
+
trigger: '_refund_amount_cents',
|
|
58
|
+
description: 'Send this attribute as a value in cents to specify the amount to be refunded.',
|
|
59
|
+
},
|
|
50
60
|
};
|
|
@@ -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' | 'deliver' | 'reserve_stock' | 'release_stock' | 'decrement_stock' | 'get_rates' | 'purchase';
|
|
3
|
+
export type ActionType = 'upcoming' | 'cancel' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'ship' | 'deliver' | 'reserve_stock' | 'release_stock' | 'decrement_stock' | 'get_rates' | 'purchase';
|
|
@@ -7,6 +7,11 @@ exports.triggers = {
|
|
|
7
7
|
trigger: '_upcoming',
|
|
8
8
|
description: 'Send this attribute if you want to mark this shipment as upcoming.',
|
|
9
9
|
},
|
|
10
|
+
cancel: {
|
|
11
|
+
action: 'cancel',
|
|
12
|
+
trigger: '_cancel',
|
|
13
|
+
description: 'Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered).',
|
|
14
|
+
},
|
|
10
15
|
on_hold: {
|
|
11
16
|
action: 'on_hold',
|
|
12
17
|
trigger: '_on_hold',
|
package/oclif.manifest.json
CHANGED
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"required": true
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
|
-
"description": "
|
|
296
|
+
"description": "Send this attribute as a value in cents if you want to overwrite the amount to be captured.",
|
|
297
297
|
"flags": {
|
|
298
298
|
"organization": {
|
|
299
299
|
"char": "o",
|
|
@@ -372,6 +372,94 @@
|
|
|
372
372
|
"capture_amount_cents.js"
|
|
373
373
|
]
|
|
374
374
|
},
|
|
375
|
+
"authorization:forward": {
|
|
376
|
+
"aliases": [],
|
|
377
|
+
"args": {
|
|
378
|
+
"id": {
|
|
379
|
+
"description": "the unique id of the resource",
|
|
380
|
+
"name": "id",
|
|
381
|
+
"required": true
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"description": "Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states accordingly.",
|
|
385
|
+
"flags": {
|
|
386
|
+
"organization": {
|
|
387
|
+
"char": "o",
|
|
388
|
+
"description": "the slug of your organization",
|
|
389
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
390
|
+
"hidden": true,
|
|
391
|
+
"name": "organization",
|
|
392
|
+
"required": true,
|
|
393
|
+
"hasDynamicHelp": false,
|
|
394
|
+
"multiple": false,
|
|
395
|
+
"type": "option"
|
|
396
|
+
},
|
|
397
|
+
"domain": {
|
|
398
|
+
"char": "d",
|
|
399
|
+
"dependsOn": [
|
|
400
|
+
"organization"
|
|
401
|
+
],
|
|
402
|
+
"env": "CL_CLI_DOMAIN",
|
|
403
|
+
"hidden": true,
|
|
404
|
+
"name": "domain",
|
|
405
|
+
"required": false,
|
|
406
|
+
"hasDynamicHelp": false,
|
|
407
|
+
"multiple": false,
|
|
408
|
+
"type": "option"
|
|
409
|
+
},
|
|
410
|
+
"accessToken": {
|
|
411
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
412
|
+
"hidden": true,
|
|
413
|
+
"name": "accessToken",
|
|
414
|
+
"required": true,
|
|
415
|
+
"hasDynamicHelp": false,
|
|
416
|
+
"multiple": false,
|
|
417
|
+
"type": "option"
|
|
418
|
+
},
|
|
419
|
+
"print": {
|
|
420
|
+
"char": "p",
|
|
421
|
+
"description": "print out the modified resource",
|
|
422
|
+
"name": "print",
|
|
423
|
+
"allowNo": false,
|
|
424
|
+
"type": "boolean"
|
|
425
|
+
},
|
|
426
|
+
"json": {
|
|
427
|
+
"char": "j",
|
|
428
|
+
"dependsOn": [
|
|
429
|
+
"print"
|
|
430
|
+
],
|
|
431
|
+
"description": "print result in JSON format",
|
|
432
|
+
"name": "json",
|
|
433
|
+
"allowNo": false,
|
|
434
|
+
"type": "boolean"
|
|
435
|
+
},
|
|
436
|
+
"unformatted": {
|
|
437
|
+
"char": "u",
|
|
438
|
+
"dependsOn": [
|
|
439
|
+
"json"
|
|
440
|
+
],
|
|
441
|
+
"description": "print JSON output without indentation",
|
|
442
|
+
"name": "unformatted",
|
|
443
|
+
"allowNo": false,
|
|
444
|
+
"type": "boolean"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"hasDynamicHelp": false,
|
|
448
|
+
"hiddenAliases": [],
|
|
449
|
+
"id": "authorization:forward",
|
|
450
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
451
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
452
|
+
"pluginType": "core",
|
|
453
|
+
"strict": true,
|
|
454
|
+
"enableJsonFlag": false,
|
|
455
|
+
"isESM": false,
|
|
456
|
+
"relativePath": [
|
|
457
|
+
"lib",
|
|
458
|
+
"commands",
|
|
459
|
+
"authorization",
|
|
460
|
+
"forward.js"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
375
463
|
"authorization": {
|
|
376
464
|
"aliases": [],
|
|
377
465
|
"args": {
|
|
@@ -1252,6 +1340,94 @@
|
|
|
1252
1340
|
"index.js"
|
|
1253
1341
|
]
|
|
1254
1342
|
},
|
|
1343
|
+
"capture:forward": {
|
|
1344
|
+
"aliases": [],
|
|
1345
|
+
"args": {
|
|
1346
|
+
"id": {
|
|
1347
|
+
"description": "the unique id of the resource",
|
|
1348
|
+
"name": "id",
|
|
1349
|
+
"required": true
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
"description": "Send this attribute if you want to forwrad a stuck transaction to succeeded and update associated order states accordingly.",
|
|
1353
|
+
"flags": {
|
|
1354
|
+
"organization": {
|
|
1355
|
+
"char": "o",
|
|
1356
|
+
"description": "the slug of your organization",
|
|
1357
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
1358
|
+
"hidden": true,
|
|
1359
|
+
"name": "organization",
|
|
1360
|
+
"required": true,
|
|
1361
|
+
"hasDynamicHelp": false,
|
|
1362
|
+
"multiple": false,
|
|
1363
|
+
"type": "option"
|
|
1364
|
+
},
|
|
1365
|
+
"domain": {
|
|
1366
|
+
"char": "d",
|
|
1367
|
+
"dependsOn": [
|
|
1368
|
+
"organization"
|
|
1369
|
+
],
|
|
1370
|
+
"env": "CL_CLI_DOMAIN",
|
|
1371
|
+
"hidden": true,
|
|
1372
|
+
"name": "domain",
|
|
1373
|
+
"required": false,
|
|
1374
|
+
"hasDynamicHelp": false,
|
|
1375
|
+
"multiple": false,
|
|
1376
|
+
"type": "option"
|
|
1377
|
+
},
|
|
1378
|
+
"accessToken": {
|
|
1379
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
1380
|
+
"hidden": true,
|
|
1381
|
+
"name": "accessToken",
|
|
1382
|
+
"required": true,
|
|
1383
|
+
"hasDynamicHelp": false,
|
|
1384
|
+
"multiple": false,
|
|
1385
|
+
"type": "option"
|
|
1386
|
+
},
|
|
1387
|
+
"print": {
|
|
1388
|
+
"char": "p",
|
|
1389
|
+
"description": "print out the modified resource",
|
|
1390
|
+
"name": "print",
|
|
1391
|
+
"allowNo": false,
|
|
1392
|
+
"type": "boolean"
|
|
1393
|
+
},
|
|
1394
|
+
"json": {
|
|
1395
|
+
"char": "j",
|
|
1396
|
+
"dependsOn": [
|
|
1397
|
+
"print"
|
|
1398
|
+
],
|
|
1399
|
+
"description": "print result in JSON format",
|
|
1400
|
+
"name": "json",
|
|
1401
|
+
"allowNo": false,
|
|
1402
|
+
"type": "boolean"
|
|
1403
|
+
},
|
|
1404
|
+
"unformatted": {
|
|
1405
|
+
"char": "u",
|
|
1406
|
+
"dependsOn": [
|
|
1407
|
+
"json"
|
|
1408
|
+
],
|
|
1409
|
+
"description": "print JSON output without indentation",
|
|
1410
|
+
"name": "unformatted",
|
|
1411
|
+
"allowNo": false,
|
|
1412
|
+
"type": "boolean"
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
"hasDynamicHelp": false,
|
|
1416
|
+
"hiddenAliases": [],
|
|
1417
|
+
"id": "capture:forward",
|
|
1418
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
1419
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
1420
|
+
"pluginType": "core",
|
|
1421
|
+
"strict": true,
|
|
1422
|
+
"enableJsonFlag": false,
|
|
1423
|
+
"isESM": false,
|
|
1424
|
+
"relativePath": [
|
|
1425
|
+
"lib",
|
|
1426
|
+
"commands",
|
|
1427
|
+
"capture",
|
|
1428
|
+
"forward.js"
|
|
1429
|
+
]
|
|
1430
|
+
},
|
|
1255
1431
|
"capture": {
|
|
1256
1432
|
"aliases": [],
|
|
1257
1433
|
"args": {
|
|
@@ -1437,7 +1613,7 @@
|
|
|
1437
1613
|
"required": true
|
|
1438
1614
|
}
|
|
1439
1615
|
},
|
|
1440
|
-
"description": "
|
|
1616
|
+
"description": "Send this attribute as a value in cents if you want to overwrite the amount to be refunded.",
|
|
1441
1617
|
"flags": {
|
|
1442
1618
|
"organization": {
|
|
1443
1619
|
"char": "o",
|
|
@@ -5749,7 +5925,7 @@
|
|
|
5749
5925
|
"required": true
|
|
5750
5926
|
}
|
|
5751
5927
|
},
|
|
5752
|
-
"description": "
|
|
5928
|
+
"description": "Send this attribute as a value in cents if you want to overwrite the amount to be authorized.",
|
|
5753
5929
|
"flags": {
|
|
5754
5930
|
"organization": {
|
|
5755
5931
|
"char": "o",
|
|
@@ -9903,6 +10079,182 @@
|
|
|
9903
10079
|
"receive.js"
|
|
9904
10080
|
]
|
|
9905
10081
|
},
|
|
10082
|
+
"return:refund": {
|
|
10083
|
+
"aliases": [],
|
|
10084
|
+
"args": {
|
|
10085
|
+
"id": {
|
|
10086
|
+
"description": "the unique id of the resource",
|
|
10087
|
+
"name": "id",
|
|
10088
|
+
"required": true
|
|
10089
|
+
}
|
|
10090
|
+
},
|
|
10091
|
+
"description": "Send this attribute if you want to create a refund for this return.",
|
|
10092
|
+
"flags": {
|
|
10093
|
+
"organization": {
|
|
10094
|
+
"char": "o",
|
|
10095
|
+
"description": "the slug of your organization",
|
|
10096
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
10097
|
+
"hidden": true,
|
|
10098
|
+
"name": "organization",
|
|
10099
|
+
"required": true,
|
|
10100
|
+
"hasDynamicHelp": false,
|
|
10101
|
+
"multiple": false,
|
|
10102
|
+
"type": "option"
|
|
10103
|
+
},
|
|
10104
|
+
"domain": {
|
|
10105
|
+
"char": "d",
|
|
10106
|
+
"dependsOn": [
|
|
10107
|
+
"organization"
|
|
10108
|
+
],
|
|
10109
|
+
"env": "CL_CLI_DOMAIN",
|
|
10110
|
+
"hidden": true,
|
|
10111
|
+
"name": "domain",
|
|
10112
|
+
"required": false,
|
|
10113
|
+
"hasDynamicHelp": false,
|
|
10114
|
+
"multiple": false,
|
|
10115
|
+
"type": "option"
|
|
10116
|
+
},
|
|
10117
|
+
"accessToken": {
|
|
10118
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
10119
|
+
"hidden": true,
|
|
10120
|
+
"name": "accessToken",
|
|
10121
|
+
"required": true,
|
|
10122
|
+
"hasDynamicHelp": false,
|
|
10123
|
+
"multiple": false,
|
|
10124
|
+
"type": "option"
|
|
10125
|
+
},
|
|
10126
|
+
"print": {
|
|
10127
|
+
"char": "p",
|
|
10128
|
+
"description": "print out the modified resource",
|
|
10129
|
+
"name": "print",
|
|
10130
|
+
"allowNo": false,
|
|
10131
|
+
"type": "boolean"
|
|
10132
|
+
},
|
|
10133
|
+
"json": {
|
|
10134
|
+
"char": "j",
|
|
10135
|
+
"dependsOn": [
|
|
10136
|
+
"print"
|
|
10137
|
+
],
|
|
10138
|
+
"description": "print result in JSON format",
|
|
10139
|
+
"name": "json",
|
|
10140
|
+
"allowNo": false,
|
|
10141
|
+
"type": "boolean"
|
|
10142
|
+
},
|
|
10143
|
+
"unformatted": {
|
|
10144
|
+
"char": "u",
|
|
10145
|
+
"dependsOn": [
|
|
10146
|
+
"json"
|
|
10147
|
+
],
|
|
10148
|
+
"description": "print JSON output without indentation",
|
|
10149
|
+
"name": "unformatted",
|
|
10150
|
+
"allowNo": false,
|
|
10151
|
+
"type": "boolean"
|
|
10152
|
+
}
|
|
10153
|
+
},
|
|
10154
|
+
"hasDynamicHelp": false,
|
|
10155
|
+
"hiddenAliases": [],
|
|
10156
|
+
"id": "return:refund",
|
|
10157
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
10158
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
10159
|
+
"pluginType": "core",
|
|
10160
|
+
"strict": true,
|
|
10161
|
+
"enableJsonFlag": false,
|
|
10162
|
+
"isESM": false,
|
|
10163
|
+
"relativePath": [
|
|
10164
|
+
"lib",
|
|
10165
|
+
"commands",
|
|
10166
|
+
"return",
|
|
10167
|
+
"refund.js"
|
|
10168
|
+
]
|
|
10169
|
+
},
|
|
10170
|
+
"return:refund_amount_cents": {
|
|
10171
|
+
"aliases": [],
|
|
10172
|
+
"args": {
|
|
10173
|
+
"id": {
|
|
10174
|
+
"description": "the unique id of the resource",
|
|
10175
|
+
"name": "id",
|
|
10176
|
+
"required": true
|
|
10177
|
+
}
|
|
10178
|
+
},
|
|
10179
|
+
"description": "Send this attribute as a value in cents to specify the amount to be refunded.",
|
|
10180
|
+
"flags": {
|
|
10181
|
+
"organization": {
|
|
10182
|
+
"char": "o",
|
|
10183
|
+
"description": "the slug of your organization",
|
|
10184
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
10185
|
+
"hidden": true,
|
|
10186
|
+
"name": "organization",
|
|
10187
|
+
"required": true,
|
|
10188
|
+
"hasDynamicHelp": false,
|
|
10189
|
+
"multiple": false,
|
|
10190
|
+
"type": "option"
|
|
10191
|
+
},
|
|
10192
|
+
"domain": {
|
|
10193
|
+
"char": "d",
|
|
10194
|
+
"dependsOn": [
|
|
10195
|
+
"organization"
|
|
10196
|
+
],
|
|
10197
|
+
"env": "CL_CLI_DOMAIN",
|
|
10198
|
+
"hidden": true,
|
|
10199
|
+
"name": "domain",
|
|
10200
|
+
"required": false,
|
|
10201
|
+
"hasDynamicHelp": false,
|
|
10202
|
+
"multiple": false,
|
|
10203
|
+
"type": "option"
|
|
10204
|
+
},
|
|
10205
|
+
"accessToken": {
|
|
10206
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
10207
|
+
"hidden": true,
|
|
10208
|
+
"name": "accessToken",
|
|
10209
|
+
"required": true,
|
|
10210
|
+
"hasDynamicHelp": false,
|
|
10211
|
+
"multiple": false,
|
|
10212
|
+
"type": "option"
|
|
10213
|
+
},
|
|
10214
|
+
"print": {
|
|
10215
|
+
"char": "p",
|
|
10216
|
+
"description": "print out the modified resource",
|
|
10217
|
+
"name": "print",
|
|
10218
|
+
"allowNo": false,
|
|
10219
|
+
"type": "boolean"
|
|
10220
|
+
},
|
|
10221
|
+
"json": {
|
|
10222
|
+
"char": "j",
|
|
10223
|
+
"dependsOn": [
|
|
10224
|
+
"print"
|
|
10225
|
+
],
|
|
10226
|
+
"description": "print result in JSON format",
|
|
10227
|
+
"name": "json",
|
|
10228
|
+
"allowNo": false,
|
|
10229
|
+
"type": "boolean"
|
|
10230
|
+
},
|
|
10231
|
+
"unformatted": {
|
|
10232
|
+
"char": "u",
|
|
10233
|
+
"dependsOn": [
|
|
10234
|
+
"json"
|
|
10235
|
+
],
|
|
10236
|
+
"description": "print JSON output without indentation",
|
|
10237
|
+
"name": "unformatted",
|
|
10238
|
+
"allowNo": false,
|
|
10239
|
+
"type": "boolean"
|
|
10240
|
+
}
|
|
10241
|
+
},
|
|
10242
|
+
"hasDynamicHelp": false,
|
|
10243
|
+
"hiddenAliases": [],
|
|
10244
|
+
"id": "return:refund_amount_cents",
|
|
10245
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
10246
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
10247
|
+
"pluginType": "core",
|
|
10248
|
+
"strict": true,
|
|
10249
|
+
"enableJsonFlag": false,
|
|
10250
|
+
"isESM": false,
|
|
10251
|
+
"relativePath": [
|
|
10252
|
+
"lib",
|
|
10253
|
+
"commands",
|
|
10254
|
+
"return",
|
|
10255
|
+
"refund_amount_cents.js"
|
|
10256
|
+
]
|
|
10257
|
+
},
|
|
9906
10258
|
"return:reject": {
|
|
9907
10259
|
"aliases": [],
|
|
9908
10260
|
"args": {
|
|
@@ -10695,6 +11047,94 @@
|
|
|
10695
11047
|
"refresh.js"
|
|
10696
11048
|
]
|
|
10697
11049
|
},
|
|
11050
|
+
"shipment:cancel": {
|
|
11051
|
+
"aliases": [],
|
|
11052
|
+
"args": {
|
|
11053
|
+
"id": {
|
|
11054
|
+
"description": "the unique id of the resource",
|
|
11055
|
+
"name": "id",
|
|
11056
|
+
"required": true
|
|
11057
|
+
}
|
|
11058
|
+
},
|
|
11059
|
+
"description": "Send this attribute if you want to mark this shipment as cancelled (unless already shipped or delivered).",
|
|
11060
|
+
"flags": {
|
|
11061
|
+
"organization": {
|
|
11062
|
+
"char": "o",
|
|
11063
|
+
"description": "the slug of your organization",
|
|
11064
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
11065
|
+
"hidden": true,
|
|
11066
|
+
"name": "organization",
|
|
11067
|
+
"required": true,
|
|
11068
|
+
"hasDynamicHelp": false,
|
|
11069
|
+
"multiple": false,
|
|
11070
|
+
"type": "option"
|
|
11071
|
+
},
|
|
11072
|
+
"domain": {
|
|
11073
|
+
"char": "d",
|
|
11074
|
+
"dependsOn": [
|
|
11075
|
+
"organization"
|
|
11076
|
+
],
|
|
11077
|
+
"env": "CL_CLI_DOMAIN",
|
|
11078
|
+
"hidden": true,
|
|
11079
|
+
"name": "domain",
|
|
11080
|
+
"required": false,
|
|
11081
|
+
"hasDynamicHelp": false,
|
|
11082
|
+
"multiple": false,
|
|
11083
|
+
"type": "option"
|
|
11084
|
+
},
|
|
11085
|
+
"accessToken": {
|
|
11086
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
11087
|
+
"hidden": true,
|
|
11088
|
+
"name": "accessToken",
|
|
11089
|
+
"required": true,
|
|
11090
|
+
"hasDynamicHelp": false,
|
|
11091
|
+
"multiple": false,
|
|
11092
|
+
"type": "option"
|
|
11093
|
+
},
|
|
11094
|
+
"print": {
|
|
11095
|
+
"char": "p",
|
|
11096
|
+
"description": "print out the modified resource",
|
|
11097
|
+
"name": "print",
|
|
11098
|
+
"allowNo": false,
|
|
11099
|
+
"type": "boolean"
|
|
11100
|
+
},
|
|
11101
|
+
"json": {
|
|
11102
|
+
"char": "j",
|
|
11103
|
+
"dependsOn": [
|
|
11104
|
+
"print"
|
|
11105
|
+
],
|
|
11106
|
+
"description": "print result in JSON format",
|
|
11107
|
+
"name": "json",
|
|
11108
|
+
"allowNo": false,
|
|
11109
|
+
"type": "boolean"
|
|
11110
|
+
},
|
|
11111
|
+
"unformatted": {
|
|
11112
|
+
"char": "u",
|
|
11113
|
+
"dependsOn": [
|
|
11114
|
+
"json"
|
|
11115
|
+
],
|
|
11116
|
+
"description": "print JSON output without indentation",
|
|
11117
|
+
"name": "unformatted",
|
|
11118
|
+
"allowNo": false,
|
|
11119
|
+
"type": "boolean"
|
|
11120
|
+
}
|
|
11121
|
+
},
|
|
11122
|
+
"hasDynamicHelp": false,
|
|
11123
|
+
"hiddenAliases": [],
|
|
11124
|
+
"id": "shipment:cancel",
|
|
11125
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
11126
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
11127
|
+
"pluginType": "core",
|
|
11128
|
+
"strict": true,
|
|
11129
|
+
"enableJsonFlag": false,
|
|
11130
|
+
"isESM": false,
|
|
11131
|
+
"relativePath": [
|
|
11132
|
+
"lib",
|
|
11133
|
+
"commands",
|
|
11134
|
+
"shipment",
|
|
11135
|
+
"cancel.js"
|
|
11136
|
+
]
|
|
11137
|
+
},
|
|
10698
11138
|
"shipment:decrement_stock": {
|
|
10699
11139
|
"aliases": [],
|
|
10700
11140
|
"args": {
|
|
@@ -14128,5 +14568,5 @@
|
|
|
14128
14568
|
]
|
|
14129
14569
|
}
|
|
14130
14570
|
},
|
|
14131
|
-
"version": "4.
|
|
14571
|
+
"version": "4.6.0"
|
|
14132
14572
|
}
|
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.6.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,29 +56,29 @@
|
|
|
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.2.
|
|
59
|
+
"@oclif/plugin-help": "^6.2.6",
|
|
60
60
|
"@oclif/test": "^3.2.15",
|
|
61
61
|
"@semantic-release/changelog": "^6.0.3",
|
|
62
62
|
"@semantic-release/git": "^10.0.1",
|
|
63
63
|
"@types/chai": "^4.3.16",
|
|
64
64
|
"@types/inquirer": "^8.2.10",
|
|
65
65
|
"@types/lodash.snakecase": "^4.1.9",
|
|
66
|
-
"@types/mocha": "^10.0.
|
|
67
|
-
"@types/node": "^20.14.
|
|
66
|
+
"@types/mocha": "^10.0.7",
|
|
67
|
+
"@types/node": "^20.14.10",
|
|
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
|
-
"mocha": "^10.
|
|
72
|
+
"mocha": "^10.6.0",
|
|
73
73
|
"nyc": "^15.1.0",
|
|
74
|
-
"oclif": "^4.
|
|
74
|
+
"oclif": "^4.14.5",
|
|
75
75
|
"semantic-release": "^22.0.12",
|
|
76
|
-
"tsx": "^4.
|
|
76
|
+
"tsx": "^4.16.2",
|
|
77
77
|
"typescript": "5.3.2"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@commercelayer/cli-core": "^5.
|
|
81
|
-
"@commercelayer/sdk": "^6.
|
|
80
|
+
"@commercelayer/cli-core": "^5.1.1",
|
|
81
|
+
"@commercelayer/sdk": "^6.9.1",
|
|
82
82
|
"@oclif/core": "^3.27.0",
|
|
83
83
|
"inquirer": "^8.2.6",
|
|
84
84
|
"tslib": "^2.6.3"
|