@caido/sdk-frontend 0.47.2-beta.1 → 0.47.2-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.47.2-beta.1",
3
+ "version": "0.47.2-beta.3",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "license": "MIT",
@@ -11,7 +11,8 @@
11
11
  "src/*"
12
12
  ],
13
13
  "peerDependencies": {
14
- "@codemirror/view": "^6.0.0"
14
+ "@codemirror/view": "^6.0.0",
15
+ "@codemirror/state": "^6.0.0"
15
16
  },
16
17
  "peerDependenciesMeta": {},
17
18
  "scripts": {
@@ -1,7 +1,3 @@
1
- type JSONPrimitive = string | number | boolean | null | undefined;
2
- type JSONValue = JSONPrimitive | JSONValue[] | {
3
- [key: string]: JSONValue;
4
- };
5
1
  export type Maybe<T> = T | undefined | null;
6
2
  export type InputMaybe<T> = T | undefined | null;
7
3
  export type Exact<T extends {
@@ -83,8 +79,8 @@ export type Scalars = {
83
79
  };
84
80
  /** A scalar that can represent any JSON value. */
85
81
  JSON: {
86
- input: JSONValue;
87
- output: JSONValue;
82
+ input: unknown;
83
+ output: unknown;
88
84
  };
89
85
  JsonObject: {
90
86
  input: Record<string, unknown>;
@@ -2164,7 +2160,7 @@ export type Plugin = {
2164
2160
  export type PluginAuthor = {
2165
2161
  email?: Maybe<Scalars["String"]["output"]>;
2166
2162
  name?: Maybe<Scalars["String"]["output"]>;
2167
- url?: Maybe<Scalars["Url"]["output"]>;
2163
+ url?: Maybe<Scalars["String"]["output"]>;
2168
2164
  };
2169
2165
  export type PluginBackend = Plugin & {
2170
2166
  enabled: Scalars["Boolean"]["output"];
@@ -10215,6 +10211,9 @@ export type InterceptStreamWsMessagesQuery = {
10215
10211
  alteration: Alteration;
10216
10212
  edited: boolean;
10217
10213
  } | undefined | null;
10214
+ stream?: {
10215
+ id: string;
10216
+ } | undefined | null;
10218
10217
  };
10219
10218
  } | {
10220
10219
  __typename: "InterceptResponseMessage";
@@ -10260,6 +10259,9 @@ export type InterceptStreamWsMessagesQuery = {
10260
10259
  alteration: Alteration;
10261
10260
  edited: boolean;
10262
10261
  } | undefined | null;
10262
+ stream?: {
10263
+ id: string;
10264
+ } | undefined | null;
10263
10265
  };
10264
10266
  } | {
10265
10267
  __typename: "InterceptStreamWsMessage";
@@ -14697,7 +14699,7 @@ export type PluginFrontendFullFragment = {
14697
14699
  __typename: "PluginFrontend";
14698
14700
  entrypoint?: string | undefined | null;
14699
14701
  style?: string | undefined | null;
14700
- data?: JSONValue | undefined | null;
14702
+ data?: unknown | undefined | null;
14701
14703
  id: string;
14702
14704
  name?: string | undefined | null;
14703
14705
  enabled: boolean;
@@ -14778,7 +14780,7 @@ export type PluginPackageFullFragment = {
14778
14780
  __typename: "PluginFrontend";
14779
14781
  entrypoint?: string | undefined | null;
14780
14782
  style?: string | undefined | null;
14781
- data?: JSONValue | undefined | null;
14783
+ data?: unknown | undefined | null;
14782
14784
  id: string;
14783
14785
  name?: string | undefined | null;
14784
14786
  enabled: boolean;
@@ -14861,7 +14863,7 @@ export type PluginPackagesQuery = {
14861
14863
  __typename: "PluginFrontend";
14862
14864
  entrypoint?: string | undefined | null;
14863
14865
  style?: string | undefined | null;
14864
- data?: JSONValue | undefined | null;
14866
+ data?: unknown | undefined | null;
14865
14867
  id: string;
14866
14868
  name?: string | undefined | null;
14867
14869
  enabled: boolean;
@@ -14953,7 +14955,7 @@ export type InstallPluginPackageMutation = {
14953
14955
  __typename: "PluginFrontend";
14954
14956
  entrypoint?: string | undefined | null;
14955
14957
  style?: string | undefined | null;
14956
- data?: JSONValue | undefined | null;
14958
+ data?: unknown | undefined | null;
14957
14959
  id: string;
14958
14960
  name?: string | undefined | null;
14959
14961
  enabled: boolean;
@@ -15051,7 +15053,7 @@ export type TogglePluginMutation = {
15051
15053
  __typename: "PluginFrontend";
15052
15054
  entrypoint?: string | undefined | null;
15053
15055
  style?: string | undefined | null;
15054
- data?: JSONValue | undefined | null;
15056
+ data?: unknown | undefined | null;
15055
15057
  id: string;
15056
15058
  name?: string | undefined | null;
15057
15059
  enabled: boolean;
@@ -15120,7 +15122,7 @@ export type SetPluginDataMutation = {
15120
15122
  __typename: "PluginFrontend";
15121
15123
  entrypoint?: string | undefined | null;
15122
15124
  style?: string | undefined | null;
15123
- data?: JSONValue | undefined | null;
15125
+ data?: unknown | undefined | null;
15124
15126
  id: string;
15125
15127
  name?: string | undefined | null;
15126
15128
  enabled: boolean;
@@ -15195,7 +15197,7 @@ export type CreatedPluginPackageSubscription = {
15195
15197
  __typename: "PluginFrontend";
15196
15198
  entrypoint?: string | undefined | null;
15197
15199
  style?: string | undefined | null;
15198
- data?: JSONValue | undefined | null;
15200
+ data?: unknown | undefined | null;
15199
15201
  id: string;
15200
15202
  name?: string | undefined | null;
15201
15203
  enabled: boolean;
@@ -15268,7 +15270,7 @@ export type UpdatedPluginSubscription = {
15268
15270
  __typename: "PluginFrontend";
15269
15271
  entrypoint?: string | undefined | null;
15270
15272
  style?: string | undefined | null;
15271
- data?: JSONValue | undefined | null;
15273
+ data?: unknown | undefined | null;
15272
15274
  id: string;
15273
15275
  name?: string | undefined | null;
15274
15276
  enabled: boolean;
@@ -20674,8 +20676,8 @@ export type UserProfileFullFragment = {
20674
20676
  };
20675
20677
  export type UserSettingsFullFragment = {
20676
20678
  __typename: "UserSettings";
20677
- data: JSONValue;
20678
- migrations: JSONValue;
20679
+ data: unknown;
20680
+ migrations: unknown;
20679
20681
  };
20680
20682
  export type UpdateViewerSettingsMutationVariables = Exact<{
20681
20683
  input: UpdateViewerSettingsInput;
@@ -20684,8 +20686,8 @@ export type UpdateViewerSettingsMutation = {
20684
20686
  updateViewerSettings: {
20685
20687
  settings?: {
20686
20688
  __typename: "UserSettings";
20687
- data: JSONValue;
20688
- migrations: JSONValue;
20689
+ data: unknown;
20690
+ migrations: unknown;
20689
20691
  } | undefined | null;
20690
20692
  };
20691
20693
  };
@@ -20724,8 +20726,8 @@ export type UserSettingsQuery = {
20724
20726
  id: string;
20725
20727
  settings?: {
20726
20728
  __typename: "UserSettings";
20727
- data: JSONValue;
20728
- migrations: JSONValue;
20729
+ data: unknown;
20730
+ migrations: unknown;
20729
20731
  } | undefined | null;
20730
20732
  };
20731
20733
  };
@@ -1,3 +1,4 @@
1
+ import type { Extension } from "@codemirror/state";
1
2
  import type { HTTPQL, ID } from "./utils";
2
3
  /**
3
4
  * Utilities to interact with the HTTP History page.
@@ -24,4 +25,9 @@ export type HTTPHistorySDK = {
24
25
  * @param id The ID of the scope to set.
25
26
  */
26
27
  setScope: (id: ID | undefined) => Promise<void>;
28
+ /**
29
+ * Add an extension to the request editor.
30
+ * @param extension The extension to add.
31
+ */
32
+ addRequestEditorExtension: (extension: Extension) => void;
27
33
  };
@@ -28,7 +28,7 @@ export type { MenuItem } from "./menu";
28
28
  export type { ReplayTab, ReplaySession, ReplayCollection } from "./replay";
29
29
  export type { HostedFile } from "./files";
30
30
  export type { Filter } from "./filters";
31
- export type { HTTPQL, ID } from "./utils";
31
+ export type { HTTPQL, ID, JSONValue, JSONCompatible } from "./utils";
32
32
  export type { MatchReplaceRule, MatchReplaceCollection, MatchReplaceSection, MatchReplaceSectionRequestBody, MatchReplaceSectionRequestFirstLine, MatchReplaceSectionRequestHeader, MatchReplaceSectionRequestMethod, MatchReplaceSectionRequestPath, MatchReplaceSectionRequestQuery, MatchReplaceSectionResponseBody, MatchReplaceSectionResponseFirstLine, MatchReplaceSectionResponseHeader, MatchReplaceSectionResponseStatusCode, MatchReplaceOperationStatusCode, MatchReplaceOperationStatusCodeUpdate, MatchReplaceOperationQuery, MatchReplaceOperationQueryRaw, MatchReplaceOperationQueryAdd, MatchReplaceOperationQueryRemove, MatchReplaceOperationQueryUpdate, MatchReplaceOperationPath, MatchReplaceOperationPathRaw, MatchReplaceOperationMethod, MatchReplaceOperationMethodUpdate, MatchReplaceOperationHeader, MatchReplaceOperationHeaderRaw, MatchReplaceOperationHeaderAdd, MatchReplaceOperationHeaderRemove, MatchReplaceOperationHeaderUpdate, MatchReplaceOperationBody, MatchReplaceOperationBodyRaw, MatchReplaceOperationFirstLine, MatchReplaceOperationFirstLineRaw, MatchReplaceReplacer, MatchReplaceReplacerTerm, MatchReplaceReplacerWorkflow, MatchReplaceMatcherName, MatchReplaceMatcherRaw, MatchReplaceMatcherRawFull, MatchReplaceMatcherRawRegex, MatchReplaceMatcherRawValue, } from "./matchReplace";
33
33
  export type { Scope } from "./scopes";
34
34
  export type { EnvironmentVariable } from "./environment";