opal-security 3.0.1-beta.cbf0332 → 3.1.1-beta.65d1a96

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
@@ -22,7 +22,7 @@ $ npm install -g opal-security
22
22
  $ opal COMMAND
23
23
  running command...
24
24
  $ opal (--version)
25
- opal-security/3.0.1-beta.cbf0332 linux-x64 node-v20.19.0
25
+ opal-security/3.1.1-beta.65d1a96 linux-x64 node-v20.19.1
26
26
  $ opal --help [COMMAND]
27
27
  USAGE
28
28
  $ opal COMMAND
@@ -37,13 +37,13 @@ USAGE
37
37
  * [`opal aws identity`](#opal-aws-identity)
38
38
  * [`opal clear-auth-provider`](#opal-clear-auth-provider)
39
39
  * [`opal curl-example`](#opal-curl-example)
40
+ * [`opal groups get`](#opal-groups-get)
40
41
  * [`opal help [COMMANDS]`](#opal-help-commands)
41
42
  * [`opal iam-roles start`](#opal-iam-roles-start)
42
43
  * [`opal kube-roles start`](#opal-kube-roles-start)
43
44
  * [`opal login`](#opal-login)
44
45
  * [`opal logout`](#opal-logout)
45
46
  * [`opal postgres-instances start`](#opal-postgres-instances-start)
46
- * [`opal request ls`](#opal-request-ls)
47
47
  * [`opal resources get`](#opal-resources-get)
48
48
  * [`opal set-auth-provider`](#opal-set-auth-provider)
49
49
  * [`opal set-custom-header`](#opal-set-custom-header)
@@ -101,7 +101,7 @@ EXAMPLES
101
101
  $ opal aws:identity
102
102
  ```
103
103
 
104
- _See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/aws/identity.ts)_
104
+ _See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/aws/identity.ts)_
105
105
 
106
106
  ## `opal clear-auth-provider`
107
107
 
@@ -121,7 +121,7 @@ EXAMPLES
121
121
  $ opal clear-auth-provider
122
122
  ```
123
123
 
124
- _See code: [src/commands/clear-auth-provider.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/clear-auth-provider.ts)_
124
+ _See code: [src/commands/clear-auth-provider.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/clear-auth-provider.ts)_
125
125
 
126
126
  ## `opal curl-example`
127
127
 
@@ -138,7 +138,28 @@ DESCRIPTION
138
138
  Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.
139
139
  ```
140
140
 
141
- _See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/curl-example.ts)_
141
+ _See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/curl-example.ts)_
142
+
143
+ ## `opal groups get`
144
+
145
+ Get group info for a particular group.
146
+
147
+ ```
148
+ USAGE
149
+ $ opal groups get [-h] [-i <value>]
150
+
151
+ FLAGS
152
+ -h, --help Show CLI help.
153
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]
154
+
155
+ DESCRIPTION
156
+ Get group info for a particular group.
157
+
158
+ EXAMPLES
159
+ $ opal groups:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
160
+ ```
161
+
162
+ _See code: [src/commands/groups/get.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/groups/get.ts)_
142
163
 
143
164
  ## `opal help [COMMANDS]`
144
165
 
@@ -188,7 +209,7 @@ EXAMPLES
188
209
  $ opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName "custom-profile"
189
210
  ```
190
211
 
191
- _See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/iam-roles/start.ts)_
212
+ _See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/iam-roles/start.ts)_
192
213
 
193
214
  ## `opal kube-roles start`
194
215
 
@@ -219,7 +240,7 @@ EXAMPLES
219
240
  $ opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId "arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
220
241
  ```
221
242
 
222
- _See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/kube-roles/start.ts)_
243
+ _See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/kube-roles/start.ts)_
223
244
 
224
245
  ## `opal login`
225
246
 
@@ -240,7 +261,7 @@ EXAMPLES
240
261
  $ opal login
241
262
  ```
242
263
 
243
- _See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/login.ts)_
264
+ _See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/login.ts)_
244
265
 
245
266
  ## `opal logout`
246
267
 
@@ -260,7 +281,7 @@ EXAMPLES
260
281
  $ opal logout
261
282
  ```
262
283
 
263
- _See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/logout.ts)_
284
+ _See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/logout.ts)_
264
285
 
265
286
  ## `opal postgres-instances start`
266
287
 
@@ -297,22 +318,7 @@ EXAMPLES
297
318
  $ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess --action view
298
319
  ```
299
320
 
300
- _See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/postgres-instances/start.ts)_
301
-
302
- ## `opal request ls`
303
-
304
- Lists access requests
305
-
306
- ```
307
- USAGE
308
- $ opal request ls
309
-
310
- DESCRIPTION
311
- Lists access requests
312
-
313
- ALIASES
314
- $ opal request ls
315
- ```
321
+ _See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/postgres-instances/start.ts)_
316
322
 
317
323
  ## `opal resources get`
318
324
 
@@ -333,7 +339,7 @@ EXAMPLES
333
339
  $ opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
334
340
  ```
335
341
 
336
- _See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/resources/get.ts)_
342
+ _See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/resources/get.ts)_
337
343
 
338
344
  ## `opal set-auth-provider`
339
345
 
@@ -359,7 +365,7 @@ EXAMPLES
359
365
  $ opal set-auth-provider --clientID 1234asdf --issuerUrl https://auth.example.com
360
366
  ```
361
367
 
362
- _See code: [src/commands/set-auth-provider.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/set-auth-provider.ts)_
368
+ _See code: [src/commands/set-auth-provider.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/set-auth-provider.ts)_
363
369
 
364
370
  ## `opal set-custom-header`
365
371
 
@@ -380,7 +386,7 @@ EXAMPLES
380
386
  $ opal set-custom-header --header 'cf-access-token: $TOKEN'
381
387
  ```
382
388
 
383
- _See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/set-custom-header.ts)_
389
+ _See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/set-custom-header.ts)_
384
390
 
385
391
  ## `opal set-token`
386
392
 
@@ -400,7 +406,7 @@ EXAMPLES
400
406
  $ opal set-token
401
407
  ```
402
408
 
403
- _See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/set-token.ts)_
409
+ _See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/set-token.ts)_
404
410
 
405
411
  ## `opal set-url [URL]`
406
412
 
@@ -424,7 +430,7 @@ EXAMPLES
424
430
  $ opal set-url
425
431
  ```
426
432
 
427
- _See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/set-url.ts)_
433
+ _See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/set-url.ts)_
428
434
 
429
435
  ## `opal ssh copyFrom`
430
436
 
@@ -455,7 +461,7 @@ EXAMPLES
455
461
  $ opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
456
462
  ```
457
463
 
458
- _See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/ssh/copyFrom.ts)_
464
+ _See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/ssh/copyFrom.ts)_
459
465
 
460
466
  ## `opal ssh copyTo`
461
467
 
@@ -486,7 +492,7 @@ EXAMPLES
486
492
  $ opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
487
493
  ```
488
494
 
489
- _See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/ssh/copyTo.ts)_
495
+ _See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/ssh/copyTo.ts)_
490
496
 
491
497
  ## `opal ssh start`
492
498
 
@@ -513,7 +519,7 @@ EXAMPLES
513
519
  $ opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
514
520
  ```
515
521
 
516
- _See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.0.1-beta.cbf0332/src/commands/ssh/start.ts)_
522
+ _See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v3.1.1-beta.65d1a96/src/commands/ssh/start.ts)_
517
523
 
518
524
  ## `opal version`
519
525
 
@@ -0,0 +1,10 @@
1
+ import { Command } from "@oclif/core";
2
+ export default class GetGroup extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
7
+ id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ };
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const parseAndCheckHttpResponse_1 = require("@apollo/client/link/http/parseAndCheckHttpResponse");
5
+ const graphql_1 = require("../../graphql");
6
+ const apollo_1 = require("../../lib/apollo");
7
+ const cmd_1 = require("../../lib/cmd");
8
+ const flags_1 = require("../../lib/flags");
9
+ const GET_GROUP_QUERY = (0, graphql_1.graphql)(`
10
+ query GetGroup($id: GroupId!) {
11
+ group(input: { id: $id }) {
12
+ __typename
13
+ ... on GroupResult {
14
+ group {
15
+ name
16
+ id
17
+ description
18
+ groupType
19
+ adminOwnerId
20
+ groupLeaders {
21
+ fullName
22
+ email
23
+ id
24
+ }
25
+ connection {
26
+ name
27
+ id
28
+ connectionType
29
+ }
30
+ paginatedGroupUsers {
31
+ totalNumGroupUsers
32
+ groupUsers {
33
+ user {
34
+ fullName
35
+ email
36
+ id
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ... on GroupNotFoundError {
43
+ message
44
+ }
45
+ }
46
+ }`);
47
+ class GetGroup extends core_1.Command {
48
+ async run() {
49
+ (0, cmd_1.setMostRecentCommand)(this);
50
+ const { flags } = await this.parse(GetGroup);
51
+ if (!flags.id) {
52
+ this.log("Error: Please provide a group ID using the --id flag.");
53
+ this.log("ex. opal groups:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4");
54
+ return;
55
+ }
56
+ try {
57
+ const client = await (0, apollo_1.getClient)(this);
58
+ const resp = await client.query({
59
+ query: GET_GROUP_QUERY,
60
+ variables: {
61
+ id: flags.id,
62
+ },
63
+ });
64
+ (0, apollo_1.printResponse)(this, resp);
65
+ }
66
+ catch (error) {
67
+ return (0, parseAndCheckHttpResponse_1.handleError)(this, error);
68
+ }
69
+ }
70
+ }
71
+ GetGroup.description = "Get group info for a particular group.";
72
+ GetGroup.examples = [
73
+ "opal groups:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4",
74
+ ];
75
+ GetGroup.flags = {
76
+ help: flags_1.SHARED_FLAGS.help,
77
+ id: flags_1.SHARED_FLAGS.id,
78
+ };
79
+ exports.default = GetGroup;
@@ -1,32 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
+ const apollo_1 = require("../../lib/apollo");
4
5
  const requests_1 = require("../../lib/requests");
