@scalar/api-client 2.3.11 → 2.3.13
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 +39 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +45 -51
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +6 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +3 -3
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +25 -22
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +25 -26
- package/dist/layouts/App/create-api-client-app.d.ts +154 -4
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +308 -8
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +154 -4
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +154 -4
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +40 -37
- package/dist/libs/find-request.d.ts +15 -0
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +41 -41
- package/dist/libs/send-request/create-request-operation.test.d.ts +15 -0
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +15 -0
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +12 -12
- package/dist/store/requests.d.ts +169 -4
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/store.d.ts +154 -4
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +71 -61
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +32 -32
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +123 -79
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +6 -6
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +25 -25
- package/package.json +14 -14
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { ERRORS as k, normalizeError as
|
|
2
|
-
import { normalizeHeaders as
|
|
3
|
-
import { createFetchBody as
|
|
4
|
-
import { createFetchHeaders as
|
|
5
|
-
import { createFetchQueryParams as
|
|
6
|
-
import { decodeBuffer as
|
|
7
|
-
import { setRequestCookies as
|
|
8
|
-
import { replaceTemplateVariables as
|
|
9
|
-
import { isDefined as M, mergeUrls as Y, shouldUseProxy as
|
|
10
|
-
import { buildRequestSecurity as
|
|
1
|
+
import { ERRORS as k, normalizeError as w } from "../errors.js";
|
|
2
|
+
import { normalizeHeaders as j } from "../normalize-headers.js";
|
|
3
|
+
import { createFetchBody as A } from "./create-fetch-body.js";
|
|
4
|
+
import { createFetchHeaders as I } from "./create-fetch-headers.js";
|
|
5
|
+
import { createFetchQueryParams as Q } from "./create-fetch-query-params.js";
|
|
6
|
+
import { decodeBuffer as V } from "./decode-buffer.js";
|
|
7
|
+
import { setRequestCookies as X, getCookieHeader as K } from "./set-request-cookies.js";
|
|
8
|
+
import { replaceTemplateVariables as s } from "../string-template.js";
|
|
9
|
+
import { isDefined as M, mergeUrls as Y, shouldUseProxy as g, redirectToProxy as G } from "@scalar/oas-utils/helpers";
|
|
10
|
+
import { buildRequestSecurity as J } from "./build-request-security.js";
|
|
11
11
|
const ce = ({
|
|
12
|
-
environment:
|
|
13
|
-
example:
|
|
14
|
-
globalCookies:
|
|
15
|
-
proxyUrl:
|
|
12
|
+
environment: C,
|
|
13
|
+
example: i,
|
|
14
|
+
globalCookies: R,
|
|
15
|
+
proxyUrl: c,
|
|
16
16
|
request: d,
|
|
17
17
|
securitySchemes: P,
|
|
18
18
|
selectedSecuritySchemeUids: T = [],
|
|
19
|
-
server:
|
|
19
|
+
server: a,
|
|
20
20
|
status: o
|
|
21
21
|
}) => {
|
|
22
22
|
try {
|
|
23
|
-
const t =
|
|
23
|
+
const t = C ?? {}, p = new AbortController(), y = i.parameters.path.reduce((r, e) => (e.enabled && (r[e.key] = s(e.value, t)), r), {}), q = s((a == null ? void 0 : a.url) ?? "", t), h = s(d.path, y);
|
|
24
24
|
let n = q || h;
|
|
25
25
|
if (!n)
|
|
26
26
|
throw k.URL_EMPTY;
|
|
27
|
-
Object.entries((
|
|
28
|
-
n =
|
|
29
|
-
[r]:
|
|
27
|
+
Object.entries((a == null ? void 0 : a.variables) ?? {}).forEach(([r, e]) => {
|
|
28
|
+
n = s(n, {
|
|
29
|
+
[r]: y[r] || e.default
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
const H =
|
|
33
|
-
example:
|
|
32
|
+
const H = Q(i, t), U = I(i, t), { body: E } = A(d.method, i, t), { cookieParams: L } = X({
|
|
33
|
+
example: i,
|
|
34
34
|
env: t,
|
|
35
|
-
globalCookies:
|
|
35
|
+
globalCookies: R,
|
|
36
36
|
serverUrl: n,
|
|
37
|
-
proxyUrl:
|
|
38
|
-
}), D = T.flat().map((r) => P[r]).filter(M), l =
|
|
37
|
+
proxyUrl: c
|
|
38
|
+
}), D = T.flat().map((r) => P[r]).filter(M), l = J(D, t), m = { ...Object.entries(l.headers).reduce(
|
|
39
39
|
(r, [e, u]) => (r[e.toLowerCase()] = u, r),
|
|
40
40
|
{}
|
|
41
|
-
), ...U },
|
|
42
|
-
n = Y(n, h,
|
|
43
|
-
const f =
|
|
44
|
-
f && (
|
|
41
|
+
), ...U }, z = [...L, ...l.cookies], F = new URLSearchParams([...H, ...l.urlParams]);
|
|
42
|
+
n = Y(n, h, F);
|
|
43
|
+
const f = s(K(z, m.Cookie), t);
|
|
44
|
+
f && (g(c, n) ? (console.warn(
|
|
45
45
|
"We’re using a `X-Scalar-Cookie` custom header to the request. The proxy will forward this as a `Cookie` header. We do this to avoid the browser omitting the `Cookie` header for cross-origin requests for security reasons."
|
|
46
46
|
), m["X-Scalar-Cookie"] = f) : (console.warn(
|
|
47
47
|
`We’re trying to add a Cookie header, but browsers often omit them for cross-origin requests for various security reasons. If it’s not working, that’s probably why. Here are the requirements for it to work:
|
|
@@ -50,35 +50,35 @@ const ce = ({
|
|
|
50
50
|
- The connection must be made over HTTPS.
|
|
51
51
|
`
|
|
52
52
|
), m.Cookie = f));
|
|
53
|
-
const
|
|
53
|
+
const _ = G(c, n), S = new Request(_, {
|
|
54
54
|
method: d.method.toUpperCase(),
|
|
55
|
-
body:
|
|
55
|
+
body: E ?? null,
|
|
56
56
|
headers: m
|
|
57
57
|
});
|
|
58
58
|
return [
|
|
59
59
|
null,
|
|
60
60
|
{
|
|
61
|
-
request:
|
|
61
|
+
request: S,
|
|
62
62
|
sendRequest: async () => {
|
|
63
63
|
o == null || o.emit("start");
|
|
64
64
|
const r = Date.now();
|
|
65
65
|
try {
|
|
66
|
-
const e = await fetch(
|
|
67
|
-
signal:
|
|
66
|
+
const e = await fetch(S, {
|
|
67
|
+
signal: p.signal
|
|
68
68
|
});
|
|
69
69
|
o == null || o.emit("stop");
|
|
70
|
-
const u =
|
|
70
|
+
const u = j(e.headers, g(c, n)), B = e.headers.get("content-type") ?? "text/plain;charset=UTF-8", b = await e.arrayBuffer(), O = V(b, B), W = "getSetCookie" in e.headers && typeof e.headers.getSetCookie == "function" ? e.headers.getSetCookie() : [];
|
|
71
71
|
return [
|
|
72
72
|
null,
|
|
73
73
|
{
|
|
74
74
|
timestamp: Date.now(),
|
|
75
|
-
request:
|
|
75
|
+
request: i,
|
|
76
76
|
response: {
|
|
77
77
|
...e,
|
|
78
78
|
headers: u,
|
|
79
|
-
cookieHeaderKeys:
|
|
80
|
-
data:
|
|
81
|
-
size:
|
|
79
|
+
cookieHeaderKeys: W,
|
|
80
|
+
data: O,
|
|
81
|
+
size: b.byteLength,
|
|
82
82
|
duration: Date.now() - r,
|
|
83
83
|
method: d.method,
|
|
84
84
|
status: e.status,
|
|
@@ -87,14 +87,14 @@ const ce = ({
|
|
|
87
87
|
}
|
|
88
88
|
];
|
|
89
89
|
} catch (e) {
|
|
90
|
-
return o == null || o.emit("abort"), [
|
|
90
|
+
return o == null || o.emit("abort"), [w(e, k.REQUEST_FAILED), null];
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
controller:
|
|
93
|
+
controller: p
|
|
94
94
|
}
|
|
95
95
|
];
|
|
96
96
|
} catch (t) {
|
|
97
|
-
return console.error(t), o == null || o.emit("abort"), [
|
|
97
|
+
return console.error(t), o == null || o.emit("abort"), [w(t), null];
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
export {
|
|
@@ -49,6 +49,21 @@ export declare const createRequestPayload: (metaRequestPayload?: MetaRequestPayl
|
|
|
49
49
|
}[] | undefined;
|
|
50
50
|
requestBody?: any;
|
|
51
51
|
responses?: Record<string, any> | undefined;
|
|
52
|
+
'x-codeSamples'?: {
|
|
53
|
+
source: string;
|
|
54
|
+
label?: string | undefined;
|
|
55
|
+
lang?: string | undefined;
|
|
56
|
+
}[] | undefined;
|
|
57
|
+
'x-code-samples'?: {
|
|
58
|
+
source: string;
|
|
59
|
+
label?: string | undefined;
|
|
60
|
+
lang?: string | undefined;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
'x-custom-examples'?: {
|
|
63
|
+
source: string;
|
|
64
|
+
label?: string | undefined;
|
|
65
|
+
lang?: string | undefined;
|
|
66
|
+
}[] | undefined;
|
|
52
67
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
53
68
|
};
|
|
54
69
|
environment: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-request-operation.test.d.ts","sourceRoot":"","sources":["../../../src/libs/send-request/create-request-operation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,oBAAoB,EAIrB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQ5B,eAAO,MAAM,QAAQ,0BAAkC,CAAA;AAEvD,KAAK,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,KAAK,kBAAkB,GAAG;IACxB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,wBAAwB,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"create-request-operation.test.d.ts","sourceRoot":"","sources":["../../../src/libs/send-request/create-request-operation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,oBAAoB,EAIrB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQ5B,eAAO,MAAM,QAAQ,0BAAkC,CAAA;AAEvD,KAAK,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,KAAK,kBAAkB,GAAG;IACxB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,wBAAwB,kBAAkB;;;sBA06BvB,EAAG,KAAK;;;+CAIA,EAAG,KAAK,gCAA+B,EAAG,KAAK;qCAA0D,EAAG,KAAK;2BAA0C,EAAG,KAAK;4BAAsC,EAAG,KAAK;;;;;;uBAAyP,CAAC;;;;;;;;;;;;;uBAA0c,CAAC;mBAAqC,CAAC;kBAAyB,CAAC;mBAA0B,CAAC;iBAAwB,CAAC;oBAA0H,CAAC;qBAAgD,CAAC;uBAA8B,CAAC;;;;;;;iBAAwM,CAAC;gBAAkC,CAAC;;;;iBAAyG,CAAC;gBAAkC,CAAC;;;;iBAA4G,CAAC;gBAAkC,CAAC;;;;;;;sBAA6vY,EAAG,KAAK;;;;;oBAA0I,CAAC;;;;;2BAA8I,CAAC;wBAA0C,CAAC;2BAAwD,CAAC;+BAAiD,CAAC;2BAA6C,CAAC;4BAA+B,CAAC;4BAA+C,CAAC;0BAA8C,CAAC;wBAA0C,CAAC;wBAA4C,CAAC;4BAA+B,CAAC;;;;kBAA+H,CAAC;eAA+B,CAAC;;;wBAA2I,CAAC;;;;;;;;uBAA2L,CAAC;oBAAsC,CAAC;uBAAoD,CAAC;2BAA6C,CAAC;uBAAyC,CAAC;wBAA2B,CAAC;wBAA2C,CAAC;sBAA0C,CAAC;oBAAsC,CAAC;oBAAwC,CAAC;wBAA2B,CAAC;;;;;;uBAA0J,CAAC;oBAAsC,CAAC;uBAAoD,CAAC;2BAA6C,CAAC;uBAAyC,CAAC;wBAA2B,CAAC;wBAA2C,CAAC;sBAA0C,CAAC;oBAAsC,CAAC;oBAAwC,CAAC;wBAA2B,CAAC;;;;;;uBAA4J,CAAC;oBAAsC,CAAC;uBAAoD,CAAC;2BAA6C,CAAC;uBAAyC,CAAC;wBAA2B,CAAC;wBAA2C,CAAC;sBAA0C,CAAC;oBAAsC,CAAC;oBAAwC,CAAC;wBAA2B,CAAC;;;;;;uBAA4J,CAAC;oBAAsC,CAAC;uBAAoD,CAAC;2BAA6C,CAAC;uBAAyC,CAAC;wBAA2B,CAAC;wBAA2C,CAAC;sBAA0C,CAAC;oBAAsC,CAAC;oBAAwC,CAAC;wBAA2B,CAAC;;;+BAAqE,EAAG,KAAK;;;;sBA7rB1ziB,EAAA,KAAR;;;;iBAMF,CAAD;uBAGQ,CAAC;mBAGY,CAAC;gBAAkC,CAAC;;;;;CAtO7D,CAAA"}
|
|
@@ -220,6 +220,21 @@ export declare const createActiveEntitiesStore: ({ collections, requestExamples,
|
|
|
220
220
|
}[] | undefined;
|
|
221
221
|
requestBody?: any;
|
|
222
222
|
responses?: Record<string, any> | undefined;
|
|
223
|
+
'x-codeSamples'?: {
|
|
224
|
+
source: string;
|
|
225
|
+
label?: string | undefined;
|
|
226
|
+
lang?: string | undefined;
|
|
227
|
+
}[] | undefined;
|
|
228
|
+
'x-code-samples'?: {
|
|
229
|
+
source: string;
|
|
230
|
+
label?: string | undefined;
|
|
231
|
+
lang?: string | undefined;
|
|
232
|
+
}[] | undefined;
|
|
233
|
+
'x-custom-examples'?: {
|
|
234
|
+
source: string;
|
|
235
|
+
label?: string | undefined;
|
|
236
|
+
lang?: string | undefined;
|
|
237
|
+
}[] | undefined;
|
|
223
238
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
224
239
|
} | undefined>;
|
|
225
240
|
activeRouterParams: import("vue").ComputedRef<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-entities.d.ts","sourceRoot":"","sources":["../../src/store/active-entities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAErE,OAAO,EAAE,KAAK,YAAY,EAAoB,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAGxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAE/D,KAAK,+BAA+B,GAAG;IACrC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACvC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACzC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,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AAErH,KAAK,kBAAkB,GAAG,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAA;AAEhG,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,EACpC,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,GACX,EAAE,YAAY;4BAEJ,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBACrB,MAAM,YACX,kBAAkB;;;;gBAmD4B,YAAa,QAClE;;;;;;6BAPG,MAAM,gBACG,MAAM,6BAIjB,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC,KACvF,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,SArDlC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBACrB,MAAM,YACX,kBAAkB;;;;gBAmD4B,YAAa,QAClE;;;;;mBAD8D,CAAC,CAAC,CAAC;EAqBtE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createHash as y,
|
|
2
|
-
import { importSpecToWorkspace as
|
|
3
|
-
import { toRaw as
|
|
4
|
-
import { normalizeError as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
1
|
+
import { createHash as y, fetchDocument as R } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { importSpecToWorkspace as S } from "@scalar/oas-utils/transforms";
|
|
3
|
+
import { toRaw as g } from "vue";
|
|
4
|
+
import { normalizeError as w } from "../libs/errors.js";
|
|
5
|
+
const F = {};
|
|
6
|
+
function O({
|
|
7
7
|
requestMutators: s,
|
|
8
8
|
collectionMutators: l,
|
|
9
9
|
serverMutators: m,
|
|
@@ -15,12 +15,12 @@ function T({
|
|
|
15
15
|
}) {
|
|
16
16
|
const n = async (t, a, e = {}) => {
|
|
17
17
|
var i;
|
|
18
|
-
const c =
|
|
18
|
+
const c = g(t), r = await S(c, e);
|
|
19
19
|
if (r.error) {
|
|
20
20
|
console.group("IMPORT ERRORS"), r.importWarnings.forEach((o) => console.warn(o)), console.groupEnd();
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
return e.documentUrl && typeof c == "string" && (
|
|
23
|
+
return e.documentUrl && typeof c == "string" && (F[e.documentUrl] = {
|
|
24
24
|
hash: y(c),
|
|
25
25
|
schema: r.schema
|
|
26
26
|
}), r.examples.forEach((o) => f.add(o)), r.requests.forEach((o) => s.add(o)), r.tags.forEach((o) => p.add(o)), r.servers.forEach((o) => m.add(o)), r.securitySchemes.forEach((o) => d.add(o)), l.add(r.collection), u.edit(a, "collections", [
|
|
@@ -33,7 +33,7 @@ function T({
|
|
|
33
33
|
...c
|
|
34
34
|
} = {}) {
|
|
35
35
|
try {
|
|
36
|
-
const r = await
|
|
36
|
+
const r = await R(t, e);
|
|
37
37
|
return [
|
|
38
38
|
null,
|
|
39
39
|
await n(r, a, {
|
|
@@ -42,7 +42,7 @@ function T({
|
|
|
42
42
|
})
|
|
43
43
|
];
|
|
44
44
|
} catch (r) {
|
|
45
|
-
return console.error("Failed to fetch spec from URL:", r), [
|
|
45
|
+
return console.error("Failed to fetch spec from URL:", r), [w(r), null];
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
return {
|
|
@@ -51,6 +51,6 @@ function T({
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
O as importSpecFileFactory,
|
|
55
|
+
F as specDictionary
|
|
56
56
|
};
|
package/dist/store/requests.d.ts
CHANGED
|
@@ -41,6 +41,21 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
41
41
|
}[] | undefined;
|
|
42
42
|
requestBody?: any;
|
|
43
43
|
responses?: Record<string, any> | undefined;
|
|
44
|
+
'x-codeSamples'?: {
|
|
45
|
+
source: string;
|
|
46
|
+
label?: string | undefined;
|
|
47
|
+
lang?: string | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
'x-code-samples'?: {
|
|
50
|
+
source: string;
|
|
51
|
+
label?: string | undefined;
|
|
52
|
+
lang?: string | undefined;
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
'x-custom-examples'?: {
|
|
55
|
+
source: string;
|
|
56
|
+
label?: string | undefined;
|
|
57
|
+
lang?: string | undefined;
|
|
58
|
+
}[] | undefined;
|
|
44
59
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
45
60
|
}>;
|
|
46
61
|
requestMutators: {
|
|
@@ -82,6 +97,21 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
82
97
|
}[] | undefined;
|
|
83
98
|
requestBody?: any;
|
|
84
99
|
responses?: Record<string, any> | undefined;
|
|
100
|
+
'x-codeSamples'?: {
|
|
101
|
+
source: string;
|
|
102
|
+
label?: string | undefined;
|
|
103
|
+
lang?: string | undefined;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
'x-code-samples'?: {
|
|
106
|
+
source: string;
|
|
107
|
+
label?: string | undefined;
|
|
108
|
+
lang?: string | undefined;
|
|
109
|
+
}[] | undefined;
|
|
110
|
+
'x-custom-examples'?: {
|
|
111
|
+
source: string;
|
|
112
|
+
label?: string | undefined;
|
|
113
|
+
lang?: string | undefined;
|
|
114
|
+
}[] | undefined;
|
|
85
115
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
86
116
|
}) => void;
|
|
87
117
|
delete: (uid: (string & import("zod").BRAND<"operation">) | null | undefined) => void;
|
|
@@ -123,9 +153,24 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
123
153
|
}[] | undefined;
|
|
124
154
|
requestBody?: any;
|
|
125
155
|
responses?: Record<string, any> | undefined;
|
|
156
|
+
'x-codeSamples'?: {
|
|
157
|
+
source: string;
|
|
158
|
+
label?: string | undefined;
|
|
159
|
+
lang?: string | undefined;
|
|
160
|
+
}[] | undefined;
|
|
161
|
+
'x-code-samples'?: {
|
|
162
|
+
source: string;
|
|
163
|
+
label?: string | undefined;
|
|
164
|
+
lang?: string | undefined;
|
|
165
|
+
}[] | undefined;
|
|
166
|
+
'x-custom-examples'?: {
|
|
167
|
+
source: string;
|
|
168
|
+
label?: string | undefined;
|
|
169
|
+
lang?: string | undefined;
|
|
170
|
+
}[] | undefined;
|
|
126
171
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
127
172
|
}) => void;
|
|
128
|
-
edit: <P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `selectedSecuritySchemeUids.${number}` | `selectedSecuritySchemeUids.${number}.${number}` | `servers.${number}` | "examples" | `requestBody.${string}` | `examples.${number}` | `parameters.${number}` | `parameters.${number}.description` | `parameters.${number}.deprecated` | `parameters.${number}.example` | `parameters.${number}.name` | `parameters.${number}.in` | `parameters.${number}.style` | `parameters.${number}.examples` | `parameters.${number}.content` | `parameters.${number}.required` | `parameters.${number}.schema` | `parameters.${number}.examples.${number}` | `parameters.${number}.examples.${string}` | `responses.${string}`>(uid: (string & import("zod").BRAND<"operation">) | null | undefined, path: P, value: P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? {
|
|
173
|
+
edit: <P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-codeSamples" | "x-code-samples" | "x-custom-examples" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `selectedSecuritySchemeUids.${number}` | `selectedSecuritySchemeUids.${number}.${number}` | `servers.${number}` | "examples" | `requestBody.${string}` | `examples.${number}` | `parameters.${number}` | `parameters.${number}.description` | `parameters.${number}.deprecated` | `parameters.${number}.example` | `parameters.${number}.name` | `parameters.${number}.in` | `parameters.${number}.style` | `parameters.${number}.examples` | `parameters.${number}.content` | `parameters.${number}.required` | `parameters.${number}.schema` | `parameters.${number}.examples.${number}` | `parameters.${number}.examples.${string}` | `responses.${string}` | `x-codeSamples.${number}` | `x-codeSamples.${number}.label` | `x-codeSamples.${number}.source` | `x-codeSamples.${number}.lang` | `x-code-samples.${number}` | `x-code-samples.${number}.label` | `x-code-samples.${number}.source` | `x-code-samples.${number}.lang` | `x-custom-examples.${number}` | `x-custom-examples.${number}.label` | `x-custom-examples.${number}.source` | `x-custom-examples.${number}.lang`>(uid: (string & import("zod").BRAND<"operation">) | null | undefined, path: P, value: P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-codeSamples" | "x-code-samples" | "x-custom-examples" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? {
|
|
129
174
|
uid: string & import("zod").BRAND<"operation">;
|
|
130
175
|
path: string;
|
|
131
176
|
type: "request";
|
|
@@ -163,8 +208,23 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
163
208
|
}[] | undefined;
|
|
164
209
|
requestBody?: any;
|
|
165
210
|
responses?: Record<string, any> | undefined;
|
|
211
|
+
'x-codeSamples'?: {
|
|
212
|
+
source: string;
|
|
213
|
+
label?: string | undefined;
|
|
214
|
+
lang?: string | undefined;
|
|
215
|
+
}[] | undefined;
|
|
216
|
+
'x-code-samples'?: {
|
|
217
|
+
source: string;
|
|
218
|
+
label?: string | undefined;
|
|
219
|
+
lang?: string | undefined;
|
|
220
|
+
}[] | undefined;
|
|
221
|
+
'x-custom-examples'?: {
|
|
222
|
+
source: string;
|
|
223
|
+
label?: string | undefined;
|
|
224
|
+
lang?: string | undefined;
|
|
225
|
+
}[] | undefined;
|
|
166
226
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
167
|
-
}[P] : P extends `${infer K}.${infer R}` ? K extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
227
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-codeSamples" | "x-code-samples" | "x-custom-examples" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
168
228
|
uid: string & import("zod").BRAND<"operation">;
|
|
169
229
|
path: string;
|
|
170
230
|
type: "request";
|
|
@@ -202,6 +262,21 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
202
262
|
}[] | undefined;
|
|
203
263
|
requestBody?: any;
|
|
204
264
|
responses?: Record<string, any> | undefined;
|
|
265
|
+
'x-codeSamples'?: {
|
|
266
|
+
source: string;
|
|
267
|
+
label?: string | undefined;
|
|
268
|
+
lang?: string | undefined;
|
|
269
|
+
}[] | undefined;
|
|
270
|
+
'x-code-samples'?: {
|
|
271
|
+
source: string;
|
|
272
|
+
label?: string | undefined;
|
|
273
|
+
lang?: string | undefined;
|
|
274
|
+
}[] | undefined;
|
|
275
|
+
'x-custom-examples'?: {
|
|
276
|
+
source: string;
|
|
277
|
+
label?: string | undefined;
|
|
278
|
+
lang?: string | undefined;
|
|
279
|
+
}[] | undefined;
|
|
205
280
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
206
281
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
207
282
|
uid: string & import("zod").BRAND<"operation">;
|
|
@@ -241,9 +316,24 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
241
316
|
}[] | undefined;
|
|
242
317
|
requestBody?: any;
|
|
243
318
|
responses?: Record<string, any> | undefined;
|
|
319
|
+
'x-codeSamples'?: {
|
|
320
|
+
source: string;
|
|
321
|
+
label?: string | undefined;
|
|
322
|
+
lang?: string | undefined;
|
|
323
|
+
}[] | undefined;
|
|
324
|
+
'x-code-samples'?: {
|
|
325
|
+
source: string;
|
|
326
|
+
label?: string | undefined;
|
|
327
|
+
lang?: string | undefined;
|
|
328
|
+
}[] | undefined;
|
|
329
|
+
'x-custom-examples'?: {
|
|
330
|
+
source: string;
|
|
331
|
+
label?: string | undefined;
|
|
332
|
+
lang?: string | undefined;
|
|
333
|
+
}[] | undefined;
|
|
244
334
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
245
335
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
246
|
-
untrackedEdit: <P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `selectedSecuritySchemeUids.${number}` | `selectedSecuritySchemeUids.${number}.${number}` | `servers.${number}` | "examples" | `requestBody.${string}` | `examples.${number}` | `parameters.${number}` | `parameters.${number}.description` | `parameters.${number}.deprecated` | `parameters.${number}.example` | `parameters.${number}.name` | `parameters.${number}.in` | `parameters.${number}.style` | `parameters.${number}.examples` | `parameters.${number}.content` | `parameters.${number}.required` | `parameters.${number}.schema` | `parameters.${number}.examples.${number}` | `parameters.${number}.examples.${string}` | `responses.${string}`>(uid: string & import("zod").BRAND<"operation">, path: P, value: P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? {
|
|
336
|
+
untrackedEdit: <P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-codeSamples" | "x-code-samples" | "x-custom-examples" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | `tags.${number}` | `security.${number}` | `security.${number}.${string}` | "externalDocs.description" | "externalDocs.url" | `selectedSecuritySchemeUids.${number}` | `selectedSecuritySchemeUids.${number}.${number}` | `servers.${number}` | "examples" | `requestBody.${string}` | `examples.${number}` | `parameters.${number}` | `parameters.${number}.description` | `parameters.${number}.deprecated` | `parameters.${number}.example` | `parameters.${number}.name` | `parameters.${number}.in` | `parameters.${number}.style` | `parameters.${number}.examples` | `parameters.${number}.content` | `parameters.${number}.required` | `parameters.${number}.schema` | `parameters.${number}.examples.${number}` | `parameters.${number}.examples.${string}` | `responses.${string}` | `x-codeSamples.${number}` | `x-codeSamples.${number}.label` | `x-codeSamples.${number}.source` | `x-codeSamples.${number}.lang` | `x-code-samples.${number}` | `x-code-samples.${number}.label` | `x-code-samples.${number}.source` | `x-code-samples.${number}.lang` | `x-custom-examples.${number}` | `x-custom-examples.${number}.label` | `x-custom-examples.${number}.source` | `x-custom-examples.${number}.lang`>(uid: string & import("zod").BRAND<"operation">, path: P, value: P extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-codeSamples" | "x-code-samples" | "x-custom-examples" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? {
|
|
247
337
|
uid: string & import("zod").BRAND<"operation">;
|
|
248
338
|
path: string;
|
|
249
339
|
type: "request";
|
|
@@ -281,8 +371,23 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
281
371
|
}[] | undefined;
|
|
282
372
|
requestBody?: any;
|
|
283
373
|
responses?: Record<string, any> | undefined;
|
|
374
|
+
'x-codeSamples'?: {
|
|
375
|
+
source: string;
|
|
376
|
+
label?: string | undefined;
|
|
377
|
+
lang?: string | undefined;
|
|
378
|
+
}[] | undefined;
|
|
379
|
+
'x-code-samples'?: {
|
|
380
|
+
source: string;
|
|
381
|
+
label?: string | undefined;
|
|
382
|
+
lang?: string | undefined;
|
|
383
|
+
}[] | undefined;
|
|
384
|
+
'x-custom-examples'?: {
|
|
385
|
+
source: string;
|
|
386
|
+
label?: string | undefined;
|
|
387
|
+
lang?: string | undefined;
|
|
388
|
+
}[] | undefined;
|
|
284
389
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
285
|
-
}[P] : P extends `${infer K}.${infer R}` ? K extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
390
|
+
}[P] : P extends `${infer K}.${infer R}` ? K extends "tags" | "summary" | "description" | "operationId" | "security" | "requestBody" | "parameters" | "externalDocs" | "deprecated" | "responses" | "x-internal" | "x-scalar-ignore" | "x-codeSamples" | "x-code-samples" | "x-custom-examples" | "x-scalar-stability" | "path" | "method" | "type" | "uid" | "selectedSecuritySchemeUids" | "servers" | "selectedServerUid" | "examples" ? R extends import("@scalar/object-utils/nested").Path<{
|
|
286
391
|
uid: string & import("zod").BRAND<"operation">;
|
|
287
392
|
path: string;
|
|
288
393
|
type: "request";
|
|
@@ -320,6 +425,21 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
320
425
|
}[] | undefined;
|
|
321
426
|
requestBody?: any;
|
|
322
427
|
responses?: Record<string, any> | undefined;
|
|
428
|
+
'x-codeSamples'?: {
|
|
429
|
+
source: string;
|
|
430
|
+
label?: string | undefined;
|
|
431
|
+
lang?: string | undefined;
|
|
432
|
+
}[] | undefined;
|
|
433
|
+
'x-code-samples'?: {
|
|
434
|
+
source: string;
|
|
435
|
+
label?: string | undefined;
|
|
436
|
+
lang?: string | undefined;
|
|
437
|
+
}[] | undefined;
|
|
438
|
+
'x-custom-examples'?: {
|
|
439
|
+
source: string;
|
|
440
|
+
label?: string | undefined;
|
|
441
|
+
lang?: string | undefined;
|
|
442
|
+
}[] | undefined;
|
|
323
443
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
324
444
|
}[K]> ? import("@scalar/object-utils/nested").PathValue<{
|
|
325
445
|
uid: string & import("zod").BRAND<"operation">;
|
|
@@ -359,6 +479,21 @@ export declare function createStoreRequests(useLocalStorage: boolean): {
|
|
|
359
479
|
}[] | undefined;
|
|
360
480
|
requestBody?: any;
|
|
361
481
|
responses?: Record<string, any> | undefined;
|
|
482
|
+
'x-codeSamples'?: {
|
|
483
|
+
source: string;
|
|
484
|
+
label?: string | undefined;
|
|
485
|
+
lang?: string | undefined;
|
|
486
|
+
}[] | undefined;
|
|
487
|
+
'x-code-samples'?: {
|
|
488
|
+
source: string;
|
|
489
|
+
label?: string | undefined;
|
|
490
|
+
lang?: string | undefined;
|
|
491
|
+
}[] | undefined;
|
|
492
|
+
'x-custom-examples'?: {
|
|
493
|
+
source: string;
|
|
494
|
+
label?: string | undefined;
|
|
495
|
+
lang?: string | undefined;
|
|
496
|
+
}[] | undefined;
|
|
362
497
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
363
498
|
}[K], R> : never : K extends `${number}` ? never : never : P extends `${number}` ? never : never) => void;
|
|
364
499
|
undo: (uid: string & import("zod").BRAND<"operation">) => void;
|
|
@@ -409,6 +544,21 @@ export declare function extendedRequestDataFactory({ requestExamples, requestExa
|
|
|
409
544
|
}[] | undefined;
|
|
410
545
|
requestBody?: any;
|
|
411
546
|
responses?: Record<string, any> | undefined;
|
|
547
|
+
'x-codeSamples'?: {
|
|
548
|
+
source: string;
|
|
549
|
+
label?: string | undefined;
|
|
550
|
+
lang?: string | undefined;
|
|
551
|
+
}[] | undefined;
|
|
552
|
+
'x-code-samples'?: {
|
|
553
|
+
source: string;
|
|
554
|
+
label?: string | undefined;
|
|
555
|
+
lang?: string | undefined;
|
|
556
|
+
}[] | undefined;
|
|
557
|
+
'x-custom-examples'?: {
|
|
558
|
+
source: string;
|
|
559
|
+
label?: string | undefined;
|
|
560
|
+
lang?: string | undefined;
|
|
561
|
+
}[] | undefined;
|
|
412
562
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
413
563
|
};
|
|
414
564
|
deleteRequest: (request: Request, collectionUid: Collection["uid"]) => void;
|
|
@@ -459,6 +609,21 @@ export declare function createInitialRequest(): {
|
|
|
459
609
|
}[] | undefined;
|
|
460
610
|
requestBody?: any;
|
|
461
611
|
responses?: Record<string, any> | undefined;
|
|
612
|
+
'x-codeSamples'?: {
|
|
613
|
+
source: string;
|
|
614
|
+
label?: string | undefined;
|
|
615
|
+
lang?: string | undefined;
|
|
616
|
+
}[] | undefined;
|
|
617
|
+
'x-code-samples'?: {
|
|
618
|
+
source: string;
|
|
619
|
+
label?: string | undefined;
|
|
620
|
+
lang?: string | undefined;
|
|
621
|
+
}[] | undefined;
|
|
622
|
+
'x-custom-examples'?: {
|
|
623
|
+
source: string;
|
|
624
|
+
label?: string | undefined;
|
|
625
|
+
lang?: string | undefined;
|
|
626
|
+
}[] | undefined;
|
|
462
627
|
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
463
628
|
};
|
|
464
629
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/store/requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,GAAG,EAGT,MAAM,iCAAiC,CAAA;AAKxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,OAAO;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/store/requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,GAAG,EAGT,MAAM,iCAAiC,CAAA;AAKxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,OAAO;;;;;;;;;;;;;;uBA2Lo2oB,CAAC;;;;;;;;;;;;;uBAA0c,CAAC;mBAAqC,CAAC;kBAAyB,CAAC;mBAA0B,CAAC;iBAAwB,CAAC;oBAA0H,CAAC;qBAAgD,CAAC;uBAA8B,CAAC;;;;;;;iBAAwM,CAAC;gBAAkC,CAAC;;;;iBAAyG,CAAC;gBAAkC,CAAC;;;;iBAA4G,CAAC;gBAAkC,CAAC;;;;;;;;;;;;;;;;;;2BAApxC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