@caido/sdk-frontend 0.51.2-beta.14 → 0.51.2-beta.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-frontend",
3
- "version": "0.51.2-beta.14",
3
+ "version": "0.51.2-beta.15",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
@@ -16,3 +16,4 @@ export type { Workflow, WorkflowKind, OnCreatedWorkflowCallback, OnUpdatedWorkfl
16
16
  export type { ListenerHandle } from "./types/utils";
17
17
  export type { AIProvider } from "./types/ai";
18
18
  export type { API } from "./sdks";
19
+ export { Routes } from "./types/navigation";
@@ -1,18 +1,23 @@
1
+ import { type Routes } from "../types/navigation";
1
2
  /**
2
3
  * Utilities to interact with navigation.
3
4
  * @category Navigation
4
5
  */
5
6
  export type NavigationSDK = {
6
7
  /**
7
- * Navigate to a path.
8
- * @param path The path to navigate to.
8
+ * Navigate to a route or path.
9
+ * @param route The route to navigate to. Can be a route ID object or a custom path string.
9
10
  *
10
11
  * @example
11
12
  * ```ts
13
+ * sdk.navigation.goTo({ id: Routes.Replay });
14
+ * sdk.navigation.goTo({ id: Routes.Projects });
12
15
  * sdk.navigation.goTo("/my-plugin-page");
13
16
  * ```
14
17
  */
15
- goTo: (path: string) => void;
18
+ goTo: (route: string | {
19
+ id: Routes;
20
+ }) => void;
16
21
  /**
17
22
  * Add a page to the navigation.
18
23
  * @param path The path of the page.
@@ -0,0 +1,25 @@
1
+ export declare const Routes: {
2
+ readonly Sitemap: "Sitemap";
3
+ readonly Intercept: "Intercept";
4
+ readonly Search: "Search";
5
+ readonly HTTPHistory: "HTTPHistory";
6
+ readonly Websockets: "Websockets";
7
+ readonly Workflows: "Workflows";
8
+ readonly Replay: "Replay";
9
+ readonly Automate: "Automate";
10
+ readonly Projects: "Projects";
11
+ readonly Backups: "Backups";
12
+ readonly MatchReplace: "Tamper";
13
+ readonly Assistant: "Assistant";
14
+ readonly Environment: "Environment";
15
+ readonly Scope: "Scope";
16
+ readonly Filter: "Filter";
17
+ readonly Exports: "Exports";
18
+ readonly Findings: "Findings";
19
+ readonly Files: "Files";
20
+ readonly Plugins: "Plugins";
21
+ readonly Certificate: "Certificate";
22
+ readonly About: "About";
23
+ readonly Settings: "Settings";
24
+ };
25
+ export type Routes = (typeof Routes)[keyof typeof Routes];