@commercelayer/cli-plugin-triggers 4.13.0 → 4.14.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 CHANGED
@@ -35,6 +35,7 @@ $ commercelayer plugins:install triggers
35
35
  * [`commercelayer address:remove_tags ID`](#commercelayer-addressremove_tags-id)
36
36
  * [`commercelayer adyen_payment ID`](#commercelayer-adyen_payment-id)
37
37
  * [`commercelayer adyen_payment:authorize ID`](#commercelayer-adyen_paymentauthorize-id)
38
+ * [`commercelayer adyen_payment:balance ID`](#commercelayer-adyen_paymentbalance-id)
38
39
  * [`commercelayer adyen_payment:details ID`](#commercelayer-adyen_paymentdetails-id)
39
40
  * [`commercelayer authorization ID`](#commercelayer-authorization-id)
40
41
  * [`commercelayer authorization:cancel ID`](#commercelayer-authorizationcancel-id)
@@ -381,6 +382,28 @@ DESCRIPTION
381
382
 
382
383
  _See code: [src/commands/adyen_payment/authorize.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/adyen_payment/authorize.ts)_
383
384
 
385
+ ### `commercelayer adyen_payment:balance ID`
386
+
387
+ Send this attribute if you want retrieve the balance remaining on a shopper's gift card.
388
+
389
+ ```sh-session
390
+ USAGE
391
+ $ commercelayer adyen_payment:balance ID [-u [-j -p]]
392
+
393
+ ARGUMENTS
394
+ ID the unique id of the resource
395
+
396
+ FLAGS
397
+ -j, --json print result in JSON format
398
+ -p, --print print out the modified resource
399
+ -u, --unformatted print JSON output without indentation
400
+
401
+ DESCRIPTION
402
+ Send this attribute if you want retrieve the balance remaining on a shopper's gift card.
403
+ ```
404
+
405
+ _See code: [src/commands/adyen_payment/balance.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/adyen_payment/balance.ts)_
406
+
384
407
  ### `commercelayer adyen_payment:details ID`
385
408
 
386
409
  Send this attribute if you want to send additional details the payment request.
@@ -1142,7 +1165,7 @@ _See code: [src/commands/customer/add_tags.ts](https://github.com/commercelayer/
1142
1165
 
1143
1166
  ### `commercelayer customer:cancel_anonymization ID`
1144
1167
 
1145
- Send this attribute if you want to trigger a cancellation of anonymization.
1168
+ Send this attribute if you want to trigger a cancellation of anonymization. Cannot be passed by sales channels.
1146
1169
 
1147
1170
  ```sh-session
1148
1171
  USAGE
@@ -1157,7 +1180,7 @@ FLAGS
1157
1180
  -u, --unformatted print JSON output without indentation
1158
1181
 
1159
1182
  DESCRIPTION
1160
- Send this attribute if you want to trigger a cancellation of anonymization.
1183
+ Send this attribute if you want to trigger a cancellation of anonymization. Cannot be passed by sales channels.
1161
1184
  ```
1162
1185
 
1163
1186
  _See code: [src/commands/customer/cancel_anonymization.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/customer/cancel_anonymization.ts)_
@@ -1187,7 +1210,7 @@ _See code: [src/commands/customer/remove_tags.ts](https://github.com/commercelay
1187
1210
 
1188
1211
  ### `commercelayer customer:request_anonymization ID`
1189
1212
 
1190
- Send this attribute if you want to trigger anonymization.
1213
+ Send this attribute if you want to trigger anonymization. Cannot be passed by sales channels.
1191
1214
 
1192
1215
  ```sh-session
1193
1216
  USAGE
@@ -1202,7 +1225,7 @@ FLAGS
1202
1225
  -u, --unformatted print JSON output without indentation
1203
1226
 
1204
1227
  DESCRIPTION
1205
- Send this attribute if you want to trigger anonymization.
1228
+ Send this attribute if you want to trigger anonymization. Cannot be passed by sales channels.
1206
1229
  ```
1207
1230
 
1208
1231
  _See code: [src/commands/customer/request_anonymization.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/customer/request_anonymization.ts)_
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class AdyenPaymentBalance 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 = 'balance';
7
+ class AdyenPaymentBalance 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(AdyenPaymentBalance);
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 = AdyenPaymentBalance;
@@ -1,3 +1,3 @@
1
1
  import type { Trigger } from '../common';
2
2
  export declare const triggers: Record<string, Trigger>;
3
- export type ActionType = 'authorize' | 'details';
3
+ export type ActionType = 'authorize' | 'details' | 'balance';
@@ -12,4 +12,9 @@ exports.triggers = {
12
12
  trigger: '_details',
13
13
  description: 'Send this attribute if you want to send additional details the payment request.',
14
14
  },
15
+ balance: {
16
+ action: 'balance',
17
+ trigger: '_balance',
18
+ description: 'Send this attribute if you want retrieve the balance remaining on a shopper\'s gift card.',
19
+ },
15
20
  };
@@ -15,11 +15,11 @@ exports.triggers = {
15
15
  request_anonymization: {
16
16
  action: 'request_anonymization',
17
17
  trigger: '_request_anonymization',
18
- description: 'Send this attribute if you want to trigger anonymization.',
18
+ description: 'Send this attribute if you want to trigger anonymization. Cannot be passed by sales channels.',
19
19
  },
20
20
  cancel_anonymization: {
21
21
  action: 'cancel_anonymization',
22
22
  trigger: '_cancel_anonymization',
23
- description: 'Send this attribute if you want to trigger a cancellation of anonymization.',
23
+ description: 'Send this attribute if you want to trigger a cancellation of anonymization. Cannot be passed by sales channels.',
24
24
  },
25
25
  };
@@ -372,6 +372,94 @@
372
372
  "authorize.js"
373
373
  ]
374
374
  },
375
+ "adyen_payment:balance": {
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 retrieve the balance remaining on a shopper's gift card.",
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": "adyen_payment:balance",
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
+ "adyen_payment",
460
+ "balance.js"
461
+ ]
462
+ },
375
463
  "adyen_payment:details": {
376
464
  "aliases": [],
377
465
  "args": {
@@ -3373,7 +3461,7 @@
3373
3461
  "required": true
3374
3462
  }
3375
3463
  },
3376
- "description": "Send this attribute if you want to trigger a cancellation of anonymization.",
3464
+ "description": "Send this attribute if you want to trigger a cancellation of anonymization. Cannot be passed by sales channels.",
3377
3465
  "flags": {
3378
3466
  "organization": {
3379
3467
  "char": "o",
@@ -3637,7 +3725,7 @@
3637
3725
  "required": true
3638
3726
  }
3639
3727
  },
3640
- "description": "Send this attribute if you want to trigger anonymization.",
3728
+ "description": "Send this attribute if you want to trigger anonymization. Cannot be passed by sales channels.",
3641
3729
  "flags": {
3642
3730
  "organization": {
3643
3731
  "char": "o",
@@ -20992,5 +21080,5 @@
20992
21080
  ]
20993
21081
  }
20994
21082
  },
20995
- "version": "4.13.0"
21083
+ "version": "4.14.0"
20996
21084
  }
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.13.0",
4
+ "version": "4.14.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",
@@ -65,21 +65,21 @@
65
65
  "@types/inquirer": "^8.2.11",
66
66
  "@types/lodash.snakecase": "^4.1.9",
67
67
  "@types/mocha": "^10.0.10",
68
- "@types/node": "^22.15.12",
68
+ "@types/node": "^22.15.30",
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.46",
76
- "semantic-release": "^24.2.3",
75
+ "oclif": "^4.18.1",
76
+ "semantic-release": "^24.2.5",
77
77
  "tsx": "^4.19.4",
78
78
  "typescript": "5.5.4"
79
79
  },
80
80
  "dependencies": {
81
81
  "@commercelayer/cli-core": "beta",
82
- "@commercelayer/sdk": "^6.40.0",
82
+ "@commercelayer/sdk": "^6.43.0",
83
83
  "@oclif/core": "^3.27.0",
84
84
  "inquirer": "^8.2.6",
85
85
  "tslib": "^2.8.1"