opal-security 3.2.4 → 4.0.2
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 +46 -61
- package/bin/dev +5 -5
- package/bin/run +2 -4
- package/build/commands/aws/identity.js +16 -0
- package/build/commands/clear-auth-config.d.ts +6 -0
- package/build/commands/clear-auth-config.js +22 -0
- package/{lib → build}/commands/groups/get.js +14 -16
- package/{lib → build}/commands/iam-roles/start.js +28 -30
- package/build/commands/kube-roles/start.js +71 -0
- package/{lib → build}/commands/login.d.ts +1 -0
- package/build/commands/login.js +379 -0
- package/build/commands/logout.js +22 -0
- package/{lib → build}/commands/postgres-instances/start.js +25 -27
- package/{lib → build}/commands/request/create.js +34 -36
- package/{lib → build}/commands/request/get.js +22 -24
- package/{lib → build}/commands/request/list.js +17 -19
- package/{lib → build}/commands/resources/get.js +15 -18
- package/build/commands/set-auth-config.d.ts +11 -0
- package/build/commands/set-auth-config.js +59 -0
- package/build/commands/set-custom-header.js +35 -0
- package/{lib → build}/commands/set-token.js +15 -17
- package/{lib → build}/commands/set-url.js +26 -28
- package/{lib → build}/commands/ssh/copyFrom.js +22 -24
- package/{lib → build}/commands/ssh/copyTo.js +22 -24
- package/{lib → build}/commands/ssh/start.js +30 -33
- package/build/commands/whoami.js +27 -0
- package/{lib → build}/graphql/fragment-masking.d.ts +1 -1
- package/{lib → build}/graphql/fragment-masking.js +3 -8
- package/{lib → build}/graphql/gql.d.ts +1 -1
- package/{lib → build}/graphql/gql.js +2 -5
- package/{lib → build}/graphql/graphql.js +256 -261
- package/build/graphql/index.d.ts +2 -0
- package/build/graphql/index.js +2 -0
- package/{lib → build}/handler.d.ts +1 -1
- package/build/handler.js +36 -0
- package/build/index.js +1 -0
- package/{lib → build}/labels.d.ts +1 -1
- package/build/labels.js +37 -0
- package/{lib → build}/lib/apollo.d.ts +2 -2
- package/{lib → build}/lib/apollo.js +62 -69
- package/build/lib/auth-success-template.d.ts +3 -0
- package/build/lib/auth-success-template.js +149 -0
- package/{lib → build}/lib/aws.js +2 -7
- package/{lib → build}/lib/cmd.d.ts +4 -4
- package/{lib → build}/lib/cmd.js +16 -20
- package/build/lib/config.js +46 -0
- package/{lib → build}/lib/credentials/index.d.ts +3 -2
- package/build/lib/credentials/index.js +85 -0
- package/{lib → build}/lib/credentials/keychain.js +4 -10
- package/{lib → build}/lib/credentials/localEncryption.js +12 -17
- package/{lib → build}/lib/flags.js +7 -10
- package/build/lib/local-auth-server.d.ts +5 -0
- package/build/lib/local-auth-server.js +69 -0
- package/build/lib/request/api/index.d.ts +6 -0
- package/build/lib/request/api/index.js +8 -0
- package/{lib → build}/lib/request/api/mutations/create-request.d.ts +2 -2
- package/{lib → build}/lib/request/api/mutations/create-request.js +3 -6
- package/{lib → build}/lib/request/api/queries/apps.d.ts +1 -1
- package/{lib → build}/lib/request/api/queries/apps.js +3 -6
- package/{lib → build}/lib/request/api/queries/assets.d.ts +2 -2
- package/{lib → build}/lib/request/api/queries/assets.js +7 -11
- package/{lib → build}/lib/request/api/queries/request-defaults.d.ts +2 -2
- package/{lib → build}/lib/request/api/queries/request-defaults.js +3 -6
- package/{lib → build}/lib/request/api/queries/requests.d.ts +3 -3
- package/{lib → build}/lib/request/api/queries/requests.js +10 -16
- package/{lib → build}/lib/request/api/queries/roles.d.ts +1 -1
- package/{lib → build}/lib/request/api/queries/roles.js +14 -18
- package/{lib → build}/lib/request/displays.d.ts +2 -2
- package/{lib → build}/lib/request/displays.js +27 -37
- package/{lib → build}/lib/request/prompts/apps-prompt.d.ts +1 -1
- package/build/lib/request/prompts/apps-prompt.js +33 -0
- package/{lib → build}/lib/request/prompts/asset-prompt.d.ts +1 -1
- package/build/lib/request/prompts/asset-prompt.js +61 -0
- package/{lib → build}/lib/request/prompts/duration-prompt.d.ts +1 -1
- package/{lib → build}/lib/request/prompts/duration-prompt.js +6 -10
- package/build/lib/request/prompts/index.d.ts +7 -0
- package/build/lib/request/prompts/index.js +8 -0
- package/{lib → build}/lib/request/prompts/reason-prompt.d.ts +1 -1
- package/{lib → build}/lib/request/prompts/reason-prompt.js +3 -6
- package/{lib → build}/lib/request/prompts/role-prompt.d.ts +1 -1
- package/{lib → build}/lib/request/prompts/role-prompt.js +9 -11
- package/{lib → build}/lib/request/prompts/validate-prompt.d.ts +1 -1
- package/{lib → build}/lib/request/prompts/validate-prompt.js +9 -13
- package/{lib → build}/lib/request/request-utils.d.ts +2 -2
- package/{lib → build}/lib/request/request-utils.js +50 -62
- package/{lib → build}/lib/request/types.d.ts +1 -1
- package/build/lib/request/types.js +12 -0
- package/{lib → build}/lib/resources.d.ts +1 -1
- package/{lib → build}/lib/resources.js +18 -23
- package/{lib → build}/lib/sessions.d.ts +1 -1
- package/{lib → build}/lib/sessions.js +57 -32
- package/{lib → build}/lib/ssh.d.ts +1 -1
- package/{lib → build}/lib/ssh.js +6 -11
- package/{lib → build}/lib/util.js +7 -14
- package/{lib → build}/types.js +98 -101
- package/oclif.manifest.json +77 -98
- package/package.json +24 -14
- package/lib/commands/aws/identity.js +0 -18
- package/lib/commands/clear-auth-provider.d.ts +0 -9
- package/lib/commands/clear-auth-provider.js +0 -28
- package/lib/commands/curl-example.d.ts +0 -8
- package/lib/commands/curl-example.js +0 -34
- package/lib/commands/kube-roles/start.js +0 -73
- package/lib/commands/login.js +0 -286
- package/lib/commands/logout.js +0 -23
- package/lib/commands/set-auth-provider.d.ts +0 -11
- package/lib/commands/set-auth-provider.js +0 -44
- package/lib/commands/set-custom-header.js +0 -37
- package/lib/commands/whoami.js +0 -34
- package/lib/graphql/index.d.ts +0 -2
- package/lib/graphql/index.js +0 -5
- package/lib/handler.js +0 -41
- package/lib/index.js +0 -5
- package/lib/labels.js +0 -40
- package/lib/lib/config.js +0 -54
- package/lib/lib/credentials/index.js +0 -67
- package/lib/lib/request/api/index.d.ts +0 -6
- package/lib/lib/request/api/index.js +0 -20
- package/lib/lib/request/prompts/apps-prompt.js +0 -35
- package/lib/lib/request/prompts/asset-prompt.js +0 -65
- package/lib/lib/request/prompts/index.d.ts +0 -7
- package/lib/lib/request/prompts/index.js +0 -19
- package/lib/lib/request/types.js +0 -15
- /package/{lib → build}/commands/aws/identity.d.ts +0 -0
- /package/{lib → build}/commands/groups/get.d.ts +0 -0
- /package/{lib → build}/commands/iam-roles/start.d.ts +0 -0
- /package/{lib → build}/commands/kube-roles/start.d.ts +0 -0
- /package/{lib → build}/commands/logout.d.ts +0 -0
- /package/{lib → build}/commands/postgres-instances/start.d.ts +0 -0
- /package/{lib → build}/commands/request/create.d.ts +0 -0
- /package/{lib → build}/commands/request/get.d.ts +0 -0
- /package/{lib → build}/commands/request/list.d.ts +0 -0
- /package/{lib → build}/commands/resources/get.d.ts +0 -0
- /package/{lib → build}/commands/set-custom-header.d.ts +0 -0
- /package/{lib → build}/commands/set-token.d.ts +0 -0
- /package/{lib → build}/commands/set-url.d.ts +0 -0
- /package/{lib → build}/commands/ssh/copyFrom.d.ts +0 -0
- /package/{lib → build}/commands/ssh/copyTo.d.ts +0 -0
- /package/{lib → build}/commands/ssh/start.d.ts +0 -0
- /package/{lib → build}/commands/whoami.d.ts +0 -0
- /package/{lib → build}/graphql/graphql.d.ts +0 -0
- /package/{lib → build}/index.d.ts +0 -0
- /package/{lib → build}/lib/aws.d.ts +0 -0
- /package/{lib → build}/lib/config.d.ts +0 -0
- /package/{lib → build}/lib/credentials/keychain.d.ts +0 -0
- /package/{lib → build}/lib/credentials/localEncryption.d.ts +0 -0
- /package/{lib → build}/lib/flags.d.ts +0 -0
- /package/{lib → build}/lib/util.d.ts +0 -0
- /package/{lib → build}/types.d.ts +0 -0
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const start_1 = require("./start");
|
|
11
|
-
class StartSCPSession extends core_1.Command {
|
|
1
|
+
import { Command, Flags } from "@oclif/core";
|
|
2
|
+
import { handleError } from "../../lib/apollo.js";
|
|
3
|
+
import { runCommandSpawn, setMostRecentCommand } from "../../lib/cmd.js";
|
|
4
|
+
import { SHARED_FLAGS } from "../../lib/flags.js";
|
|
5
|
+
import { DEFAULT_ACCESS_LEVEL } from "../../lib/resources.js";
|
|
6
|
+
import { getOrCreateSession } from "../../lib/sessions.js";
|
|
7
|
+
import { assertSessionManagerPluginExists, selectComputeInstance, } from "../../lib/ssh.js";
|
|
8
|
+
import { Ec2SessionMetadataFragment } from "./start.js";
|
|
9
|
+
class StartSCPSession extends Command {
|
|
12
10
|
async run() {
|
|
13
|
-
|
|
11
|
+
setMostRecentCommand(this);
|
|
14
12
|
const { flags } = await this.parse(StartSCPSession);
|
|
15
|
-
const pluginExists = await
|
|
13
|
+
const pluginExists = await assertSessionManagerPluginExists();
|
|
16
14
|
if (!pluginExists) {
|
|
17
15
|
return;
|
|
18
16
|
}
|
|
@@ -20,14 +18,14 @@ class StartSCPSession extends core_1.Command {
|
|
|
20
18
|
let instanceName = null;
|
|
21
19
|
const sessionId = flags.sessionId;
|
|
22
20
|
if (!instanceId) {
|
|
23
|
-
const selectedInstance = await
|
|
21
|
+
const selectedInstance = await selectComputeInstance(this, "SCP into");
|
|
24
22
|
if (!selectedInstance) {
|
|
25
23
|
return;
|
|
26
24
|
}
|
|
27
25
|
instanceId = selectedInstance.id;
|
|
28
26
|
instanceName = selectedInstance.name;
|
|
29
27
|
}
|
|
30
|
-
const session = await
|
|
28
|
+
const session = await getOrCreateSession(this, instanceId, DEFAULT_ACCESS_LEVEL, sessionId, Ec2SessionMetadataFragment);
|
|
31
29
|
if (!session) {
|
|
32
30
|
return;
|
|
33
31
|
}
|
|
@@ -42,11 +40,11 @@ class StartSCPSession extends core_1.Command {
|
|
|
42
40
|
// Run SCP script
|
|
43
41
|
const scpCmd = `$SCRIPT_PATH/../../scripts/ssh_ssm_scp_to_server.sh ${metadata.ec2InstanceId} ${flags.user} ${flags.src} ${metadata.ec2Region} ${flags.dest}`;
|
|
44
42
|
const outputMessage = `from "${flags.src}" locally to "${flags.dest}" on ${instanceName ? `"${instanceName}" instance` : "instance"}.`;
|
|
45
|
-
|
|
43
|
+
runCommandSpawn(scpCmd, `Copied ${outputMessage}`, `Failed to copy ${outputMessage}.`, envVars);
|
|
46
44
|
break;
|
|
47
45
|
}
|
|
48
46
|
default:
|
|
49
|
-
return
|
|
47
|
+
return handleError(this, undefined, session);
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
50
|
}
|
|
@@ -56,25 +54,25 @@ StartSCPSession.examples = [
|
|
|
56
54
|
"opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398",
|
|
57
55
|
];
|
|
58
56
|
StartSCPSession.flags = {
|
|
59
|
-
help:
|
|
60
|
-
src:
|
|
57
|
+
help: SHARED_FLAGS.help,
|
|
58
|
+
src: Flags.string({
|
|
61
59
|
multiple: false,
|
|
62
60
|
required: true,
|
|
63
61
|
description: "The directory or file you would like to copy over SCP. Note we only support one file or directory at a time.",
|
|
64
62
|
}),
|
|
65
|
-
dest:
|
|
63
|
+
dest: Flags.string({
|
|
66
64
|
multiple: false,
|
|
67
65
|
required: false,
|
|
68
66
|
default: ".",
|
|
69
67
|
description: "The directory you want your files to be copied to.",
|
|
70
68
|
}),
|
|
71
|
-
user:
|
|
69
|
+
user: Flags.string({
|
|
72
70
|
multiple: false,
|
|
73
71
|
required: false,
|
|
74
72
|
default: "ssm-user",
|
|
75
73
|
description: "The user you want to run SCP over. Keep in mind not all users will have access to each other's home directory.",
|
|
76
74
|
}),
|
|
77
|
-
id:
|
|
78
|
-
sessionId:
|
|
75
|
+
id: SHARED_FLAGS.id,
|
|
76
|
+
sessionId: SHARED_FLAGS.sessionId,
|
|
79
77
|
};
|
|
80
|
-
|
|
78
|
+
export default StartSCPSession;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const sessions_1 = require("../../lib/sessions");
|
|
13
|
-
const ssh_1 = require("../../lib/ssh");
|
|
14
|
-
exports.Ec2SessionMetadataFragment = `
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { GetResourceDocument } from "../../commands/resources/get.js";
|
|
3
|
+
import { runQueryDeprecated } from "../../handler.js";
|
|
4
|
+
import { handleError } from "../../lib/apollo.js";
|
|
5
|
+
import { getAwsConfigUpdateCmd } from "../../lib/aws.js";
|
|
6
|
+
import { setMostRecentCommand, startInteractiveShell } from "../../lib/cmd.js";
|
|
7
|
+
import { SHARED_FLAGS } from "../../lib/flags.js";
|
|
8
|
+
import { DEFAULT_ACCESS_LEVEL } from "../../lib/resources.js";
|
|
9
|
+
import { getOrCreateSession, getSessionExpirationMessage, } from "../../lib/sessions.js";
|
|
10
|
+
import { assertSessionManagerPluginExists, selectComputeInstance, } from "../../lib/ssh.js";
|
|
11
|
+
export const Ec2SessionMetadataFragment = `
|
|
15
12
|
... on AwsIamFederatedSSMSession {
|
|
16
13
|
awsAccessKeyId
|
|
17
14
|
awsSecretAccessKey
|
|
@@ -21,14 +18,14 @@ exports.Ec2SessionMetadataFragment = `
|
|
|
21
18
|
ec2InstanceId
|
|
22
19
|
ec2Region
|
|
23
20
|
}`;
|
|
24
|
-
class StartSSHSession extends
|
|
21
|
+
class StartSSHSession extends Command {
|
|
25
22
|
async run() {
|
|
26
|
-
|
|
23
|
+
setMostRecentCommand(this);
|
|
27
24
|
const { flags } = await this.parse(StartSSHSession);
|
|
28
25
|
if (flags.sessionId && flags.refresh) {
|
|
29
|
-
return
|
|
26
|
+
return handleError(this, "Cannot use both --sessionId and --refresh");
|
|
30
27
|
}
|
|
31
|
-
const pluginExists = await
|
|
28
|
+
const pluginExists = await assertSessionManagerPluginExists();
|
|
32
29
|
if (!pluginExists) {
|
|
33
30
|
return;
|
|
34
31
|
}
|
|
@@ -36,7 +33,7 @@ class StartSSHSession extends core_1.Command {
|
|
|
36
33
|
let instanceName = null;
|
|
37
34
|
const sessionId = flags.sessionId;
|
|
38
35
|
if (!instanceId) {
|
|
39
|
-
const selectedInstance = await
|
|
36
|
+
const selectedInstance = await selectComputeInstance(this, "SSH into");
|
|
40
37
|
if (!selectedInstance) {
|
|
41
38
|
return;
|
|
42
39
|
}
|
|
@@ -44,40 +41,40 @@ class StartSSHSession extends core_1.Command {
|
|
|
44
41
|
instanceName = selectedInstance.name;
|
|
45
42
|
}
|
|
46
43
|
else {
|
|
47
|
-
const { resp, error } = await
|
|
44
|
+
const { resp, error } = await runQueryDeprecated({
|
|
48
45
|
command: this,
|
|
49
|
-
query:
|
|
46
|
+
query: GetResourceDocument,
|
|
50
47
|
variables: {
|
|
51
48
|
id: instanceId,
|
|
52
49
|
},
|
|
53
50
|
});
|
|
54
51
|
if (error) {
|
|
55
|
-
return
|
|
52
|
+
return handleError(this, error, resp);
|
|
56
53
|
}
|
|
57
54
|
if (!(resp === null || resp === void 0 ? void 0 : resp.data.resource.resource)) {
|
|
58
|
-
return
|
|
55
|
+
return handleError(this, `Resource not found for ID: ${instanceId}`);
|
|
59
56
|
}
|
|
60
57
|
instanceName = (resp === null || resp === void 0 ? void 0 : resp.data.resource.resource.name) || "ssh-instance";
|
|
61
58
|
}
|
|
62
|
-
const session = await
|
|
59
|
+
const session = await getOrCreateSession(this, instanceId, DEFAULT_ACCESS_LEVEL, sessionId, Ec2SessionMetadataFragment, flags.refresh);
|
|
63
60
|
if (!session) {
|
|
64
61
|
return;
|
|
65
62
|
}
|
|
66
63
|
const metadata = session.metadata;
|
|
67
64
|
switch (metadata === null || metadata === void 0 ? void 0 : metadata.__typename) {
|
|
68
65
|
case "AwsIamFederatedSSMSession": {
|
|
69
|
-
this.log(`\n🕰 Connecting to a session that expires in ${
|
|
70
|
-
const updateAwsConfigCommand =
|
|
66
|
+
this.log(`\n🕰 Connecting to a session that expires in ${getSessionExpirationMessage(session)}.`);
|
|
67
|
+
const updateAwsConfigCommand = getAwsConfigUpdateCmd(instanceName, metadata.awsAccessKeyId, metadata.awsSecretAccessKey, metadata.awsSessionToken);
|
|
71
68
|
const sessionCmd = `aws ssm start-session --target ${metadata.ec2InstanceId} --region ${metadata.ec2Region} --profile opal`;
|
|
72
69
|
// TODO: Unfortunately allowing SSH over SSM disables logging
|
|
73
70
|
// Run SSH script
|
|
74
71
|
// const sessionCmd = `../../scripts/ssh_ssm.sh ${metadata.ec2InstanceId} ${flags.user} ${metadata.ec2Region}`
|
|
75
72
|
const startSessionCmd = `${updateAwsConfigCommand} && ${sessionCmd}`;
|
|
76
|
-
|
|
73
|
+
startInteractiveShell(startSessionCmd, `shell into ${instanceName ? `"${instanceName}" instance` : "instance"}`);
|
|
77
74
|
break;
|
|
78
75
|
}
|
|
79
76
|
default:
|
|
80
|
-
return
|
|
77
|
+
return handleError(this, undefined, session);
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
80
|
}
|
|
@@ -87,15 +84,15 @@ StartSSHSession.examples = [
|
|
|
87
84
|
"opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398",
|
|
88
85
|
];
|
|
89
86
|
StartSSHSession.flags = {
|
|
90
|
-
help:
|
|
91
|
-
id:
|
|
87
|
+
help: SHARED_FLAGS.help,
|
|
88
|
+
id: SHARED_FLAGS.id,
|
|
92
89
|
// TODO: Unfortunately allowing SSM over SSH disables logging
|
|
93
90
|
// user: flags.string({
|
|
94
91
|
// multiple: false,
|
|
95
92
|
// required: false,
|
|
96
93
|
// default: "ssm-user",
|
|
97
94
|
// }),
|
|
98
|
-
sessionId:
|
|
99
|
-
refresh:
|
|
95
|
+
sessionId: SHARED_FLAGS.sessionId,
|
|
96
|
+
refresh: SHARED_FLAGS.refresh,
|
|
100
97
|
};
|
|
101
|
-
|
|
98
|
+
export default StartSSHSession;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { getOrCreateConfigData, urlKey } from "../lib/config.js";
|
|
3
|
+
import { getOpalCredentials } from "../lib/credentials/index.js";
|
|
4
|
+
import { SHARED_FLAGS } from "../lib/flags.js";
|
|
5
|
+
class WhoAmI extends Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const opalCreds = await getOpalCredentials(this, false);
|
|
8
|
+
const organizationID = opalCreds === null || opalCreds === void 0 ? void 0 : opalCreds.organizationID;
|
|
9
|
+
const email = opalCreds === null || opalCreds === void 0 ? void 0 : opalCreds.email;
|
|
10
|
+
const configData = getOrCreateConfigData(this.config.configDir);
|
|
11
|
+
const url = configData[urlKey];
|
|
12
|
+
if (email) {
|
|
13
|
+
this.log(`User email: ${email}`);
|
|
14
|
+
}
|
|
15
|
+
if (organizationID) {
|
|
16
|
+
this.log(`OrganizationID: ${organizationID}`);
|
|
17
|
+
}
|
|
18
|
+
if (url) {
|
|
19
|
+
this.log(`Server: ${url}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
WhoAmI.description = "Describes current url set, organization name, and logged in user if applicable.";
|
|
24
|
+
WhoAmI.flags = {
|
|
25
|
+
help: SHARED_FLAGS.help,
|
|
26
|
+
};
|
|
27
|
+
export default WhoAmI;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentTypeDecoration, ResultOf, TypedDocumentNode } from "@graphql-typed-document-node/core";
|
|
2
|
-
import type { Incremental } from "./graphql";
|
|
2
|
+
import type { Incremental } from "./graphql.js";
|
|
3
3
|
export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
|
|
4
4
|
" $fragmentName"?: infer TKey;
|
|
5
5
|
}] ? TKey extends string ? {
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFragment = useFragment;
|
|
4
|
-
exports.makeFragmentData = makeFragmentData;
|
|
5
|
-
exports.isFragmentReady = isFragmentReady;
|
|
6
|
-
function useFragment(_documentNode, fragmentType) {
|
|
1
|
+
export function useFragment(_documentNode, fragmentType) {
|
|
7
2
|
return fragmentType;
|
|
8
3
|
}
|
|
9
|
-
function makeFragmentData(data, _fragment) {
|
|
4
|
+
export function makeFragmentData(data, _fragment) {
|
|
10
5
|
return data;
|
|
11
6
|
}
|
|
12
|
-
function isFragmentReady(queryNode, fragmentNode, data) {
|
|
7
|
+
export function isFragmentReady(queryNode, fragmentNode, data) {
|
|
13
8
|
var _a, _b;
|
|
14
9
|
const deferredFields = (_a = queryNode.__meta__) === null || _a === void 0 ? void 0 : _a.deferredFields;
|
|
15
10
|
if (!deferredFields)
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.graphql = graphql;
|
|
4
1
|
/* eslint-disable */
|
|
5
|
-
|
|
2
|
+
import * as types from "./graphql.js";
|
|
6
3
|
const documents = {
|
|
7
4
|
"\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
5
|
"\nquery CheckAuthSessionQuery {\n organizationSettings {\n ... on OrganizationSettingsResult {\n settings {\n id\n }\n }\n }\n}\n": types.CheckAuthSessionQueryDocument,
|
|
@@ -21,7 +18,7 @@ const documents = {
|
|
|
21
18
|
"\nquery GroupAccessLevels($groupId: GroupId!) {\n groupAccessLevels(\n input: { groupId: $groupId }\n ) {\n ... on GroupAccessLevelsResult {\n groupId\n accessLevels {\n ... on GroupAccessLevel {\n accessLevelName\n accessLevelRemoteId\n }\n }\n }\n }\n}\n": types.GroupAccessLevelsDocument,
|
|
22
19
|
"\n query GetAssociatedItems($resourceId: ResourceId!, $searchQuery: String) {\n resource(input: {\n id: $resourceId\n }) {\n __typename\n ... on ResourceResult {\n __typename\n resource {\n associatedItems(\n first: 200\n filters: {\n searchQuery: {\n contains: $searchQuery\n }\n access: REQUESTABLE\n endUserVisible: true\n entityType: {\n in: [GROUP, RESOURCE]\n }\n }\n ) {\n edges {\n __typename\n ... on ResourceAssociatedItemEdge {\n alias\n node {\n __typename\n id\n name\n ... on Resource {\n accessLevels(\n filters: {\n skipRemoteAccessLevels: false # azure app roles are remote\n }\n ) {\n __typename\n accessLevelName\n accessLevelRemoteId\n }\n }\n }\n }\n }\n }\n }\n }\n ... on ResourceNotFoundError {\n message\n }\n }\n }\n": types.GetAssociatedItemsDocument,
|
|
23
20
|
};
|
|
24
|
-
function graphql(source) {
|
|
21
|
+
export function graphql(source) {
|
|
25
22
|
var _a;
|
|
26
23
|
return (_a = documents[source]) !== null && _a !== void 0 ? _a : {};
|
|
27
24
|
}
|