@caido/sdk-frontend 0.42.1-beta.1 → 0.42.1-beta.3

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.42.1-beta.1",
3
+ "version": "0.42.1-beta.3",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
@@ -968,7 +968,7 @@ export type DeleteProjectPayload = {
968
968
  deletedId?: Maybe<Scalars["ID"]["output"]>;
969
969
  error?: Maybe<DeleteProjectPayloadError>;
970
970
  };
971
- export type DeleteProjectPayloadError = OtherUserError | ProjectLockedUserError;
971
+ export type DeleteProjectPayloadError = OtherUserError | ProjectUserError | UnknownIdUserError;
972
972
  export type DeleteReplaySessionCollectionPayload = {
973
973
  deletedId?: Maybe<Scalars["ID"]["output"]>;
974
974
  };
@@ -1943,22 +1943,24 @@ export type Project = {
1943
1943
  updatedAt: Scalars["DateTime"]["output"];
1944
1944
  version: Scalars["String"]["output"];
1945
1945
  };
1946
- export declare const ProjectLockedErrorReason: {
1946
+ export declare const ProjectErrorReason: {
1947
1947
  readonly Deleting: "DELETING";
1948
1948
  readonly Exporting: "EXPORTING";
1949
+ readonly InvalidVersion: "INVALID_VERSION";
1949
1950
  readonly NotReady: "NOT_READY";
1951
+ readonly TooRecent: "TOO_RECENT";
1950
1952
  };
1951
- export type ProjectLockedErrorReason = (typeof ProjectLockedErrorReason)[keyof typeof ProjectLockedErrorReason];
1952
- export type ProjectLockedUserError = UserError & {
1953
- code: Scalars["String"]["output"];
1954
- reason: ProjectLockedErrorReason;
1955
- };
1953
+ export type ProjectErrorReason = (typeof ProjectErrorReason)[keyof typeof ProjectErrorReason];
1956
1954
  export declare const ProjectStatus: {
1957
1955
  readonly Error: "ERROR";
1958
1956
  readonly Ready: "READY";
1959
1957
  readonly Restoring: "RESTORING";
1960
1958
  };
1961
1959
  export type ProjectStatus = (typeof ProjectStatus)[keyof typeof ProjectStatus];
1960
+ export type ProjectUserError = UserError & {
1961
+ code: Scalars["String"]["output"];
1962
+ reason: ProjectErrorReason;
1963
+ };
1962
1964
  export type QueryRoot = {
1963
1965
  assistantModels: Array<AssistantModel>;
1964
1966
  assistantSession?: Maybe<AssistantSession>;
@@ -2616,7 +2618,7 @@ export type SelectProjectPayload = {
2616
2618
  error?: Maybe<SelectProjectPayloadError>;
2617
2619
  project?: Maybe<Project>;
2618
2620
  };
2619
- export type SelectProjectPayloadError = OtherUserError | ProjectLockedUserError;
2621
+ export type SelectProjectPayloadError = OtherUserError | ProjectUserError | UnknownIdUserError;
2620
2622
  export type SendAssistantMessageError = OtherUserError | PermissionDeniedUserError | TaskInProgressUserError;
2621
2623
  export type SendAssistantMessagePayload = {
2622
2624
  error?: Maybe<SendAssistantMessageError>;
@@ -4284,8 +4286,8 @@ type UserErrorFull_PluginUserError_Fragment = {
4284
4286
  __typename: "PluginUserError";
4285
4287
  code: string;
4286
4288
  };
4287
- type UserErrorFull_ProjectLockedUserError_Fragment = {
4288
- __typename: "ProjectLockedUserError";
4289
+ type UserErrorFull_ProjectUserError_Fragment = {
4290
+ __typename: "ProjectUserError";
4289
4291
  code: string;
4290
4292
  };
4291
4293
  type UserErrorFull_ReadOnlyUserError_Fragment = {
@@ -4316,7 +4318,7 @@ type UserErrorFull_WorkflowUserError_Fragment = {
4316
4318
  __typename: "WorkflowUserError";
4317
4319
  code: string;
4318
4320
  };
4319
- export type UserErrorFullFragment = UserErrorFull_AliasTakenUserError_Fragment | UserErrorFull_AssistantUserError_Fragment | UserErrorFull_AuthenticationUserError_Fragment | UserErrorFull_AutomateTaskUserError_Fragment | UserErrorFull_BackupUserError_Fragment | UserErrorFull_InternalUserError_Fragment | UserErrorFull_InvalidGlobTermsUserError_Fragment | UserErrorFull_InvalidHttpqlUserError_Fragment | UserErrorFull_InvalidRegexUserError_Fragment | UserErrorFull_NameTakenUserError_Fragment | UserErrorFull_OtherUserError_Fragment | UserErrorFull_PermissionDeniedUserError_Fragment | UserErrorFull_PluginUserError_Fragment | UserErrorFull_ProjectLockedUserError_Fragment | UserErrorFull_ReadOnlyUserError_Fragment | UserErrorFull_RenderFailedUserError_Fragment | UserErrorFull_StoreUserError_Fragment | UserErrorFull_TaskInProgressUserError_Fragment | UserErrorFull_UnknownIdUserError_Fragment | UserErrorFull_UnsupportedPlatformUserError_Fragment | UserErrorFull_WorkflowUserError_Fragment;
4321
+ export type UserErrorFullFragment = UserErrorFull_AliasTakenUserError_Fragment | UserErrorFull_AssistantUserError_Fragment | UserErrorFull_AuthenticationUserError_Fragment | UserErrorFull_AutomateTaskUserError_Fragment | UserErrorFull_BackupUserError_Fragment | UserErrorFull_InternalUserError_Fragment | UserErrorFull_InvalidGlobTermsUserError_Fragment | UserErrorFull_InvalidHttpqlUserError_Fragment | UserErrorFull_InvalidRegexUserError_Fragment | UserErrorFull_NameTakenUserError_Fragment | UserErrorFull_OtherUserError_Fragment | UserErrorFull_PermissionDeniedUserError_Fragment | UserErrorFull_PluginUserError_Fragment | UserErrorFull_ProjectUserError_Fragment | UserErrorFull_ReadOnlyUserError_Fragment | UserErrorFull_RenderFailedUserError_Fragment | UserErrorFull_StoreUserError_Fragment | UserErrorFull_TaskInProgressUserError_Fragment | UserErrorFull_UnknownIdUserError_Fragment | UserErrorFull_UnsupportedPlatformUserError_Fragment | UserErrorFull_WorkflowUserError_Fragment;
4320
4322
  export type InvalidHttpqlUserErrorFullFragment = {
4321
4323
  __typename: "InvalidHTTPQLUserError";
4322
4324
  query: string;
@@ -4332,6 +4334,11 @@ export type StoreUserErrorFullFragment = {
4332
4334
  code: string;
4333
4335
  storeReason: StoreErrorReason;
4334
4336
  };
4337
+ export type ProjectUserErrorFullFragment = {
4338
+ __typename: "ProjectUserError";
4339
+ code: string;
4340
+ projectReason: ProjectErrorReason;
4341
+ };
4335
4342
  export type DataExportMetaFragment = {
4336
4343
  __typename: "DataExport";
4337
4344
  id: string;
@@ -7500,6 +7507,18 @@ export type SelectProjectMutation = {
7500
7507
  id: string;
7501
7508
  }>;
7502
7509
  } | undefined | null;
7510
+ error?: {
7511
+ __typename: "OtherUserError";
7512
+ code: string;
7513
+ } | {
7514
+ __typename: "ProjectUserError";
7515
+ code: string;
7516
+ projectReason: ProjectErrorReason;
7517
+ } | {
7518
+ __typename: "UnknownIdUserError";
7519
+ id: string;
7520
+ code: string;
7521
+ } | undefined | null;
7503
7522
  };
7504
7523
  };
7505
7524
  export type DeleteProjectMutationVariables = Exact<{
@@ -7508,6 +7527,18 @@ export type DeleteProjectMutationVariables = Exact<{
7508
7527
  export type DeleteProjectMutation = {
7509
7528
  deleteProject: {
7510
7529
  deletedId?: string | undefined | null;
7530
+ error?: {
7531
+ __typename: "OtherUserError";
7532
+ code: string;
7533
+ } | {
7534
+ __typename: "ProjectUserError";
7535
+ code: string;
7536
+ projectReason: ProjectErrorReason;
7537
+ } | {
7538
+ __typename: "UnknownIdUserError";
7539
+ id: string;
7540
+ code: string;
7541
+ } | undefined | null;
7511
7542
  };
7512
7543
  };
7513
7544
  export type RenameProjectMutationVariables = Exact<{
@@ -14283,6 +14314,7 @@ export declare const InvalidGlobTermsUserErrorFullFragmentDoc = "\n fragment
14283
14314
  export declare const InvalidHttpqlUserErrorFullFragmentDoc = "\n fragment invalidHTTPQLUserErrorFull on InvalidHTTPQLUserError {\n ...userErrorFull\n query\n}\n ";
14284
14315
  export declare const PluginUserErrorFullFragmentDoc = "\n fragment pluginUserErrorFull on PluginUserError {\n ...userErrorFull\n reason\n}\n ";
14285
14316
  export declare const StoreUserErrorFullFragmentDoc = "\n fragment storeUserErrorFull on StoreUserError {\n ...userErrorFull\n storeReason: reason\n}\n ";
14317
+ export declare const ProjectUserErrorFullFragmentDoc = "\n fragment projectUserErrorFull on ProjectUserError {\n ...userErrorFull\n projectReason: reason\n}\n ";
14286
14318
  export declare const DataExportMetaFieldsFragmentDoc = "\n fragment dataExportMetaFields on DataExport {\n __typename\n id\n name\n path\n size\n status\n format\n error\n createdAt\n}\n ";
14287
14319
  export declare const DataExportMetaFragmentDoc = "\n fragment dataExportMeta on DataExport {\n ...dataExportMetaFields\n}\n ";
14288
14320
  export declare const DataExportFullFieldsFragmentDoc = "\n fragment dataExportFullFields on DataExport {\n ...dataExportMeta\n downloadUri\n}\n ";
@@ -14405,8 +14437,8 @@ export declare const UninstallPluginPackageDocument = "\n mutation uninstallP
14405
14437
  export declare const TogglePluginDocument = "\n mutation togglePlugin($id: ID!, $enabled: Boolean!) {\n togglePlugin(id: $id, enabled: $enabled) {\n plugin {\n ... on PluginFrontend {\n ...pluginFrontendFull\n }\n ... on PluginBackend {\n ...pluginBackendFull\n }\n ... on PluginWorkflow {\n ...pluginWorkflowFull\n }\n }\n error {\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n ... on PluginUserError {\n ...pluginUserErrorFull\n }\n }\n }\n}\n \n fragment pluginFrontendFull on PluginFrontend {\n ...pluginMeta\n entrypoint\n style\n data\n backend {\n ...pluginBackendMeta\n }\n}\n \n\n fragment pluginMeta on Plugin {\n __typename\n id\n name\n enabled\n manifestId\n package {\n id\n }\n}\n \n\n fragment pluginBackendMeta on PluginBackend {\n __typename\n id\n}\n \n\n fragment pluginBackendFull on PluginBackend {\n ...pluginMeta\n runtime\n state {\n error\n running\n }\n}\n \n\n fragment pluginWorkflowFull on PluginWorkflow {\n ...pluginMeta\n name\n workflow {\n ...workflowMeta\n }\n}\n \n\n fragment workflowMeta on Workflow {\n __typename\n id\n kind\n name\n enabled\n global\n readOnly\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 \n\n fragment pluginUserErrorFull on PluginUserError {\n ...userErrorFull\n reason\n}\n ";
14406
14438
  export declare const SetPluginDataDocument = "\n mutation setPluginData($id: ID!, $data: JSON!) {\n setPluginData(id: $id, data: $data) {\n plugin {\n ... on PluginFrontend {\n ...pluginFrontendFull\n }\n ... on PluginBackend {\n ...pluginBackendFull\n }\n ... on PluginWorkflow {\n ...pluginWorkflowFull\n }\n }\n error {\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n ... on PluginUserError {\n ...pluginUserErrorFull\n }\n }\n }\n}\n \n fragment pluginFrontendFull on PluginFrontend {\n ...pluginMeta\n entrypoint\n style\n data\n backend {\n ...pluginBackendMeta\n }\n}\n \n\n fragment pluginMeta on Plugin {\n __typename\n id\n name\n enabled\n manifestId\n package {\n id\n }\n}\n \n\n fragment pluginBackendMeta on PluginBackend {\n __typename\n id\n}\n \n\n fragment pluginBackendFull on PluginBackend {\n ...pluginMeta\n runtime\n state {\n error\n running\n }\n}\n \n\n fragment pluginWorkflowFull on PluginWorkflow {\n ...pluginMeta\n name\n workflow {\n ...workflowMeta\n }\n}\n \n\n fragment workflowMeta on Workflow {\n __typename\n id\n kind\n name\n enabled\n global\n readOnly\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 \n\n fragment pluginUserErrorFull on PluginUserError {\n ...userErrorFull\n reason\n}\n ";
14407
14439
  export declare const CreateProjectDocument = "\n mutation createProject($input: CreateProjectInput!) {\n createProject(input: $input) {\n project {\n ...projectFull\n }\n error {\n ... on NameTakenUserError {\n ...nameTakenUserErrorFull\n }\n ... on PermissionDeniedUserError {\n ...permissionDeniedUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment projectFull on Project {\n __typename\n id\n name\n path\n version\n status\n size\n createdAt\n updatedAt\n backups {\n id\n }\n}\n \n\n fragment nameTakenUserErrorFull on NameTakenUserError {\n ...userErrorFull\n name\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 \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
14408
- export declare const SelectProjectDocument = "\n mutation selectProject($id: ID!) {\n selectProject(id: $id) {\n project {\n ...projectFull\n }\n }\n}\n \n fragment projectFull on Project {\n __typename\n id\n name\n path\n version\n status\n size\n createdAt\n updatedAt\n backups {\n id\n }\n}\n ";
14409
- export declare const DeleteProjectDocument = "\n mutation deleteProject($id: ID!) {\n deleteProject(id: $id) {\n deletedId\n }\n}\n ";
14440
+ export declare const SelectProjectDocument = "\n mutation selectProject($id: ID!) {\n selectProject(id: $id) {\n project {\n ...projectFull\n }\n error {\n ... on ProjectUserError {\n ...projectUserErrorFull\n }\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment projectFull on Project {\n __typename\n id\n name\n path\n version\n status\n size\n createdAt\n updatedAt\n backups {\n id\n }\n}\n \n\n fragment projectUserErrorFull on ProjectUserError {\n ...userErrorFull\n projectReason: reason\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 \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
14441
+ export declare const DeleteProjectDocument = "\n mutation deleteProject($id: ID!) {\n deleteProject(id: $id) {\n deletedId\n error {\n ... on ProjectUserError {\n ...projectUserErrorFull\n }\n ... on UnknownIdUserError {\n ...unknownIdUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment projectUserErrorFull on ProjectUserError {\n ...userErrorFull\n projectReason: reason\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 \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
14410
14442
  export declare const RenameProjectDocument = "\n mutation renameProject($id: ID!, $name: String!) {\n renameProject(id: $id, name: $name) {\n project {\n ...projectFull\n }\n error {\n ... on NameTakenUserError {\n ...nameTakenUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment projectFull on Project {\n __typename\n id\n name\n path\n version\n status\n size\n createdAt\n updatedAt\n backups {\n id\n }\n}\n \n\n fragment nameTakenUserErrorFull on NameTakenUserError {\n ...userErrorFull\n name\n}\n \n\n fragment userErrorFull on UserError {\n __typename\n code\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
14411
14443
  export declare const RenameReplaySessionCollectionDocument = "\n mutation renameReplaySessionCollection($id: ID!, $name: String!) {\n renameReplaySessionCollection(id: $id, name: $name) {\n collection {\n ...replaySessionCollectionMeta\n }\n }\n}\n \n fragment replaySessionCollectionMeta on ReplaySessionCollection {\n __typename\n id\n name\n sessions {\n ...replaySessionMeta\n }\n}\n \n\n fragment replaySessionMeta on ReplaySession {\n __typename\n id\n name\n activeEntry {\n ...replayEntryMeta\n }\n collection {\n id\n }\n entries {\n nodes {\n ...replayEntryMeta\n }\n pageInfo {\n ...pageInfoFull\n }\n count {\n ...countFull\n }\n }\n}\n \n\n fragment replayEntryMeta on ReplayEntry {\n __typename\n id\n error\n connection {\n ...connectionInfoFull\n }\n session {\n id\n }\n request {\n ...requestMeta\n }\n}\n \n\n fragment connectionInfoFull on ConnectionInfo {\n __typename\n host\n port\n isTls\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 length\n alteration\n metadata {\n ...requestMetadataFull\n }\n fileExtension\n source\n createdAt\n response {\n ...responseMeta\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 \n\n fragment countFull on Count {\n __typename\n value\n snapshot\n}\n ";
14412
14444
  export declare const CreateReplaySessionCollectionDocument = "\n mutation createReplaySessionCollection($input: CreateReplaySessionCollectionInput!) {\n createReplaySessionCollection(input: $input) {\n collection {\n ...replaySessionCollectionMeta\n }\n }\n}\n \n fragment replaySessionCollectionMeta on ReplaySessionCollection {\n __typename\n id\n name\n sessions {\n ...replaySessionMeta\n }\n}\n \n\n fragment replaySessionMeta on ReplaySession {\n __typename\n id\n name\n activeEntry {\n ...replayEntryMeta\n }\n collection {\n id\n }\n entries {\n nodes {\n ...replayEntryMeta\n }\n pageInfo {\n ...pageInfoFull\n }\n count {\n ...countFull\n }\n }\n}\n \n\n fragment replayEntryMeta on ReplayEntry {\n __typename\n id\n error\n connection {\n ...connectionInfoFull\n }\n session {\n id\n }\n request {\n ...requestMeta\n }\n}\n \n\n fragment connectionInfoFull on ConnectionInfo {\n __typename\n host\n port\n isTls\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 length\n alteration\n metadata {\n ...requestMetadataFull\n }\n fileExtension\n source\n createdAt\n response {\n ...responseMeta\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 \n\n fragment countFull on Count {\n __typename\n value\n snapshot\n}\n ";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Utilities to interact with the HTTP History page.
3
+ * @category HTTP History
4
+ */
5
+ export type HTTPHistorySDK = {
6
+ /**
7
+ * Set the HTTPQL query that will be applied on the HTTP History table results.
8
+ * @param query The HTTPQL query.
9
+ */
10
+ setQuery: (query: string) => void;
11
+ /**
12
+ * Get the current HTTPQL query.
13
+ * @returns The current HTTPQL query.
14
+ */
15
+ getQuery: () => string;
16
+ };
@@ -12,6 +12,8 @@ import type { StorageSDK } from "./storage";
12
12
  import type { UISDK } from "./ui";
13
13
  import type { WindowSDK } from "./window";
14
14
  import type { ReplaySDK } from "./replay";
15
+ import type { SearchSDK } from "./search";
16
+ import type { HTTPHistorySDK } from "./httpHistory";
15
17
  export type { CommandContext } from "./commands";
16
18
  export type { MenuItem } from "./menu";
17
19
  export type { ReplayTab, ReplaySession, ReplayCollection } from "./replay";
@@ -73,7 +75,15 @@ export type API<T extends BackendEndpoints = Record<string, never>, E extends Ba
73
75
  */
74
76
  sidebar: SidebarSDK;
75
77
  /**
76
- * Utilities to interact with Replay.
78
+ * Utilities to interact with the Replay page.
77
79
  */
78
80
  replay: ReplaySDK;
81
+ /**
82
+ * Utilities to interact with the Search page.
83
+ */
84
+ search: SearchSDK;
85
+ /**
86
+ * Utilities to interact with the HTTP History page.
87
+ */
88
+ httpHistory: HTTPHistorySDK;
79
89
  };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Utilities to interact with the Search page.
3
+ * @category Search
4
+ */
5
+ export type SearchSDK = {
6
+ /**
7
+ * Set the HTTPQL query that will be applied on the search table results.
8
+ * @param query The HTTPQL query.
9
+ */
10
+ setQuery: (query: string) => void;
11
+ /**
12
+ * Get the current HTTPQL query.
13
+ * @returns The current HTTPQL query.
14
+ */
15
+ getQuery: () => string;
16
+ };