@caido/sdk-frontend 0.58.2 → 0.58.3-beta.0
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 +1272 -1633
- package/src/types/index.d.ts +9 -3
- package/src/types/sdks/ai.d.ts +2 -2
- package/src/types/sdks/automate.d.ts +12 -2
- package/src/types/sdks/findings.d.ts +12 -2
- package/src/types/sdks/httpHistory.d.ts +12 -2
- package/src/types/sdks/index.d.ts +17 -0
- package/src/types/sdks/intercept.d.ts +12 -2
- package/src/types/sdks/replay.d.ts +44 -7
- package/src/types/sdks/search.d.ts +12 -2
- 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/replay.d.ts +44 -0
package/src/types/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { DefineComponent } from "vue";
|
|
2
|
+
import type { HTTPQLEditorProps } from "./types/httpqlEditor";
|
|
1
3
|
export { FooterSlot, type FooterSlotContent } from "./types/footer";
|
|
2
4
|
export type { DialogOptions, DialogComponent } from "./types/window";
|
|
5
|
+
export type { Editor } from "./types/editor";
|
|
3
6
|
export type { _AnalyticsSDK } from "./private/analytics";
|
|
4
7
|
export type { MessageViewModeOptions, StreamWsMessageMeta, MessageViewModePropsInternal, MessageViewModeProps, } from "./types/websocket";
|
|
5
8
|
export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
|
|
6
9
|
export type { MenuItem } from "./types/menu";
|
|
7
|
-
export { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
|
|
10
|
+
export { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type ReplayTab, type ReplaySession, type ReplayEntry, type ReplaySelectedExchange, type ReplayWebSocketMessage, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, ReplaySessionKind, type ReplayPageContext, } from "./types/replay";
|
|
8
11
|
export type { AutomateSession, AutomateEntry } from "./types/automate";
|
|
9
12
|
export type { SitemapEntry, SitemapRootEntry, ChildState, } from "./types/sitemap";
|
|
10
13
|
export { SearchSlot, type SearchSlotContent } from "./types/search";
|
|
@@ -23,7 +26,7 @@ export { SettingsSlot, type SettingsSlotContent, type SettingsPluginSlotContent,
|
|
|
23
26
|
export type { EnvironmentVariable } from "./types/environment";
|
|
24
27
|
export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
|
|
25
28
|
export type { ListenerHandle, AddIndicatorOptions, Indicator, ComponentProps, ComponentPropsWithSdk, } from "./types/utils";
|
|
26
|
-
export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider,
|
|
29
|
+
export type { AIProvider, AILanguageModelSettings, AIReasoningSettings, AIUpstreamProvider, AIUpstreamProviderApi, AIUpstreamProviderId, } from "./types/ai";
|
|
27
30
|
export type { SelectedProjectChangeEvent } from "./types/projects";
|
|
28
31
|
export type { CommandPaletteViewProps, CommandPaletteViewPropsInternal, } from "./types/commandPalette";
|
|
29
32
|
export type { CommandPaletteView } from "./sdks/commandPalette";
|
|
@@ -43,9 +46,12 @@ export type { FindingsPageContext } from "./types/findings";
|
|
|
43
46
|
export type { HTTPHistoryPageContext } from "./types/httpHistory";
|
|
44
47
|
export type { InterceptPageContext } from "./types/intercept";
|
|
45
48
|
export type { ProjectsPageContext } from "./types/projects";
|
|
46
|
-
export type { ReplayPageContext } from "./types/replay";
|
|
47
49
|
export type { ScopePageContext } from "./types/scopes";
|
|
48
50
|
export type { SearchPageContext } from "./types/search";
|
|
49
51
|
export type { SitemapPageContext } from "./types/sitemap";
|
|
50
52
|
export type { MatchReplacePageContext } from "./types/matchReplace";
|
|
51
53
|
export type { WorkflowsPageContext } from "./types/workflows";
|
|
54
|
+
export type { HTTPQLEditorProps };
|
|
55
|
+
export declare const HTTPQLEditor: DefineComponent<HTTPQLEditorProps & {
|
|
56
|
+
modelValue?: string;
|
|
57
|
+
}>;
|
package/src/types/sdks/ai.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export type AiSDK = {
|
|
|
10
10
|
*/
|
|
11
11
|
createProvider: () => AIProvider;
|
|
12
12
|
/**
|
|
13
|
-
* Gets the list of upstream AI providers
|
|
14
|
-
* @returns An array of AI upstream providers
|
|
13
|
+
* Gets the list of configured upstream AI providers.
|
|
14
|
+
* @returns An array of configured AI upstream providers.
|
|
15
15
|
*/
|
|
16
16
|
getUpstreamProviders: () => AIUpstreamProvider[];
|
|
17
17
|
};
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import type { Extension } from "@codemirror/state";
|
|
2
2
|
import type { AutomateEntry, AutomateSession } from "../types/automate";
|
|
3
|
-
import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
4
|
-
import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
3
|
+
import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
4
|
+
import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
5
5
|
import type { AddIndicatorOptions, ID, Indicator } from "../types/utils";
|
|
6
6
|
/**
|
|
7
7
|
* Utilities to interact with the Automate page.
|
|
8
8
|
* @category Automate
|
|
9
9
|
*/
|
|
10
10
|
export type AutomateSDK = {
|
|
11
|
+
/**
|
|
12
|
+
* Get the currently selected request.
|
|
13
|
+
* @returns The currently selected request.
|
|
14
|
+
*/
|
|
15
|
+
getSelectedRequest: () => RequestFull | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Get the currently selected response.
|
|
18
|
+
* @returns The currently selected response.
|
|
19
|
+
*/
|
|
20
|
+
getSelectedResponse: () => ResponseFull | undefined;
|
|
11
21
|
/**
|
|
12
22
|
* Add an extension to the request editor.
|
|
13
23
|
* @param extension The extension to add.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Extension } from "@codemirror/state";
|
|
2
2
|
import { type Finding } from "../types/findings";
|
|
3
|
-
import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
4
|
-
import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
3
|
+
import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
4
|
+
import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
5
5
|
import type { ID } from "../types/utils";
|
|
6
6
|
/**
|
|
7
7
|
* Utilities to interact with findings
|
|
@@ -24,6 +24,16 @@ export type FindingsSDK = {
|
|
|
24
24
|
reporter: string;
|
|
25
25
|
dedupeKey?: string;
|
|
26
26
|
}) => Promise<Finding | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Get the currently selected request.
|
|
29
|
+
* @returns The currently selected request.
|
|
30
|
+
*/
|
|
31
|
+
getSelectedRequest: () => RequestFull | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Get the currently selected response.
|
|
34
|
+
* @returns The currently selected response.
|
|
35
|
+
*/
|
|
36
|
+
getSelectedResponse: () => ResponseFull | undefined;
|
|
27
37
|
/**
|
|
28
38
|
* Add an extension to the request editor.
|
|
29
39
|
* @param extension The extension to add.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Extension } from "@codemirror/state";
|
|
2
2
|
import type { HTTPHistorySlotContent } from "../types/httpHistory";
|
|
3
|
-
import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
4
|
-
import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
3
|
+
import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
4
|
+
import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
5
5
|
import { type DefineAddToSlotFn } from "../types/slots";
|
|
6
6
|
import type { HTTPQL, ID } from "../types/utils";
|
|
7
7
|
/**
|
|
@@ -24,6 +24,16 @@ export type HTTPHistorySDK = {
|
|
|
24
24
|
* @returns The current scope ID.
|
|
25
25
|
*/
|
|
26
26
|
getScopeId: () => ID | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Get the currently selected request.
|
|
29
|
+
* @returns The currently selected request.
|
|
30
|
+
*/
|
|
31
|
+
getSelectedRequest: () => RequestFull | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Get the currently selected response.
|
|
34
|
+
* @returns The currently selected response.
|
|
35
|
+
*/
|
|
36
|
+
getSelectedResponse: () => ResponseFull | undefined;
|
|
27
37
|
/**
|
|
28
38
|
* Set the current scope.
|
|
29
39
|
* @param id The ID of the scope to set.
|
|
@@ -39,6 +39,23 @@ import type { WorkflowSDK } from "./workflows";
|
|
|
39
39
|
export type API<T extends BackendEndpoints | BackendSpec = Record<string, never>, E extends BackendEvents = Record<string, never>> = {
|
|
40
40
|
/**
|
|
41
41
|
* Utilities to interact with the GraphQL API.
|
|
42
|
+
*
|
|
43
|
+
* Queries and mutations return a promise; subscriptions return an
|
|
44
|
+
* `AsyncIterable`. On success they resolve with the response data or yield
|
|
45
|
+
* it. On failure (network error or any GraphQL errors returned by the
|
|
46
|
+
* server) the promise rejects, or the iterator throws into the `for await`
|
|
47
|
+
* loop, with the underlying error. Failures can be handled with `try`/
|
|
48
|
+
* `catch` or `.catch()`.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* try {
|
|
53
|
+
* const result = await sdk.graphql.automateEntry({ id: "1" });
|
|
54
|
+
* // use result
|
|
55
|
+
* } catch (err) {
|
|
56
|
+
* // err.message, err.graphQLErrors, err.networkError
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
42
59
|
*/
|
|
43
60
|
graphql: GraphqlSDK;
|
|
44
61
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
|
|
2
|
-
import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
1
|
+
import type { RequestFull, RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
|
|
2
|
+
import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
3
3
|
import type { ID } from "../types/utils";
|
|
4
4
|
/**
|
|
5
5
|
* Utilities to interact with the Intercept page.
|
|
@@ -11,6 +11,16 @@ export type InterceptSDK = {
|
|
|
11
11
|
* @returns The current scope ID.
|
|
12
12
|
*/
|
|
13
13
|
getScopeId: () => ID | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Get the currently selected request.
|
|
16
|
+
* @returns The currently selected request.
|
|
17
|
+
*/
|
|
18
|
+
getSelectedRequest: () => RequestFull | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Get the currently selected response.
|
|
21
|
+
* @returns The currently selected response.
|
|
22
|
+
*/
|
|
23
|
+
getSelectedResponse: () => ResponseFull | undefined;
|
|
14
24
|
/**
|
|
15
25
|
* Set the current scope.
|
|
16
26
|
* @param scopeId The ID of the scope to set.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type Extension } from "@codemirror/state";
|
|
2
|
-
import { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type CurrentReplaySessionChangeEvent, type OpenTabOptions, type ReplayCollection, type ReplayCollectionCreatedEvent, type ReplayEntry, type ReplaySession, type ReplaySessionCreatedEvent, type ReplaySlotContent, type ReplayTab, type RequestSource, type SendRequestOptions } from "../types/replay";
|
|
3
|
-
import type { RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
|
|
4
|
-
import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
2
|
+
import { type AddCollectionIndicatorOptions, type AddSessionIndicatorOptions, type CurrentReplaySessionChangeEvent, type OpenTabOptions, type ReplayCollection, type ReplayCollectionCreatedEvent, type ReplayEntry, type ReplaySelectedExchange, type ReplaySession, type ReplaySessionCreatedEvent, type ReplaySessionKind, type ReplaySlotContent, type ReplayTab, type RequestSource, type SendRequestOptions } from "../types/replay";
|
|
3
|
+
import type { RequestFull, RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
|
|
4
|
+
import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
5
5
|
import { type DefineAddToSlotFn } from "../types/slots";
|
|
6
6
|
import type { ID, Indicator, ListenerHandle } from "../types/utils";
|
|
7
|
+
import type { MessageViewModeOptions, MessageViewModeProps } from "../types/websocket";
|
|
7
8
|
/**
|
|
8
9
|
* Utilities to interact with Replay.
|
|
9
10
|
* @category Replay
|
|
@@ -27,9 +28,13 @@ export type ReplaySDK = {
|
|
|
27
28
|
getTabs: () => ReplayTab[];
|
|
28
29
|
/**
|
|
29
30
|
* Get the list of all replay sessions.
|
|
31
|
+
* @param options The options for getting the sessions.
|
|
32
|
+
* @param options.collectionId The ID of the collection to get the sessions for.
|
|
30
33
|
* @returns The list of all replay sessions.
|
|
31
34
|
*/
|
|
32
|
-
getSessions: (
|
|
35
|
+
getSessions: (options?: {
|
|
36
|
+
collectionId?: ID;
|
|
37
|
+
}) => ReplaySession[];
|
|
33
38
|
/**
|
|
34
39
|
* Get the currently selected replay session.
|
|
35
40
|
* @returns The currently selected replay session, or undefined if no session is selected.
|
|
@@ -58,6 +63,21 @@ export type ReplaySDK = {
|
|
|
58
63
|
* ```
|
|
59
64
|
*/
|
|
60
65
|
getCurrentEntry: () => ReplayEntry | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Get the currently selected Replay exchange.
|
|
68
|
+
* @returns The currently selected Replay exchange.
|
|
69
|
+
*/
|
|
70
|
+
getSelectedExchange: () => ReplaySelectedExchange | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Get the currently selected request.
|
|
73
|
+
* @returns The currently selected request.
|
|
74
|
+
*/
|
|
75
|
+
getSelectedRequest: () => RequestFull | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Get the currently selected response.
|
|
78
|
+
* @returns The currently selected response.
|
|
79
|
+
*/
|
|
80
|
+
getSelectedResponse: () => ResponseFull | undefined;
|
|
61
81
|
/**
|
|
62
82
|
* Rename a session.
|
|
63
83
|
* @param id The ID of the session to rename.
|
|
@@ -79,10 +99,22 @@ export type ReplaySDK = {
|
|
|
79
99
|
deleteSessions: (sessionIds: ID[]) => Promise<ID[]>;
|
|
80
100
|
/**
|
|
81
101
|
* Create a session.
|
|
82
|
-
* @param
|
|
83
|
-
* @param collectionId The ID of the collection to add the
|
|
102
|
+
* @param source The source of the session to create.
|
|
103
|
+
* @param collectionId The ID of the collection to add the session to.
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* sdk.replay.createSession({
|
|
107
|
+
* type: "Raw",
|
|
108
|
+
* raw: "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n",
|
|
109
|
+
* connectionInfo: {
|
|
110
|
+
* host: "example.com",
|
|
111
|
+
* port: 443,
|
|
112
|
+
* isTLS: true,
|
|
113
|
+
* },
|
|
114
|
+
* });
|
|
115
|
+
* ```
|
|
84
116
|
*/
|
|
85
|
-
createSession: (source: RequestSource, collectionId?: ID) => Promise<
|
|
117
|
+
createSession: (source: RequestSource, collectionId?: ID, sessionKind?: ReplaySessionKind) => Promise<ReplaySession>;
|
|
86
118
|
/**
|
|
87
119
|
* Get the list of all replay collections.
|
|
88
120
|
* @returns The list of all replay collections.
|
|
@@ -149,6 +181,11 @@ export type ReplaySDK = {
|
|
|
149
181
|
* @param options The view mode options.
|
|
150
182
|
*/
|
|
151
183
|
addResponseViewMode: (options: ResponseViewModeOptions<ResponseViewModeProps>) => void;
|
|
184
|
+
/**
|
|
185
|
+
* Add a custom WebSocket message view mode.
|
|
186
|
+
* @param options The view mode options.
|
|
187
|
+
*/
|
|
188
|
+
addWebsocketMessageViewMode: (options: MessageViewModeOptions<MessageViewModeProps>) => void;
|
|
152
189
|
/**
|
|
153
190
|
* Send a request to the Replay backend.
|
|
154
191
|
* @param request The request to send.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Extension } from "@codemirror/state";
|
|
2
|
-
import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
3
|
-
import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
2
|
+
import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
3
|
+
import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
4
4
|
import type { SearchSlot, SearchSlotContent } from "../types/search";
|
|
5
5
|
import type { HTTPQL, ID } from "../types/utils";
|
|
6
6
|
/**
|
|
@@ -23,6 +23,16 @@ export type SearchSDK = {
|
|
|
23
23
|
* @returns The current scope ID.
|
|
24
24
|
*/
|
|
25
25
|
getScopeId: () => ID | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Get the currently selected request.
|
|
28
|
+
* @returns The currently selected request.
|
|
29
|
+
*/
|
|
30
|
+
getSelectedRequest: () => RequestFull | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Get the currently selected response.
|
|
33
|
+
* @returns The currently selected response.
|
|
34
|
+
*/
|
|
35
|
+
getSelectedResponse: () => ResponseFull | undefined;
|
|
26
36
|
/**
|
|
27
37
|
* Set the current scope.
|
|
28
38
|
* @param id The ID of the scope to set.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Extension } from "@codemirror/state";
|
|
2
|
-
import type { RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
3
|
-
import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
2
|
+
import type { RequestFull, RequestReadableViewModeProps, RequestViewModeOptions } from "../types/request";
|
|
3
|
+
import type { ResponseFull, ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
|
|
4
4
|
import type { SitemapEntry, SitemapEntryChildStateUpdateEvent, SitemapRootEntry } from "../types/sitemap";
|
|
5
5
|
import type { AddIndicatorOptions, ID, Indicator, ListenerHandle } from "../types/utils";
|
|
6
6
|
/**
|
|
@@ -39,6 +39,16 @@ export type SitemapSDK = {
|
|
|
39
39
|
* @returns The current scope ID.
|
|
40
40
|
*/
|
|
41
41
|
getScopeId: () => ID | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Get the currently selected request.
|
|
44
|
+
* @returns The currently selected request.
|
|
45
|
+
*/
|
|
46
|
+
getSelectedRequest: () => RequestFull | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Get the currently selected response.
|
|
49
|
+
* @returns The currently selected response.
|
|
50
|
+
*/
|
|
51
|
+
getSelectedResponse: () => ResponseFull | undefined;
|
|
42
52
|
/**
|
|
43
53
|
* Set the current scope.
|
|
44
54
|
* @param id The ID of the scope to set.
|
|
@@ -11,6 +11,16 @@ export type WindowSDK = {
|
|
|
11
11
|
* @returns The active editor.
|
|
12
12
|
*/
|
|
13
13
|
getActiveEditor: () => Editor | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Get the active request editor.
|
|
16
|
+
* @returns The active request editor.
|
|
17
|
+
*/
|
|
18
|
+
getActiveRequestEditor: () => Editor | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Get the active response editor.
|
|
21
|
+
* @returns The active response editor.
|
|
22
|
+
*/
|
|
23
|
+
getActiveResponseEditor: () => Editor | undefined;
|
|
14
24
|
/**
|
|
15
25
|
* Show a toast message.
|
|
16
26
|
* @param message The message to show.
|
package/src/types/types/ai.d.ts
CHANGED
|
@@ -26,19 +26,18 @@ export type AIProvider = ProviderV3 & ((modelId: string, settings?: AILanguageMo
|
|
|
26
26
|
* AI upstream provider ID.
|
|
27
27
|
* @category AI
|
|
28
28
|
*/
|
|
29
|
-
export type AIUpstreamProviderId =
|
|
29
|
+
export type AIUpstreamProviderId = string;
|
|
30
|
+
/**
|
|
31
|
+
* The response API a provider speaks.
|
|
32
|
+
* @category AI
|
|
33
|
+
*/
|
|
34
|
+
export type AIUpstreamProviderApi = "ANTHROPIC" | "GEMINI" | "OPENAI_COMPLETION" | "OPENAI_RESPONSE" | "OPENROUTER";
|
|
30
35
|
/**
|
|
31
36
|
* AI upstream provider information.
|
|
37
|
+
* Only configured providers are returned.
|
|
32
38
|
* @category AI
|
|
33
39
|
*/
|
|
34
40
|
export type AIUpstreamProvider = {
|
|
35
41
|
id: AIUpstreamProviderId;
|
|
36
|
-
|
|
42
|
+
api: AIUpstreamProviderApi;
|
|
37
43
|
};
|
|
38
|
-
/**
|
|
39
|
-
* AI upstream provider status.
|
|
40
|
-
* Ready: The upstream provider is ready to use.
|
|
41
|
-
* Missing: The upstream provider is not configured.
|
|
42
|
-
* @category AI
|
|
43
|
-
*/
|
|
44
|
-
export type AIUpstreamProviderStatus = "Ready" | "Missing";
|
|
@@ -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
|