@scalar/api-reference 1.25.63 → 1.25.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 +32 -0
- package/dist/browser/standalone.js +19184 -19124
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/Anchor/Anchor.vue.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.vue.js +2 -2
- package/dist/components/Anchor/Anchor.vue2.js +4 -4
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +59 -61
- package/dist/components/Content/Operation/OperationAccordion.vue.js +2 -2
- package/dist/components/Content/Operation/OperationAccordion.vue2.js +18 -18
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +7 -7
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +17 -17
- package/dist/features/ApiClientModal/useApiClient.d.ts +634 -302
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +4 -4
- package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +4 -5
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +4 -4
- package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +27 -23
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +36 -35
- package/dist/features/ExampleResponses/ExampleResponses.vue.js +3 -3
- package/dist/features/ExampleResponses/ExampleResponses.vue2.js +14 -14
- package/dist/helpers/getApiClientRequest.js +19 -19
- package/dist/helpers/getExampleCode.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.js +16 -14
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useReactiveSpec.d.ts +7 -7
- package/dist/index.js +33 -37
- package/dist/legacy/components/SecurityScheme.vue.js +2 -2
- package/dist/legacy/components/SecurityScheme.vue2.js +8 -8
- package/dist/legacy/helpers/getUrlFromServerState.d.ts +4 -1
- package/dist/legacy/helpers/getUrlFromServerState.d.ts.map +1 -1
- package/dist/legacy/helpers/getUrlFromServerState.js +15 -6
- package/dist/legacy/helpers/prepareClientRequestConfig.d.ts +1 -1
- package/dist/legacy/stores/useOpenApiStore.d.ts +5 -5
- package/dist/legacy/stores/useServerStore.d.ts.map +1 -1
- package/dist/legacy/stores/useServerStore.js +47 -36
- package/dist/style.css +1 -1
- package/package.json +8 -7
- package/dist/hooks/useClipboard.d.ts +0 -4
- package/dist/hooks/useClipboard.d.ts.map +0 -1
- package/dist/hooks/useClipboard.js +0 -14
- package/dist/hooks/useDarkModeState.d.ts +0 -7
- package/dist/hooks/useDarkModeState.d.ts.map +0 -1
- package/dist/hooks/useDarkModeState.js +0 -31
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { getRequestFromOperation as
|
|
2
|
-
import { getHarRequest as
|
|
1
|
+
import { getRequestFromOperation as a, getParametersFromOperation as p } from "@scalar/oas-utils/spec-getters";
|
|
2
|
+
import { getHarRequest as q } from "./getHarRequest.js";
|
|
3
3
|
import { getRequestFromAuthentication as c } from "../legacy/helpers/getRequestFromAuthentication.js";
|
|
4
|
-
import { getUrlFromServerState as
|
|
4
|
+
import { getUrlFromServerState as n } from "../legacy/helpers/getUrlFromServerState.js";
|
|
5
5
|
function O({
|
|
6
6
|
serverState: t,
|
|
7
7
|
authenticationState: o,
|
|
8
8
|
operation: e,
|
|
9
|
-
globalSecurity:
|
|
9
|
+
globalSecurity: d
|
|
10
10
|
}) {
|
|
11
|
-
var
|
|
12
|
-
const r =
|
|
11
|
+
var m, u;
|
|
12
|
+
const r = q(
|
|
13
13
|
{
|
|
14
|
-
url:
|
|
14
|
+
url: n(t).modifiedUrl
|
|
15
15
|
},
|
|
16
|
-
|
|
16
|
+
a(e, { requiredOnly: !1 }),
|
|
17
17
|
// Only generate authentication parameters if an authentication state is passed.
|
|
18
18
|
o ? c(
|
|
19
19
|
o,
|
|
20
|
-
((
|
|
20
|
+
((m = e.information) == null ? void 0 : m.security) ?? d ?? []
|
|
21
21
|
) : {}
|
|
22
|
-
),
|
|
22
|
+
), l = a(e, {
|
|
23
23
|
requiredOnly: !1
|
|
24
|
-
}),
|
|
24
|
+
}), f = p(e, "path", !1);
|
|
25
25
|
return {
|
|
26
26
|
id: e.operationId,
|
|
27
27
|
name: e.name,
|
|
28
28
|
type: r.method,
|
|
29
|
-
path:
|
|
30
|
-
variables:
|
|
31
|
-
cookies:
|
|
32
|
-
query: r.queryString.map((
|
|
33
|
-
headers:
|
|
34
|
-
url:
|
|
35
|
-
body: (
|
|
29
|
+
path: l.path ?? "",
|
|
30
|
+
variables: f,
|
|
31
|
+
cookies: s(r.cookies),
|
|
32
|
+
query: r.queryString.map((i) => ({ ...i, enabled: i.required ?? !0 })),
|
|
33
|
+
headers: s(r.headers),
|
|
34
|
+
url: n(t).modifiedUrl ?? "",
|
|
35
|
+
body: (u = r.postData) == null ? void 0 : u.text
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function s(t) {
|
|
39
39
|
return (t ?? []).map((o) => ({ ...o, enabled: !0 }));
|
|
40
40
|
}
|
|
41
41
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AAEjE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"getExampleCode.d.ts","sourceRoot":"","sources":["../../src/helpers/getExampleCode.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,QAAQ,IAAI,gBAAgB,EAElC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,KAAK,QAAQ,IAAI,uBAAuB,EACxC,KAAK,QAAQ,IAAI,uBAAuB,EACzC,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AACjE,MAAM,MAAM,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CAAA;AAEjE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,mBAyCjB"}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import { snippetz as
|
|
1
|
+
import { snippetz as r } from "@scalar/snippetz";
|
|
2
2
|
import { HTTPSnippet as s } from "httpsnippet-lite";
|
|
3
|
-
async function
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
return
|
|
7
|
-
e,
|
|
3
|
+
async function f(e, t, p) {
|
|
4
|
+
const o = t;
|
|
5
|
+
if (r().hasPlugin(o, p))
|
|
6
|
+
return r().print(
|
|
8
7
|
t,
|
|
9
|
-
|
|
8
|
+
p,
|
|
9
|
+
e
|
|
10
10
|
);
|
|
11
|
+
if (e.url.startsWith("__"))
|
|
12
|
+
return e.url;
|
|
11
13
|
try {
|
|
12
|
-
const
|
|
14
|
+
const n = t == null ? void 0 : t.replace(
|
|
13
15
|
"js",
|
|
14
16
|
"javascript"
|
|
15
|
-
), c =
|
|
16
|
-
|
|
17
|
+
), c = p, i = await new s(e).convert(
|
|
18
|
+
n,
|
|
17
19
|
c
|
|
18
20
|
);
|
|
19
|
-
if (typeof
|
|
20
|
-
} catch (
|
|
21
|
+
if (typeof i == "string") return i;
|
|
22
|
+
} catch (n) {
|
|
21
23
|
console.error(
|
|
22
24
|
"[getExampleCode] Failed to generate example code with httpsnippet-lite:",
|
|
23
|
-
|
|
25
|
+
n
|
|
24
26
|
);
|
|
25
27
|
}
|
|
26
28
|
return "";
|
|
27
29
|
}
|
|
28
30
|
export {
|
|
29
|
-
|
|
31
|
+
f as getExampleCode
|
|
30
32
|
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
|
|
@@ -38,11 +38,11 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
|
|
|
38
38
|
default?: any;
|
|
39
39
|
format?: string | undefined;
|
|
40
40
|
description?: string | undefined;
|
|
41
|
-
properties?: Record<string, import("@scalar/types
|
|
41
|
+
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
42
42
|
} | undefined;
|
|
43
43
|
example?: any;
|
|
44
44
|
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
45
|
-
content?: import("@scalar/types
|
|
45
|
+
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
46
46
|
headers?: {
|
|
47
47
|
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
48
48
|
} | undefined;
|
|
@@ -52,7 +52,7 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
|
|
|
52
52
|
requestBody?: {
|
|
53
53
|
description?: string | undefined;
|
|
54
54
|
required?: boolean | undefined;
|
|
55
|
-
content?: import("@scalar/types
|
|
55
|
+
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
56
56
|
} | undefined;
|
|
57
57
|
summary?: string | undefined;
|
|
58
58
|
tags?: string[] | undefined;
|
|
@@ -90,11 +90,11 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
|
|
|
90
90
|
default?: any;
|
|
91
91
|
format?: string | undefined;
|
|
92
92
|
description?: string | undefined;
|
|
93
|
-
properties?: Record<string, import("@scalar/types
|
|
93
|
+
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
94
94
|
} | undefined;
|
|
95
95
|
example?: any;
|
|
96
96
|
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
97
|
-
content?: import("@scalar/types
|
|
97
|
+
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
98
98
|
headers?: {
|
|
99
99
|
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
100
100
|
} | undefined;
|
|
@@ -205,8 +205,8 @@ export declare function useReactiveSpec({ specConfig, proxy, }: {
|
|
|
205
205
|
callbacks?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.CallbackObject> | undefined;
|
|
206
206
|
pathItems?: Record<string, import("@scalar/openapi-types").OpenAPIV3_1.ReferenceObject | import("@scalar/openapi-types").OpenAPIV3_1.PathItemObject> | undefined;
|
|
207
207
|
} | undefined;
|
|
208
|
-
webhooks?: import("@scalar/types
|
|
209
|
-
definitions?: import("@scalar/types
|
|
208
|
+
webhooks?: import("@scalar/types").Webhooks | undefined;
|
|
209
|
+
definitions?: import("@scalar/types").Definitions | undefined;
|
|
210
210
|
swagger?: import("@scalar/openapi-types").OpenAPIV2.Document["swagger"];
|
|
211
211
|
openapi?: import("@scalar/openapi-types").OpenAPIV3.Document["openapi"] | import("@scalar/openapi-types").OpenAPIV3_1.Document["openapi"];
|
|
212
212
|
'x-tagGroups'?: {
|