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/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 resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]",
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,
@@ -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
- interface AppNode {
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
- interface AssetNode {
10
+ };
11
+ type AssetNode = {
12
+ assetId: string;
9
13
  assetName: string;
10
- type: string;
14
+ type: EntityType;
11
15
  roles?: Record<string, RoleNode>;
12
- }
13
- interface RoleNode {
16
+ };
17
+ type RoleNode = {
18
+ roleId: string;
14
19
  roleName: string;
15
- }
20
+ };
16
21
  export type RequestMap = Record<string, AppNode>;
17
- interface DurationOption {
22
+ type DurationOption = {
18
23
  durationInMinutes: number;
19
24
  label: string;
20
- }
21
- interface RequestDefaults {
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 interface RequestMetadata {
34
+ };
35
+ export type RequestMetadata = {
31
36
  requestMap: RequestMap;
32
37
  requestDefaults: RequestDefaults;
33
- }
34
- export declare function createEmptyRequestMetadata(): RequestMetadata;
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<any>;
41
- export declare function promptForExpiration(metadata: RequestMetadata): Promise<any>;
42
- export declare function submitFinalRequest(cmd: Command): Promise<void>;
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 {};