@scalar/api-client-react 1.0.63 → 1.0.65
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/CHANGELOG.md +19 -0
- package/dist/ApiClientModalProvider.js +22 -22
- package/dist/index.d.ts +140 -83
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @scalar/api-client-react
|
|
2
2
|
|
|
3
|
+
## 1.0.65
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e4caffd: fix: ensure react client app is torn down
|
|
8
|
+
- Updated dependencies [4e50d65]
|
|
9
|
+
- Updated dependencies [4e50d65]
|
|
10
|
+
- @scalar/api-client@2.1.27
|
|
11
|
+
|
|
12
|
+
## 1.0.64
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [8223e31]
|
|
17
|
+
- Updated dependencies [f8b81ee]
|
|
18
|
+
- Updated dependencies [9e769df]
|
|
19
|
+
- Updated dependencies [a80a931]
|
|
20
|
+
- @scalar/api-client@2.1.26
|
|
21
|
+
|
|
3
22
|
## 1.0.63
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as f, jsx as m } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as S, useRef as x, useSyncExternalStore as A, useEffect as
|
|
4
|
-
import { clientStore as
|
|
3
|
+
import { createContext as S, useRef as x, useSyncExternalStore as A, useEffect as p, useContext as v } from "react";
|
|
4
|
+
import { clientStore as n } from "./client-store.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
const d = S(null);
|
|
7
|
-
let
|
|
8
|
-
const
|
|
7
|
+
let u = !1;
|
|
8
|
+
const a = {}, j = ({
|
|
9
9
|
children: C,
|
|
10
10
|
initialRequest: r,
|
|
11
|
-
configuration:
|
|
11
|
+
configuration: l = {}
|
|
12
12
|
}) => {
|
|
13
|
-
var
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
var i;
|
|
14
|
+
const t = ((i = l.spec) == null ? void 0 : i.url) || "default", c = x(null), s = A(
|
|
15
|
+
n.subscribe,
|
|
16
|
+
n.getSnapshot,
|
|
17
|
+
n.getSnapshot
|
|
18
18
|
);
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
return p(() => {
|
|
20
|
+
u || (async () => {
|
|
21
|
+
u = !0;
|
|
22
22
|
const { createApiClientModalSync: o } = await import("@scalar/api-client/layouts/Modal");
|
|
23
|
-
|
|
23
|
+
n.setCreateClient(o);
|
|
24
24
|
})();
|
|
25
|
-
}, []),
|
|
26
|
-
if (!
|
|
27
|
-
const e = s.createClient(
|
|
28
|
-
await e.updateSpec(
|
|
25
|
+
}, []), p(() => {
|
|
26
|
+
if (!c.current || !s.createClient || a[t]) return () => null;
|
|
27
|
+
const e = s.createClient(c.current, l), o = async () => {
|
|
28
|
+
await e.updateSpec(l.spec), r && e.route(r);
|
|
29
29
|
};
|
|
30
|
-
return
|
|
31
|
-
e.app.unmount(),
|
|
30
|
+
return n.addClient(t, e), a[t] = e, l.spec ? o() : r && e.route(r), () => {
|
|
31
|
+
e.app.unmount(), n.removeClient(t), delete a[t];
|
|
32
32
|
};
|
|
33
|
-
}, [
|
|
33
|
+
}, [c.current, s.createClient]), /* @__PURE__ */ f(d.Provider, { value: s.clientDict[t], children: [
|
|
34
34
|
/* @__PURE__ */ m(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
37
|
className: "scalar-app",
|
|
38
|
-
ref:
|
|
38
|
+
ref: c
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
41
|
C
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { CollectionPayload } from '@scalar/oas-utils/entities/spec';
|
|
|
5
5
|
import { CommandPaletteEvent } from 'node_modules/@scalar/api-client/dist/components/CommandPalette/TheCommandPalette.vue';
|
|
6
6
|
import { ComputedRef } from 'vue';
|
|
7
7
|
import { default as default_2 } from 'react';
|
|
8
|
+
import { ErrorResponse } from '@scalar/api-client/libs';
|
|
8
9
|
import { EventBus } from '@scalar/api-client/libs';
|
|
9
10
|
import { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
10
11
|
import { OpenClientPayload } from '@scalar/api-client/libs';
|
|
@@ -19,7 +20,6 @@ import { RequestExample } from '@scalar/oas-utils/entities/spec';
|
|
|
19
20
|
import { RequestPayload } from '@scalar/oas-utils/entities/spec';
|
|
20
21
|
import { RequestStatus } from '@scalar/api-client/libs';
|
|
21
22
|
import { Router } from 'vue-router';
|
|
22
|
-
import { SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
23
23
|
import { SecuritySchemePayload } from '@scalar/oas-utils/entities/spec';
|
|
24
24
|
import { ServerPayload } from '@scalar/oas-utils/entities/spec';
|
|
25
25
|
import { Spec } from '@scalar/types/legacy';
|
|
@@ -121,6 +121,8 @@ export declare const useApiClientModal: () => {
|
|
|
121
121
|
token: string;
|
|
122
122
|
clientSecret: string;
|
|
123
123
|
}>;
|
|
124
|
+
watchForChanges: boolean;
|
|
125
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
124
126
|
externalDocs?: {
|
|
125
127
|
url: string;
|
|
126
128
|
description?: string | undefined;
|
|
@@ -145,6 +147,7 @@ export declare const useApiClientModal: () => {
|
|
|
145
147
|
} | undefined;
|
|
146
148
|
components?: Record<string, unknown> | undefined;
|
|
147
149
|
webhooks?: Record<string, unknown> | undefined;
|
|
150
|
+
documentUrl?: string | undefined;
|
|
148
151
|
}>;
|
|
149
152
|
tags: Record<string, {
|
|
150
153
|
type: "tag";
|
|
@@ -314,8 +317,8 @@ export declare const useApiClientModal: () => {
|
|
|
314
317
|
}>;
|
|
315
318
|
servers: Record<string, {
|
|
316
319
|
uid: string;
|
|
320
|
+
url: string;
|
|
317
321
|
description?: string | undefined;
|
|
318
|
-
url?: string | undefined;
|
|
319
322
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
320
323
|
enum?: [string, ...string[]];
|
|
321
324
|
}> | undefined;
|
|
@@ -414,6 +417,8 @@ export declare const useApiClientModal: () => {
|
|
|
414
417
|
token: string;
|
|
415
418
|
clientSecret: string;
|
|
416
419
|
}>;
|
|
420
|
+
watchForChanges: boolean;
|
|
421
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
417
422
|
externalDocs?: {
|
|
418
423
|
url: string;
|
|
419
424
|
description?: string | undefined;
|
|
@@ -438,6 +443,7 @@ export declare const useApiClientModal: () => {
|
|
|
438
443
|
} | undefined;
|
|
439
444
|
components?: Record<string, unknown> | undefined;
|
|
440
445
|
webhooks?: Record<string, unknown> | undefined;
|
|
446
|
+
documentUrl?: string | undefined;
|
|
441
447
|
} | undefined>;
|
|
442
448
|
activeCookieId: ComputedRef<string | undefined>;
|
|
443
449
|
activeExample: ComputedRef< {
|
|
@@ -592,8 +598,8 @@ export declare const useApiClientModal: () => {
|
|
|
592
598
|
}>;
|
|
593
599
|
activeServer: ComputedRef< {
|
|
594
600
|
uid: string;
|
|
601
|
+
url: string;
|
|
595
602
|
description?: string | undefined;
|
|
596
|
-
url?: string | undefined;
|
|
597
603
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
598
604
|
enum?: [string, ...string[]];
|
|
599
605
|
}> | undefined;
|
|
@@ -656,6 +662,8 @@ export declare const useApiClientModal: () => {
|
|
|
656
662
|
token: string;
|
|
657
663
|
clientSecret: string;
|
|
658
664
|
}>;
|
|
665
|
+
watchForChanges: boolean;
|
|
666
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
659
667
|
externalDocs?: {
|
|
660
668
|
url: string;
|
|
661
669
|
description?: string | undefined;
|
|
@@ -680,11 +688,12 @@ export declare const useApiClientModal: () => {
|
|
|
680
688
|
} | undefined;
|
|
681
689
|
components?: Record<string, unknown> | undefined;
|
|
682
690
|
webhooks?: Record<string, unknown> | undefined;
|
|
691
|
+
documentUrl?: string | undefined;
|
|
683
692
|
}[]>;
|
|
684
693
|
activeWorkspaceServers: ComputedRef< {
|
|
685
694
|
uid: string;
|
|
695
|
+
url: string;
|
|
686
696
|
description?: string | undefined;
|
|
687
|
-
url?: string | undefined;
|
|
688
697
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
689
698
|
enum?: [string, ...string[]];
|
|
690
699
|
}> | undefined;
|
|
@@ -712,71 +721,12 @@ export declare const useApiClientModal: () => {
|
|
|
712
721
|
setSidebarWidth: (width: string) => void;
|
|
713
722
|
proxyUrl: Ref<string, string>;
|
|
714
723
|
setProxyUrl: (url: string) => void;
|
|
715
|
-
importSpecFile: (_spec: string | Record<string, any>, workspaceUid
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
"x-scalar-icon": string;
|
|
722
|
-
securitySchemes: string[];
|
|
723
|
-
selectedServerUid: string;
|
|
724
|
-
servers: string[];
|
|
725
|
-
requests: string[];
|
|
726
|
-
tags: string[];
|
|
727
|
-
auth: Record<string, {
|
|
728
|
-
type: "apiKey";
|
|
729
|
-
value: string;
|
|
730
|
-
name: string;
|
|
731
|
-
} | {
|
|
732
|
-
type: "http";
|
|
733
|
-
username: string;
|
|
734
|
-
password: string;
|
|
735
|
-
token: string;
|
|
736
|
-
} | {
|
|
737
|
-
type: "oauth-implicit";
|
|
738
|
-
token: string;
|
|
739
|
-
} | {
|
|
740
|
-
type: "oauth-password";
|
|
741
|
-
username: string;
|
|
742
|
-
password: string;
|
|
743
|
-
token: string;
|
|
744
|
-
clientSecret: string;
|
|
745
|
-
} | {
|
|
746
|
-
type: "oauth-clientCredentials";
|
|
747
|
-
token: string;
|
|
748
|
-
clientSecret: string;
|
|
749
|
-
} | {
|
|
750
|
-
type: "oauth-authorizationCode";
|
|
751
|
-
token: string;
|
|
752
|
-
clientSecret: string;
|
|
753
|
-
}>;
|
|
754
|
-
externalDocs?: {
|
|
755
|
-
url: string;
|
|
756
|
-
description?: string | undefined;
|
|
757
|
-
} | undefined;
|
|
758
|
-
jsonSchemaDialect?: string | undefined;
|
|
759
|
-
info?: {
|
|
760
|
-
title: string;
|
|
761
|
-
version: string;
|
|
762
|
-
description?: string | undefined;
|
|
763
|
-
summary?: string | undefined;
|
|
764
|
-
termsOfService?: string | undefined;
|
|
765
|
-
contact?: {
|
|
766
|
-
name?: string | undefined;
|
|
767
|
-
url?: string | undefined;
|
|
768
|
-
email?: string | undefined;
|
|
769
|
-
} | undefined;
|
|
770
|
-
license?: {
|
|
771
|
-
name: string;
|
|
772
|
-
identifier?: string | undefined;
|
|
773
|
-
url?: string | undefined;
|
|
774
|
-
} | undefined;
|
|
775
|
-
} | undefined;
|
|
776
|
-
components?: Record<string, unknown> | undefined;
|
|
777
|
-
webhooks?: Record<string, unknown> | undefined;
|
|
778
|
-
} | undefined>;
|
|
779
|
-
importSpecFromUrl: (url: string, proxy?: string, overloadServers?: Spec["servers"], preferredSecurityScheme?: ClientConfiguration["preferredSecurityScheme"], workspaceUid?: string) => Promise<{
|
|
724
|
+
importSpecFile: (_spec: string | Record<string, any>, workspaceUid: string, { documentUrl, watchForChanges, overloadServers, preferredSecurityScheme, }?: {
|
|
725
|
+
documentUrl?: string;
|
|
726
|
+
watchForChanges?: boolean;
|
|
727
|
+
overloadServers?: Spec["servers"];
|
|
728
|
+
preferredSecurityScheme?: ClientConfiguration["preferredSecurityScheme"];
|
|
729
|
+
}) => Promise<{
|
|
780
730
|
type: "collection";
|
|
781
731
|
uid: string;
|
|
782
732
|
children: string[];
|
|
@@ -815,6 +765,8 @@ export declare const useApiClientModal: () => {
|
|
|
815
765
|
token: string;
|
|
816
766
|
clientSecret: string;
|
|
817
767
|
}>;
|
|
768
|
+
watchForChanges: boolean;
|
|
769
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
818
770
|
externalDocs?: {
|
|
819
771
|
url: string;
|
|
820
772
|
description?: string | undefined;
|
|
@@ -839,7 +791,85 @@ export declare const useApiClientModal: () => {
|
|
|
839
791
|
} | undefined;
|
|
840
792
|
components?: Record<string, unknown> | undefined;
|
|
841
793
|
webhooks?: Record<string, unknown> | undefined;
|
|
794
|
+
documentUrl?: string | undefined;
|
|
842
795
|
} | undefined>;
|
|
796
|
+
importSpecFromUrl: (url: string, workspaceUid: string, { proxy, overloadServers, watchForChanges, preferredSecurityScheme, }?: {
|
|
797
|
+
watchForChanges?: boolean;
|
|
798
|
+
overloadServers?: Spec["servers"];
|
|
799
|
+
preferredSecurityScheme?: ClientConfiguration["preferredSecurityScheme"];
|
|
800
|
+
proxy?: string;
|
|
801
|
+
}) => Promise<ErrorResponse<Awaited<ReturnType<(_spec: string | Record<string, any>, workspaceUid: string, { documentUrl, watchForChanges, overloadServers, preferredSecurityScheme, }?: {
|
|
802
|
+
documentUrl?: string;
|
|
803
|
+
watchForChanges?: boolean;
|
|
804
|
+
overloadServers?: Spec["servers"];
|
|
805
|
+
preferredSecurityScheme?: ClientConfiguration["preferredSecurityScheme"];
|
|
806
|
+
}) => Promise<{
|
|
807
|
+
type: "collection";
|
|
808
|
+
uid: string;
|
|
809
|
+
children: string[];
|
|
810
|
+
openapi: string;
|
|
811
|
+
security: Record<string, string[]>[];
|
|
812
|
+
"x-scalar-icon": string;
|
|
813
|
+
securitySchemes: string[];
|
|
814
|
+
selectedServerUid: string;
|
|
815
|
+
servers: string[];
|
|
816
|
+
requests: string[];
|
|
817
|
+
tags: string[];
|
|
818
|
+
auth: Record<string, {
|
|
819
|
+
type: "apiKey";
|
|
820
|
+
value: string;
|
|
821
|
+
name: string;
|
|
822
|
+
} | {
|
|
823
|
+
type: "http";
|
|
824
|
+
username: string;
|
|
825
|
+
password: string;
|
|
826
|
+
token: string;
|
|
827
|
+
} | {
|
|
828
|
+
type: "oauth-implicit";
|
|
829
|
+
token: string;
|
|
830
|
+
} | {
|
|
831
|
+
type: "oauth-password";
|
|
832
|
+
username: string;
|
|
833
|
+
password: string;
|
|
834
|
+
token: string;
|
|
835
|
+
clientSecret: string;
|
|
836
|
+
} | {
|
|
837
|
+
type: "oauth-clientCredentials";
|
|
838
|
+
token: string;
|
|
839
|
+
clientSecret: string;
|
|
840
|
+
} | {
|
|
841
|
+
type: "oauth-authorizationCode";
|
|
842
|
+
token: string;
|
|
843
|
+
clientSecret: string;
|
|
844
|
+
}>;
|
|
845
|
+
watchForChanges: boolean;
|
|
846
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
847
|
+
externalDocs?: {
|
|
848
|
+
url: string;
|
|
849
|
+
description?: string | undefined;
|
|
850
|
+
} | undefined;
|
|
851
|
+
jsonSchemaDialect?: string | undefined;
|
|
852
|
+
info?: {
|
|
853
|
+
title: string;
|
|
854
|
+
version: string;
|
|
855
|
+
description?: string | undefined;
|
|
856
|
+
summary?: string | undefined;
|
|
857
|
+
termsOfService?: string | undefined;
|
|
858
|
+
contact?: {
|
|
859
|
+
name?: string | undefined;
|
|
860
|
+
url?: string | undefined;
|
|
861
|
+
email?: string | undefined;
|
|
862
|
+
} | undefined;
|
|
863
|
+
license?: {
|
|
864
|
+
name: string;
|
|
865
|
+
identifier?: string | undefined;
|
|
866
|
+
url?: string | undefined;
|
|
867
|
+
} | undefined;
|
|
868
|
+
} | undefined;
|
|
869
|
+
components?: Record<string, unknown> | undefined;
|
|
870
|
+
webhooks?: Record<string, unknown> | undefined;
|
|
871
|
+
documentUrl?: string | undefined;
|
|
872
|
+
} | undefined>>>>>;
|
|
843
873
|
cookieMutators: {
|
|
844
874
|
add: (item: {
|
|
845
875
|
value: string;
|
|
@@ -985,6 +1015,8 @@ export declare const useApiClientModal: () => {
|
|
|
985
1015
|
token: string;
|
|
986
1016
|
clientSecret: string;
|
|
987
1017
|
}>;
|
|
1018
|
+
watchForChanges: boolean;
|
|
1019
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
988
1020
|
externalDocs?: {
|
|
989
1021
|
url: string;
|
|
990
1022
|
description?: string | undefined;
|
|
@@ -1009,6 +1041,7 @@ export declare const useApiClientModal: () => {
|
|
|
1009
1041
|
} | undefined;
|
|
1010
1042
|
components?: Record<string, unknown> | undefined;
|
|
1011
1043
|
webhooks?: Record<string, unknown> | undefined;
|
|
1044
|
+
documentUrl?: string | undefined;
|
|
1012
1045
|
}) => void;
|
|
1013
1046
|
add: (payload: CollectionPayload, workspaceUid: string) => {
|
|
1014
1047
|
type: "collection";
|
|
@@ -1049,6 +1082,8 @@ export declare const useApiClientModal: () => {
|
|
|
1049
1082
|
token: string;
|
|
1050
1083
|
clientSecret: string;
|
|
1051
1084
|
}>;
|
|
1085
|
+
watchForChanges: boolean;
|
|
1086
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1052
1087
|
externalDocs?: {
|
|
1053
1088
|
url: string;
|
|
1054
1089
|
description?: string | undefined;
|
|
@@ -1073,6 +1108,7 @@ export declare const useApiClientModal: () => {
|
|
|
1073
1108
|
} | undefined;
|
|
1074
1109
|
components?: Record<string, unknown> | undefined;
|
|
1075
1110
|
webhooks?: Record<string, unknown> | undefined;
|
|
1111
|
+
documentUrl?: string | undefined;
|
|
1076
1112
|
};
|
|
1077
1113
|
delete: (collection: Collection, workspace: Workspace) => void;
|
|
1078
1114
|
set: (item: {
|
|
@@ -1114,6 +1150,8 @@ export declare const useApiClientModal: () => {
|
|
|
1114
1150
|
token: string;
|
|
1115
1151
|
clientSecret: string;
|
|
1116
1152
|
}>;
|
|
1153
|
+
watchForChanges: boolean;
|
|
1154
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1117
1155
|
externalDocs?: {
|
|
1118
1156
|
url: string;
|
|
1119
1157
|
description?: string | undefined;
|
|
@@ -1138,8 +1176,9 @@ export declare const useApiClientModal: () => {
|
|
|
1138
1176
|
} | undefined;
|
|
1139
1177
|
components?: Record<string, unknown> | undefined;
|
|
1140
1178
|
webhooks?: Record<string, unknown> | undefined;
|
|
1179
|
+
documentUrl?: string | undefined;
|
|
1141
1180
|
}) => void;
|
|
1142
|
-
edit: <P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "selectedServerUid" | `servers.${number}` | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.url" | "externalDocs.description" | "x-scalar-icon" | `children.${number}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.url" | "info.contact.name" | "info.contact.email" | "info.license.url" | "info.license.name" | "info.license.identifier" | `auth.${string}` | `securitySchemes.${number}` | `requests.${number}` | `components.${string}` | `webhooks.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "selectedServerUid" | "x-scalar-icon" ? {
|
|
1181
|
+
edit: <P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "documentUrl" | "watchForChanges" | "selectedServerUid" | `servers.${number}` | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.url" | "externalDocs.description" | "x-scalar-icon" | "watchForChangesStatus" | `children.${number}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.url" | "info.contact.name" | "info.contact.email" | "info.license.url" | "info.license.name" | "info.license.identifier" | `auth.${string}` | `securitySchemes.${number}` | `requests.${number}` | `components.${string}` | `webhooks.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "documentUrl" | "watchForChanges" | "selectedServerUid" | "x-scalar-icon" | "watchForChangesStatus" ? {
|
|
1143
1182
|
type: "collection";
|
|
1144
1183
|
uid: string;
|
|
1145
1184
|
children: string[];
|
|
@@ -1178,6 +1217,8 @@ export declare const useApiClientModal: () => {
|
|
|
1178
1217
|
token: string;
|
|
1179
1218
|
clientSecret: string;
|
|
1180
1219
|
}>;
|
|
1220
|
+
watchForChanges: boolean;
|
|
1221
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1181
1222
|
externalDocs?: {
|
|
1182
1223
|
url: string;
|
|
1183
1224
|
description?: string | undefined;
|
|
@@ -1202,7 +1243,8 @@ export declare const useApiClientModal: () => {
|
|
|
1202
1243
|
} | undefined;
|
|
1203
1244
|
components?: Record<string, unknown> | undefined;
|
|
1204
1245
|
webhooks?: Record<string, unknown> | undefined;
|
|
1205
|
-
|
|
1246
|
+
documentUrl?: string | undefined;
|
|
1247
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "documentUrl" | "watchForChanges" | "selectedServerUid" | "x-scalar-icon" | "watchForChangesStatus" ? R extends Path< {
|
|
1206
1248
|
type: "collection";
|
|
1207
1249
|
uid: string;
|
|
1208
1250
|
children: string[];
|
|
@@ -1241,6 +1283,8 @@ export declare const useApiClientModal: () => {
|
|
|
1241
1283
|
token: string;
|
|
1242
1284
|
clientSecret: string;
|
|
1243
1285
|
}>;
|
|
1286
|
+
watchForChanges: boolean;
|
|
1287
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1244
1288
|
externalDocs?: {
|
|
1245
1289
|
url: string;
|
|
1246
1290
|
description?: string | undefined;
|
|
@@ -1265,6 +1309,7 @@ export declare const useApiClientModal: () => {
|
|
|
1265
1309
|
} | undefined;
|
|
1266
1310
|
components?: Record<string, unknown> | undefined;
|
|
1267
1311
|
webhooks?: Record<string, unknown> | undefined;
|
|
1312
|
+
documentUrl?: string | undefined;
|
|
1268
1313
|
}[K]> ? PathValue< {
|
|
1269
1314
|
type: "collection";
|
|
1270
1315
|
uid: string;
|
|
@@ -1304,6 +1349,8 @@ export declare const useApiClientModal: () => {
|
|
|
1304
1349
|
token: string;
|
|
1305
1350
|
clientSecret: string;
|
|
1306
1351
|
}>;
|
|
1352
|
+
watchForChanges: boolean;
|
|
1353
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1307
1354
|
externalDocs?: {
|
|
1308
1355
|
url: string;
|
|
1309
1356
|
description?: string | undefined;
|
|
@@ -1328,8 +1375,9 @@ export declare const useApiClientModal: () => {
|
|
|
1328
1375
|
} | undefined;
|
|
1329
1376
|
components?: Record<string, unknown> | undefined;
|
|
1330
1377
|
webhooks?: Record<string, unknown> | undefined;
|
|
1378
|
+
documentUrl?: string | undefined;
|
|
1331
1379
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
1332
|
-
untrackedEdit: <P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "selectedServerUid" | `servers.${number}` | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.url" | "externalDocs.description" | "x-scalar-icon" | `children.${number}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.url" | "info.contact.name" | "info.contact.email" | "info.license.url" | "info.license.name" | "info.license.identifier" | `auth.${string}` | `securitySchemes.${number}` | `requests.${number}` | `components.${string}` | `webhooks.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "selectedServerUid" | "x-scalar-icon" ? {
|
|
1380
|
+
untrackedEdit: <P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "documentUrl" | "watchForChanges" | "selectedServerUid" | `servers.${number}` | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.url" | "externalDocs.description" | "x-scalar-icon" | "watchForChangesStatus" | `children.${number}` | "info.summary" | "info.title" | "info.description" | "info.termsOfService" | "info.contact" | "info.license" | "info.version" | "info.contact.url" | "info.contact.name" | "info.contact.email" | "info.license.url" | "info.license.name" | "info.license.identifier" | `auth.${string}` | `securitySchemes.${number}` | `requests.${number}` | `components.${string}` | `webhooks.${string}`>(uid: string, path: P, value: P extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "documentUrl" | "watchForChanges" | "selectedServerUid" | "x-scalar-icon" | "watchForChangesStatus" ? {
|
|
1333
1381
|
type: "collection";
|
|
1334
1382
|
uid: string;
|
|
1335
1383
|
children: string[];
|
|
@@ -1368,6 +1416,8 @@ export declare const useApiClientModal: () => {
|
|
|
1368
1416
|
token: string;
|
|
1369
1417
|
clientSecret: string;
|
|
1370
1418
|
}>;
|
|
1419
|
+
watchForChanges: boolean;
|
|
1420
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1371
1421
|
externalDocs?: {
|
|
1372
1422
|
url: string;
|
|
1373
1423
|
description?: string | undefined;
|
|
@@ -1392,7 +1442,8 @@ export declare const useApiClientModal: () => {
|
|
|
1392
1442
|
} | undefined;
|
|
1393
1443
|
components?: Record<string, unknown> | undefined;
|
|
1394
1444
|
webhooks?: Record<string, unknown> | undefined;
|
|
1395
|
-
|
|
1445
|
+
documentUrl?: string | undefined;
|
|
1446
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "type" | "children" | "info" | "servers" | "uid" | "auth" | "securitySchemes" | "tags" | "requests" | "components" | "openapi" | "security" | "externalDocs" | "webhooks" | "jsonSchemaDialect" | "documentUrl" | "watchForChanges" | "selectedServerUid" | "x-scalar-icon" | "watchForChangesStatus" ? R extends Path< {
|
|
1396
1447
|
type: "collection";
|
|
1397
1448
|
uid: string;
|
|
1398
1449
|
children: string[];
|
|
@@ -1431,6 +1482,8 @@ export declare const useApiClientModal: () => {
|
|
|
1431
1482
|
token: string;
|
|
1432
1483
|
clientSecret: string;
|
|
1433
1484
|
}>;
|
|
1485
|
+
watchForChanges: boolean;
|
|
1486
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1434
1487
|
externalDocs?: {
|
|
1435
1488
|
url: string;
|
|
1436
1489
|
description?: string | undefined;
|
|
@@ -1455,6 +1508,7 @@ export declare const useApiClientModal: () => {
|
|
|
1455
1508
|
} | undefined;
|
|
1456
1509
|
components?: Record<string, unknown> | undefined;
|
|
1457
1510
|
webhooks?: Record<string, unknown> | undefined;
|
|
1511
|
+
documentUrl?: string | undefined;
|
|
1458
1512
|
}[K]> ? PathValue< {
|
|
1459
1513
|
type: "collection";
|
|
1460
1514
|
uid: string;
|
|
@@ -1494,6 +1548,8 @@ export declare const useApiClientModal: () => {
|
|
|
1494
1548
|
token: string;
|
|
1495
1549
|
clientSecret: string;
|
|
1496
1550
|
}>;
|
|
1551
|
+
watchForChanges: boolean;
|
|
1552
|
+
watchForChangesStatus: "IDLE" | "WATCHING" | "ERROR";
|
|
1497
1553
|
externalDocs?: {
|
|
1498
1554
|
url: string;
|
|
1499
1555
|
description?: string | undefined;
|
|
@@ -1518,6 +1574,7 @@ export declare const useApiClientModal: () => {
|
|
|
1518
1574
|
} | undefined;
|
|
1519
1575
|
components?: Record<string, unknown> | undefined;
|
|
1520
1576
|
webhooks?: Record<string, unknown> | undefined;
|
|
1577
|
+
documentUrl?: string | undefined;
|
|
1521
1578
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
1522
1579
|
undo: (uid: string) => void;
|
|
1523
1580
|
redo: (uid: string) => void;
|
|
@@ -2882,7 +2939,7 @@ export declare const useApiClientModal: () => {
|
|
|
2882
2939
|
"x-scalar-client-id": string;
|
|
2883
2940
|
description?: string | undefined;
|
|
2884
2941
|
};
|
|
2885
|
-
delete: (
|
|
2942
|
+
delete: (schemeUid: string) => void;
|
|
2886
2943
|
set: (item: {
|
|
2887
2944
|
type: "apiKey";
|
|
2888
2945
|
uid: string;
|
|
@@ -3270,16 +3327,16 @@ export declare const useApiClientModal: () => {
|
|
|
3270
3327
|
serverMutators: {
|
|
3271
3328
|
rawAdd: (item: {
|
|
3272
3329
|
uid: string;
|
|
3330
|
+
url: string;
|
|
3273
3331
|
description?: string | undefined;
|
|
3274
|
-
url?: string | undefined;
|
|
3275
3332
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3276
3333
|
enum?: [string, ...string[]];
|
|
3277
3334
|
}> | undefined;
|
|
3278
3335
|
}) => void;
|
|
3279
3336
|
add: (payload: ServerPayload, parentUid: string) => {
|
|
3280
3337
|
uid: string;
|
|
3338
|
+
url: string;
|
|
3281
3339
|
description?: string | undefined;
|
|
3282
|
-
url?: string | undefined;
|
|
3283
3340
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3284
3341
|
enum?: [string, ...string[]];
|
|
3285
3342
|
}> | undefined;
|
|
@@ -3287,52 +3344,52 @@ export declare const useApiClientModal: () => {
|
|
|
3287
3344
|
delete: (serverUid: string, collectionUid: string) => void;
|
|
3288
3345
|
set: (item: {
|
|
3289
3346
|
uid: string;
|
|
3347
|
+
url: string;
|
|
3290
3348
|
description?: string | undefined;
|
|
3291
|
-
url?: string | undefined;
|
|
3292
3349
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3293
3350
|
enum?: [string, ...string[]];
|
|
3294
3351
|
}> | undefined;
|
|
3295
3352
|
}) => void;
|
|
3296
3353
|
edit: <P extends "url" | "description" | "uid" | "variables" | `variables.${string}`>(uid: string, path: P, value: P extends "url" | "description" | "uid" | "variables" ? {
|
|
3297
3354
|
uid: string;
|
|
3355
|
+
url: string;
|
|
3298
3356
|
description?: string | undefined;
|
|
3299
|
-
url?: string | undefined;
|
|
3300
3357
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3301
3358
|
enum?: [string, ...string[]];
|
|
3302
3359
|
}> | undefined;
|
|
3303
3360
|
}[P] : P extends `${infer K}.${infer R}` ? K extends "url" | "description" | "uid" | "variables" ? R extends Path< {
|
|
3304
3361
|
uid: string;
|
|
3362
|
+
url: string;
|
|
3305
3363
|
description?: string | undefined;
|
|
3306
|
-
url?: string | undefined;
|
|
3307
3364
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3308
3365
|
enum?: [string, ...string[]];
|
|
3309
3366
|
}> | undefined;
|
|
3310
3367
|
}[K]> ? PathValue< {
|
|
3311
3368
|
uid: string;
|
|
3369
|
+
url: string;
|
|
3312
3370
|
description?: string | undefined;
|
|
3313
|
-
url?: string | undefined;
|
|
3314
3371
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3315
3372
|
enum?: [string, ...string[]];
|
|
3316
3373
|
}> | undefined;
|
|
3317
3374
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
3318
3375
|
untrackedEdit: <P extends "url" | "description" | "uid" | "variables" | `variables.${string}`>(uid: string, path: P, value: P extends "url" | "description" | "uid" | "variables" ? {
|
|
3319
3376
|
uid: string;
|
|
3377
|
+
url: string;
|
|
3320
3378
|
description?: string | undefined;
|
|
3321
|
-
url?: string | undefined;
|
|
3322
3379
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3323
3380
|
enum?: [string, ...string[]];
|
|
3324
3381
|
}> | undefined;
|
|
3325
3382
|
}[P] : P extends `${infer K}.${infer R}` ? K extends "url" | "description" | "uid" | "variables" ? R extends Path< {
|
|
3326
3383
|
uid: string;
|
|
3384
|
+
url: string;
|
|
3327
3385
|
description?: string | undefined;
|
|
3328
|
-
url?: string | undefined;
|
|
3329
3386
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3330
3387
|
enum?: [string, ...string[]];
|
|
3331
3388
|
}> | undefined;
|
|
3332
3389
|
}[K]> ? PathValue< {
|
|
3333
3390
|
uid: string;
|
|
3391
|
+
url: string;
|
|
3334
3392
|
description?: string | undefined;
|
|
3335
|
-
url?: string | undefined;
|
|
3336
3393
|
variables?: Record<string, Omit<OpenAPIV3_1.ServerVariableObject, "enum"> & {
|
|
3337
3394
|
enum?: [string, ...string[]];
|
|
3338
3395
|
}> | undefined;
|