@commercelayer/cli-plugin-triggers 4.9.2 → 4.10.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 +26 -2
- package/lib/commands/adyen_payment/authorize.d.ts +9 -0
- package/lib/commands/adyen_payment/authorize.js +22 -0
- package/lib/triggers/adyen_payments.d.ts +1 -1
- package/lib/triggers/adyen_payments.js +5 -0
- package/lib/triggers/orders.js +1 -1
- package/oclif.manifest.json +90 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ $ commercelayer plugins:install triggers
|
|
|
31
31
|
<!-- commands -->
|
|
32
32
|
|
|
33
33
|
* [`commercelayer adyen_payment ID`](#commercelayer-adyen_payment-id)
|
|
34
|
+
* [`commercelayer adyen_payment:authorize ID`](#commercelayer-adyen_paymentauthorize-id)
|
|
34
35
|
* [`commercelayer adyen_payment:details ID`](#commercelayer-adyen_paymentdetails-id)
|
|
35
36
|
* [`commercelayer authorization ID`](#commercelayer-authorization-id)
|
|
36
37
|
* [`commercelayer authorization:cancel ID`](#commercelayer-authorizationcancel-id)
|
|
@@ -238,6 +239,28 @@ DESCRIPTION
|
|
|
238
239
|
|
|
239
240
|
_See code: [src/commands/adyen_payment/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/adyen_payment/index.ts)_
|
|
240
241
|
|
|
242
|
+
### `commercelayer adyen_payment:authorize ID`
|
|
243
|
+
|
|
244
|
+
Send this attribute if you want to authorize the payment.
|
|
245
|
+
|
|
246
|
+
```sh-session
|
|
247
|
+
USAGE
|
|
248
|
+
$ commercelayer adyen_payment:authorize ID [-u [-j -p]]
|
|
249
|
+
|
|
250
|
+
ARGUMENTS
|
|
251
|
+
ID the unique id of the resource
|
|
252
|
+
|
|
253
|
+
FLAGS
|
|
254
|
+
-j, --json print result in JSON format
|
|
255
|
+
-p, --print print out the modified resource
|
|
256
|
+
-u, --unformatted print JSON output without indentation
|
|
257
|
+
|
|
258
|
+
DESCRIPTION
|
|
259
|
+
Send this attribute if you want to authorize the payment.
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
_See code: [src/commands/adyen_payment/authorize.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/adyen_payment/authorize.ts)_
|
|
263
|
+
|
|
241
264
|
### `commercelayer adyen_payment:details ID`
|
|
242
265
|
|
|
243
266
|
Send this attribute if you want to send additional details the payment request.
|
|
@@ -2216,7 +2239,7 @@ _See code: [src/commands/order/customer_payment_source_id.ts](https://github.com
|
|
|
2216
2239
|
|
|
2217
2240
|
### `commercelayer order:fix_payment_source ID`
|
|
2218
2241
|
|
|
2219
|
-
Send this attribute if you want to set the payment source associated with the last succeeded authorization. At the end of the fix the order should be placed and authorized and ready
|
|
2242
|
+
Send this attribute if you want to set the payment source associated with the last succeeded authorization. At the end of the fix the order should be placed and authorized and ready to be approved. A tentative to fix the payment source is done before approval automatically. Cannot be passed by sales channels.
|
|
2220
2243
|
|
|
2221
2244
|
```sh-session
|
|
2222
2245
|
USAGE
|
|
@@ -2232,7 +2255,8 @@ FLAGS
|
|
|
2232
2255
|
|
|
2233
2256
|
DESCRIPTION
|
|
2234
2257
|
Send this attribute if you want to set the payment source associated with the last succeeded authorization. At the end
|
|
2235
|
-
of the fix the order should be placed and authorized and ready
|
|
2258
|
+
of the fix the order should be placed and authorized and ready to be approved. A tentative to fix the payment source
|
|
2259
|
+
is done before approval automatically. Cannot be passed by sales channels.
|
|
2236
2260
|
```
|
|
2237
2261
|
|
|
2238
2262
|
_See code: [src/commands/order/fix_payment_source.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order/fix_payment_source.ts)_
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Command from '../../base';
|
|
2
|
+
export default class AdyenPaymentAuthorize 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 adyen_payments_1 = require("../../triggers/adyen_payments");
|
|
6
|
+
const TRIGGER = 'authorize';
|
|
7
|
+
class AdyenPaymentAuthorize extends base_1.default {
|
|
8
|
+
static description = adyen_payments_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(AdyenPaymentAuthorize);
|
|
15
|
+
const res = await this.executeAction('adyen_payments', args.id, TRIGGER, flags);
|
|
16
|
+
if (flags.print)
|
|
17
|
+
this.printOutput(res, flags);
|
|
18
|
+
this.successMessage('adyen_payment', TRIGGER, res.id);
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = AdyenPaymentAuthorize;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.triggers = void 0;
|
|
4
4
|
exports.triggers = {
|
|
5
|
+
authorize: {
|
|
6
|
+
action: 'authorize',
|
|
7
|
+
trigger: '_authorize',
|
|
8
|
+
description: 'Send this attribute if you want to authorize the payment.',
|
|
9
|
+
},
|
|
5
10
|
details: {
|
|
6
11
|
action: 'details',
|
|
7
12
|
trigger: '_details',
|
package/lib/triggers/orders.js
CHANGED
|
@@ -75,7 +75,7 @@ exports.triggers = {
|
|
|
75
75
|
fix_payment_source: {
|
|
76
76
|
action: 'fix_payment_source',
|
|
77
77
|
trigger: '_fix_payment_source',
|
|
78
|
-
description: 'Send this attribute if you want to set the payment source associated with the last succeeded authorization. At the end of the fix the order should be placed and authorized and ready
|
|
78
|
+
description: 'Send this attribute if you want to set the payment source associated with the last succeeded authorization. At the end of the fix the order should be placed and authorized and ready to be approved. A tentative to fix the payment source is done before approval automatically. Cannot be passed by sales channels.',
|
|
79
79
|
},
|
|
80
80
|
billing_address_clone_id: {
|
|
81
81
|
action: 'billing_address_clone_id',
|
package/oclif.manifest.json
CHANGED
|
@@ -20,6 +20,94 @@
|
|
|
20
20
|
"noc.js"
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
|
+
"adyen_payment:authorize": {
|
|
24
|
+
"aliases": [],
|
|
25
|
+
"args": {
|
|
26
|
+
"id": {
|
|
27
|
+
"description": "the unique id of the resource",
|
|
28
|
+
"name": "id",
|
|
29
|
+
"required": true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"description": "Send this attribute if you want to authorize the payment.",
|
|
33
|
+
"flags": {
|
|
34
|
+
"organization": {
|
|
35
|
+
"char": "o",
|
|
36
|
+
"description": "the slug of your organization",
|
|
37
|
+
"env": "CL_CLI_ORGANIZATION",
|
|
38
|
+
"hidden": true,
|
|
39
|
+
"name": "organization",
|
|
40
|
+
"required": true,
|
|
41
|
+
"hasDynamicHelp": false,
|
|
42
|
+
"multiple": false,
|
|
43
|
+
"type": "option"
|
|
44
|
+
},
|
|
45
|
+
"domain": {
|
|
46
|
+
"char": "d",
|
|
47
|
+
"dependsOn": [
|
|
48
|
+
"organization"
|
|
49
|
+
],
|
|
50
|
+
"env": "CL_CLI_DOMAIN",
|
|
51
|
+
"hidden": true,
|
|
52
|
+
"name": "domain",
|
|
53
|
+
"required": false,
|
|
54
|
+
"hasDynamicHelp": false,
|
|
55
|
+
"multiple": false,
|
|
56
|
+
"type": "option"
|
|
57
|
+
},
|
|
58
|
+
"accessToken": {
|
|
59
|
+
"env": "CL_CLI_ACCESS_TOKEN",
|
|
60
|
+
"hidden": true,
|
|
61
|
+
"name": "accessToken",
|
|
62
|
+
"required": true,
|
|
63
|
+
"hasDynamicHelp": false,
|
|
64
|
+
"multiple": false,
|
|
65
|
+
"type": "option"
|
|
66
|
+
},
|
|
67
|
+
"print": {
|
|
68
|
+
"char": "p",
|
|
69
|
+
"description": "print out the modified resource",
|
|
70
|
+
"name": "print",
|
|
71
|
+
"allowNo": false,
|
|
72
|
+
"type": "boolean"
|
|
73
|
+
},
|
|
74
|
+
"json": {
|
|
75
|
+
"char": "j",
|
|
76
|
+
"dependsOn": [
|
|
77
|
+
"print"
|
|
78
|
+
],
|
|
79
|
+
"description": "print result in JSON format",
|
|
80
|
+
"name": "json",
|
|
81
|
+
"allowNo": false,
|
|
82
|
+
"type": "boolean"
|
|
83
|
+
},
|
|
84
|
+
"unformatted": {
|
|
85
|
+
"char": "u",
|
|
86
|
+
"dependsOn": [
|
|
87
|
+
"json"
|
|
88
|
+
],
|
|
89
|
+
"description": "print JSON output without indentation",
|
|
90
|
+
"name": "unformatted",
|
|
91
|
+
"allowNo": false,
|
|
92
|
+
"type": "boolean"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"hasDynamicHelp": false,
|
|
96
|
+
"hiddenAliases": [],
|
|
97
|
+
"id": "adyen_payment:authorize",
|
|
98
|
+
"pluginAlias": "@commercelayer/cli-plugin-triggers",
|
|
99
|
+
"pluginName": "@commercelayer/cli-plugin-triggers",
|
|
100
|
+
"pluginType": "core",
|
|
101
|
+
"strict": true,
|
|
102
|
+
"enableJsonFlag": false,
|
|
103
|
+
"isESM": false,
|
|
104
|
+
"relativePath": [
|
|
105
|
+
"lib",
|
|
106
|
+
"commands",
|
|
107
|
+
"adyen_payment",
|
|
108
|
+
"authorize.js"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
23
111
|
"adyen_payment:details": {
|
|
24
112
|
"aliases": [],
|
|
25
113
|
"args": {
|
|
@@ -7879,7 +7967,7 @@
|
|
|
7879
7967
|
"required": true
|
|
7880
7968
|
}
|
|
7881
7969
|
},
|
|
7882
|
-
"description": "Send this attribute if you want to set the payment source associated with the last succeeded authorization. At the end of the fix the order should be placed and authorized and ready
|
|
7970
|
+
"description": "Send this attribute if you want to set the payment source associated with the last succeeded authorization. At the end of the fix the order should be placed and authorized and ready to be approved. A tentative to fix the payment source is done before approval automatically. Cannot be passed by sales channels.",
|
|
7883
7971
|
"flags": {
|
|
7884
7972
|
"organization": {
|
|
7885
7973
|
"char": "o",
|
|
@@ -16328,5 +16416,5 @@
|
|
|
16328
16416
|
]
|
|
16329
16417
|
}
|
|
16330
16418
|
},
|
|
16331
|
-
"version": "4.
|
|
16419
|
+
"version": "4.10.0"
|
|
16332
16420
|
}
|
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.10.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",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@commercelayer/cli-dev": "^3.0.7",
|
|
59
59
|
"@commercelayer/eslint-config-ts": "^1.4.5",
|
|
60
|
-
"@oclif/plugin-help": "^6.2.
|
|
60
|
+
"@oclif/plugin-help": "^6.2.25",
|
|
61
61
|
"@oclif/test": "^3.2.15",
|
|
62
62
|
"@semantic-release/changelog": "^6.0.3",
|
|
63
63
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -65,21 +65,21 @@
|
|
|
65
65
|
"@types/inquirer": "^8.2.10",
|
|
66
66
|
"@types/lodash.snakecase": "^4.1.9",
|
|
67
67
|
"@types/mocha": "^10.0.10",
|
|
68
|
-
"@types/node": "^22.
|
|
68
|
+
"@types/node": "^22.13.4",
|
|
69
69
|
"chai": "^4.5.0",
|
|
70
70
|
"eslint": "^8.57.1",
|
|
71
71
|
"inflector-js": "^1.0.1",
|
|
72
72
|
"lodash.snakecase": "^4.1.1",
|
|
73
73
|
"mocha": "^10.8.2",
|
|
74
74
|
"nyc": "^15.1.0",
|
|
75
|
-
"oclif": "^4.17.
|
|
76
|
-
"semantic-release": "^24.2.
|
|
75
|
+
"oclif": "^4.17.30",
|
|
76
|
+
"semantic-release": "^24.2.3",
|
|
77
77
|
"tsx": "^4.19.2",
|
|
78
78
|
"typescript": "5.5.4"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@commercelayer/cli-core": "beta",
|
|
82
|
-
"@commercelayer/sdk": "^6.
|
|
82
|
+
"@commercelayer/sdk": "^6.32.0",
|
|
83
83
|
"@oclif/core": "^3.27.0",
|
|
84
84
|
"inquirer": "^8.2.6",
|
|
85
85
|
"tslib": "^2.8.1"
|