@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.
Files changed (48) hide show
  1. package/package.json +1 -1
  2. package/src/types/index.d.ts +17 -151
  3. package/src/types/{assets.d.ts → sdks/assets.d.ts} +1 -11
  4. package/src/types/{backend.d.ts → sdks/backend.d.ts} +2 -15
  5. package/src/types/{commandPalette.d.ts → sdks/commandPalette.d.ts} +2 -2
  6. package/src/types/sdks/commands.d.ts +31 -0
  7. package/src/types/{environment.d.ts → sdks/environment.d.ts} +1 -14
  8. package/src/types/{files.d.ts → sdks/files.d.ts} +1 -30
  9. package/src/types/{filters.d.ts → sdks/filters.d.ts} +2 -24
  10. package/src/types/{findings.d.ts → sdks/findings.d.ts} +2 -32
  11. package/src/types/{footer.d.ts → sdks/footer.d.ts} +3 -10
  12. package/src/types/{httpHistory.d.ts → sdks/httpHistory.d.ts} +2 -2
  13. package/src/types/sdks/index.d.ts +137 -0
  14. package/src/types/{intercept.d.ts → sdks/intercept.d.ts} +1 -1
  15. package/src/types/sdks/matchReplace.d.ts +87 -0
  16. package/src/types/sdks/menu.d.ts +21 -0
  17. package/src/types/{replay.d.ts → sdks/replay.d.ts} +4 -59
  18. package/src/types/{scopes.d.ts → sdks/scopes.d.ts} +2 -23
  19. package/src/types/{search.d.ts → sdks/search.d.ts} +1 -1
  20. package/src/types/{shortcuts.d.ts → sdks/shortcuts.d.ts} +1 -1
  21. package/src/types/{sidebar.d.ts → sdks/sidebar.d.ts} +2 -13
  22. package/src/types/{sitemap.d.ts → sdks/sitemap.d.ts} +1 -1
  23. package/src/types/{storage.d.ts → sdks/storage.d.ts} +1 -1
  24. package/src/types/{ui.d.ts → sdks/ui.d.ts} +2 -2
  25. package/src/types/{window.d.ts → sdks/window.d.ts} +4 -11
  26. package/src/types/{workflows.d.ts → sdks/workflows.d.ts} +2 -25
  27. package/src/types/types/assets.d.ts +10 -0
  28. package/src/types/types/backend.d.ts +14 -0
  29. package/src/types/{commands.d.ts → types/commands.d.ts} +5 -28
  30. package/src/types/types/environment.d.ts +14 -0
  31. package/src/types/types/files.d.ts +30 -0
  32. package/src/types/types/filter.d.ts +24 -0
  33. package/src/types/types/findings.d.ts +31 -0
  34. package/src/types/types/footer.d.ts +10 -0
  35. package/src/types/types/json.d.ts +9 -0
  36. package/src/types/{matchReplace.d.ts → types/matchReplace.d.ts} +1 -86
  37. package/src/types/{menu.d.ts → types/menu.d.ts} +2 -21
  38. package/src/types/types/replay.d.ts +59 -0
  39. package/src/types/{request.d.ts → types/request.d.ts} +2 -2
  40. package/src/types/types/scopes.d.ts +23 -0
  41. package/src/types/types/sidebar.d.ts +11 -0
  42. package/src/types/{slots.d.ts → types/slots.d.ts} +4 -4
  43. package/src/types/{utils.d.ts → types/utils.d.ts} +9 -15
  44. package/src/types/types/window.d.ts +8 -0
  45. package/src/types/types/workflows.d.ts +25 -0
  46. /package/src/types/{navigation.d.ts → sdks/navigation.d.ts} +0 -0
  47. /package/src/types/{runtime.d.ts → sdks/runtime.d.ts} +0 -0
  48. /package/src/types/{editor.d.ts → types/editor.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { type Component } from "vue";
2
- import { type CommandID } from "./utils";
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<TProps extends Record<string, unknown> = Record<string, unknown>> = DefineSlotContent<"Custom", {
12
- component: Component<TProps>;
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
- type JSONPrimitive = string | number | boolean | null | undefined;
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
- export type JSONValue = JSONPrimitive | JSONValue[] | {
30
- [key: string]: JSONValue;
31
- };
32
- type NotAssignableToJson = bigint | symbol | Function;
33
- export type JSONCompatible<T> = unknown extends T ? never : {
34
- [P in keyof T]: T[P] extends JSONValue ? T[P] : T[P] extends NotAssignableToJson ? never : JSONCompatible<T[P]>;
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,8 @@
1
+ export type DialogOptions = {
2
+ title?: string;
3
+ draggable?: boolean;
4
+ closeOnEscape?: boolean;
5
+ closable?: boolean;
6
+ modal?: boolean;
7
+ position?: "left" | "right" | "top" | "bottom" | "center" | "topleft" | "topright" | "bottomleft" | "bottomright";
8
+ };
@@ -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