@caido/sdk-frontend 0.56.1-beta.3 → 0.56.1-beta.5
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/index.d.ts +1 -1
- package/src/types/__generated__/graphql-sdk.d.ts +190 -12
- package/src/types/index.d.ts +7 -6
- package/src/types/sdks/automate.d.ts +4 -4
- package/src/types/sdks/commandPalette.d.ts +2 -1
- package/src/types/sdks/findings.d.ts +4 -4
- package/src/types/sdks/httpHistory.d.ts +4 -4
- package/src/types/sdks/intercept.d.ts +4 -4
- package/src/types/sdks/replay.d.ts +4 -4
- 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/commandPalette.d.ts +20 -0
- package/src/types/types/filter.d.ts +3 -4
- package/src/types/types/footer.d.ts +3 -4
- package/src/types/types/httpHistory.d.ts +7 -3
- package/src/types/types/matchReplace.d.ts +3 -4
- package/src/types/types/replay.d.ts +7 -5
- package/src/types/types/request.d.ts +36 -3
- package/src/types/types/response.d.ts +17 -3
- package/src/types/types/scopes.d.ts +7 -4
- package/src/types/types/search.d.ts +7 -3
- package/src/types/types/slots.d.ts +19 -4
- package/src/types/types/utils.d.ts +16 -3
- package/src/types/types/websocket.d.ts +17 -3
- package/src/types/types/window.d.ts +6 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type EditorView } from "@codemirror/view";
|
|
2
|
+
import type { As, ComponentDefinition, ComponentPropsWithSdk, ID, Prettify } from "./utils";
|
|
2
3
|
/**
|
|
3
4
|
* Certificate page context.
|
|
4
5
|
* @category Websockets
|
|
@@ -21,11 +22,24 @@ export type StreamWsMessageMeta = Prettify<As<"StreamWsMessageMeta"> & {
|
|
|
21
22
|
createdAt: Date;
|
|
22
23
|
};
|
|
23
24
|
}>;
|
|
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>;
|
|
24
38
|
/**
|
|
25
39
|
* Options for defining a custom message view mode.
|
|
26
40
|
* @category Websockets
|
|
27
41
|
*/
|
|
28
|
-
export type MessageViewModeOptions = {
|
|
42
|
+
export type MessageViewModeOptions<TProps extends MessageViewModeProps | MessageViewModePropsInternal> = {
|
|
29
43
|
/**
|
|
30
44
|
* The label of the view mode.
|
|
31
45
|
*/
|
|
@@ -33,7 +47,7 @@ export type MessageViewModeOptions = {
|
|
|
33
47
|
/**
|
|
34
48
|
* The component to render when the view mode is selected.
|
|
35
49
|
*/
|
|
36
|
-
view: ComponentDefinition
|
|
50
|
+
view: ComponentDefinition<TProps>;
|
|
37
51
|
/**
|
|
38
52
|
* A function that determines if the view mode should be shown for a given message.
|
|
39
53
|
*/
|
|
@@ -15,6 +15,7 @@ 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";
|
|
18
19
|
import { type WebsocketPageContext } from "./websocket";
|
|
19
20
|
import type { WorkflowsPageContext } from "./workflows";
|
|
20
21
|
/**
|
|
@@ -29,6 +30,11 @@ export type DialogOptions = {
|
|
|
29
30
|
modal?: boolean;
|
|
30
31
|
position?: "left" | "right" | "top" | "bottom" | "center" | "topleft" | "topright" | "bottomleft" | "bottomright";
|
|
31
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* The component definition for a dialog.
|
|
35
|
+
* @category Window
|
|
36
|
+
*/
|
|
37
|
+
export type DialogComponent = ComponentDefinition<ComponentPropsWithSdk<ComponentProps>>;
|
|
32
38
|
/**
|
|
33
39
|
* A dialog instance that can be closed programmatically.
|
|
34
40
|
* @category Window
|