opal-security 3.1.0 → 3.1.1-beta.16f5ed5
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 +18 -34
- package/lib/commands/request/create.js +10 -8
- package/lib/commands/request/get.d.ts +7 -1
- package/lib/commands/request/get.js +106 -5
- package/lib/commands/request/list.d.ts +8 -2
- package/lib/commands/request/list.js +113 -6
- package/lib/graphql/gql.d.ts +32 -2
- package/lib/graphql/gql.js +7 -1
- package/lib/graphql/graphql.d.ts +359 -117
- package/lib/graphql/graphql.js +1635 -173
- package/lib/lib/requests.d.ts +34 -10
- package/lib/lib/requests.js +650 -109
- package/lib/utils/displays.d.ts +8 -3
- package/lib/utils/displays.js +184 -42
- package/oclif.manifest.json +70 -8
- package/package.json +4 -1
package/lib/lib/requests.d.ts
CHANGED
|
@@ -1,22 +1,46 @@
|
|
|
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
|
+
interface AppNode {
|
|
5
5
|
appName: string;
|
|
6
|
-
assets:
|
|
6
|
+
assets: Record<string, AssetNode>;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface AssetNode {
|
|
9
9
|
assetName: string;
|
|
10
|
-
|
|
10
|
+
type: string;
|
|
11
|
+
roles?: Record<string, RoleNode>;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
interface RoleNode {
|
|
13
14
|
roleName: string;
|
|
14
15
|
}
|
|
15
|
-
export type RequestMap =
|
|
16
|
+
export type RequestMap = Record<string, AppNode>;
|
|
17
|
+
interface DurationOption {
|
|
18
|
+
durationInMinutes: number;
|
|
19
|
+
label: string;
|
|
20
|
+
}
|
|
21
|
+
interface RequestDefaults {
|
|
22
|
+
durationOptions?: DurationOption[];
|
|
23
|
+
recommendedDurationInMinutes?: number | null;
|
|
24
|
+
defaultDurationInMinutes?: number;
|
|
25
|
+
maxDurationInMinutes?: number | null;
|
|
26
|
+
requireSupportTicket?: boolean;
|
|
27
|
+
reasonOptional?: boolean;
|
|
28
|
+
requesterIsAdmin?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface RequestMetadata {
|
|
31
|
+
requestMap: RequestMap;
|
|
32
|
+
requestDefaults: RequestDefaults;
|
|
33
|
+
durationLabel: string;
|
|
34
|
+
durationInMinutes?: number;
|
|
35
|
+
reason: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function initEmptyRequestMetadata(): RequestMetadata;
|
|
16
38
|
export declare function selectRequestableItems(cmd: Command, client: ApolloClient<NormalizedCacheObject>, requestMap: RequestMap): Promise<void>;
|
|
17
39
|
export declare function chooseAssets(cmd: Command, client: ApolloClient<NormalizedCacheObject>, appId: string, requestMap: RequestMap): Promise<void>;
|
|
18
|
-
export declare function chooseRoles(appId: string, assetId: string, requestMap: RequestMap): Promise<void>;
|
|
40
|
+
export declare function chooseRoles(cmd: Command, client: ApolloClient<NormalizedCacheObject>, appId: string, assetId: string, requestMap: RequestMap): Promise<void>;
|
|
19
41
|
export declare function doneSelectingAssets(): Promise<boolean>;
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
42
|
+
export declare function setRequestDefaults(cmd: Command, client: ApolloClient<NormalizedCacheObject>, metadata: RequestMetadata): Promise<void>;
|
|
43
|
+
export declare function promptForReason(metadata: RequestMetadata): Promise<void>;
|
|
44
|
+
export declare function promptForExpiration(metadata: RequestMetadata): Promise<void>;
|
|
45
|
+
export declare function submitFinalRequest(cmd: Command, client: ApolloClient<NormalizedCacheObject>, metadata: RequestMetadata): Promise<void>;
|
|
46
|
+
export {};
|