@caido/sdk-frontend 0.49.1-beta.2 → 0.49.1-beta.4
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/index.d.ts +17 -151
- package/src/types/{assets.d.ts → sdks/assets.d.ts} +1 -11
- package/src/types/{backend.d.ts → sdks/backend.d.ts} +2 -15
- package/src/types/{commandPalette.d.ts → sdks/commandPalette.d.ts} +2 -2
- package/src/types/sdks/commands.d.ts +31 -0
- package/src/types/{environment.d.ts → sdks/environment.d.ts} +1 -14
- package/src/types/{files.d.ts → sdks/files.d.ts} +1 -30
- package/src/types/{filters.d.ts → sdks/filters.d.ts} +2 -24
- package/src/types/{findings.d.ts → sdks/findings.d.ts} +2 -32
- package/src/types/{footer.d.ts → sdks/footer.d.ts} +3 -10
- package/src/types/{httpHistory.d.ts → sdks/httpHistory.d.ts} +2 -2
- package/src/types/sdks/index.d.ts +137 -0
- package/src/types/{intercept.d.ts → sdks/intercept.d.ts} +1 -1
- package/src/types/sdks/matchReplace.d.ts +87 -0
- package/src/types/sdks/menu.d.ts +21 -0
- package/src/types/{replay.d.ts → sdks/replay.d.ts} +4 -59
- package/src/types/{scopes.d.ts → sdks/scopes.d.ts} +2 -23
- package/src/types/{search.d.ts → sdks/search.d.ts} +1 -1
- package/src/types/{shortcuts.d.ts → sdks/shortcuts.d.ts} +1 -1
- package/src/types/{sidebar.d.ts → sdks/sidebar.d.ts} +2 -13
- package/src/types/{sitemap.d.ts → sdks/sitemap.d.ts} +1 -1
- package/src/types/{storage.d.ts → sdks/storage.d.ts} +1 -1
- package/src/types/{ui.d.ts → sdks/ui.d.ts} +2 -2
- package/src/types/{window.d.ts → sdks/window.d.ts} +4 -11
- package/src/types/{workflows.d.ts → sdks/workflows.d.ts} +2 -25
- package/src/types/types/assets.d.ts +10 -0
- package/src/types/types/backend.d.ts +14 -0
- package/src/types/{commands.d.ts → types/commands.d.ts} +5 -28
- package/src/types/types/environment.d.ts +14 -0
- package/src/types/types/files.d.ts +30 -0
- package/src/types/types/filter.d.ts +24 -0
- package/src/types/types/findings.d.ts +31 -0
- package/src/types/types/footer.d.ts +10 -0
- package/src/types/types/json.d.ts +9 -0
- package/src/types/{matchReplace.d.ts → types/matchReplace.d.ts} +1 -86
- package/src/types/{menu.d.ts → types/menu.d.ts} +2 -21
- package/src/types/types/replay.d.ts +59 -0
- package/src/types/{request.d.ts → types/request.d.ts} +2 -2
- package/src/types/types/scopes.d.ts +23 -0
- package/src/types/types/sidebar.d.ts +11 -0
- package/src/types/{slots.d.ts → types/slots.d.ts} +4 -4
- package/src/types/{utils.d.ts → types/utils.d.ts} +9 -15
- package/src/types/types/window.d.ts +8 -0
- package/src/types/types/workflows.d.ts +25 -0
- /package/src/types/{navigation.d.ts → sdks/navigation.d.ts} +0 -0
- /package/src/types/{runtime.d.ts → sdks/runtime.d.ts} +0 -0
- /package/src/types/{editor.d.ts → types/editor.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type CommandID } from "./commands";
|
|
2
|
+
import { type ComponentDefinition } from "./utils";
|
|
3
3
|
type DefineSlotContent<TType extends string, P extends Record<string, unknown>> = {
|
|
4
4
|
type: TType;
|
|
5
5
|
} & P;
|
|
@@ -8,8 +8,8 @@ export type ButtonSlotContent = DefineSlotContent<"Button", {
|
|
|
8
8
|
icon?: string;
|
|
9
9
|
onClick: () => void;
|
|
10
10
|
}>;
|
|
11
|
-
export type CustomSlotContent
|
|
12
|
-
|
|
11
|
+
export type CustomSlotContent = DefineSlotContent<"Custom", {
|
|
12
|
+
definition: ComponentDefinition;
|
|
13
13
|
}>;
|
|
14
14
|
export type CommandSlotContent = DefineSlotContent<"Command", {
|
|
15
15
|
commandId: CommandID;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { type Component as VueComponent } from "vue";
|
|
2
2
|
/**
|
|
3
3
|
* A unique Caido identifier per type.
|
|
4
4
|
*/
|
|
5
5
|
export type ID = string & {
|
|
6
6
|
__id?: never;
|
|
7
7
|
};
|
|
8
|
-
/**
|
|
9
|
-
* A unique command identifier.
|
|
10
|
-
* @example "my-super-command"
|
|
11
|
-
*/
|
|
12
|
-
export type CommandID = string & {
|
|
13
|
-
__commandId?: never;
|
|
14
|
-
};
|
|
15
8
|
/**
|
|
16
9
|
* An HTTPQL expression.
|
|
17
10
|
* @example `req.method.eq:"POST"`
|
|
@@ -26,12 +19,14 @@ export type HTTPQL = string & {
|
|
|
26
19
|
export type Icon = string & {
|
|
27
20
|
__icon?: never;
|
|
28
21
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export type
|
|
34
|
-
|
|
22
|
+
/**
|
|
23
|
+
* A custom component that will be rendered in the UI.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export type ComponentDefinition = {
|
|
27
|
+
component: VueComponent;
|
|
28
|
+
props?: Record<string, unknown>;
|
|
29
|
+
events?: Record<string, (...args: unknown[]) => void>;
|
|
35
30
|
};
|
|
36
31
|
export type PromisifiedReturnType<T extends (...args: unknown[]) => unknown> = ReturnType<T> extends Promise<infer U> ? Promise<U> : Promise<ReturnType<T>>;
|
|
37
32
|
/**
|
|
@@ -43,4 +38,3 @@ export type ListenerHandle = {
|
|
|
43
38
|
*/
|
|
44
39
|
stop: () => void;
|
|
45
40
|
};
|
|
46
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ID } from "./utils";
|
|
2
|
+
/**
|
|
3
|
+
* A workflow
|
|
4
|
+
* @category Workflows
|
|
5
|
+
*/
|
|
6
|
+
export type Workflow = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
kind: WorkflowKind;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The kind of workflow.
|
|
14
|
+
* @category Workflows
|
|
15
|
+
*/
|
|
16
|
+
export type WorkflowKind = "Convert" | "Active" | "Passive";
|
|
17
|
+
export type OnCreatedWorkflowCallback = (event: {
|
|
18
|
+
workflow: Workflow;
|
|
19
|
+
}) => void;
|
|
20
|
+
export type OnUpdatedWorkflowCallback = (event: {
|
|
21
|
+
workflow: Workflow;
|
|
22
|
+
}) => void;
|
|
23
|
+
export type OnDeletedWorkflowCallback = (event: {
|
|
24
|
+
id: ID;
|
|
25
|
+
}) => void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|