opal-security 3.1.1-beta.9cc3edb → 3.1.1-beta.b652df3
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 +44 -26
- package/lib/commands/login.js +6 -2
- package/lib/commands/request/create.d.ts +6 -0
- package/lib/commands/request/create.js +57 -14
- package/lib/commands/whoami.d.ts +8 -0
- package/lib/commands/whoami.js +34 -0
- package/lib/graphql/gql.d.ts +10 -0
- package/lib/graphql/gql.js +2 -0
- package/lib/graphql/graphql.d.ts +85 -0
- package/lib/graphql/graphql.js +539 -1
- package/lib/lib/apollo.js +3 -4
- package/lib/lib/credentials/index.d.ts +2 -1
- package/lib/lib/credentials/index.js +2 -1
- package/lib/lib/flags.js +1 -1
- package/lib/lib/requests.d.ts +22 -15
- package/lib/lib/requests.js +458 -121
- package/lib/utils/displays.d.ts +1 -1
- package/lib/utils/displays.js +21 -30
- package/oclif.manifest.json +71 -11
- package/package.json +1 -1
package/lib/lib/requests.d.ts
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
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
|
+
export declare const DISPLAY_LABELS: Partial<Record<EntityType, string>>;
|
|
23
|
+
type DurationOption = {
|
|
18
24
|
durationInMinutes: number;
|
|
19
25
|
label: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
26
|
+
};
|
|
27
|
+
type RequestDefaults = {
|
|
22
28
|
durationOptions?: DurationOption[];
|
|
23
29
|
recommendedDurationInMinutes?: number | null;
|
|
24
30
|
defaultDurationInMinutes?: number;
|
|
@@ -26,21 +32,22 @@ interface RequestDefaults {
|
|
|
26
32
|
requireSupportTicket?: boolean;
|
|
27
33
|
reasonOptional?: boolean;
|
|
28
34
|
requesterIsAdmin?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export
|
|
35
|
+
};
|
|
36
|
+
export type RequestMetadata = {
|
|
31
37
|
requestMap: RequestMap;
|
|
32
38
|
requestDefaults: RequestDefaults;
|
|
33
39
|
durationLabel: string;
|
|
34
40
|
durationInMinutes?: number;
|
|
35
41
|
reason: string;
|
|
36
|
-
}
|
|
42
|
+
};
|
|
37
43
|
export declare function initEmptyRequestMetadata(): RequestMetadata;
|
|
38
44
|
export declare function selectRequestableItems(cmd: Command, client: ApolloClient<NormalizedCacheObject>, requestMap: RequestMap): Promise<void>;
|
|
39
|
-
export declare function chooseAssets(cmd: Command, client: ApolloClient<NormalizedCacheObject>, appId: string, requestMap: RequestMap): Promise<void>;
|
|
40
|
-
export declare function chooseRoles(cmd: Command, client: ApolloClient<NormalizedCacheObject>, appId: string, assetId: string, requestMap: RequestMap): Promise<void>;
|
|
41
45
|
export declare function doneSelectingAssets(): Promise<boolean>;
|
|
42
46
|
export declare function setRequestDefaults(cmd: Command, client: ApolloClient<NormalizedCacheObject>, metadata: RequestMetadata): Promise<void>;
|
|
43
47
|
export declare function promptForReason(metadata: RequestMetadata): Promise<void>;
|
|
44
48
|
export declare function promptForExpiration(metadata: RequestMetadata): Promise<void>;
|
|
49
|
+
export declare function promptRequestSubmission(cmd: Command, metadata: RequestMetadata): Promise<boolean>;
|
|
45
50
|
export declare function submitFinalRequest(cmd: Command, client: ApolloClient<NormalizedCacheObject>, metadata: RequestMetadata): Promise<void>;
|
|
51
|
+
export declare function bypassRequestSelection(cmd: Command, client: ApolloClient<NormalizedCacheObject>, flagValue: string[], metadata: RequestMetadata): Promise<void>;
|
|
52
|
+
export declare function bypassDuration(cmd: Command, duration: number, metadata: RequestMetadata): void;
|
|
46
53
|
export {};
|