@caido/sdk-frontend 0.53.2-beta.5 → 0.53.2-beta.7

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.53.2-beta.5",
3
+ "version": "0.53.2-beta.7",
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/",
@@ -3160,6 +3160,7 @@ export type Runtime = {
3160
3160
  logs: Scalars["Uri"]["output"];
3161
3161
  platform: Scalars["String"]["output"];
3162
3162
  version: Scalars["String"]["output"];
3163
+ workspace?: Maybe<Workspace>;
3163
3164
  };
3164
3165
  export type Scope = {
3165
3166
  allowlist: Array<Scalars["String"]["output"]>;
@@ -3563,6 +3564,7 @@ export type SubscriptionRoot = {
3563
3564
  updatedAutomateTask: UpdatedAutomateTaskPayload;
3564
3565
  updatedBackup: UpdatedBackupPayload;
3565
3566
  updatedBrowser: UpdatedBrowserPayload;
3567
+ updatedCloudStatus: UpdatedCloudStatusPayload;
3566
3568
  updatedDataExport: UpdatedDataExportPayload;
3567
3569
  updatedDeleteInterceptEntriesTask: UpdatedDeleteInterceptEntriesTaskPayload;
3568
3570
  updatedDnsRewrite: UpdatedDnsRewritePayload;
@@ -4438,6 +4440,9 @@ export type UpdatedBackupPayload = {
4438
4440
  export type UpdatedBrowserPayload = {
4439
4441
  browser: Browser;
4440
4442
  };
4443
+ export type UpdatedCloudStatusPayload = {
4444
+ cloudStatus: CloudStatus;
4445
+ };
4441
4446
  export type UpdatedDnsRewritePayload = {
4442
4447
  rewrite: DnsRewrite;
4443
4448
  };
@@ -4682,6 +4687,11 @@ export type WorkflowUserError = UserError & {
4682
4687
  node?: Maybe<Scalars["String"]["output"]>;
4683
4688
  reason: WorkflowErrorReason;
4684
4689
  };
4690
+ export type Workspace = {
4691
+ generation: Scalars["Int"]["output"];
4692
+ id: Scalars["ID"]["output"];
4693
+ name: Scalars["String"]["output"];
4694
+ };
4685
4695
  export type AssistantMessageFullFragment = {
4686
4696
  __typename: "AssistantMessage";
4687
4697
  id: string;
@@ -9603,7 +9613,7 @@ export type CreateFindingMutation = {
9603
9613
  };
9604
9614
  };
9605
9615
  export type DeleteFindingsMutationVariables = Exact<{
9606
- input: DeleteFindingsInput;
9616
+ input?: InputMaybe<DeleteFindingsInput>;
9607
9617
  }>;
9608
9618
  export type DeleteFindingsMutation = {
9609
9619
  deleteFindings: {
@@ -23681,7 +23691,7 @@ export declare const CreatedFindingDocument = "\n subscription createdFinding
23681
23691
  export declare const DeletedFindingsDocument = "\n subscription deletedFindings {\n deletedFindings {\n deletedFindingIds\n snapshot\n }\n}\n ";
23682
23692
  export declare const UpdatedFindingsDocument = "\n subscription updatedFindings($order: FindingOrderInput) {\n updatedFindings {\n findings {\n findingEdge(order: $order) {\n ...findingEdgeMeta\n }\n snapshot\n }\n }\n}\n \n fragment findingEdgeMeta on FindingEdge {\n cursor\n node {\n ...findingMeta\n }\n}\n \n\n fragment findingMeta on Finding {\n id\n title\n reporter\n host\n path\n createdAt\n request {\n ...requestMeta\n }\n}\n \n\n fragment requestMeta on Request {\n __typename\n id\n host\n port\n path\n query\n method\n edited\n isTls\n sni\n length\n alteration\n metadata {\n ...requestMetadataFull\n }\n fileExtension\n source\n createdAt\n response {\n ...responseMeta\n }\n stream {\n id\n }\n}\n \n\n fragment requestMetadataFull on RequestMetadata {\n __typename\n id\n color\n}\n \n\n fragment responseMeta on Response {\n __typename\n id\n statusCode\n roundtripTime\n length\n createdAt\n alteration\n edited\n}\n ";
23683
23693
  export declare const CreateFindingDocument = "\n mutation createFinding($requestId: ID!, $input: CreateFindingInput!) {\n createFinding(requestId: $requestId, input: $input) {\n finding {\n ...findingFull\n }\n error {\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n }\n }\n}\n \n fragment findingFull on Finding {\n ...findingMeta\n description\n}\n \n\n fragment findingMeta on Finding {\n id\n title\n reporter\n host\n path\n createdAt\n request {\n ...requestMeta\n }\n}\n \n\n fragment requestMeta on Request {\n __typename\n id\n host\n port\n path\n query\n method\n edited\n isTls\n sni\n length\n alteration\n metadata {\n ...requestMetadataFull\n }\n fileExtension\n source\n createdAt\n response {\n ...responseMeta\n }\n stream {\n id\n }\n}\n \n\n fragment requestMetadataFull on RequestMetadata {\n __typename\n id\n color\n}\n \n\n fragment responseMeta on Response {\n __typename\n id\n statusCode\n roundtripTime\n length\n createdAt\n alteration\n edited\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment unknownIdUserErrorFull on UnknownIdUserError {\n ...userErrorFull\n id\n}\n ";
23684
- export declare const DeleteFindingsDocument = "\n mutation deleteFindings($input: DeleteFindingsInput!) {\n deleteFindings(input: $input) {\n deletedIds\n }\n}\n ";
23694
+ export declare const DeleteFindingsDocument = "\n mutation deleteFindings($input: DeleteFindingsInput) {\n deleteFindings(input: $input) {\n deletedIds\n }\n}\n ";
23685
23695
  export declare const UpdateFindingDocument = "\n mutation updateFinding($id: ID!, $input: UpdateFindingInput!) {\n updateFinding(id: $id, input: $input) {\n finding {\n ...findingMeta\n }\n error {\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n }\n }\n}\n \n fragment findingMeta on Finding {\n id\n title\n reporter\n host\n path\n createdAt\n request {\n ...requestMeta\n }\n}\n \n\n fragment requestMeta on Request {\n __typename\n id\n host\n port\n path\n query\n method\n edited\n isTls\n sni\n length\n alteration\n metadata {\n ...requestMetadataFull\n }\n fileExtension\n source\n createdAt\n response {\n ...responseMeta\n }\n stream {\n id\n }\n}\n \n\n fragment requestMetadataFull on RequestMetadata {\n __typename\n id\n color\n}\n \n\n fragment responseMeta on Response {\n __typename\n id\n statusCode\n roundtripTime\n length\n createdAt\n alteration\n edited\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment unknownIdUserErrorFull on UnknownIdUserError {\n ...userErrorFull\n id\n}\n ";
23686
23696
  export declare const ExportFindingsDocument = "\n mutation exportFindings($input: ExportFindingsInput!) {\n exportFindings(input: $input) {\n export {\n ...dataExportOnDemandMeta\n }\n error {\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n ... on PermissionDeniedUserError {\n ...permissionDeniedUserErrorFull\n }\n }\n }\n}\n \n fragment dataExportOnDemandMeta on DataExportOnDemand {\n downloadUri\n id\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment permissionDeniedUserErrorFull on PermissionDeniedUserError {\n ...userErrorFull\n permissionDeniedReason: reason\n}\n ";
23687
23697
  export declare const InterceptEntriesDocument = "\n query interceptEntries($after: String, $first: Int, $before: String, $last: Int, $order: InterceptEntryOrderInput, $filter: HTTPQL, $scopeId: ID) {\n interceptEntries(\n after: $after\n first: $first\n before: $before\n last: $last\n order: $order\n filter: $filter\n scopeId: $scopeId\n ) {\n edges {\n ...interceptEntryEdgeMeta\n }\n snapshot\n pageInfo {\n ...pageInfoFull\n }\n }\n}\n \n fragment interceptEntryEdgeMeta on InterceptEntryEdge {\n __typename\n cursor\n node {\n ...interceptEntryMeta\n }\n}\n \n\n fragment interceptEntryMeta on InterceptEntry {\n __typename\n id\n request {\n ...requestMeta\n }\n}\n \n\n fragment requestMeta on Request {\n __typename\n id\n host\n port\n path\n query\n method\n edited\n isTls\n sni\n length\n alteration\n metadata {\n ...requestMetadataFull\n }\n fileExtension\n source\n createdAt\n response {\n ...responseMeta\n }\n stream {\n id\n }\n}\n \n\n fragment requestMetadataFull on RequestMetadata {\n __typename\n id\n color\n}\n \n\n fragment responseMeta on Response {\n __typename\n id\n statusCode\n roundtripTime\n length\n createdAt\n alteration\n edited\n}\n \n\n fragment pageInfoFull on PageInfo {\n __typename\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n}\n ";
@@ -23990,7 +24000,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
23990
24000
  deletedFindings(variables?: DeletedFindingsSubscriptionVariables, options?: C): AsyncIterable<DeletedFindingsSubscription>;
23991
24001
  updatedFindings(variables?: UpdatedFindingsSubscriptionVariables, options?: C): AsyncIterable<UpdatedFindingsSubscription>;
23992
24002
  createFinding(variables: CreateFindingMutationVariables, options?: C): Promise<CreateFindingMutation>;
23993
- deleteFindings(variables: DeleteFindingsMutationVariables, options?: C): Promise<DeleteFindingsMutation>;
24003
+ deleteFindings(variables?: DeleteFindingsMutationVariables, options?: C): Promise<DeleteFindingsMutation>;
23994
24004
  updateFinding(variables: UpdateFindingMutationVariables, options?: C): Promise<UpdateFindingMutation>;
23995
24005
  exportFindings(variables: ExportFindingsMutationVariables, options?: C): Promise<ExportFindingsMutation>;
23996
24006
  interceptEntries(variables?: InterceptEntriesQueryVariables, options?: C): Promise<InterceptEntriesQuery>;
@@ -3,6 +3,7 @@ export type { DialogOptions } from "./types/window";
3
3
  export type { CommandContext, CommandContextRequest, CommandContextRequestRow, CommandContextResponse, CommandContextBase, } from "./types/commands";
4
4
  export type { MenuItem } from "./types/menu";
5
5
  export { type ReplayTab, type ReplaySession, type ReplayEntry, type ReplayCollection, type SendRequestOptions, ReplaySlot, type ReplaySlotContent, type RequestSource, type CurrentReplaySessionChangeEvent, } from "./types/replay";
6
+ export { SearchSlot, type SearchSlotContent } from "./types/search";
6
7
  export type { HostedFile } from "./types/files";
7
8
  export { FilterSlot, type Filter, type FilterSlotContent, } from "./types/filter";
8
9
  export type { HTTPQL, ID, ComponentDefinition } from "./types/utils";
@@ -1,5 +1,6 @@
1
1
  import type { Extension } from "@codemirror/state";
2
2
  import type { RequestViewModeOptions } from "../types/request";
3
+ import type { SearchSlot, SearchSlotContent } from "../types/search";
3
4
  import type { HTTPQL, ID } from "../types/utils";
4
5
  /**
5
6
  * Utilities to interact with the Search page.
@@ -41,4 +42,10 @@ export type SearchSDK = {
41
42
  * @param id The ID of the request to scroll to.
42
43
  */
43
44
  scrollTo: (id: ID) => void;
45
+ /**
46
+ * Add content to a slot in the Search UI.
47
+ * @param slot The slot to add content to.
48
+ * @param content The content to add.
49
+ */
50
+ addToSlot: <T extends SearchSlot>(slot: T, content: SearchSlotContent[T]) => void;
44
51
  };
@@ -0,0 +1,15 @@
1
+ import { type ButtonSlotContent, type CommandSlotContent, type CustomSlotContent } from "./slots";
2
+ /**
3
+ * The slots in the Search UI.
4
+ * @category Search
5
+ */
6
+ export declare const SearchSlot: {
7
+ /**
8
+ * The primary slot in the search toolbar.
9
+ */
10
+ readonly ToolbarPrimary: "search-toolbar-primary";
11
+ };
12
+ export type SearchSlot = (typeof SearchSlot)[keyof typeof SearchSlot];
13
+ export type SearchSlotContent = {
14
+ [SearchSlot.ToolbarPrimary]: ButtonSlotContent | CustomSlotContent | CommandSlotContent;
15
+ };