@caido/sdk-frontend 0.34.1 → 0.35.0
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/package.json +1 -1
- package/src/types/__generated__/graphql-sdk.d.ts +19331 -0
- package/src/types/commands.d.ts +2 -2
- package/src/types/index.d.ts +6 -9
- package/src/types/menu.d.ts +13 -8
- package/src/types/navigation.d.ts +16 -0
- package/src/types/window.d.ts +9 -0
package/src/types/commands.d.ts
CHANGED
|
@@ -15,14 +15,14 @@ type CommandContextBase = {
|
|
|
15
15
|
|
|
16
16
|
type CommandContextRequestRow = {
|
|
17
17
|
type: "RequestRowContext";
|
|
18
|
-
|
|
18
|
+
requests: {
|
|
19
19
|
id: string;
|
|
20
20
|
host: string;
|
|
21
21
|
port: number;
|
|
22
22
|
path: string;
|
|
23
23
|
query: string;
|
|
24
24
|
isTls: boolean;
|
|
25
|
-
};
|
|
25
|
+
}[];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export type CommandContext = CommandContextBase | CommandContextRequestRow;
|
package/src/types/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { Sdk } from "./__generated__/graphql";
|
|
1
2
|
import type { Commands } from "./commands";
|
|
2
3
|
import type { Menu } from "./menu";
|
|
4
|
+
import type { Navigation } from "./navigation";
|
|
3
5
|
import type { Scopes } from "./scopes";
|
|
4
6
|
import type { UI } from "./ui";
|
|
7
|
+
import type { Window } from "./window";
|
|
5
8
|
|
|
6
9
|
export type { CommandContext } from "./commands";
|
|
7
10
|
|
|
@@ -10,11 +13,8 @@ export type API = {
|
|
|
10
13
|
scopes: Scopes;
|
|
11
14
|
commands: Commands;
|
|
12
15
|
menu: Menu;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
goTo: (path: string) => void;
|
|
16
|
-
addPage: (path: string, options: PageOptions) => void;
|
|
17
|
-
};
|
|
16
|
+
navigation: Navigation;
|
|
17
|
+
window: Window;
|
|
18
18
|
|
|
19
19
|
shortcuts: {
|
|
20
20
|
register: (commandId: string, keys: string[]) => void;
|
|
@@ -31,11 +31,8 @@ export type API = {
|
|
|
31
31
|
options?: SidebarItemOptions,
|
|
32
32
|
) => SidebarItem;
|
|
33
33
|
};
|
|
34
|
-
};
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
body: HTMLElement;
|
|
38
|
-
topbar?: HTMLElement;
|
|
35
|
+
graphql: Sdk;
|
|
39
36
|
};
|
|
40
37
|
|
|
41
38
|
type SidebarItemOptions = {
|
package/src/types/menu.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
type MenuId = "RequestRow";
|
|
2
|
-
|
|
3
1
|
export type Menu = {
|
|
4
|
-
registerItem: (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
registerItem: (item: MenuItem) => void;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
type MenuItem = RequestRowMenuItem | SettingsMenuItem;
|
|
6
|
+
|
|
7
|
+
type RequestRowMenuItem = {
|
|
8
|
+
type: "RequestRow";
|
|
9
|
+
commandId: string;
|
|
10
|
+
leadingIcon?: string;
|
|
9
11
|
};
|
|
10
12
|
|
|
11
|
-
type
|
|
13
|
+
type SettingsMenuItem = {
|
|
14
|
+
type: "Settings";
|
|
15
|
+
label: string;
|
|
16
|
+
path: string;
|
|
12
17
|
leadingIcon?: string;
|
|
13
18
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Commands } from "./commands";
|
|
2
|
+
import type { Menu } from "./menu";
|
|
3
|
+
import type { Scopes } from "./scopes";
|
|
4
|
+
import type { UI } from "./ui";
|
|
5
|
+
|
|
6
|
+
export type { CommandContext } from "./commands";
|
|
7
|
+
|
|
8
|
+
export type Navigation = {
|
|
9
|
+
goTo: (path: string) => void;
|
|
10
|
+
addPage: (path: string, options: PageOptions) => void;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type PageOptions = {
|
|
14
|
+
body: HTMLElement;
|
|
15
|
+
topbar?: HTMLElement;
|
|
16
|
+
};
|