@caido/sdk-frontend 0.44.2-beta.1 → 0.44.2-beta.11
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 +240 -80
- package/src/types/environment.d.ts +19 -0
- package/src/types/httpHistory.d.ts +11 -1
- package/src/types/index.d.ts +19 -7
- package/src/types/intercept.d.ts +17 -0
- package/src/types/scopes.d.ts +1 -2
- package/src/types/search.d.ts +11 -1
- package/src/types/sitemap.d.ts +17 -0
|
@@ -9,4 +9,23 @@ export type EnvironmentSDK = {
|
|
|
9
9
|
* @returns The value of the environment variable.
|
|
10
10
|
*/
|
|
11
11
|
getVar: (name: string) => string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Get all environment variables available in the global environment and the selected environment.
|
|
14
|
+
* @returns All environment variables.
|
|
15
|
+
*/
|
|
16
|
+
getVars: () => EnvironmentVariable[];
|
|
17
|
+
};
|
|
18
|
+
export type EnvironmentVariable = {
|
|
19
|
+
/**
|
|
20
|
+
* The name of the environment variable.
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* The value of the environment variable.
|
|
25
|
+
*/
|
|
26
|
+
value: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the environment variable is a secret.
|
|
29
|
+
*/
|
|
30
|
+
isSecret: boolean;
|
|
12
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HTTPQL } from "./utils";
|
|
1
|
+
import type { HTTPQL, ID } from "./utils";
|
|
2
2
|
/**
|
|
3
3
|
* Utilities to interact with the HTTP History page.
|
|
4
4
|
* @category HTTP History
|
|
@@ -14,4 +14,14 @@ export type HTTPHistorySDK = {
|
|
|
14
14
|
* @returns The current HTTPQL query.
|
|
15
15
|
*/
|
|
16
16
|
getQuery: () => HTTPQL;
|
|
17
|
+
/**
|
|
18
|
+
* Get the current scope ID.
|
|
19
|
+
* @returns The current scope ID.
|
|
20
|
+
*/
|
|
21
|
+
getScopeId: () => ID | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Set the current scope.
|
|
24
|
+
* @param id The ID of the scope to set.
|
|
25
|
+
*/
|
|
26
|
+
setScope: (id: ID | undefined) => Promise<void>;
|
|
17
27
|
};
|
package/src/types/index.d.ts
CHANGED
|
@@ -2,22 +2,24 @@ import type { Sdk as GraphqlSDK } from "./__generated__/graphql-sdk";
|
|
|
2
2
|
import type { BackendEndpoints, BackendEvents, BackendSDK } from "./backend";
|
|
3
3
|
import type { CommandPaletteSDK } from "./commandPalette";
|
|
4
4
|
import type { CommandsSDK } from "./commands";
|
|
5
|
+
import type { EnvironmentSDK } from "./environment";
|
|
6
|
+
import type { FilesSDK } from "./files";
|
|
7
|
+
import type { FiltersSDK } from "./filters";
|
|
5
8
|
import type { FindingsSDK } from "./findings";
|
|
9
|
+
import type { HTTPHistorySDK } from "./httpHistory";
|
|
10
|
+
import type { InterceptSDK } from "./intercept";
|
|
11
|
+
import type { MatchReplaceSDK } from "./matchReplace";
|
|
6
12
|
import type { MenuSDK } from "./menu";
|
|
7
13
|
import type { NavigationSDK } from "./navigation";
|
|
14
|
+
import type { ReplaySDK } from "./replay";
|
|
8
15
|
import type { ScopesSDK } from "./scopes";
|
|
16
|
+
import type { SearchSDK } from "./search";
|
|
9
17
|
import type { ShortcutsSDK } from "./shortcuts";
|
|
10
18
|
import type { SidebarSDK } from "./sidebar";
|
|
19
|
+
import type { SitemapSDK } from "./sitemap";
|
|
11
20
|
import type { StorageSDK } from "./storage";
|
|
12
21
|
import type { UISDK } from "./ui";
|
|
13
22
|
import type { WindowSDK } from "./window";
|
|
14
|
-
import type { ReplaySDK } from "./replay";
|
|
15
|
-
import type { SearchSDK } from "./search";
|
|
16
|
-
import type { HTTPHistorySDK } from "./httpHistory";
|
|
17
|
-
import type { FilesSDK } from "./files";
|
|
18
|
-
import type { FiltersSDK } from "./filters";
|
|
19
|
-
import type { MatchReplaceSDK } from "./matchReplace";
|
|
20
|
-
import type { EnvironmentSDK } from "./environment";
|
|
21
23
|
export type { CommandContext } from "./commands";
|
|
22
24
|
export type { MenuItem } from "./menu";
|
|
23
25
|
export type { ReplayTab, ReplaySession, ReplayCollection } from "./replay";
|
|
@@ -25,6 +27,8 @@ export type { HostedFile } from "./files";
|
|
|
25
27
|
export type { Filter } from "./filters";
|
|
26
28
|
export type { HTTPQL, ID } from "./utils";
|
|
27
29
|
export type { MatchReplaceRule, MatchReplaceCollection, MatchReplaceStrategy, } from "./matchReplace";
|
|
30
|
+
export type { Scope } from "./scopes";
|
|
31
|
+
export type { EnvironmentVariable } from "./environment";
|
|
28
32
|
/**
|
|
29
33
|
* Utilities for frontend plugins.
|
|
30
34
|
* @category SDK
|
|
@@ -110,4 +114,12 @@ export type API<T extends BackendEndpoints = Record<string, never>, E extends Ba
|
|
|
110
114
|
* Utilities to interact with the environment.
|
|
111
115
|
*/
|
|
112
116
|
env: EnvironmentSDK;
|
|
117
|
+
/**
|
|
118
|
+
* Utilities to interact with the Sitemap page.
|
|
119
|
+
*/
|
|
120
|
+
sitemap: SitemapSDK;
|
|
121
|
+
/**
|
|
122
|
+
* Utilities to interact with the Intercept page.
|
|
123
|
+
*/
|
|
124
|
+
intercept: InterceptSDK;
|
|
113
125
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ID } from "./utils";
|
|
2
|
+
/**
|
|
3
|
+
* Utilities to interact with the Intercept page.
|
|
4
|
+
* @category Intercept
|
|
5
|
+
*/
|
|
6
|
+
export type InterceptSDK = {
|
|
7
|
+
/**
|
|
8
|
+
* Get the current scope ID.
|
|
9
|
+
* @returns The current scope ID.
|
|
10
|
+
*/
|
|
11
|
+
getScopeId: () => ID | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Set the current scope.
|
|
14
|
+
* @param scopeId The ID of the scope to set.
|
|
15
|
+
*/
|
|
16
|
+
setScope: (id: ID | undefined) => void;
|
|
17
|
+
};
|
package/src/types/scopes.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export type ScopesSDK = {
|
|
|
56
56
|
* Represents a scope.
|
|
57
57
|
* @category Scopes
|
|
58
58
|
*/
|
|
59
|
-
type Scope = {
|
|
59
|
+
export type Scope = {
|
|
60
60
|
/**
|
|
61
61
|
* The unique ID of the scope.
|
|
62
62
|
*/
|
|
@@ -74,4 +74,3 @@ type Scope = {
|
|
|
74
74
|
*/
|
|
75
75
|
denylist: string[];
|
|
76
76
|
};
|
|
77
|
-
export {};
|
package/src/types/search.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HTTPQL } from "./utils";
|
|
1
|
+
import type { HTTPQL, ID } from "./utils";
|
|
2
2
|
/**
|
|
3
3
|
* Utilities to interact with the Search page.
|
|
4
4
|
* @category Search
|
|
@@ -14,4 +14,14 @@ export type SearchSDK = {
|
|
|
14
14
|
* @returns The current HTTPQL query.
|
|
15
15
|
*/
|
|
16
16
|
getQuery: () => HTTPQL;
|
|
17
|
+
/**
|
|
18
|
+
* Get the current scope ID.
|
|
19
|
+
* @returns The current scope ID.
|
|
20
|
+
*/
|
|
21
|
+
getScopeId: () => ID | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Set the current scope.
|
|
24
|
+
* @param id The ID of the scope to set.
|
|
25
|
+
*/
|
|
26
|
+
setScope: (id: ID | undefined) => Promise<void>;
|
|
17
27
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ID } from "./utils";
|
|
2
|
+
/**
|
|
3
|
+
* Utilities to interact with the Sitemap page.
|
|
4
|
+
* @category Sitemap
|
|
5
|
+
*/
|
|
6
|
+
export type SitemapSDK = {
|
|
7
|
+
/**
|
|
8
|
+
* Get the current scope ID.
|
|
9
|
+
* @returns The current scope ID.
|
|
10
|
+
*/
|
|
11
|
+
getScopeId: () => ID | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Set the current scope.
|
|
14
|
+
* @param id The ID of the scope to set.
|
|
15
|
+
*/
|
|
16
|
+
setScope: (id: ID | undefined) => void;
|
|
17
|
+
};
|