@caido/sdk-frontend 0.42.1-beta.0 → 0.42.1-beta.2
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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities to interact with the HTTP History page.
|
|
3
|
+
* @category HTTP History
|
|
4
|
+
*/
|
|
5
|
+
export type HTTPHistorySDK = {
|
|
6
|
+
/**
|
|
7
|
+
* Set the HTTPQL query that will be applied on the HTTP History table results.
|
|
8
|
+
* @param query The HTTPQL query.
|
|
9
|
+
*/
|
|
10
|
+
setQuery: (query: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Get the current HTTPQL query.
|
|
13
|
+
* @returns The current HTTPQL query.
|
|
14
|
+
*/
|
|
15
|
+
getQuery: () => string;
|
|
16
|
+
};
|
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,12 @@ 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";
|
|
15
|
+
import type { SearchSDK } from "./search";
|
|
16
|
+
import type { HTTPHistorySDK } from "./httpHistory";
|
|
14
17
|
export type { CommandContext } from "./commands";
|
|
15
18
|
export type { MenuItem } from "./menu";
|
|
19
|
+
export type { ReplayTab, ReplaySession, ReplayCollection } from "./replay";
|
|
16
20
|
/**
|
|
17
21
|
* Utilities for frontend plugins.
|
|
18
22
|
* @category SDK
|
|
@@ -70,4 +74,16 @@ export type API<T extends BackendEndpoints = Record<string, never>, E extends Ba
|
|
|
70
74
|
* Utilities to interact with the sidebar.
|
|
71
75
|
*/
|
|
72
76
|
sidebar: SidebarSDK;
|
|
77
|
+
/**
|
|
78
|
+
* Utilities to interact with the Replay page.
|
|
79
|
+
*/
|
|
80
|
+
replay: ReplaySDK;
|
|
81
|
+
/**
|
|
82
|
+
* Utilities to interact with the Search page.
|
|
83
|
+
*/
|
|
84
|
+
search: SearchSDK;
|
|
85
|
+
/**
|
|
86
|
+
* Utilities to interact with the HTTP History page.
|
|
87
|
+
*/
|
|
88
|
+
httpHistory: HTTPHistorySDK;
|
|
73
89
|
};
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities to interact with the Search page.
|
|
3
|
+
* @category Search
|
|
4
|
+
*/
|
|
5
|
+
export type SearchSDK = {
|
|
6
|
+
/**
|
|
7
|
+
* Set the HTTPQL query that will be applied on the search table results.
|
|
8
|
+
* @param query The HTTPQL query.
|
|
9
|
+
*/
|
|
10
|
+
setQuery: (query: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Get the current HTTPQL query.
|
|
13
|
+
* @returns The current HTTPQL query.
|
|
14
|
+
*/
|
|
15
|
+
getQuery: () => string;
|
|
16
|
+
};
|
|
File without changes
|