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.
@@ -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
- export interface AppNode {
4
+ interface AppNode {
5
5
  appName: string;
6
- assets: Map<string, AssetNode>;
6
+ assets: Record<string, AssetNode>;
7
7
  }
8
- export interface AssetNode {
8
+ interface AssetNode {
9
9
  assetName: string;
10
- roles?: Map<string, RoleNode>;
10
+ type: string;
11
+ roles?: Record<string, RoleNode>;
11
12
  }
12
- export interface RoleNode {
13
+ interface RoleNode {
13
14
  roleName: string;
14
15
  }
15
- export type RequestMap = Map<string, AppNode>;
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 promptForReason(): Promise<any>;
21
- export declare function promptForExpiration(): Promise<any>;
22
- export declare function submitFinalRequest(cmd: Command): Promise<void>;
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 {};