@caido/sdk-frontend 0.57.1-beta.9 → 0.57.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 +2 -2
- package/src/types/__generated__/graphql-sdk.d.ts +18200 -85392
- package/src/types/index.d.ts +8 -8
- package/src/types/sdks/automate.d.ts +4 -4
- package/src/types/sdks/commandPalette.d.ts +1 -2
- package/src/types/sdks/files.d.ts +1 -1
- package/src/types/sdks/findings.d.ts +4 -4
- package/src/types/sdks/httpHistory.d.ts +4 -4
- package/src/types/sdks/index.d.ts +0 -17
- package/src/types/sdks/intercept.d.ts +4 -4
- package/src/types/sdks/replay.d.ts +11 -60
- package/src/types/sdks/search.d.ts +4 -4
- package/src/types/sdks/sitemap.d.ts +4 -4
- package/src/types/sdks/websocket.d.ts +2 -2
- package/src/types/sdks/window.d.ts +3 -3
- package/src/types/types/filter.d.ts +4 -3
- package/src/types/types/footer.d.ts +4 -3
- package/src/types/types/httpHistory.d.ts +3 -7
- package/src/types/types/matchReplace.d.ts +4 -3
- package/src/types/types/replay.d.ts +6 -37
- package/src/types/types/request.d.ts +2 -40
- package/src/types/types/response.d.ts +2 -19
- package/src/types/types/scopes.d.ts +4 -7
- package/src/types/types/search.d.ts +3 -7
- package/src/types/types/slots.d.ts +3 -21
- package/src/types/types/utils.d.ts +3 -16
- package/src/types/types/websocket.d.ts +3 -17
- package/src/types/types/window.d.ts +0 -6
- package/src/types/types/commandPalette.d.ts +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent
|
|
1
|
+
import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
|
|
2
2
|
import { type ID, type Selection } from "./utils";
|
|
3
3
|
/**
|
|
4
4
|
* Represents a scope.
|
|
@@ -37,12 +37,9 @@ export declare const ScopeSlot: {
|
|
|
37
37
|
readonly CreateHeader: "create-header";
|
|
38
38
|
};
|
|
39
39
|
export type ScopeSlot = (typeof ScopeSlot)[keyof typeof ScopeSlot];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
export type ScopeSlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = {
|
|
45
|
-
[K in ScopeSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
|
|
40
|
+
export type ScopeSlotContent = {
|
|
41
|
+
[ScopeSlot.UpdateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
|
|
42
|
+
[ScopeSlot.CreateHeader]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
|
|
46
43
|
};
|
|
47
44
|
/**
|
|
48
45
|
* Event fired when the current scope changes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent
|
|
1
|
+
import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
|
|
2
2
|
/**
|
|
3
3
|
* The slots in the Search UI.
|
|
4
4
|
* @category Search
|
|
@@ -10,12 +10,8 @@ export declare const SearchSlot: {
|
|
|
10
10
|
readonly ToolbarPrimary: "search-toolbar-primary";
|
|
11
11
|
};
|
|
12
12
|
export type SearchSlot = (typeof SearchSlot)[keyof typeof SearchSlot];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* @category Search
|
|
16
|
-
*/
|
|
17
|
-
export type SearchSlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = {
|
|
18
|
-
[K in SearchSlot]: ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
|
|
13
|
+
export type SearchSlotContent = {
|
|
14
|
+
[SearchSlot.ToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
|
|
19
15
|
};
|
|
20
16
|
/**
|
|
21
17
|
* Search page context.
|
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
import { type API } from "../sdks";
|
|
2
1
|
import { type CommandID } from "./commands";
|
|
3
2
|
import { type ComponentDefinition, type Prettify } from "./utils";
|
|
4
3
|
type DefineSlotContent<TType extends string, P extends Record<string, unknown>> = Prettify<{
|
|
5
4
|
type: TType;
|
|
6
5
|
} & P>;
|
|
7
|
-
/**
|
|
8
|
-
* The internal props for a slot content.
|
|
9
|
-
* @category Slots
|
|
10
|
-
*/
|
|
11
|
-
export type SlotContentPropsInternal = {};
|
|
12
|
-
/**
|
|
13
|
-
* The props for a slot content.
|
|
14
|
-
* @category Slots
|
|
15
|
-
*/
|
|
16
|
-
export type SlotContentProps = SlotContentPropsInternal & {
|
|
17
|
-
sdk: API;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* The props group for a slot content.
|
|
21
|
-
* @category Slots
|
|
22
|
-
*/
|
|
23
|
-
export type SlotContentPropsGroup = SlotContentProps | SlotContentPropsInternal;
|
|
24
6
|
/**
|
|
25
7
|
* Content for a button slot.
|
|
26
8
|
* @category Slots
|
|
@@ -34,8 +16,8 @@ export type ButtonSlotContent = DefineSlotContent<"Button", {
|
|
|
34
16
|
* Content for a custom component slot.
|
|
35
17
|
* @category Slots
|
|
36
18
|
*/
|
|
37
|
-
export type CustomSlotContent
|
|
38
|
-
definition: ComponentDefinition
|
|
19
|
+
export type CustomSlotContent = DefineSlotContent<"Custom", {
|
|
20
|
+
definition: ComponentDefinition;
|
|
39
21
|
}>;
|
|
40
22
|
/**
|
|
41
23
|
* Content for a command slot.
|
|
@@ -49,7 +31,7 @@ export type CommandSlotContent = DefineSlotContent<"Command", {
|
|
|
49
31
|
* Union type of all possible slot content types.
|
|
50
32
|
* @category Slots
|
|
51
33
|
*/
|
|
52
|
-
export type SlotContent
|
|
34
|
+
export type SlotContent = ButtonSlotContent | CustomSlotContent | CommandSlotContent;
|
|
53
35
|
/**
|
|
54
36
|
* A function type for adding content to slots.
|
|
55
37
|
* @category Slots
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Component as VueComponent } from "vue";
|
|
2
|
-
import { type API } from "../index";
|
|
3
2
|
/**
|
|
4
3
|
* A unique Caido identifier per type.
|
|
5
4
|
* @category Utils
|
|
@@ -38,25 +37,13 @@ export type QueryInput = HTTPQL | StreamQL;
|
|
|
38
37
|
export type Icon = string & {
|
|
39
38
|
__icon?: never;
|
|
40
39
|
};
|
|
41
|
-
/**
|
|
42
|
-
* A set of properties that can be passed to a component.
|
|
43
|
-
* @category Utils
|
|
44
|
-
*/
|
|
45
|
-
export type ComponentProps = Record<string, unknown>;
|
|
46
|
-
/**
|
|
47
|
-
* A set of properties that can be passed to a component definition with the SDK.
|
|
48
|
-
* @category Utils
|
|
49
|
-
*/
|
|
50
|
-
export type ComponentPropsWithSdk<TProps extends ComponentProps> = TProps & {
|
|
51
|
-
sdk: API;
|
|
52
|
-
};
|
|
53
40
|
/**
|
|
54
41
|
* A custom component that will be rendered in the UI.
|
|
55
42
|
* @category Utils
|
|
56
43
|
*/
|
|
57
|
-
export type ComponentDefinition
|
|
58
|
-
component: VueComponent
|
|
59
|
-
props?:
|
|
44
|
+
export type ComponentDefinition = {
|
|
45
|
+
component: VueComponent;
|
|
46
|
+
props?: Record<string, unknown>;
|
|
60
47
|
events?: Record<string, (...args: unknown[]) => void>;
|
|
61
48
|
};
|
|
62
49
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { As, ComponentDefinition, ComponentPropsWithSdk, ID, Prettify } from "./utils";
|
|
1
|
+
import type { As, ComponentDefinition, ID, Prettify } from "./utils";
|
|
3
2
|
/**
|
|
4
3
|
* Certificate page context.
|
|
5
4
|
* @category Websockets
|
|
@@ -22,24 +21,11 @@ export type StreamWsMessageMeta = Prettify<As<"StreamWsMessageMeta"> & {
|
|
|
22
21
|
createdAt: Date;
|
|
23
22
|
};
|
|
24
23
|
}>;
|
|
25
|
-
/**
|
|
26
|
-
* The internal props for the message view mode.
|
|
27
|
-
* @category Websockets
|
|
28
|
-
*/
|
|
29
|
-
export type MessageViewModePropsInternal = {
|
|
30
|
-
message: StreamWsMessageMeta;
|
|
31
|
-
view: EditorView;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* The props for the message view mode.
|
|
35
|
-
* @category Websockets
|
|
36
|
-
*/
|
|
37
|
-
export type MessageViewModeProps = ComponentPropsWithSdk<MessageViewModePropsInternal>;
|
|
38
24
|
/**
|
|
39
25
|
* Options for defining a custom message view mode.
|
|
40
26
|
* @category Websockets
|
|
41
27
|
*/
|
|
42
|
-
export type MessageViewModeOptions
|
|
28
|
+
export type MessageViewModeOptions = {
|
|
43
29
|
/**
|
|
44
30
|
* The label of the view mode.
|
|
45
31
|
*/
|
|
@@ -47,7 +33,7 @@ export type MessageViewModeOptions<TProps extends MessageViewModeProps | Message
|
|
|
47
33
|
/**
|
|
48
34
|
* The component to render when the view mode is selected.
|
|
49
35
|
*/
|
|
50
|
-
view: ComponentDefinition
|
|
36
|
+
view: ComponentDefinition;
|
|
51
37
|
/**
|
|
52
38
|
* A function that determines if the view mode should be shown for a given message.
|
|
53
39
|
*/
|
|
@@ -15,7 +15,6 @@ import type { ReplayPageContext } from "./replay";
|
|
|
15
15
|
import type { ScopePageContext } from "./scopes";
|
|
16
16
|
import type { SearchPageContext } from "./search";
|
|
17
17
|
import type { SitemapPageContext } from "./sitemap";
|
|
18
|
-
import type { ComponentDefinition, ComponentProps, ComponentPropsWithSdk } from "./utils";
|
|
19
18
|
import { type WebsocketPageContext } from "./websocket";
|
|
20
19
|
import type { WorkflowsPageContext } from "./workflows";
|
|
21
20
|
/**
|
|
@@ -30,11 +29,6 @@ export type DialogOptions = {
|
|
|
30
29
|
modal?: boolean;
|
|
31
30
|
position?: "left" | "right" | "top" | "bottom" | "center" | "topleft" | "topright" | "bottomleft" | "bottomright";
|
|
32
31
|
};
|
|
33
|
-
/**
|
|
34
|
-
* The component definition for a dialog.
|
|
35
|
-
* @category Window
|
|
36
|
-
*/
|
|
37
|
-
export type DialogComponent = ComponentDefinition<ComponentPropsWithSdk<ComponentProps>>;
|
|
38
32
|
/**
|
|
39
33
|
* A dialog instance that can be closed programmatically.
|
|
40
34
|
* @category Window
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type API } from "../sdks";
|
|
2
|
-
/**
|
|
3
|
-
* The internal props for the command palette view.
|
|
4
|
-
* @category Command Palette
|
|
5
|
-
*/
|
|
6
|
-
export type CommandPaletteViewPropsInternal = {
|
|
7
|
-
/**
|
|
8
|
-
* The function to call when the command palette is closed.
|
|
9
|
-
*/
|
|
10
|
-
onClose: () => void;
|
|
11
|
-
/**
|
|
12
|
-
* The function to call when the command palette is backed.
|
|
13
|
-
*/
|
|
14
|
-
onBack: () => void;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* The props for the command palette view.
|
|
18
|
-
* @category Command Palette
|
|
19
|
-
*/
|
|
20
|
-
export type CommandPaletteViewProps = CommandPaletteViewPropsInternal & {
|
|
21
|
-
sdk: API;
|
|
22
|
-
};
|