@caido/sdk-frontend 0.56.1-beta.0 → 0.56.1-beta.2
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
|
@@ -781,6 +781,7 @@ export type CreateFilterPresetError = AliasTakenUserError | CloudUserError | Nam
|
|
|
781
781
|
export type CreateFilterPresetInput = {
|
|
782
782
|
alias: Scalars["Alias"]["input"];
|
|
783
783
|
clause: QueryInput;
|
|
784
|
+
global: Scalars["Boolean"]["input"];
|
|
784
785
|
name: Scalars["String"]["input"];
|
|
785
786
|
};
|
|
786
787
|
export type CreateFilterPresetPayload = {
|
|
@@ -821,6 +822,32 @@ export type CreateReplaySessionInput = {
|
|
|
821
822
|
export type CreateReplaySessionPayload = {
|
|
822
823
|
session?: Maybe<ReplaySession>;
|
|
823
824
|
};
|
|
825
|
+
export type CreateRequestInput = {
|
|
826
|
+
alteration: Alteration;
|
|
827
|
+
host: Scalars["String"]["input"];
|
|
828
|
+
isTls: Scalars["Boolean"]["input"];
|
|
829
|
+
method: Scalars["String"]["input"];
|
|
830
|
+
parentId?: InputMaybe<Scalars["ID"]["input"]>;
|
|
831
|
+
path: Scalars["String"]["input"];
|
|
832
|
+
port: Scalars["Int"]["input"];
|
|
833
|
+
query: Scalars["String"]["input"];
|
|
834
|
+
raw: Scalars["Blob"]["input"];
|
|
835
|
+
response?: InputMaybe<CreateResponseInput>;
|
|
836
|
+
sni?: InputMaybe<Scalars["String"]["input"]>;
|
|
837
|
+
source: Source;
|
|
838
|
+
};
|
|
839
|
+
export type CreateRequestPayload = {
|
|
840
|
+
id: Scalars["ID"]["output"];
|
|
841
|
+
responseId?: Maybe<Scalars["ID"]["output"]>;
|
|
842
|
+
};
|
|
843
|
+
export type CreateResponseInput = {
|
|
844
|
+
alteration: Alteration;
|
|
845
|
+
parentId?: InputMaybe<Scalars["ID"]["input"]>;
|
|
846
|
+
raw: Scalars["Blob"]["input"];
|
|
847
|
+
roundtripTime: Scalars["Int"]["input"];
|
|
848
|
+
source: Source;
|
|
849
|
+
statusCode: Scalars["Int"]["input"];
|
|
850
|
+
};
|
|
824
851
|
export type CreateScopeError = InvalidGlobTermsUserError | OtherUserError;
|
|
825
852
|
export type CreateScopeInput = {
|
|
826
853
|
allowlist: Array<Scalars["String"]["input"]>;
|
|
@@ -1400,6 +1427,7 @@ export type FilterClauseFindingInput = {
|
|
|
1400
1427
|
export type FilterPreset = {
|
|
1401
1428
|
alias: Scalars["Alias"]["output"];
|
|
1402
1429
|
clause: Query;
|
|
1430
|
+
global: Scalars["Boolean"]["output"];
|
|
1403
1431
|
id: Scalars["ID"]["output"];
|
|
1404
1432
|
name: Scalars["String"]["output"];
|
|
1405
1433
|
};
|
|
@@ -1807,6 +1835,7 @@ export type MutationRoot = {
|
|
|
1807
1835
|
createProject: CreateProjectPayload;
|
|
1808
1836
|
createReplaySession: CreateReplaySessionPayload;
|
|
1809
1837
|
createReplaySessionCollection: CreateReplaySessionCollectionPayload;
|
|
1838
|
+
createRequest: CreateRequestPayload;
|
|
1810
1839
|
createScope: CreateScopePayload;
|
|
1811
1840
|
createSitemapEntries: CreateSitemapEntriesPayload;
|
|
1812
1841
|
createTamperRule: CreateTamperRulePayload;
|
|
@@ -1989,6 +2018,9 @@ export type MutationRootCreateReplaySessionArgs = {
|
|
|
1989
2018
|
export type MutationRootCreateReplaySessionCollectionArgs = {
|
|
1990
2019
|
input: CreateReplaySessionCollectionInput;
|
|
1991
2020
|
};
|
|
2021
|
+
export type MutationRootCreateRequestArgs = {
|
|
2022
|
+
input: CreateRequestInput;
|
|
2023
|
+
};
|
|
1992
2024
|
export type MutationRootCreateScopeArgs = {
|
|
1993
2025
|
input: CreateScopeInput;
|
|
1994
2026
|
};
|
|
@@ -2648,6 +2680,7 @@ export type QueryRoot = {
|
|
|
2648
2680
|
projects: Array<Project>;
|
|
2649
2681
|
replayEntry?: Maybe<ReplayEntry>;
|
|
2650
2682
|
replaySession?: Maybe<ReplaySession>;
|
|
2683
|
+
replaySessionCollection?: Maybe<ReplaySessionCollection>;
|
|
2651
2684
|
replaySessionCollections: ReplaySessionCollectionConnection;
|
|
2652
2685
|
replaySessions: ReplaySessionConnection;
|
|
2653
2686
|
replayTasks: Array<ReplayTask>;
|
|
@@ -2771,6 +2804,9 @@ export type QueryRootReplayEntryArgs = {
|
|
|
2771
2804
|
export type QueryRootReplaySessionArgs = {
|
|
2772
2805
|
id: Scalars["ID"]["input"];
|
|
2773
2806
|
};
|
|
2807
|
+
export type QueryRootReplaySessionCollectionArgs = {
|
|
2808
|
+
id: Scalars["ID"]["input"];
|
|
2809
|
+
};
|
|
2774
2810
|
export type QueryRootReplaySessionCollectionsArgs = {
|
|
2775
2811
|
after?: InputMaybe<Scalars["String"]["input"]>;
|
|
2776
2812
|
before?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -4713,6 +4749,7 @@ export type UpdateFilterPresetError = AliasTakenUserError | NameTakenUserError |
|
|
|
4713
4749
|
export type UpdateFilterPresetInput = {
|
|
4714
4750
|
alias: Scalars["Alias"]["input"];
|
|
4715
4751
|
clause: QueryInput;
|
|
4752
|
+
global: Scalars["Boolean"]["input"];
|
|
4716
4753
|
name: Scalars["String"]["input"];
|
|
4717
4754
|
};
|
|
4718
4755
|
export type UpdateFilterPresetPayload = {
|
|
@@ -9354,6 +9391,7 @@ export type FilterPresetFullFragment = {
|
|
|
9354
9391
|
id: string;
|
|
9355
9392
|
alias: string;
|
|
9356
9393
|
name: string;
|
|
9394
|
+
global: boolean;
|
|
9357
9395
|
clause: {
|
|
9358
9396
|
__typename: "HTTPQL";
|
|
9359
9397
|
code: string;
|
|
@@ -9369,6 +9407,7 @@ export type FilterPresetEdgeFullFragment = {
|
|
|
9369
9407
|
id: string;
|
|
9370
9408
|
alias: string;
|
|
9371
9409
|
name: string;
|
|
9410
|
+
global: boolean;
|
|
9372
9411
|
clause: {
|
|
9373
9412
|
__typename: "HTTPQL";
|
|
9374
9413
|
code: string;
|
|
@@ -9388,6 +9427,7 @@ export type CreateFilterPresetMutation = {
|
|
|
9388
9427
|
id: string;
|
|
9389
9428
|
alias: string;
|
|
9390
9429
|
name: string;
|
|
9430
|
+
global: boolean;
|
|
9391
9431
|
clause: {
|
|
9392
9432
|
__typename: "HTTPQL";
|
|
9393
9433
|
code: string;
|
|
@@ -9429,6 +9469,7 @@ export type UpdateFilterPresetMutation = {
|
|
|
9429
9469
|
id: string;
|
|
9430
9470
|
alias: string;
|
|
9431
9471
|
name: string;
|
|
9472
|
+
global: boolean;
|
|
9432
9473
|
clause: {
|
|
9433
9474
|
__typename: "HTTPQL";
|
|
9434
9475
|
code: string;
|
|
@@ -9468,6 +9509,7 @@ export type FilterPresetsQuery = {
|
|
|
9468
9509
|
id: string;
|
|
9469
9510
|
alias: string;
|
|
9470
9511
|
name: string;
|
|
9512
|
+
global: boolean;
|
|
9471
9513
|
clause: {
|
|
9472
9514
|
__typename: "HTTPQL";
|
|
9473
9515
|
code: string;
|
|
@@ -9486,6 +9528,7 @@ export type FilterPresetQuery = {
|
|
|
9486
9528
|
id: string;
|
|
9487
9529
|
alias: string;
|
|
9488
9530
|
name: string;
|
|
9531
|
+
global: boolean;
|
|
9489
9532
|
clause: {
|
|
9490
9533
|
__typename: "HTTPQL";
|
|
9491
9534
|
code: string;
|
|
@@ -9507,6 +9550,7 @@ export type CreatedFilterPresetSubscription = {
|
|
|
9507
9550
|
id: string;
|
|
9508
9551
|
alias: string;
|
|
9509
9552
|
name: string;
|
|
9553
|
+
global: boolean;
|
|
9510
9554
|
clause: {
|
|
9511
9555
|
__typename: "HTTPQL";
|
|
9512
9556
|
code: string;
|
|
@@ -9530,6 +9574,7 @@ export type UpdatedFilterPresetSubscription = {
|
|
|
9530
9574
|
id: string;
|
|
9531
9575
|
alias: string;
|
|
9532
9576
|
name: string;
|
|
9577
|
+
global: boolean;
|
|
9533
9578
|
clause: {
|
|
9534
9579
|
__typename: "HTTPQL";
|
|
9535
9580
|
code: string;
|
|
@@ -37831,7 +37876,7 @@ export declare const DataExportTaskMetaFieldsFragmentDoc = "\n fragment dataE
|
|
|
37831
37876
|
export declare const DataExportTaskMetaFragmentDoc = "\n fragment dataExportTaskMeta on DataExportTask {\n ...dataExportTaskMetaFields\n}\n ";
|
|
37832
37877
|
export declare const HttpqlQueryFullFragmentDoc = "\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n ";
|
|
37833
37878
|
export declare const StreamQlQueryFullFragmentDoc = "\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
37834
|
-
export declare const FilterPresetFullFragmentDoc = "\n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n ";
|
|
37879
|
+
export declare const FilterPresetFullFragmentDoc = "\n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n global\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n ";
|
|
37835
37880
|
export declare const FilterPresetEdgeFullFragmentDoc = "\n fragment filterPresetEdgeFull on FilterPresetEdge {\n cursor\n node {\n ...filterPresetFull\n }\n}\n ";
|
|
37836
37881
|
export declare const FindingMetaFragmentDoc = "\n fragment findingMeta on Finding {\n id\n title\n reporter\n host\n path\n createdAt\n request {\n ...requestMeta\n }\n}\n ";
|
|
37837
37882
|
export declare const FindingEdgeMetaFragmentDoc = "\n fragment findingEdgeMeta on FindingEdge {\n cursor\n node {\n ...findingMeta\n }\n}\n ";
|
|
@@ -38056,13 +38101,13 @@ export declare const DataExportDocument = "\n query dataExport($id: ID!) {\n
|
|
|
38056
38101
|
export declare const CreatedDataExportDocument = "\n subscription createdDataExport {\n createdDataExport {\n dataExportEdge {\n cursor\n node {\n __typename\n ... on DataExportStored {\n ...dataExportStoredFullFields\n }\n }\n }\n snapshot\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 ";
|
|
38057
38102
|
export declare const UpdatedDataExportDocument = "\n subscription updatedDataExport {\n updatedDataExport {\n dataExportEdge {\n cursor\n node {\n __typename\n ... on DataExportStored {\n ...dataExportStoredFullFields\n }\n }\n }\n snapshot\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 ";
|
|
38058
38103
|
export declare const DeletedDataExportDocument = "\n subscription deletedDataExport {\n deletedDataExport {\n deletedDataExportId\n snapshot\n }\n}\n ";
|
|
38059
|
-
export declare const CreateFilterPresetDocument = "\n mutation createFilterPreset($input: CreateFilterPresetInput!) {\n createFilterPreset(input: $input) {\n filter {\n ...filterPresetFull\n }\n error {\n ... on NameTakenUserError {\n ...nameTakenUserErrorFull\n }\n ... on AliasTakenUserError {\n ...aliasTakenUserErrorFull\n }\n ... on PermissionDeniedUserError {\n ...permissionDeniedUserErrorFull\n }\n ... on CloudUserError {\n ...cloudUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\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 aliasTakenUserErrorFull on AliasTakenUserError {\n ...userErrorFull\n alias\n}\n \n\n fragment permissionDeniedUserErrorFull on PermissionDeniedUserError {\n ...userErrorFull\n permissionDeniedReason: reason\n}\n \n\n fragment cloudUserErrorFull on CloudUserError {\n ...userErrorFull\n cloudReason: reason\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
|
|
38060
|
-
export declare const UpdateFilterPresetDocument = "\n mutation updateFilterPreset($id: ID!, $input: UpdateFilterPresetInput!) {\n updateFilterPreset(id: $id, input: $input) {\n filter {\n ...filterPresetFull\n }\n error {\n ... on NameTakenUserError {\n ...nameTakenUserErrorFull\n }\n ... on AliasTakenUserError {\n ...aliasTakenUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\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 aliasTakenUserErrorFull on AliasTakenUserError {\n ...userErrorFull\n alias\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
|
|
38104
|
+
export declare const CreateFilterPresetDocument = "\n mutation createFilterPreset($input: CreateFilterPresetInput!) {\n createFilterPreset(input: $input) {\n filter {\n ...filterPresetFull\n }\n error {\n ... on NameTakenUserError {\n ...nameTakenUserErrorFull\n }\n ... on AliasTakenUserError {\n ...aliasTakenUserErrorFull\n }\n ... on PermissionDeniedUserError {\n ...permissionDeniedUserErrorFull\n }\n ... on CloudUserError {\n ...cloudUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n global\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\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 aliasTakenUserErrorFull on AliasTakenUserError {\n ...userErrorFull\n alias\n}\n \n\n fragment permissionDeniedUserErrorFull on PermissionDeniedUserError {\n ...userErrorFull\n permissionDeniedReason: reason\n}\n \n\n fragment cloudUserErrorFull on CloudUserError {\n ...userErrorFull\n cloudReason: reason\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
|
|
38105
|
+
export declare const UpdateFilterPresetDocument = "\n mutation updateFilterPreset($id: ID!, $input: UpdateFilterPresetInput!) {\n updateFilterPreset(id: $id, input: $input) {\n filter {\n ...filterPresetFull\n }\n error {\n ... on NameTakenUserError {\n ...nameTakenUserErrorFull\n }\n ... on AliasTakenUserError {\n ...aliasTakenUserErrorFull\n }\n ... on OtherUserError {\n ...otherUserErrorFull\n }\n }\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n global\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\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 aliasTakenUserErrorFull on AliasTakenUserError {\n ...userErrorFull\n alias\n}\n \n\n fragment otherUserErrorFull on OtherUserError {\n ...userErrorFull\n}\n ";
|
|
38061
38106
|
export declare const DeleteFilterPresetDocument = "\n mutation deleteFilterPreset($id: ID!) {\n deleteFilterPreset(id: $id) {\n deletedId\n }\n}\n ";
|
|
38062
|
-
export declare const FilterPresetsDocument = "\n query filterPresets {\n filterPresets {\n ...filterPresetFull\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38063
|
-
export declare const FilterPresetDocument = "\n query filterPreset($id: ID!) {\n filterPreset(id: $id) {\n ...filterPresetFull\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38064
|
-
export declare const CreatedFilterPresetDocument = "\n subscription createdFilterPreset {\n createdFilterPreset {\n filterEdge {\n ...filterPresetEdgeFull\n }\n }\n}\n \n fragment filterPresetEdgeFull on FilterPresetEdge {\n cursor\n node {\n ...filterPresetFull\n }\n}\n \n\n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38065
|
-
export declare const UpdatedFilterPresetDocument = "\n subscription updatedFilterPreset {\n updatedFilterPreset {\n filterEdge {\n ...filterPresetEdgeFull\n }\n }\n}\n \n fragment filterPresetEdgeFull on FilterPresetEdge {\n cursor\n node {\n ...filterPresetFull\n }\n}\n \n\n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38107
|
+
export declare const FilterPresetsDocument = "\n query filterPresets {\n filterPresets {\n ...filterPresetFull\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n global\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38108
|
+
export declare const FilterPresetDocument = "\n query filterPreset($id: ID!) {\n filterPreset(id: $id) {\n ...filterPresetFull\n }\n}\n \n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n global\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38109
|
+
export declare const CreatedFilterPresetDocument = "\n subscription createdFilterPreset {\n createdFilterPreset {\n filterEdge {\n ...filterPresetEdgeFull\n }\n }\n}\n \n fragment filterPresetEdgeFull on FilterPresetEdge {\n cursor\n node {\n ...filterPresetFull\n }\n}\n \n\n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n global\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38110
|
+
export declare const UpdatedFilterPresetDocument = "\n subscription updatedFilterPreset {\n updatedFilterPreset {\n filterEdge {\n ...filterPresetEdgeFull\n }\n }\n}\n \n fragment filterPresetEdgeFull on FilterPresetEdge {\n cursor\n node {\n ...filterPresetFull\n }\n}\n \n\n fragment filterPresetFull on FilterPreset {\n __typename\n id\n alias\n name\n global\n clause {\n ... on HTTPQL {\n ...HTTPQLQueryFull\n }\n ... on StreamQL {\n ...StreamQLQueryFull\n }\n }\n}\n \n\n fragment HTTPQLQueryFull on HTTPQL {\n __typename\n code\n}\n \n\n fragment StreamQLQueryFull on StreamQL {\n __typename\n code\n}\n ";
|
|
38066
38111
|
export declare const DeletedFilterPresetDocument = "\n subscription deletedFilterPreset {\n deletedFilterPreset {\n deletedFilterId\n }\n}\n ";
|
|
38067
38112
|
export declare const GetFindingDocument = "\n query getFinding($id: ID!) {\n finding(id: $id) {\n ...findingFull\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 ";
|
|
38068
38113
|
export declare const GetFindingsBeforeDocument = "\n query getFindingsBefore($before: String!, $last: Int!, $filter: FilterClauseFindingInput!, $order: FindingOrderInput!) {\n findings(before: $before, last: $last, filter: $filter, order: $order) {\n edges {\n ...findingEdgeMeta\n }\n pageInfo {\n ...pageInfoFull\n }\n snapshot\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 \n\n fragment pageInfoFull on PageInfo {\n __typename\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n}\n ";
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { type BackendEndpoints, type BackendEvents } from "../types/backend";
|
|
1
|
+
import { type BackendEndpoints, type BackendEvents, type BackendSpec } from "../types/backend";
|
|
2
2
|
import type { PromisifiedReturnType } from "../types/utils";
|
|
3
|
+
type ResolvedAPI<T> = T extends {
|
|
4
|
+
api: infer A;
|
|
5
|
+
} ? A : T;
|
|
6
|
+
type ResolvedEvents<T, E> = T extends {
|
|
7
|
+
events: infer A;
|
|
8
|
+
} ? A : E;
|
|
3
9
|
/**
|
|
4
10
|
* Utilities to interact with the backend plugin.
|
|
5
11
|
* @category Backend
|
|
6
12
|
*/
|
|
7
|
-
export type BackendSDK<T extends BackendEndpoints, E extends BackendEvents> = {
|
|
8
|
-
[K in keyof T]: (...args: Parameters<T[K]>) => PromisifiedReturnType<T[K]>;
|
|
13
|
+
export type BackendSDK<T extends BackendEndpoints | BackendSpec, E extends BackendEvents> = {
|
|
14
|
+
[K in keyof ResolvedAPI<T>]: (...args: Parameters<ResolvedAPI<T>[K]>) => PromisifiedReturnType<ResolvedAPI<T>[K]>;
|
|
9
15
|
} & {
|
|
10
16
|
/**
|
|
11
17
|
* Subscribe to a backend event.
|
|
@@ -13,7 +19,8 @@ export type BackendSDK<T extends BackendEndpoints, E extends BackendEvents> = {
|
|
|
13
19
|
* @param callback The callback to call when the event is emitted.
|
|
14
20
|
* @returns An object with a `stop` method that can be called to stop listening to the event.
|
|
15
21
|
*/
|
|
16
|
-
onEvent: <K extends keyof E
|
|
22
|
+
onEvent: <K extends keyof ResolvedEvents<T, E>>(event: K, callback: ResolvedEvents<T, E>[K]) => {
|
|
17
23
|
stop: () => void;
|
|
18
24
|
};
|
|
19
25
|
};
|
|
26
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Sdk as GraphqlSDK } from "../__generated__/graphql-sdk";
|
|
2
2
|
import type { _AnalyticsSDK } from "../private/analytics";
|
|
3
|
-
import { type BackendEndpoints, type BackendEvents } from "../types/backend";
|
|
3
|
+
import { type BackendEndpoints, type BackendEvents, type BackendSpec } from "../types/backend";
|
|
4
4
|
import type { AiSDK } from "./ai";
|
|
5
5
|
import type { AssetsSDK } from "./assets";
|
|
6
6
|
import type { AutomateSDK } from "./automate";
|
|
@@ -36,7 +36,7 @@ import type { WorkflowSDK } from "./workflows";
|
|
|
36
36
|
* Utilities for frontend plugins.
|
|
37
37
|
* @category SDK
|
|
38
38
|
*/
|
|
39
|
-
export type API<T extends BackendEndpoints = Record<string, never>, E extends BackendEvents = Record<string, never>> = {
|
|
39
|
+
export type API<T extends BackendEndpoints | BackendSpec = Record<string, never>, E extends BackendEvents = Record<string, never>> = {
|
|
40
40
|
/**
|
|
41
41
|
* Utilities to interact with the GraphQL API.
|
|
42
42
|
*/
|
|
@@ -12,3 +12,11 @@ export type BackendEndpoints = {
|
|
|
12
12
|
export type BackendEvents = {
|
|
13
13
|
[key: string]: (...args: any[]) => void;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* A specification for the backend plugin.
|
|
17
|
+
* @category Backend
|
|
18
|
+
*/
|
|
19
|
+
export type BackendSpec = {
|
|
20
|
+
api: BackendEndpoints;
|
|
21
|
+
events: BackendEvents;
|
|
22
|
+
};
|