@caido/sdk-frontend 0.44.2-beta.8 → 0.45.0

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.44.2-beta.8",
3
+ "version": "v0.45.0",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
@@ -8770,9 +8770,11 @@ export type InterceptMessageMetaFragment = InterceptMessageMeta_InterceptRequest
8770
8770
  export type InterceptOptionsMetaFragment = {
8771
8771
  request: {
8772
8772
  enabled: boolean;
8773
+ filter?: string | undefined | null;
8773
8774
  };
8774
8775
  response: {
8775
8776
  enabled: boolean;
8777
+ filter?: string | undefined | null;
8776
8778
  };
8777
8779
  scope?: {
8778
8780
  scopeId: string;
@@ -8780,9 +8782,11 @@ export type InterceptOptionsMetaFragment = {
8780
8782
  };
8781
8783
  export type InterceptRequestOptionsMetaFragment = {
8782
8784
  enabled: boolean;
8785
+ filter?: string | undefined | null;
8783
8786
  };
8784
8787
  export type InterceptResponseOptionsMetaFragment = {
8785
8788
  enabled: boolean;
8789
+ filter?: string | undefined | null;
8786
8790
  };
8787
8791
  export type InterceptScopeOptionsMetaFragment = {
8788
8792
  scopeId: string;
@@ -8812,9 +8816,11 @@ export type SetInterceptOptionsMutation = {
8812
8816
  options: {
8813
8817
  request: {
8814
8818
  enabled: boolean;
8819
+ filter?: string | undefined | null;
8815
8820
  };
8816
8821
  response: {
8817
8822
  enabled: boolean;
8823
+ filter?: string | undefined | null;
8818
8824
  };
8819
8825
  scope?: {
8820
8826
  scopeId: string;
@@ -9021,9 +9027,11 @@ export type InterceptOptionsQuery = {
9021
9027
  interceptOptions: {
9022
9028
  request: {
9023
9029
  enabled: boolean;
9030
+ filter?: string | undefined | null;
9024
9031
  };
9025
9032
  response: {
9026
9033
  enabled: boolean;
9034
+ filter?: string | undefined | null;
9027
9035
  };
9028
9036
  scope?: {
9029
9037
  scopeId: string;
@@ -9135,9 +9143,11 @@ export type UpdatedInterceptOptionsSubscription = {
9135
9143
  options: {
9136
9144
  request: {
9137
9145
  enabled: boolean;
9146
+ filter?: string | undefined | null;
9138
9147
  };
9139
9148
  response: {
9140
9149
  enabled: boolean;
9150
+ filter?: string | undefined | null;
9141
9151
  };
9142
9152
  scope?: {
9143
9153
  scopeId: string;
@@ -15680,8 +15690,8 @@ export declare const HostedFileFullFragmentDoc = "\n fragment hostedFileFull
15680
15690
  export declare const InterceptRequestMessageMetaFragmentDoc = "\n fragment interceptRequestMessageMeta on InterceptRequestMessage {\n __typename\n id\n request {\n ...requestMeta\n }\n}\n ";
15681
15691
  export declare const InterceptResponseMessageMetaFragmentDoc = "\n fragment interceptResponseMessageMeta on InterceptResponseMessage {\n __typename\n id\n response {\n ...responseMeta\n }\n request {\n ...requestMeta\n }\n}\n ";
15682
15692
  export declare const InterceptMessageMetaFragmentDoc = "\n fragment interceptMessageMeta on InterceptMessage {\n __typename\n ... on InterceptRequestMessage {\n ...interceptRequestMessageMeta\n }\n ... on InterceptResponseMessage {\n ...interceptResponseMessageMeta\n }\n}\n ";
15683
- export declare const InterceptRequestOptionsMetaFragmentDoc = "\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n}\n ";
15684
- export declare const InterceptResponseOptionsMetaFragmentDoc = "\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n}\n ";
15693
+ export declare const InterceptRequestOptionsMetaFragmentDoc = "\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n filter\n}\n ";
15694
+ export declare const InterceptResponseOptionsMetaFragmentDoc = "\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n filter\n}\n ";
15685
15695
  export declare const InterceptScopeOptionsMetaFragmentDoc = "\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
15686
15696
  export declare const InterceptOptionsMetaFragmentDoc = "\n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n ";
15687
15697
  export declare const TamperRuleFullFragmentDoc = "\n fragment tamperRuleFull on TamperRule {\n __typename\n id\n isEnabled\n isRegex\n name\n matchTerm\n replaceTerm\n strategy\n rank\n condition\n collection {\n id\n }\n}\n ";
@@ -15858,15 +15868,15 @@ export declare const UploadHostedFileDocument = "\n mutation uploadHostedFile
15858
15868
  export declare const HostedFilesDocument = "\n query hostedFiles {\n hostedFiles {\n ...hostedFileFull\n }\n}\n \n fragment hostedFileFull on HostedFile {\n __typename\n id\n name\n path\n size\n updatedAt\n createdAt\n}\n ";
15859
15869
  export declare const ForwardInterceptMessageDocument = "\n mutation forwardInterceptMessage($id: ID!, $input: ForwardInterceptMessageInput) {\n forwardInterceptMessage(id: $id, input: $input) {\n forwardedId\n }\n}\n ";
15860
15870
  export declare const DropInterceptMesageDocument = "\n mutation dropInterceptMesage($id: ID!) {\n dropInterceptMessage(id: $id) {\n droppedId\n }\n}\n ";
15861
- export declare const SetInterceptOptionsDocument = "\n mutation setInterceptOptions($input: InterceptOptionsInput!) {\n setInterceptOptions(input: $input) {\n options {\n ...interceptOptionsMeta\n }\n }\n}\n \n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n \n\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n}\n \n\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n}\n \n\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
15871
+ export declare const SetInterceptOptionsDocument = "\n mutation setInterceptOptions($input: InterceptOptionsInput!) {\n setInterceptOptions(input: $input) {\n options {\n ...interceptOptionsMeta\n }\n }\n}\n \n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n \n\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n filter\n}\n \n\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n filter\n}\n \n\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
15862
15872
  export declare const PauseInterceptDocument = "\n mutation pauseIntercept {\n pauseIntercept {\n status\n }\n}\n ";
15863
15873
  export declare const ResumeInterceptDocument = "\n mutation resumeIntercept {\n resumeIntercept {\n status\n }\n}\n ";
15864
15874
  export declare const InterceptRequestMessagesDocument = "\n query interceptRequestMessages($first: Int!) {\n interceptMessages(first: $first, kind: REQUEST) {\n nodes {\n ...interceptMessageMeta\n }\n }\n}\n \n fragment interceptMessageMeta on InterceptMessage {\n __typename\n ... on InterceptRequestMessage {\n ...interceptRequestMessageMeta\n }\n ... on InterceptResponseMessage {\n ...interceptResponseMessageMeta\n }\n}\n \n\n fragment interceptRequestMessageMeta on InterceptRequestMessage {\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}\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 interceptResponseMessageMeta on InterceptResponseMessage {\n __typename\n id\n response {\n ...responseMeta\n }\n request {\n ...requestMeta\n }\n}\n ";
15865
15875
  export declare const InterceptResponseMessagesDocument = "\n query interceptResponseMessages($first: Int!) {\n interceptMessages(first: $first, kind: RESPONSE) {\n nodes {\n ...interceptMessageMeta\n }\n }\n}\n \n fragment interceptMessageMeta on InterceptMessage {\n __typename\n ... on InterceptRequestMessage {\n ...interceptRequestMessageMeta\n }\n ... on InterceptResponseMessage {\n ...interceptResponseMessageMeta\n }\n}\n \n\n fragment interceptRequestMessageMeta on InterceptRequestMessage {\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}\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 interceptResponseMessageMeta on InterceptResponseMessage {\n __typename\n id\n response {\n ...responseMeta\n }\n request {\n ...requestMeta\n }\n}\n ";
15866
- export declare const InterceptOptionsDocument = "\n query interceptOptions {\n interceptOptions {\n ...interceptOptionsMeta\n }\n}\n \n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n \n\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n}\n \n\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n}\n \n\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
15876
+ export declare const InterceptOptionsDocument = "\n query interceptOptions {\n interceptOptions {\n ...interceptOptionsMeta\n }\n}\n \n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n \n\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n filter\n}\n \n\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n filter\n}\n \n\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
15867
15877
  export declare const InterceptStatusDocument = "\n query interceptStatus {\n interceptStatus\n}\n ";
15868
15878
  export declare const CreatedInterceptMessageDocument = "\n subscription createdInterceptMessage {\n createdInterceptMessage {\n messageEdge {\n node {\n ...interceptMessageMeta\n }\n }\n snapshot\n }\n}\n \n fragment interceptMessageMeta on InterceptMessage {\n __typename\n ... on InterceptRequestMessage {\n ...interceptRequestMessageMeta\n }\n ... on InterceptResponseMessage {\n ...interceptResponseMessageMeta\n }\n}\n \n\n fragment interceptRequestMessageMeta on InterceptRequestMessage {\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}\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 interceptResponseMessageMeta on InterceptResponseMessage {\n __typename\n id\n response {\n ...responseMeta\n }\n request {\n ...requestMeta\n }\n}\n ";
15869
- export declare const UpdatedInterceptOptionsDocument = "\n subscription updatedInterceptOptions {\n updatedInterceptOptions {\n options {\n ...interceptOptionsMeta\n }\n }\n}\n \n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n \n\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n}\n \n\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n}\n \n\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
15879
+ export declare const UpdatedInterceptOptionsDocument = "\n subscription updatedInterceptOptions {\n updatedInterceptOptions {\n options {\n ...interceptOptionsMeta\n }\n }\n}\n \n fragment interceptOptionsMeta on InterceptOptions {\n request {\n ...interceptRequestOptionsMeta\n }\n response {\n ...interceptResponseOptionsMeta\n }\n scope {\n ...interceptScopeOptionsMeta\n }\n}\n \n\n fragment interceptRequestOptionsMeta on InterceptRequestOptions {\n enabled\n filter\n}\n \n\n fragment interceptResponseOptionsMeta on InterceptResponseOptions {\n enabled\n filter\n}\n \n\n fragment interceptScopeOptionsMeta on InterceptScopeOptions {\n scopeId\n}\n ";
15870
15880
  export declare const TamperRuleCollectionsDocument = "\n query tamperRuleCollections {\n tamperRuleCollections {\n nodes {\n ...tamperRuleCollectionFull\n }\n pageInfo {\n ...pageInfoFull\n }\n snapshot\n }\n}\n \n fragment tamperRuleCollectionFull on TamperRuleCollection {\n __typename\n id\n name\n rules {\n ...tamperRuleFull\n }\n}\n \n\n fragment tamperRuleFull on TamperRule {\n __typename\n id\n isEnabled\n isRegex\n name\n matchTerm\n replaceTerm\n strategy\n rank\n condition\n collection {\n id\n }\n}\n \n\n fragment pageInfoFull on PageInfo {\n __typename\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n}\n ";
15871
15881
  export declare const RenameTamperRuleCollectionDocument = "\n mutation renameTamperRuleCollection($id: ID!, $name: String!) {\n renameTamperRuleCollection(id: $id, name: $name) {\n collection {\n ...tamperRuleCollectionFull\n }\n }\n}\n \n fragment tamperRuleCollectionFull on TamperRuleCollection {\n __typename\n id\n name\n rules {\n ...tamperRuleFull\n }\n}\n \n\n fragment tamperRuleFull on TamperRule {\n __typename\n id\n isEnabled\n isRegex\n name\n matchTerm\n replaceTerm\n strategy\n rank\n condition\n collection {\n id\n }\n}\n ";
15872
15882
  export declare const CreateTamperRuleCollectionDocument = "\n mutation createTamperRuleCollection($input: CreateTamperRuleCollectionInput!) {\n createTamperRuleCollection(input: $input) {\n collection {\n ...tamperRuleCollectionFull\n }\n }\n}\n \n fragment tamperRuleCollectionFull on TamperRuleCollection {\n __typename\n id\n name\n rules {\n ...tamperRuleFull\n }\n}\n \n\n fragment tamperRuleFull on TamperRule {\n __typename\n id\n isEnabled\n isRegex\n name\n matchTerm\n replaceTerm\n strategy\n rank\n condition\n collection {\n id\n }\n}\n ";
@@ -9,4 +9,23 @@ export type EnvironmentSDK = {
9
9
  * @returns The value of the environment variable.
10
10
  */
11
11
  getVar: (name: string) => string | undefined;
12
+ /**
13
+ * Get all environment variables available in the global environment and the selected environment.
14
+ * @returns All environment variables.
15
+ */
16
+ getVars: () => EnvironmentVariable[];
17
+ };
18
+ export type EnvironmentVariable = {
19
+ /**
20
+ * The name of the environment variable.
21
+ */
22
+ name: string;
23
+ /**
24
+ * The value of the environment variable.
25
+ */
26
+ value: string;
27
+ /**
28
+ * Whether the environment variable is a secret.
29
+ */
30
+ isSecret: boolean;
12
31
  };
@@ -1,4 +1,4 @@
1
- import type { HTTPQL } from "./utils";
1
+ import type { HTTPQL, ID } from "./utils";
2
2
  /**
3
3
  * Utilities to interact with the HTTP History page.
4
4
  * @category HTTP History
@@ -14,4 +14,14 @@ export type HTTPHistorySDK = {
14
14
  * @returns The current HTTPQL query.
15
15
  */
16
16
  getQuery: () => HTTPQL;
17
+ /**
18
+ * Get the current scope ID.
19
+ * @returns The current scope ID.
20
+ */
21
+ getScopeId: () => ID | undefined;
22
+ /**
23
+ * Set the current scope.
24
+ * @param id The ID of the scope to set.
25
+ */
26
+ setScope: (id: ID | undefined) => Promise<void>;
17
27
  };
@@ -7,6 +7,7 @@ import type { FilesSDK } from "./files";
7
7
  import type { FiltersSDK } from "./filters";
8
8
  import type { FindingsSDK } from "./findings";
9
9
  import type { HTTPHistorySDK } from "./httpHistory";
10
+ import type { InterceptSDK } from "./intercept";
10
11
  import type { MatchReplaceSDK } from "./matchReplace";
11
12
  import type { MenuSDK } from "./menu";
12
13
  import type { NavigationSDK } from "./navigation";
@@ -15,6 +16,7 @@ import type { ScopesSDK } from "./scopes";
15
16
  import type { SearchSDK } from "./search";
16
17
  import type { ShortcutsSDK } from "./shortcuts";
17
18
  import type { SidebarSDK } from "./sidebar";
19
+ import type { SitemapSDK } from "./sitemap";
18
20
  import type { StorageSDK } from "./storage";
19
21
  import type { UISDK } from "./ui";
20
22
  import type { WindowSDK } from "./window";
@@ -25,6 +27,8 @@ export type { HostedFile } from "./files";
25
27
  export type { Filter } from "./filters";
26
28
  export type { HTTPQL, ID } from "./utils";
27
29
  export type { MatchReplaceRule, MatchReplaceCollection, MatchReplaceStrategy, } from "./matchReplace";
30
+ export type { Scope } from "./scopes";
31
+ export type { EnvironmentVariable } from "./environment";
28
32
  /**
29
33
  * Utilities for frontend plugins.
30
34
  * @category SDK
@@ -110,4 +114,12 @@ export type API<T extends BackendEndpoints = Record<string, never>, E extends Ba
110
114
  * Utilities to interact with the environment.
111
115
  */
112
116
  env: EnvironmentSDK;
117
+ /**
118
+ * Utilities to interact with the Sitemap page.
119
+ */
120
+ sitemap: SitemapSDK;
121
+ /**
122
+ * Utilities to interact with the Intercept page.
123
+ */
124
+ intercept: InterceptSDK;
113
125
  };
@@ -0,0 +1,17 @@
1
+ import type { ID } from "./utils";
2
+ /**
3
+ * Utilities to interact with the Intercept page.
4
+ * @category Intercept
5
+ */
6
+ export type InterceptSDK = {
7
+ /**
8
+ * Get the current scope ID.
9
+ * @returns The current scope ID.
10
+ */
11
+ getScopeId: () => ID | undefined;
12
+ /**
13
+ * Set the current scope.
14
+ * @param scopeId The ID of the scope to set.
15
+ */
16
+ setScope: (id: ID | undefined) => void;
17
+ };
@@ -56,7 +56,7 @@ export type ScopesSDK = {
56
56
  * Represents a scope.
57
57
  * @category Scopes
58
58
  */
59
- type Scope = {
59
+ export type Scope = {
60
60
  /**
61
61
  * The unique ID of the scope.
62
62
  */
@@ -74,4 +74,3 @@ type Scope = {
74
74
  */
75
75
  denylist: string[];
76
76
  };
77
- export {};
@@ -1,4 +1,4 @@
1
- import type { HTTPQL } from "./utils";
1
+ import type { HTTPQL, ID } from "./utils";
2
2
  /**
3
3
  * Utilities to interact with the Search page.
4
4
  * @category Search
@@ -14,4 +14,14 @@ export type SearchSDK = {
14
14
  * @returns The current HTTPQL query.
15
15
  */
16
16
  getQuery: () => HTTPQL;
17
+ /**
18
+ * Get the current scope ID.
19
+ * @returns The current scope ID.
20
+ */
21
+ getScopeId: () => ID | undefined;
22
+ /**
23
+ * Set the current scope.
24
+ * @param id The ID of the scope to set.
25
+ */
26
+ setScope: (id: ID | undefined) => Promise<void>;
17
27
  };
@@ -0,0 +1,17 @@
1
+ import type { ID } from "./utils";
2
+ /**
3
+ * Utilities to interact with the Sitemap page.
4
+ * @category Sitemap
5
+ */
6
+ export type SitemapSDK = {
7
+ /**
8
+ * Get the current scope ID.
9
+ * @returns The current scope ID.
10
+ */
11
+ getScopeId: () => ID | undefined;
12
+ /**
13
+ * Set the current scope.
14
+ * @param id The ID of the scope to set.
15
+ */
16
+ setScope: (id: ID | undefined) => void;
17
+ };