5
6
  const displays_1 = require("../../utils/displays");
6
7
  const utils_1 = require("../../utils/utils");
7
8
  class RequestCreate extends core_1.Command {
8
9
  async run() {
10
+ await (0, apollo_1.initClient)(this, true);
11
+ const client = await (0, apollo_1.getClient)(this, true);
9
12
  (0, utils_1.restrictToDev)(); //TODO: Remove after development is complete
10
13
  const requestMap = new Map();
11
- (0, displays_1.headerMessage)();
14
+ (0, displays_1.headerMessage)(this);
12
15
  let shouldProceed = false;
13
16
  while (!shouldProceed) {
14
17
  // Step 1: Select first round of assets from an app
15
- await (0, requests_1.selectRequestableItems)(requestMap);
18
+ await (0, requests_1.selectRequestableItems)(this, client, requestMap);
16
19
  // Step 2: Display the selected items in a tree format
17
- (0, displays_1.headerMessage)();
18
- console.log((0, displays_1.treeifyRequestMap)(requestMap), "\n");
20
+ (0, displays_1.headerMessage)(this);
21
+ this.log((0, displays_1.treeifyRequestMap)(requestMap), "\n");
19
22
  // Step 3: Prompt to add more items, repeat 1-3 if needed
20
23
  shouldProceed = await (0, requests_1.doneSelectingAssets)();
21
24
  }
22
- // Step 4: Prompt for reason
25
+ // Step 4: Prompt for request reason
23
26
  const { reason } = await (0, requests_1.promptForReason)();
24
27
  // Step 5: Prompt for expiration
25
28
  const { expiration } = await (0, requests_1.promptForExpiration)();
26
29
  // Step 6: Display final summary of request
27
- (0, displays_1.displayFinalRequestSummary)(requestMap, reason, expiration);
30
+ (0, displays_1.displayFinalRequestSummary)(this, requestMap, reason, expiration);
28
31
  // Step 7: Prompt for final submition
29
- await (0, requests_1.submitFinalRequest)();
32
+ await (0, requests_1.submitFinalRequest)(this);
30
33
  }
31
34
  }
