@caido/sdk-frontend 0.57.1-beta.1 → 0.57.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-frontend",
3
- "version": "0.57.1-beta.1",
3
+ "version": "0.57.1-beta.4",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "repository": "https://github.com/caido/sdk-js/",
@@ -13,8 +13,8 @@
13
13
  ],
14
14
  "peerDependencies": {
15
15
  "@ai-sdk/provider": "^3.0.1",
16
- "@codemirror/view": "^6.0.0",
17
16
  "@codemirror/state": "^6.0.0",
17
+ "@codemirror/view": "^6.0.0",
18
18
  "vue": "^3.0.0"
19
19
  },
20
20
  "peerDependenciesMeta": {},
@@ -853,11 +853,9 @@ export type CreateReplaySessionPayload = {
853
853
  session?: Maybe<ReplaySession>;
854
854
  };
855
855
  export type CreateRequestInput = {
856
- alteration: Alteration;
857
856
  host: Scalars["String"]["input"];
858
857
  isTls: Scalars["Boolean"]["input"];
859
858
  method: Scalars["String"]["input"];
860
- parentId?: InputMaybe<Scalars["ID"]["input"]>;
861
859
  path: Scalars["String"]["input"];
862
860
  port: Scalars["Int"]["input"];
863
861
  query: Scalars["String"]["input"];
@@ -871,11 +869,8 @@ export type CreateRequestPayload = {
871
869
  responseId?: Maybe<Scalars["ID"]["output"]>;
872
870
  };
873
871
  export type CreateResponseInput = {
874
- alteration: Alteration;
875
- parentId?: InputMaybe<Scalars["ID"]["input"]>;
876
872
  raw: Scalars["Blob"]["input"];
877
873
  roundtripTime: Scalars["Int"]["input"];
878
- source: Source;
879
874
  statusCode: Scalars["Int"]["input"];
880
875
  };
881
876
  export type CreateScopeError = InvalidGlobTermsUserError | OtherUserError;
@@ -1974,6 +1969,7 @@ export type MutationRoot = {
1974
1969
  setGlobalConfigProject: SetConfigProjectPayload;
1975
1970
  setInstanceSettings: SetInstanceSettingsPayload;
1976
1971
  setInterceptOptions: SetInterceptOptionsPayload;
1972
+ setPassthroughOptions: SetPassthroughOptionsPayload;
1977
1973
  setPluginData: SetPluginDataPayload;
1978
1974
  setProjectConfigStream: SetProjectConfigStreamPayload;
1979
1975
  startAuthenticationFlow: StartAuthenticationFlowPayload;
@@ -2353,6 +2349,9 @@ export type MutationRootSetInstanceSettingsArgs = {
2353
2349
  export type MutationRootSetInterceptOptionsArgs = {
2354
2350
  input: InterceptOptionsInput;
2355
2351
  };
2352
+ export type MutationRootSetPassthroughOptionsArgs = {
2353
+ input: PassthroughOptionsInput;
2354
+ };
2356
2355
  export type MutationRootSetPluginDataArgs = {
2357
2356
  data: Scalars["JSON"]["input"];
2358
2357
  id: Scalars["ID"]["input"];
@@ -2532,6 +2531,22 @@ export type PageInfo = {
2532
2531
  /** When paginating backwards, the cursor to continue. */
2533
2532
  startCursor?: Maybe<Scalars["String"]["output"]>;
2534
2533
  };
2534
+ export type PassthroughOptions = {
2535
+ passthroughOptions?: Maybe<PassthroughOptionsObject>;
2536
+ };
2537
+ export type PassthroughOptionsInput = {
2538
+ outofscope: Scalars["Boolean"]["input"];
2539
+ targets: PassthroughTargets;
2540
+ };
2541
+ export type PassthroughOptionsObject = {
2542
+ allowlist?: Maybe<Array<Scalars["String"]["output"]>>;
2543
+ denylist?: Maybe<Array<Scalars["String"]["output"]>>;
2544
+ outOfScope: Scalars["Boolean"]["output"];
2545
+ };
2546
+ export type PassthroughTargets = {
2547
+ allowlist?: InputMaybe<Array<Scalars["String"]["input"]>>;
2548
+ denylist?: InputMaybe<Array<Scalars["String"]["input"]>>;
2549
+ };
2535
2550
  export type PauseAutomateTaskError = OtherUserError | UnknownIdUserError;
2536
2551
  export type PauseAutomateTaskPayload = {
2537
2552
  automateTask?: Maybe<AutomateTask>;
@@ -2735,6 +2750,7 @@ export type QueryRoot = {
2735
2750
  interceptMessages: InterceptMessageConnection;
2736
2751
  interceptOptions: InterceptOptions;
2737
2752
  interceptStatus: InterceptStatus;
2753
+ passthroughOptions: PassthroughOptions;
2738
2754
  pluginPackages: Array<PluginPackage>;
2739
2755
  projects: Array<Project>;
2740
2756
  replayEntry?: Maybe<ReplayEntry>;
@@ -3587,6 +3603,9 @@ export type SetInstanceSettingsPayload = {
3587
3603
  export type SetInterceptOptionsPayload = {
3588
3604
  options: InterceptOptions;
3589
3605
  };
3606
+ export type SetPassthroughOptionsPayload = {
3607
+ options: PassthroughOptions;
3608
+ };
3590
3609
  export type SetPluginDataError = OtherUserError | PluginUserError | UnknownIdUserError;
3591
3610
  export type SetPluginDataPayload = {
3592
3611
  error?: Maybe<SetPluginDataError>;
@@ -3975,6 +3994,7 @@ export type SubscriptionRoot = {
3975
3994
  updatedInterceptEntry: UpdatedInterceptEntryPayload;
3976
3995
  updatedInterceptOptions: UpdatedInterceptOptionsPayload;
3977
3996
  updatedInterceptStatus: UpdatedInterceptStatusPayload;
3997
+ updatedPassthroughOptions: UpdatedPassthroughOptionsPayload;
3978
3998
  updatedPlugin: UpdatedPluginPayload;
3979
3999
  updatedPluginPackage: UpdatedPluginPackagePayload;
3980
4000
  updatedProject: UpdatedProjectPayload;
@@ -5046,6 +5066,9 @@ export type UpdatedInterceptOptionsPayload = {
5046
5066
  export type UpdatedInterceptStatusPayload = {
5047
5067
  status: InterceptStatus;
5048
5068
  };
5069
+ export type UpdatedPassthroughOptionsPayload = {
5070
+ options: PassthroughOptions;
5071
+ };
5049
5072
  export type UpdatedPluginPackagePayload = {
5050
5073
  package: PluginPackage;
5051
5074
  };
@@ -9086,6 +9109,11 @@ export type UpdatedEnvironmentSubscription = {
9086
9109
  id: string;
9087
9110
  name: string;
9088
9111
  version: number;
9112
+ variables: Array<{
9113
+ name: string;
9114
+ value: string;
9115
+ kind: EnvironmentVariableKind;
9116
+ }>;
9089
9117
  };
9090
9118
  };
9091
9119
  };
@@ -54544,7 +54572,7 @@ export declare const UpdateEnvironmentDocument = "\n mutation updateEnvironme
54544
54572
  export declare const DeleteEnvironmentDocument = "\n mutation deleteEnvironment($id: ID!) {\n deleteEnvironment(id: $id) {\n deletedId\n error {\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment unknownIdUserErrorFull on UnknownIdUserError {\n ...userErrorFull\n id\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
54545
54573
  export declare const SelectEnvironmentDocument = "\n mutation selectEnvironment($id: ID) {\n selectEnvironment(id: $id) {\n environment {\n ...environmentFull\n }\n error {\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment environmentFull on Environment {\n ...environmentMeta\n variables {\n ...environmentVariableFull\n }\n}\n \n\n fragment environmentMeta on Environment {\n __typename\n id\n name\n version\n}\n \n\n fragment environmentVariableFull on EnvironmentVariable {\n name\n value\n kind\n}\n \n\n fragment unknownIdUserErrorFull on UnknownIdUserError {\n ...userErrorFull\n id\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
54546
54574
  export declare const CreatedEnvironmentDocument = "\n subscription createdEnvironment {\n createdEnvironment {\n environment {\n ...environmentMeta\n }\n snapshot\n }\n}\n \n fragment environmentMeta on Environment {\n __typename\n id\n name\n version\n}\n ";
54547
- export declare const UpdatedEnvironmentDocument = "\n subscription updatedEnvironment {\n updatedEnvironment {\n environment {\n ...environmentMeta\n }\n snapshot\n }\n}\n \n fragment environmentMeta on Environment {\n __typename\n id\n name\n version\n}\n ";
54575
+ export declare const UpdatedEnvironmentDocument = "\n subscription updatedEnvironment {\n updatedEnvironment {\n environment {\n ...environmentFull\n }\n snapshot\n }\n}\n \n fragment environmentFull on Environment {\n ...environmentMeta\n variables {\n ...environmentVariableFull\n }\n}\n \n\n fragment environmentMeta on Environment {\n __typename\n id\n name\n version\n}\n \n\n fragment environmentVariableFull on EnvironmentVariable {\n name\n value\n kind\n}\n ";
54548
54576
  export declare const DeletedEnvironmentDocument = "\n subscription deletedEnvironment {\n deletedEnvironment {\n deletedEnvironmentId\n snapshot\n }\n}\n ";
54549
54577
  export declare const UpdatedEnvironmentContextDocument = "\n subscription updatedEnvironmentContext {\n updatedEnvironmentContext {\n environmentContext {\n ...environmentContextFull\n }\n }\n}\n \n fragment environmentContextFull on EnvironmentContext {\n global {\n ...environmentFull\n }\n selected {\n ...environmentFull\n }\n}\n \n\n fragment environmentFull on Environment {\n ...environmentMeta\n variables {\n ...environmentVariableFull\n }\n}\n \n\n fragment environmentMeta on Environment {\n __typename\n id\n name\n version\n}\n \n\n fragment environmentVariableFull on EnvironmentVariable {\n name\n value\n kind\n}\n ";
54550
54578
  export declare const RenameDataExportDocument = "\n mutation renameDataExport($id: ID!, $name: String!) {\n renameDataExport(id: $id, name: $name) {\n export {\n __typename\n ... on DataExportStored {\n ...dataExportStoredFullFields\n }\n }\n }\n}\n \n fragment dataExportStoredFullFields on DataExportStored {\n ...dataExportStoredMeta\n fileDownloadUrl: downloadUri\n}\n \n\n fragment dataExportStoredMeta on DataExportStored {\n ...dataExportStoredMetaFields\n}\n \n\n fragment dataExportStoredMetaFields on DataExportStored {\n __typename\n id\n name\n path\n size\n status\n format\n error\n createdAt\n}\n ";
@@ -4,7 +4,7 @@ export type { _AnalyticsSDK } from "./private/analytics";
4
4
  export type { MessageViewModeOptions, StreamWsMessageMeta, MessageViewModePropsInternal, MessageViewModeProps, } from "./types/websocket";
5
5
  export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
6
6
  export type { MenuItem } from "./types/menu";
7
- export { type AddSessionIndicatorOptions, type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
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";
8
8
  export type { AutomateSession, AutomateEntry } from "./types/automate";
9
9
  export type { SitemapEntry, SitemapRootEntry, ChildState, } from "./types/sitemap";
10
10
  export { SearchSlot, type SearchSlotContent } from "./types/search";
@@ -1,5 +1,5 @@
1
1
  import { type Extension } from "@codemirror/state";
2
- import { 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";
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
3
  import type { RequestViewModeOptions, RequestWritableViewModeProps } from "../types/request";
4
4
  import type { ResponseViewModeOptions, ResponseViewModeProps } from "../types/response";
5
5
  import { type DefineAddToSlotFn } from "../types/slots";
@@ -44,6 +44,20 @@ export type ReplaySDK = {
44
44
  * ```
45
45
  */
46
46
  getCurrentSession: () => ReplaySession | undefined;
47
+ /**
48
+ * Get the entry currently displayed in the active replay session.
49
+ * @returns The active entry, or undefined if no entry is currently loaded.
50
+ * @example
51
+ * ```ts
52
+ * const currentEntry = sdk.replay.getCurrentEntry();
53
+ * if (currentEntry) {
54
+ * console.log(`Currently viewing entry ${currentEntry.id}`);
55
+ * } else {
56
+ * console.log("No entry is currently displayed");
57
+ * }
58
+ * ```
59
+ */
60
+ getCurrentEntry: () => ReplayEntry | undefined;
47
61
  /**
48
62
  * Rename a session.
49
63
  * @param id The ID of the session to rename.
@@ -243,4 +257,22 @@ export type ReplaySDK = {
243
257
  *
244
258
  */
245
259
  addSessionIndicator: (sessionId: ID, indicator: AddSessionIndicatorOptions) => Indicator;
260
+ /**
261
+ * Add an indicator to a replay collection.
262
+ * Indicators are displayed next to the collection name in the collections tree.
263
+ * @param collectionId The ID of the collection to add the indicator to.
264
+ * @param indicator The indicator configuration.
265
+ * @returns A handle object with a `remove` method to remove the indicator.
266
+ * @example
267
+ *
268
+ * const indicator = sdk.replay.addCollectionIndicator(collectionId, {
269
+ * icon: "fas fa-folder-open",
270
+ * description: "Has unresolved findings",
271
+ * });
272
+ *
273
+ * // Later, remove the indicator
274
+ * indicator.remove();
275
+ *
276
+ */
277
+ addCollectionIndicator: (collectionId: ID, indicator: AddCollectionIndicatorOptions) => Indicator;
246
278
  };
@@ -219,6 +219,11 @@ export type AddSessionIndicatorOptions = AddIndicatorOptions & {
219
219
  */
220
220
  showTabIcon?: boolean;
221
221
  };
222
+ /**
223
+ * Options for adding an indicator to a replay collection.
224
+ * @category Replay
225
+ */
226
+ export type AddCollectionIndicatorOptions = AddIndicatorOptions;
222
227
  /**
223
228
  * A unique replay session identifier.
224
229
  * @category Replay