@prismatic-io/prism 5.2.2 → 5.2.3

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.
@@ -4,10 +4,13 @@ const core_1 = require("@oclif/core");
4
4
  const graphql_1 = require("../../graphql");
5
5
  class CreateCommand extends core_1.Command {
6
6
  async run() {
7
+ const { flags: { customerId, resourceId }, } = await this.parse(CreateCommand);
7
8
  const result = await (0, graphql_1.gqlRequest)({
8
9
  document: (0, graphql_1.gql) `
9
- mutation createOnPremiseResourceJWT {
10
- createOnPremiseResourceJWT(input: {}) {
10
+ mutation createOnPremiseResourceJWT($customerId: ID, $resourceId: ID) {
11
+ createOnPremiseResourceJWT(
12
+ input: { customerId: $customerId, resourceId: $resourceId }
13
+ ) {
11
14
  result {
12
15
  jwt
13
16
  }
@@ -18,11 +21,25 @@ class CreateCommand extends core_1.Command {
18
21
  }
19
22
  }
20
23
  `,
21
- variables: {},
24
+ variables: {
25
+ customerId,
26
+ resourceId,
27
+ },
22
28
  });
23
29
  this.log(result.createOnPremiseResourceJWT.result.jwt);
24
30
  }
25
31
  }
26
32
  exports.default = CreateCommand;
27
33
  CreateCommand.description = "Create a short-lived JWT that may be used to perform registration of an On-Premise Resource.";
28
- CreateCommand.flags = {};
34
+ CreateCommand.flags = {
35
+ customerId: core_1.Flags.string({
36
+ char: "c",
37
+ required: false,
38
+ description: "The ID of the customer for which to create the JWT. Only valid when authenticated as an Organization user.",
39
+ }),
40
+ resourceId: core_1.Flags.string({
41
+ char: "r",
42
+ required: false,
43
+ description: "An optional ID of an existing On-Premise Resource for which to generate a new JWT.",
44
+ }),
45
+ };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.2.2",
2
+ "version": "5.2.3",
3
3
  "commands": {
4
4
  "login": {
5
5
  "id": "login",
@@ -1256,7 +1256,24 @@
1256
1256
  "pluginAlias": "@prismatic-io/prism",
1257
1257
  "pluginType": "core",
1258
1258
  "aliases": [],
1259
- "flags": {},
1259
+ "flags": {
1260
+ "customerId": {
1261
+ "name": "customerId",
1262
+ "type": "option",
1263
+ "char": "c",
1264
+ "description": "The ID of the customer for which to create the JWT. Only valid when authenticated as an Organization user.",
1265
+ "required": false,
1266
+ "multiple": false
1267
+ },
1268
+ "resourceId": {
1269
+ "name": "resourceId",
1270
+ "type": "option",
1271
+ "char": "r",
1272
+ "description": "An optional ID of an existing On-Premise Resource for which to generate a new JWT.",
1273
+ "required": false,
1274
+ "multiple": false
1275
+ }
1276
+ },
1260
1277
  "args": {}
1261
1278
  },
1262
1279
  "organization:update": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/prism",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "Build, deploy, and support integrations in Prismatic from the comfort of your command line",
5
5
  "keywords": [
6
6
  "prismatic",