@caido/sdk-frontend 0.58.3 → 0.58.4-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 +1 -1
- package/src/types/__generated__/graphql-sdk.d.ts +2852 -796
- package/src/types/index.d.ts +12 -4
- package/src/types/sdks/ai.d.ts +2 -2
- package/src/types/sdks/automate.d.ts +12 -2
- package/src/types/sdks/filters.d.ts +1 -0
- package/src/types/sdks/findings.d.ts +12 -2
- package/src/types/sdks/footer.d.ts +1 -0
- package/src/types/sdks/httpHistory.d.ts +13 -2
- package/src/types/sdks/index.d.ts +22 -0
- package/src/types/sdks/intercept.d.ts +12 -2
- package/src/types/sdks/kv.d.ts +69 -0
- package/src/types/sdks/matchReplace.d.ts +1 -0
- package/src/types/sdks/replay.d.ts +58 -19
- package/src/types/sdks/scopes.d.ts +1 -0
- package/src/types/sdks/search.d.ts +15 -3
- package/src/types/sdks/settings.d.ts +1 -0
- package/src/types/sdks/sitemap.d.ts +12 -2
- package/src/types/sdks/window.d.ts +10 -0
- package/src/types/types/ai.d.ts +8 -9
- package/src/types/types/httpqlEditor.d.ts +3 -0
- package/src/types/types/kv.d.ts +16 -0
- package/src/types/types/replay.d.ts +44 -0
- package/src/types/types/slots.d.ts +11 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { RequestFull } from "./request";
|
|
2
|
+
import type { ResponseFull } from "./response";
|
|
1
3
|
import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent, type SlotContentProps, type SlotContentPropsGroup } from "./slots";
|
|
2
4
|
import { type AddIndicatorOptions, type ID, type Selection } from "./utils";
|
|
3
5
|
/**
|
|
@@ -110,6 +112,35 @@ export type ReplayEntry = {
|
|
|
110
112
|
*/
|
|
111
113
|
requestId?: ID;
|
|
112
114
|
};
|
|
115
|
+
/**
|
|
116
|
+
* The currently selected Replay exchange.
|
|
117
|
+
* @category Replay
|
|
118
|
+
*/
|
|
119
|
+
export type ReplaySelectedExchange = {
|
|
120
|
+
kind: typeof ReplaySessionKind.Http;
|
|
121
|
+
entryId: ID;
|
|
122
|
+
sessionId: ID;
|
|
123
|
+
request: RequestFull;
|
|
124
|
+
response?: ResponseFull;
|
|
125
|
+
} | {
|
|
126
|
+
kind: typeof ReplaySessionKind.Ws;
|
|
127
|
+
entryId: ID;
|
|
128
|
+
sessionId: ID;
|
|
129
|
+
streamId?: ID;
|
|
130
|
+
activeTab: "http-upgrade" | "messages";
|
|
131
|
+
upgradeRequest?: RequestFull;
|
|
132
|
+
upgradeResponse?: ResponseFull;
|
|
133
|
+
message?: ReplayWebSocketMessage;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* The currently edited WebSocket message in Replay.
|
|
137
|
+
* @category Replay
|
|
138
|
+
*/
|
|
139
|
+
export type ReplayWebSocketMessage = {
|
|
140
|
+
raw: string;
|
|
141
|
+
direction: "CLIENT" | "SERVER";
|
|
142
|
+
format: "BINARY" | "CLOSE" | "PING" | "PONG" | "TEXT";
|
|
143
|
+
};
|
|
113
144
|
/**
|
|
114
145
|
* A collection in Replay.
|
|
115
146
|
* @category Replay
|
|
@@ -224,6 +255,19 @@ export type AddSessionIndicatorOptions = AddIndicatorOptions & {
|
|
|
224
255
|
* @category Replay
|
|
225
256
|
*/
|
|
226
257
|
export type AddCollectionIndicatorOptions = AddIndicatorOptions;
|
|
258
|
+
/**
|
|
259
|
+
* The kind of a replay session.
|
|
260
|
+
* @category Replay
|
|
261
|
+
*/
|
|
262
|
+
export declare const ReplaySessionKind: {
|
|
263
|
+
readonly Http: "HTTP";
|
|
264
|
+
readonly Ws: "WS";
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* The kind of a replay session.
|
|
268
|
+
* @category Replay
|
|
269
|
+
*/
|
|
270
|
+
export type ReplaySessionKind = (typeof ReplaySessionKind)[keyof typeof ReplaySessionKind];
|
|
227
271
|
/**
|
|
228
272
|
* A unique replay session identifier.
|
|
229
273
|
* @category Replay
|
|
@@ -50,11 +50,21 @@ export type CommandSlotContent = DefineSlotContent<"Command", {
|
|
|
50
50
|
* @category Slots
|
|
51
51
|
*/
|
|
52
52
|
export type SlotContent<TProps extends SlotContentPropsGroup = SlotContentProps> = ButtonSlotContent | CustomSlotContent<TProps> | CommandSlotContent;
|
|
53
|
+
/**
|
|
54
|
+
* A handle for slot content added through the SDK.
|
|
55
|
+
* @category Slots
|
|
56
|
+
*/
|
|
57
|
+
export type SlotHandle = {
|
|
58
|
+
/**
|
|
59
|
+
* Remove the content from the slot.
|
|
60
|
+
*/
|
|
61
|
+
remove: () => void;
|
|
62
|
+
};
|
|
53
63
|
/**
|
|
54
64
|
* A function type for adding content to slots.
|
|
55
65
|
* @category Slots
|
|
56
66
|
*/
|
|
57
67
|
export type DefineAddToSlotFn<TMap extends Record<string, DefineSlotContent<string, Record<string, unknown>>>> = {
|
|
58
|
-
<K extends keyof TMap>(slot: K, spec: TMap[K]):
|
|
68
|
+
<K extends keyof TMap>(slot: K, spec: TMap[K]): SlotHandle;
|
|
59
69
|
};
|
|
60
70
|
export {};
|