opal-security 3.1.1-beta.4ab1987 → 3.1.1-beta.4e22fcc
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 +26 -26
- package/lib/commands/request/create.d.ts +6 -0
- package/lib/commands/request/create.js +52 -15
- package/lib/commands/request/list.js +2 -2
- package/lib/graphql/gql.d.ts +17 -2
- package/lib/graphql/gql.js +4 -1
- package/lib/graphql/graphql.d.ts +162 -0
- package/lib/graphql/graphql.js +1075 -17
- package/lib/lib/flags.js +1 -1
- package/lib/lib/requests.d.ts +28 -19
- package/lib/lib/requests.js +723 -94
- package/lib/utils/displays.d.ts +5 -4
- package/lib/utils/displays.js +70 -69
- package/oclif.manifest.json +43 -11
- package/package.json +2 -1
package/lib/lib/flags.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.SHARED_FLAGS = {
|
|
|
7
7
|
id: core_1.Flags.string({
|
|
8
8
|
multiple: false,
|
|
9
9
|
char: "i",
|
|
10
|
-
description: "The Opal ID of the
|
|
10
|
+
description: "The Opal ID of the asset. You can find this from the URL, e.g. https://opal.dev/resources/[ID]",
|
|
11
11
|
}),
|
|
12
12
|
accessLevelRemoteId: core_1.Flags.string({
|
|
13
13
|
multiple: false,
|
package/lib/lib/requests.d.ts
CHANGED
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import type { NormalizedCacheObject } from "@apollo/client/core";
|
|
2
2
|
import type { ApolloClient } from "@apollo/client/core/ApolloClient";
|
|
3
3
|
import type { Command } from "@oclif/core/lib/command";
|
|
4
|
-
|
|
4
|
+
import { type AppType, type ConnectionType, EntityType } from "../graphql/graphql";
|
|
5
|
+
type AppNode = {
|
|
6
|
+
appId: string;
|
|
5
7
|
appName: string;
|
|
8
|
+
appType?: AppType | ConnectionType;
|
|
6
9
|
assets: Record<string, AssetNode>;
|
|
7
|
-
}
|
|
8
|
-
|
|
10
|
+
};
|
|
11
|
+
type AssetNode = {
|
|
12
|
+
assetId: string;
|
|
9
13
|
assetName: string;
|
|
10
|
-
type:
|
|
14
|
+
type: EntityType;
|
|
11
15
|
roles?: Record<string, RoleNode>;
|
|
12
|
-
}
|
|
13
|
-
|
|
16
|
+
};
|
|
17
|
+
type RoleNode = {
|
|
18
|
+
roleId: string;
|
|
14
19
|
roleName: string;
|
|
15
|
-
}
|
|
20
|
+
};
|
|
16
21
|
export type RequestMap = Record<string, AppNode>;
|
|
17
|
-
|
|
22
|
+
type DurationOption = {
|
|
18
23
|
durationInMinutes: number;
|
|
19
24
|
label: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
25
|
+
};
|
|
26
|
+
type RequestDefaults = {
|
|
22
27
|
durationOptions?: DurationOption[];
|
|
23
28
|
recommendedDurationInMinutes?: number | null;
|
|
24
29
|
defaultDurationInMinutes?: number;
|
|
@@ -26,18 +31,22 @@ interface RequestDefaults {
|
|
|
26
31
|
requireSupportTicket?: boolean;
|
|
27
32
|
reasonOptional?: boolean;
|
|
28
33
|
requesterIsAdmin?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export
|
|
34
|
+
};
|
|
35
|
+
export type RequestMetadata = {
|
|
31
36
|
requestMap: RequestMap;
|
|
32
37
|
requestDefaults: RequestDefaults;
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
durationLabel: string;
|
|
39
|
+
durationInMinutes?: number;
|
|
40
|
+
reason: string;
|
|
41
|
+
};
|
|
42
|
+
export declare function initEmptyRequestMetadata(): RequestMetadata;
|
|
35
43
|
export declare function selectRequestableItems(cmd: Command, client: ApolloClient<NormalizedCacheObject>, requestMap: RequestMap): Promise<void>;
|
|
36
|
-
export declare function chooseAssets(cmd: Command, client: ApolloClient<NormalizedCacheObject>, appId: string, requestMap: RequestMap): Promise<void>;
|
|
37
|
-
export declare function chooseRoles(cmd: Command, client: ApolloClient<NormalizedCacheObject>, appId: string, assetId: string, requestMap: RequestMap): Promise<void>;
|
|
38
44
|
export declare function doneSelectingAssets(): Promise<boolean>;
|
|
39
45
|
export declare function setRequestDefaults(cmd: Command, client: ApolloClient<NormalizedCacheObject>, metadata: RequestMetadata): Promise<void>;
|
|
40
|
-
export declare function promptForReason(metadata: RequestMetadata): Promise<
|
|
41
|
-
export declare function promptForExpiration(metadata: RequestMetadata): Promise<
|
|
42
|
-
export declare function
|
|
46
|
+
export declare function promptForReason(metadata: RequestMetadata): Promise<void>;
|
|
47
|
+
export declare function promptForExpiration(metadata: RequestMetadata): Promise<void>;
|
|
48
|
+
export declare function promptRequestSubmission(cmd: Command, metadata: RequestMetadata): Promise<void>;
|
|
49
|
+
export declare function submitFinalRequest(cmd: Command, client: ApolloClient<NormalizedCacheObject>, metadata: RequestMetadata): Promise<void>;
|
|
50
|
+
export declare function bypassRequestSelection(cmd: Command, client: ApolloClient<NormalizedCacheObject>, flagValue: string[], metadata: RequestMetadata): Promise<void>;
|
|
51
|
+
export declare function bypassDuration(cmd: Command, duration: number, metadata: RequestMetadata): void;
|
|
43
52
|
export {};
|