@caido/sdk-frontend 0.51.2-beta.9 → 0.52.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/src/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type { HTTPQL, ID, ComponentDefinition } from "./types/utils";
|
|
|
9
9
|
export type { JSONValue, JSONCompatible } from "./types/json";
|
|
10
10
|
export type { SlotContent, ButtonSlotContent, CustomSlotContent, CommandSlotContent, } from "./types/slots";
|
|
11
11
|
export type { RequestViewModeOptions, RequestFull, RequestDraft, RequestMeta, } from "./types/request";
|
|
12
|
-
export type { MatchReplaceRule, MatchReplaceCollection, MatchReplaceSection, MatchReplaceSectionRequestBody, MatchReplaceSectionRequestFirstLine, MatchReplaceSectionRequestHeader, MatchReplaceSectionRequestMethod, MatchReplaceSectionRequestPath, MatchReplaceSectionRequestQuery, MatchReplaceSectionResponseBody, MatchReplaceSectionResponseFirstLine, MatchReplaceSectionResponseHeader, MatchReplaceSectionResponseStatusCode, MatchReplaceOperationStatusCode, MatchReplaceOperationStatusCodeUpdate, MatchReplaceOperationQuery, MatchReplaceOperationQueryRaw, MatchReplaceOperationQueryAdd, MatchReplaceOperationQueryRemove, MatchReplaceOperationQueryUpdate, MatchReplaceOperationPath, MatchReplaceOperationPathRaw, MatchReplaceOperationMethod, MatchReplaceOperationMethodUpdate, MatchReplaceOperationHeader, MatchReplaceOperationHeaderRaw, MatchReplaceOperationHeaderAdd, MatchReplaceOperationHeaderRemove, MatchReplaceOperationHeaderUpdate, MatchReplaceOperationBody, MatchReplaceOperationBodyRaw, MatchReplaceOperationFirstLine, MatchReplaceOperationFirstLineRaw, MatchReplaceReplacer, MatchReplaceReplacerTerm, MatchReplaceReplacerWorkflow, MatchReplaceMatcherName, MatchReplaceMatcherRaw, MatchReplaceMatcherRawFull, MatchReplaceMatcherRawRegex, MatchReplaceMatcherRawValue, } from "./types/matchReplace";
|
|
12
|
+
export type { MatchReplaceRule, MatchReplaceCollection, MatchReplaceSection, MatchReplaceSectionRequestAll, MatchReplaceSectionRequestBody, MatchReplaceSectionRequestFirstLine, MatchReplaceSectionRequestHeader, MatchReplaceSectionRequestMethod, MatchReplaceSectionRequestPath, MatchReplaceSectionRequestQuery, MatchReplaceSectionResponseAll, MatchReplaceSectionResponseBody, MatchReplaceSectionResponseFirstLine, MatchReplaceSectionResponseHeader, MatchReplaceSectionResponseStatusCode, MatchReplaceOperationStatusCode, MatchReplaceOperationStatusCodeUpdate, MatchReplaceOperationQuery, MatchReplaceOperationQueryRaw, MatchReplaceOperationQueryAdd, MatchReplaceOperationQueryRemove, MatchReplaceOperationQueryUpdate, MatchReplaceOperationPath, MatchReplaceOperationPathRaw, MatchReplaceOperationAll, MatchReplaceOperationAllRaw, MatchReplaceOperationMethod, MatchReplaceOperationMethodUpdate, MatchReplaceOperationHeader, MatchReplaceOperationHeaderRaw, MatchReplaceOperationHeaderAdd, MatchReplaceOperationHeaderRemove, MatchReplaceOperationHeaderUpdate, MatchReplaceOperationBody, MatchReplaceOperationBodyRaw, MatchReplaceOperationFirstLine, MatchReplaceOperationFirstLineRaw, MatchReplaceReplacer, MatchReplaceReplacerTerm, MatchReplaceReplacerWorkflow, MatchReplaceMatcherName, MatchReplaceMatcherRaw, MatchReplaceMatcherRawFull, MatchReplaceMatcherRawRegex, MatchReplaceMatcherRawValue, } from "./types/matchReplace";
|
|
13
13
|
export type { Scope } from "./types/scopes";
|
|
14
14
|
export type { EnvironmentVariable } from "./types/environment";
|
|
15
15
|
export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkflowCallback, OnDeletedWorkflowCallback, } from "./types/workflows";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RequestViewModeOptions } from "../types/request";
|
|
1
2
|
import type { ID } from "../types/utils";
|
|
2
3
|
/**
|
|
3
4
|
* Utilities to interact with the Intercept page.
|
|
@@ -14,4 +15,9 @@ export type InterceptSDK = {
|
|
|
14
15
|
* @param scopeId The ID of the scope to set.
|
|
15
16
|
*/
|
|
16
17
|
setScope: (id: ID | undefined) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Add a custom request view mode.
|
|
20
|
+
* @param options The view mode options.
|
|
21
|
+
*/
|
|
22
|
+
addRequestViewMode: (options: RequestViewModeOptions) => void;
|
|
17
23
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Extension } from "@codemirror/state";
|
|
2
2
|
import { type OpenTabOptions, type ReplayCollection, type ReplaySession, type ReplaySlotContent, type ReplayTab, type RequestSource, type SendRequestOptions } from "../types/replay";
|
|
3
|
+
import type { RequestViewModeOptions } from "../types/request";
|
|
3
4
|
import { type DefineAddToSlotFn } from "../types/slots";
|
|
4
5
|
import type { ID } from "../types/utils";
|
|
5
6
|
/**
|
|
@@ -109,6 +110,11 @@ export type ReplaySDK = {
|
|
|
109
110
|
* @param extension The extension to add.
|
|
110
111
|
*/
|
|
111
112
|
addRequestEditorExtension: (extension: Extension) => void;
|
|
113
|
+
/**
|
|
114
|
+
* Add a custom view mode for requests.
|
|
115
|
+
* @param options The view mode options.
|
|
116
|
+
*/
|
|
117
|
+
addRequestViewMode: (options: RequestViewModeOptions) => void;
|
|
112
118
|
/**
|
|
113
119
|
* Send a request to the Replay backend.
|
|
114
120
|
* @param request The request to send.
|
|
@@ -30,7 +30,21 @@ export type MatchReplaceRule = {
|
|
|
30
30
|
*/
|
|
31
31
|
collectionId: ID;
|
|
32
32
|
};
|
|
33
|
-
export type MatchReplaceSection = MatchReplaceSectionRequestBody | MatchReplaceSectionRequestFirstLine | MatchReplaceSectionRequestHeader | MatchReplaceSectionRequestMethod | MatchReplaceSectionRequestPath | MatchReplaceSectionRequestQuery | MatchReplaceSectionResponseBody | MatchReplaceSectionResponseFirstLine | MatchReplaceSectionResponseHeader | MatchReplaceSectionResponseStatusCode;
|
|
33
|
+
export type MatchReplaceSection = MatchReplaceSectionRequestAll | MatchReplaceSectionRequestBody | MatchReplaceSectionRequestFirstLine | MatchReplaceSectionRequestHeader | MatchReplaceSectionRequestMethod | MatchReplaceSectionRequestPath | MatchReplaceSectionRequestQuery | MatchReplaceSectionResponseAll | MatchReplaceSectionResponseBody | MatchReplaceSectionResponseFirstLine | MatchReplaceSectionResponseHeader | MatchReplaceSectionResponseStatusCode;
|
|
34
|
+
export type MatchReplaceSectionRequestAll = {
|
|
35
|
+
kind: "SectionRequestAll";
|
|
36
|
+
operation: MatchReplaceOperationAll;
|
|
37
|
+
};
|
|
38
|
+
export type MatchReplaceSectionResponseAll = {
|
|
39
|
+
kind: "SectionResponseAll";
|
|
40
|
+
operation: MatchReplaceOperationAll;
|
|
41
|
+
};
|
|
42
|
+
export type MatchReplaceOperationAll = KeepOperation<MatchReplaceOperationAllRaw>;
|
|
43
|
+
export type MatchReplaceOperationAllRaw = {
|
|
44
|
+
kind: "OperationAllRaw";
|
|
45
|
+
matcher: MatchReplaceMatcherRaw;
|
|
46
|
+
replacer: MatchReplaceReplacer;
|
|
47
|
+
};
|
|
34
48
|
export type MatchReplaceSectionResponseStatusCode = {
|
|
35
49
|
kind: "SectionResponseStatusCode";
|
|
36
50
|
operation: MatchReplaceOperationStatusCode;
|