@commercelayer/cli-plugin-triggers 3.9.0 → 3.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 CHANGED
@@ -130,6 +130,7 @@ $ commercelayer plugins:install triggers
130
130
  * [`commercelayer stock_transfer:upcoming ID`](#commercelayer-stock_transferupcoming-id)
131
131
  * [`commercelayer stripe_payment ID`](#commercelayer-stripe_payment-id)
132
132
  * [`commercelayer stripe_payment:refresh ID`](#commercelayer-stripe_paymentrefresh-id)
133
+ * [`commercelayer stripe_payment:update ID`](#commercelayer-stripe_paymentupdate-id)
133
134
  * [`commercelayer webhook ID`](#commercelayer-webhook-id)
134
135
  * [`commercelayer webhook:reset_circuit ID`](#commercelayer-webhookreset_circuit-id)
135
136
 
@@ -2348,6 +2349,28 @@ DESCRIPTION
2348
2349
 
2349
2350
  _See code: [src/commands/stripe_payment/refresh.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/stripe_payment/refresh.ts)_
2350
2351
 
2352
+ ### `commercelayer stripe_payment:update ID`
2353
+
2354
+ Send this attribute if you want to update the created payment intent with fresh order data.
2355
+
2356
+ ```sh-session
2357
+ USAGE
2358
+ $ commercelayer stripe_payment:update ID [-u [-j -p]]
2359
+
2360
+ ARGUMENTS
2361
+ ID the unique id of the resource
2362
+
2363
+ FLAGS
2364
+ -j, --json print result in JSON format
2365
+ -p, --print print out the modified resource
2366
+ -u, --unformatted print JSON output without indentation
2367
+
2368
+ DESCRIPTION
2369
+ Send this attribute if you want to update the created payment intent with fresh order data.
2370
+ ```
2371
+
2372
+ _See code: [src/commands/stripe_payment/update.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/stripe_payment/update.ts)_
2373
+
2351
2374
  ### `commercelayer webhook ID`
2352
2375
 
2353
2376
  Execute an action on a resource of type webhooks.
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class StripePaymentUpdate extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,21 @@
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 stripe_payments_1 = require("../../triggers/stripe_payments");
7
+ const TRIGGER = 'update';
8
+ class StripePaymentUpdate extends base_1.default {
9
+ async run() {
10
+ const { args, flags } = await this.parse(StripePaymentUpdate);
11
+ const res = await (0, exec_1.default)('stripe_payments', args.id, TRIGGER, flags);
12
+ if (flags.print)
13
+ this.printOutput(res, flags);
14
+ this.successMessage('stripe_payment', TRIGGER, res.id);
15
+ return res;
16
+ }
17
+ }
18
+ StripePaymentUpdate.description = stripe_payments_1.triggers[TRIGGER].description;
19
+ StripePaymentUpdate.flags = {};
20
+ StripePaymentUpdate.args = Object.assign({}, base_1.default.args);
21
+ exports.default = StripePaymentUpdate;
@@ -1,3 +1,3 @@
1
1
  import type { Trigger } from '../common';
2
2
  export declare const triggers: Record<string, Trigger>;
3
- export type ActionType = 'refresh';
3
+ export type ActionType = 'update' | 'refresh';
@@ -2,6 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.triggers = void 0;
4
4
  exports.triggers = {
5
+ update: {
6
+ action: 'update',
7
+ trigger: '_update',
8
+ description: 'Send this attribute if you want to update the created payment intent with fresh order data.',
9
+ },
5
10
  refresh: {
6
11
  action: 'refresh',
7
12
  trigger: '_refresh',
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.9.0",
2
+ "version": "3.10.0",
3
3
  "commands": {
4
4
  "noc": {
5
5
  "id": "noc",
@@ -7236,6 +7236,78 @@
7236
7236
  }
7237
7237
  }
7238
7238
  },
7239
+ "stripe_payment:update": {
7240
+ "id": "stripe_payment:update",
7241
+ "description": "Send this attribute if you want to update the created payment intent with fresh order data.",
7242
+ "strict": true,
7243
+ "pluginName": "@commercelayer/cli-plugin-triggers",
7244
+ "pluginAlias": "@commercelayer/cli-plugin-triggers",
7245
+ "pluginType": "core",
7246
+ "aliases": [],
7247
+ "flags": {
7248
+ "organization": {
7249
+ "name": "organization",
7250
+ "type": "option",
7251
+ "char": "o",
7252
+ "description": "the slug of your organization",
7253
+ "hidden": true,
7254
+ "required": true,
7255
+ "multiple": false
7256
+ },
7257
+ "domain": {
7258
+ "name": "domain",
7259
+ "type": "option",
7260
+ "char": "d",
7261
+ "hidden": true,
7262
+ "required": false,
7263
+ "multiple": false,
7264
+ "dependsOn": [
7265
+ "organization"
7266
+ ]
7267
+ },
7268
+ "accessToken": {
7269
+ "name": "accessToken",
7270
+ "type": "option",
7271
+ "hidden": true,
7272
+ "required": true,
7273
+ "multiple": false
7274
+ },
7275
+ "print": {
7276
+ "name": "print",
7277
+ "type": "boolean",
7278
+ "char": "p",
7279
+ "description": "print out the modified resource",
7280
+ "allowNo": false
7281
+ },
7282
+ "json": {
7283
+ "name": "json",
7284
+ "type": "boolean",
7285
+ "char": "j",
7286
+ "description": "print result in JSON format",
7287
+ "allowNo": false,
7288
+ "dependsOn": [
7289
+ "print"
7290
+ ]
7291
+ },
7292
+ "unformatted": {
7293
+ "name": "unformatted",
7294
+ "type": "boolean",
7295
+ "char": "u",
7296
+ "description": "print JSON output without indentation",
7297
+ "allowNo": false,
7298
+ "dependsOn": [
7299
+ "json"
7300
+ ]
7301
+ }
7302
+ },
7303
+ "args": {
7304
+ "id": {
7305
+ "name": "id",
7306
+ "description": "the unique id of the resource",
7307
+ "required": true
7308
+ }
7309
+ }
7310
+ },
7239
7311
  "webhook": {
7240
7312
  "id": "webhook",
7241
7313
  "description": "execute an action on a resource of type webhooks",
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": "3.9.0",
4
+ "version": "3.10.0",
5
5
  "author": "Pierluigi Viti <pierluigi@commercelayer.io>",
6
6
  "bugs": "https://github.com/commercelayer/commercelayer-cli-plugin-triggers/issues",
7
7
  "engines": {
@@ -46,14 +46,14 @@
46
46
  "@commercelayer/cli-dev": "^2.0.5",
47
47
  "@commercelayer/eslint-config-ts": "^1.0.0",
48
48
  "@oclif/plugin-help": "^5.2.9",
49
- "@oclif/test": "^2.3.20",
49
+ "@oclif/test": "^2.3.21",
50
50
  "@types/chai": "^4.3.5",
51
51
  "@types/inquirer": "^8.2.6",
52
- "@types/lodash": "^4.14.194",
52
+ "@types/lodash": "^4.14.195",
53
53
  "@types/mocha": "^10.0.1",
54
- "@types/node": "^20.1.4",
54
+ "@types/node": "^20.2.4",
55
55
  "chai": "^4.3.7",
56
- "eslint": "^8.40.0",
56
+ "eslint": "^8.41.0",
57
57
  "inflector-js": "^1.0.1",
58
58
  "lodash": "^4.17.21",
59
59
  "mocha": "^10.2.0",
@@ -67,7 +67,7 @@
67
67
  "@commercelayer/sdk": "^4.27.1",
68
68
  "@oclif/core": "^2.8.5",
69
69
  "inquirer": "^8.2.5",
70
- "tslib": "^2.5.0"
70
+ "tslib": "^2.5.2"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"