@caido/sdk-frontend 0.42.0 → 0.42.1-beta.1
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
CHANGED
package/src/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Sdk as GraphqlSDK } from "./__generated__/graphql-sdk";
|
|
2
2
|
import type { BackendEndpoints, BackendEvents, BackendSDK } from "./backend";
|
|
3
|
-
import type { CommandPaletteSDK } from "./
|
|
3
|
+
import type { CommandPaletteSDK } from "./commandPalette";
|
|
4
4
|
import type { CommandsSDK } from "./commands";
|
|
5
5
|
import type { FindingsSDK } from "./findings";
|
|
6
6
|
import type { MenuSDK } from "./menu";
|
|
@@ -11,8 +11,10 @@ import type { SidebarSDK } from "./sidebar";
|
|
|
11
11
|
import type { StorageSDK } from "./storage";
|
|
12
12
|
import type { UISDK } from "./ui";
|
|
13
13
|
import type { WindowSDK } from "./window";
|
|
14
|
+
import type { ReplaySDK } from "./replay";
|
|
14
15
|
export type { CommandContext } from "./commands";
|
|
15
16
|
export type { MenuItem } from "./menu";
|
|
17
|
+
export type { ReplayTab, ReplaySession, ReplayCollection } from "./replay";
|
|
16
18
|
/**
|
|
17
19
|
* Utilities for frontend plugins.
|
|
18
20
|
* @category SDK
|
|
@@ -70,4 +72,8 @@ export type API<T extends BackendEndpoints = Record<string, never>, E extends Ba
|
|
|
70
72
|
* Utilities to interact with the sidebar.
|
|
71
73
|
*/
|
|
72
74
|
sidebar: SidebarSDK;
|
|
75
|
+
/**
|
|
76
|
+
* Utilities to interact with Replay.
|
|
77
|
+
*/
|
|
78
|
+
replay: ReplaySDK;
|
|
73
79
|
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A replay tab.
|
|
3
|
+
* @category Replay
|
|
4
|
+
*/
|
|
5
|
+
export type ReplayTab = {
|
|
6
|
+
/**
|
|
7
|
+
* The ID of the session associated with this tab.
|
|
8
|
+
*/
|
|
9
|
+
sessionId: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A session in Replay.
|
|
13
|
+
* @category Replay
|
|
14
|
+
*/
|
|
15
|
+
export type ReplaySession = {
|
|
16
|
+
/**
|
|
17
|
+
* The ID of the session.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the session.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the collection the session belongs to.
|
|
26
|
+
*/
|
|
27
|
+
collectionId: string;
|
|
28
|
+
};
|
|
29
|
+
export type ReplayCollection = {
|
|
30
|
+
/**
|
|
31
|
+
* The ID of the collection.
|
|
32
|
+
*/
|
|
33
|
+
id: string;
|
|
34
|
+
/**
|
|
35
|
+
* The name of the collection.
|
|
36
|
+
*/
|
|
37
|
+
name: string;
|
|
38
|
+
/**
|
|
39
|
+
* The sessions in the collection.
|
|
40
|
+
*/
|
|
41
|
+
sessionIds: string[];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Utilities to interact with Replay.
|
|
45
|
+
* @category Replay
|
|
46
|
+
*/
|
|
47
|
+
export type ReplaySDK = {
|
|
48
|
+
/**
|
|
49
|
+
* Open a replay tab for the given session.
|
|
50
|
+
* @param sessionId The ID of the session to open.
|
|
51
|
+
*/
|
|
52
|
+
openTab: (sessionId: string) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Close a replay tab for the given session.
|
|
55
|
+
* @param sessionId The ID of the session to close.
|
|
56
|
+
*/
|
|
57
|
+
closeTab: (sessionId: string) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Get the list of all open replay tabs.
|
|
60
|
+
* @returns The list of all open replay tabs.
|
|
61
|
+
*/
|
|
62
|
+
getTabs: () => ReplayTab[];
|
|
63
|
+
/**
|
|
64
|
+
* Get the list of all replay collections.
|
|
65
|
+
* @returns The list of all replay collections.
|
|
66
|
+
*/
|
|
67
|
+
getCollections: () => ReplayCollection[];
|
|
68
|
+
/**
|
|
69
|
+
* Get the list of all replay sessions.
|
|
70
|
+
* @returns The list of all replay sessions.
|
|
71
|
+
*/
|
|
72
|
+
getSessions: () => ReplaySession[];
|
|
73
|
+
/**
|
|
74
|
+
* Rename a session.
|
|
75
|
+
* @param id The ID of the session to rename.
|
|
76
|
+
* @param name The new name of the session.
|
|
77
|
+
* @returns The updated session.
|
|
78
|
+
*/
|
|
79
|
+
renameSession: (id: string, name: string) => Promise<ReplaySession>;
|
|
80
|
+
};
|
package/src/types/shortcuts.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type ShortcutsSDK = {
|
|
|
7
7
|
/**
|
|
8
8
|
* Register a shortcut.
|
|
9
9
|
* @param commandId The id of the command to run when the shortcut is triggered.
|
|
10
|
-
* @param keys The keys of the shortcut.
|
|
10
|
+
* @param keys The keys of the shortcut. Check out {@link https://github.com/jaywcjlove/hotkeys-js?tab=readme-ov-file#supported-keys hotkeys-js} for the list of supported keys.
|
|
11
11
|
*/
|
|
12
12
|
register: (commandId: CommandID, keys: string[]) => void;
|
|
13
13
|
};
|
|
File without changes
|