32
35
  RequestCreate.hidden = true;
@@ -1,6 +1,10 @@
1
1
  import { Command } from "@oclif/core";
2
- export default class RequestGet extends Command {
2
+ export default class GetRequest extends Command {
3
3
  static hidden: boolean;
4
4
  static description: string;
5
+ static flags: {
6
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
7
+ id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ };
5
9
  run(): Promise<void>;
6
10
  }
@@ -1,13 +1,89 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
+ const graphql_1 = require("../../graphql");
5
+ const apollo_1 = require("../../lib/apollo");
6
+ const cmd_1 = require("../../lib/cmd");
7
+ const config_1 = require("../../lib/config");
8
+ const flags_1 = require("../../lib/flags");
4
9
  const utils_1 = require("../../utils/utils");
5
- class RequestGet extends core_1.Command {
10
+ const GET_REQUEST = (0, graphql_1.graphql)(`
11
+ query GetRequest(
12
+ $id: RequestId!
13
+ ) {
14
+ request(input: {id: $id}) {
15
+ __typename
16
+ ... on RequestResult {
17
+ request {
18
+ id
19
+ status
20
+ requestedResources {
21
+ resource {
22
+ displayName
23
+ id
24
+ }
25
+ accessLevel {
26
+ accessLevelName
27
+ accessLevelRemoteId
28
+ }
29
+ }
30
+ durationInMinutes
31
+ requestedGroups {
32
+ group {
33
+ id
34
+ name
35
+ }
36
+ accessLevel {
37
+ accessLevelName
38
+ accessLevelRemoteId
39
+ }
40
+ }
41
+ reason
42
+ }
43
+ }
44
+ ... on RequestNotFoundError {
45
+ message
46
+ }
47
+ }
48
+ }
49
+ `);
50
+ class GetRequest extends core_1.Command {
6
51
  async run() {
7
52
  (0, utils_1.restrictToDev)(); //TODO: Remove after development is complete
8
- this.log("Running the get command");
53
+ (0, cmd_1.setMostRecentCommand)(this);
54
+ const configData = (0, config_1.getOrCreateConfigData)(this.config.configDir);
55
+ const client = await (0, apollo_1.getClient)(this, true);
56
+ // Verify id tag was provided
57
+ const { flags } = await this.parse(GetRequest);
58
+ if (!flags.id) {
59
+ this.log("Error: Please provide a group ID using the --id flag.");
60
+ this.log("ex. opal request get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4");
61
+ return;
62
+ }
63
+ const resp = await client.query({
64
+ query: GET_REQUEST,
65
+ variables: {
66
+ id: flags.id,
67
+ },
68
+ fetchPolicy: "network-only", // to avoid caching
69
+ });
70
+ switch (resp.data.request.__typename) {
71
+ case "RequestResult":
72
+ (0, apollo_1.printResponse)(this, resp);
73
+ this.log(`\n💡Click to see request details on web: ${configData[config_1.urlKey]}/requests/sent/${flags.id}`);
74
+ return;
75
+ case "RequestNotFoundError":
76
+ this.log(`🚫 Request with id ${flags.id} was not found`);
77
+ return;
78
+ default:
79
+ this.log("🚫 Error retrieving request data");
80
+ }
9
81
  }
10
82
  }
11
- RequestGet.hidden = true;
12
- RequestGet.description = "Lists access requests";
13
- exports.default = RequestGet;
83
+ GetRequest.hidden = true;
84
+ GetRequest.description = "Lists access requests";
85
+ GetRequest.flags = {
86
+ help: flags_1.SHARED_FLAGS.help,
87
+ id: flags_1.SHARED_FLAGS.id,
88
+ };
89
+ exports.default = GetRequest;
@@ -2,6 +2,5 @@ import { Command } from "@oclif/core";
2
2
  export default class RequestList extends Command {
3
3
  static hidden: boolean;
4
4
  static description: string;
5
- static aliases: string[];
6
5
  run(): Promise<void>;
7
6
  }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const utils_1 = require("../../utils/utils");
5
5
  class RequestList extends core_1.Command {
6
+ // static aliases = ["request:ls"];
6
7
  async run() {
7
8
  (0, utils_1.restrictToDev)(); //TODO: Remove after development is complete
8
9
  this.log("Running the list command");
@@ -10,5 +11,4 @@ class RequestList extends core_1.Command {
10
11
  }
11
12
  RequestList.hidden = true;
12
13
  RequestList.description = "Lists access requests";
13
- RequestList.aliases = ["request:ls"];
14
14
  exports.default = RequestList;
@@ -44,6 +44,11 @@ class GetResource extends core_1.Command {
44
44
  async run() {
45
45
  (0, cmd_1.setMostRecentCommand)(this);
46
46
  const { flags } = await this.parse(GetResource);
47
+ if (!flags.id) {
48
+ this.log("Error: Please provide a resource ID using the --id flag.");
49
+ this.log("ex. opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4");
50
+ return;
51
+ }
47
52
  const { resp, error } = await (0, handler_1.runQueryDeprecated)({
48
53
  command: this,
49
54
  query: exports.GetResourceDocument,
@@ -34,7 +34,7 @@ class SetToken extends core_1.Command {
34
34
  const existingCreds = await (0, credentials_1.getOpalCredentials)(this, false);
35
35
  await (0, credentials_1.setOpalCredentials)(this, existingCreds === null || existingCreds === void 0 ? void 0 : existingCreds.email, (existingCreds === null || existingCreds === void 0 ? void 0 : existingCreds.organizationID) || "unset-org-id", existingCreds === null || existingCreds === void 0 ? void 0 : existingCreds.clientIDCandidate, apiToken || "", credentials_1.SecretType.ApiToken);
36
36
  // "Representative" authenticated call to check the log-in worked as expected.
37
- const client = await (0, apollo_1.getClient)(this, false);
37
+ const client = await (0, apollo_1.getClient)(this, true);
38
38
  const resp = await client.query({
39
39
  query: CHECK_AUTH_SESSION_QUERY,
40
40
  });
@@ -12,7 +12,12 @@ import * as types from "./graphql";
12
12
  * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
13
13
  */
14
14
  type Documents = {
15
+ "\nquery GetGroup($id: GroupId!) {\n group(input: { id: $id }) {\n __typename\n ... on GroupResult {\n group {\n name\n id\n description\n groupType\n adminOwnerId\n groupLeaders {\n fullName\n email\n id\n }\n connection {\n name\n id\n connectionType\n }\n paginatedGroupUsers {\n totalNumGroupUsers\n groupUsers {\n user {\n fullName\n email\n id\n }\n }\n }\n }\n }\n ... on GroupNotFoundError {\n message\n }\n }\n}": typeof types.GetGroupDocument;
16
+ "\n query GetRequest(\n $id: RequestId!\n) {\n request(input: {id: $id}) {\n __typename\n ... on RequestResult {\n request {\n id\n status\n requestedResources {\n resource {\n displayName\n id\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n durationInMinutes\n requestedGroups {\n group {\n id\n name\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n reason\n }\n }\n ... on RequestNotFoundError {\n message\n }\n }\n}\n": typeof types.GetRequestDocument;
15
17
  "\nquery CheckAuthSessionQuery {\n organizationSettings {\n ... on OrganizationSettingsResult {\n settings {\n id\n }\n }\n }\n}\n": typeof types.CheckAuthSessionQueryDocument;
18
+ '\n query GetRequestableAppsQuery($searchQuery: String) {\n appsV2(\n filters: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n }\n ) @connection(key: "paginated-app-dropdown") {\n edges {\n node {\n id\n displayName\n ... on Connection {\n connectionType\n }\n ... on Resource {\n resourceType\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n ': typeof types.GetRequestableAppsQueryDocument;
19
+ "\n query PaginatedEntityDropdown(\n $id: UUID!\n $searchQuery: String\n) {\n app(id: $id) {\n __typename\n ... on App {\n id\n items(\n input: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n includeOnlyRequestable: true\n }\n ) {\n items {\n key\n resource {\n id\n name\n }\n group {\n id\n name\n }\n }\n cursor\n }\n }\n ... on AppNotFoundError {\n message\n }\n }\n}\n": typeof types.PaginatedEntityDropdownDocument;
20
+ "\n query ResourceAccessLevels($resourceId: ResourceId!) {\n accessLevels(input: {\n resourceId: $resourceId,\n onlyMine: false,\n }) {\n __typename\n ... on ResourceAccessLevelsResult {\n accessLevels {\n __typename\n ... on ResourceAccessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n }\n ... on ResourceNotFoundError {\n message\n }\n }\n }\n": typeof types.ResourceAccessLevelsDocument;
16
21
  };
17
22
  declare const documents: Documents;
18
23
  /**
@@ -28,9 +33,29 @@ declare const documents: Documents;
28
33
  * Please regenerate the types.
29
34
  */
30
35
  export declare function graphql(source: string): unknown;
36
+ /**
37
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
38
+ */
39
+ export declare function graphql(source: "\nquery GetGroup($id: GroupId!) {\n group(input: { id: $id }) {\n __typename\n ... on GroupResult {\n group {\n name\n id\n description\n groupType\n adminOwnerId\n groupLeaders {\n fullName\n email\n id\n }\n connection {\n name\n id\n connectionType\n }\n paginatedGroupUsers {\n totalNumGroupUsers\n groupUsers {\n user {\n fullName\n email\n id\n }\n }\n }\n }\n }\n ... on GroupNotFoundError {\n message\n }\n }\n}"): (typeof documents)["\nquery GetGroup($id: GroupId!) {\n group(input: { id: $id }) {\n __typename\n ... on GroupResult {\n group {\n name\n id\n description\n groupType\n adminOwnerId\n groupLeaders {\n fullName\n email\n id\n }\n connection {\n name\n id\n connectionType\n }\n paginatedGroupUsers {\n totalNumGroupUsers\n groupUsers {\n user {\n fullName\n email\n id\n }\n }\n }\n }\n }\n ... on GroupNotFoundError {\n message\n }\n }\n}"];
40
+ /**
41
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
42
+ */
43
+ export declare function graphql(source: "\n query GetRequest(\n $id: RequestId!\n) {\n request(input: {id: $id}) {\n __typename\n ... on RequestResult {\n request {\n id\n status\n requestedResources {\n resource {\n displayName\n id\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n durationInMinutes\n requestedGroups {\n group {\n id\n name\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n reason\n }\n }\n ... on RequestNotFoundError {\n message\n }\n }\n}\n"): (typeof documents)["\n query GetRequest(\n $id: RequestId!\n) {\n request(input: {id: $id}) {\n __typename\n ... on RequestResult {\n request {\n id\n status\n requestedResources {\n resource {\n displayName\n id\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n durationInMinutes\n requestedGroups {\n group {\n id\n name\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n reason\n }\n }\n ... on RequestNotFoundError {\n message\n }\n }\n}\n"];
31
44
  /**
32
45
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
33
46
  */
34
47
  export declare function graphql(source: "\nquery CheckAuthSessionQuery {\n organizationSettings {\n ... on OrganizationSettingsResult {\n settings {\n id\n }\n }\n }\n}\n"): (typeof documents)["\nquery CheckAuthSessionQuery {\n organizationSettings {\n ... on OrganizationSettingsResult {\n settings {\n id\n }\n }\n }\n}\n"];
48
+ /**
49
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
50
+ */
51
+ export declare function graphql(source: '\n query GetRequestableAppsQuery($searchQuery: String) {\n appsV2(\n filters: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n }\n ) @connection(key: "paginated-app-dropdown") {\n edges {\n node {\n id\n displayName\n ... on Connection {\n connectionType\n }\n ... on Resource {\n resourceType\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n '): (typeof documents)['\n query GetRequestableAppsQuery($searchQuery: String) {\n appsV2(\n filters: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n }\n ) @connection(key: "paginated-app-dropdown") {\n edges {\n node {\n id\n displayName\n ... on Connection {\n connectionType\n }\n ... on Resource {\n resourceType\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n '];
52
+ /**
53
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
54
+ */
55
+ export declare function graphql(source: "\n query PaginatedEntityDropdown(\n $id: UUID!\n $searchQuery: String\n) {\n app(id: $id) {\n __typename\n ... on App {\n id\n items(\n input: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n includeOnlyRequestable: true\n }\n ) {\n items {\n key\n resource {\n id\n name\n }\n group {\n id\n name\n }\n }\n cursor\n }\n }\n ... on AppNotFoundError {\n message\n }\n }\n}\n"): (typeof documents)["\n query PaginatedEntityDropdown(\n $id: UUID!\n $searchQuery: String\n) {\n app(id: $id) {\n __typename\n ... on App {\n id\n items(\n input: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n includeOnlyRequestable: true\n }\n ) {\n items {\n key\n resource {\n id\n name\n }\n group {\n id\n name\n }\n }\n cursor\n }\n }\n ... on AppNotFoundError {\n message\n }\n }\n}\n"];
56
+ /**
57
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
58
+ */
59
+ export declare function graphql(source: "\n query ResourceAccessLevels($resourceId: ResourceId!) {\n accessLevels(input: {\n resourceId: $resourceId,\n onlyMine: false,\n }) {\n __typename\n ... on ResourceAccessLevelsResult {\n accessLevels {\n __typename\n ... on ResourceAccessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n }\n ... on ResourceNotFoundError {\n message\n }\n }\n }\n"): (typeof documents)["\n query ResourceAccessLevels($resourceId: ResourceId!) {\n accessLevels(input: {\n resourceId: $resourceId,\n onlyMine: false,\n }) {\n __typename\n ... on ResourceAccessLevelsResult {\n accessLevels {\n __typename\n ... on ResourceAccessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n }\n ... on ResourceNotFoundError {\n message\n }\n }\n }\n"];
35
60
  export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
36
61
  export {};
@@ -4,7 +4,12 @@ exports.graphql = graphql;
4
4
  /* eslint-disable */
5
5
  const types = require("./graphql");
6
6
  const documents = {
7
+ "\nquery GetGroup($id: GroupId!) {\n group(input: { id: $id }) {\n __typename\n ... on GroupResult {\n group {\n name\n id\n description\n groupType\n adminOwnerId\n groupLeaders {\n fullName\n email\n id\n }\n connection {\n name\n id\n connectionType\n }\n paginatedGroupUsers {\n totalNumGroupUsers\n groupUsers {\n user {\n fullName\n email\n id\n }\n }\n }\n }\n }\n ... on GroupNotFoundError {\n message\n }\n }\n}": types.GetGroupDocument,
8
+ "\n query GetRequest(\n $id: RequestId!\n) {\n request(input: {id: $id}) {\n __typename\n ... on RequestResult {\n request {\n id\n status\n requestedResources {\n resource {\n displayName\n id\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n durationInMinutes\n requestedGroups {\n group {\n id\n name\n }\n accessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n reason\n }\n }\n ... on RequestNotFoundError {\n message\n }\n }\n}\n": types.GetRequestDocument,
7
9
  "\nquery CheckAuthSessionQuery {\n organizationSettings {\n ... on OrganizationSettingsResult {\n settings {\n id\n }\n }\n }\n}\n": types.CheckAuthSessionQueryDocument,
10
+ '\n query GetRequestableAppsQuery($searchQuery: String) {\n appsV2(\n filters: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n }\n ) @connection(key: "paginated-app-dropdown") {\n edges {\n node {\n id\n displayName\n ... on Connection {\n connectionType\n }\n ... on Resource {\n resourceType\n }\n }\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n }\n ': types.GetRequestableAppsQueryDocument,
11
+ "\n query PaginatedEntityDropdown(\n $id: UUID!\n $searchQuery: String\n) {\n app(id: $id) {\n __typename\n ... on App {\n id\n items(\n input: {\n access: REQUESTABLE\n searchQuery: $searchQuery\n includeOnlyRequestable: true\n }\n ) {\n items {\n key\n resource {\n id\n name\n }\n group {\n id\n name\n }\n }\n cursor\n }\n }\n ... on AppNotFoundError {\n message\n }\n }\n}\n": types.PaginatedEntityDropdownDocument,
12
+ "\n query ResourceAccessLevels($resourceId: ResourceId!) {\n accessLevels(input: {\n resourceId: $resourceId,\n onlyMine: false,\n }) {\n __typename\n ... on ResourceAccessLevelsResult {\n accessLevels {\n __typename\n ... on ResourceAccessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n }\n ... on ResourceNotFoundError {\n message\n }\n }\n }\n": types.ResourceAccessLevelsDocument,
8
13
  };
9
14
  function graphql(source) {
10
15
  var _a;