@scalar/api-reference 1.25.104 → 1.25.106
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 +34 -0
- package/dist/browser/standalone.js +7083 -7073
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +119 -131
- package/dist/components/Content/Lazy/Loading.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue.js +2 -2
- package/dist/components/Content/Models/Models.vue2.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue.js +2 -2
- package/dist/components/Content/Models/ModelsAccordion.vue2.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +3 -3
- package/dist/components/Content/Tag/TagList.vue.js +3 -3
- package/dist/components/Section/CompactSection.vue2.js +4 -4
- package/dist/components/Section/Section.vue2.js +3 -3
- package/dist/components/Sidebar/Sidebar.vue2.js +3 -3
- package/dist/components/Sidebar/SidebarElement.vue2.js +6 -6
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.d.ts.map +1 -1
- package/dist/features/DownloadLink/DownloadLink.vue.js +2 -2
- package/dist/features/DownloadLink/DownloadLink.vue2.js +14 -21
- package/dist/features/Operation/Webhooks.vue.js +3 -3
- package/dist/features/Operation/Webhooks.vue2.js +9 -9
- package/dist/features/Operation/components/OperationParameters.vue.d.ts +2 -2
- package/dist/features/Operation/components/OperationParameters.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/OperationParameters.vue.js +34 -49
- package/dist/features/Operation/components/ParameterList.vue.d.ts +2 -2
- package/dist/features/Operation/components/ParameterList.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterList.vue.js +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts +3 -3
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue2.js +34 -31
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +37 -33
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +34 -34
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/Operation/layouts/ModernLayout.vue2.js +12 -12
- package/dist/features/Search/useSearchIndex.js +11 -11
- package/dist/features/TestRequestButton/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/TestRequestButton/TestRequestButton.vue.js +2 -2
- package/dist/features/TestRequestButton/TestRequestButton.vue2.js +21 -21
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +59 -60
- package/dist/hooks/useConfig.d.ts +6 -0
- package/dist/hooks/useConfig.d.ts.map +1 -0
- package/dist/hooks/useConfig.js +6 -0
- package/dist/hooks/useNavState.d.ts +8 -3
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +71 -59
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +149 -149
- package/dist/index.js +58 -63
- package/dist/style.css +1 -1
- package/package.json +11 -11
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts +0 -7
- package/dist/features/Operation/components/RequestBodyPropertiesChild.vue.d.ts.map +0 -1
- package/dist/helpers/provideSymbols.d.ts +0 -7
- package/dist/helpers/provideSymbols.d.ts.map +0 -1
- package/dist/helpers/provideSymbols.js +0 -7
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as w, computed as c, ref as B, openBlock as s, createElementBlock as g, createVNode as r, unref as n, withCtx as m, createBlock as u, normalizeClass as E, createTextVNode as S, toDisplayString as d, createElementVNode as f, createCommentVNode as p } from "vue";
|
|
2
2
|
import b from "../../../components/ScreenReader.vue.js";
|
|
3
|
-
import { Disclosure as
|
|
4
|
-
import { ScalarIcon as
|
|
3
|
+
import { Disclosure as V, DisclosureButton as q, DisclosurePanel as D } from "@headlessui/vue";
|
|
4
|
+
import { ScalarIcon as P } from "@scalar/components";
|
|
5
5
|
import T from "./ContentTypeSelect.vue.js";
|
|
6
6
|
import I from "./ParameterHeaders.vue.js";
|
|
7
7
|
import N from "../../../components/Content/Schema/SchemaProperty.vue.js";
|
|
8
|
-
const
|
|
8
|
+
const _ = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "parameter-item"
|
|
11
|
+
}, j = { class: "parameter-item-name" }, O = { class: "parameter-item-type" }, R = { class: "absolute right-0" }, K = /* @__PURE__ */ w({
|
|
9
12
|
__name: "ParameterListItem",
|
|
10
13
|
props: {
|
|
11
14
|
parameter: {},
|
|
@@ -14,62 +17,62 @@ const P = { class: "parameter-item" }, _ = { class: "parameter-item-name" }, j =
|
|
|
14
17
|
withExamples: { type: Boolean, default: !0 }
|
|
15
18
|
},
|
|
16
19
|
setup(v) {
|
|
17
|
-
const t = v, C =
|
|
20
|
+
const t = v, C = c(() => t.parameter.content ? Object.keys(t.parameter.content) : []), o = B(
|
|
18
21
|
C.value[0]
|
|
19
22
|
);
|
|
20
|
-
t.parameter.content && "application/json" in t.parameter.content && (
|
|
21
|
-
const a =
|
|
22
|
-
return (e,
|
|
23
|
-
r(
|
|
24
|
-
default: m(({ open:
|
|
25
|
-
a.value ? (s(),
|
|
23
|
+
t.parameter.content && "application/json" in t.parameter.content && (o.value = "application/json");
|
|
24
|
+
const a = c(() => !!(t.collapsableItems && t.parameter.content)), k = c(() => t.parameter.readOnly !== !0);
|
|
25
|
+
return (e, h) => k.value ? (s(), g("li", _, [
|
|
26
|
+
r(n(V), null, {
|
|
27
|
+
default: m(({ open: i }) => [
|
|
28
|
+
a.value ? (s(), u(n(q), {
|
|
26
29
|
key: 0,
|
|
27
|
-
class:
|
|
30
|
+
class: E(["flex parameter-item-trigger", { "parameter-item-trigger-open": i }])
|
|
28
31
|
}, {
|
|
29
32
|
default: m(() => [
|
|
30
|
-
r(
|
|
33
|
+
r(n(P), {
|
|
31
34
|
class: "parameter-item-icon",
|
|
32
|
-
icon:
|
|
35
|
+
icon: i ? "ChevronDown" : "ChevronRight",
|
|
33
36
|
thickness: "1.5"
|
|
34
37
|
}, null, 8, ["icon"]),
|
|
35
38
|
r(b, null, {
|
|
36
39
|
default: m(() => [
|
|
37
|
-
|
|
40
|
+
S(d(i ? "Collapse" : "Expand"), 1)
|
|
38
41
|
]),
|
|
39
42
|
_: 2
|
|
40
43
|
}, 1024),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
a.value && t.parameter.content ? (s(),
|
|
44
|
+
f("span", j, d(e.parameter.name), 1),
|
|
45
|
+
f("span", O, d(e.parameter.description), 1),
|
|
46
|
+
f("div", R, [
|
|
47
|
+
a.value && t.parameter.content ? (s(), u(T, {
|
|
45
48
|
key: 0,
|
|
46
49
|
class: "parameter-item-content-type",
|
|
47
|
-
defaultValue:
|
|
50
|
+
defaultValue: o.value,
|
|
48
51
|
requestBody: t.parameter,
|
|
49
|
-
onSelectContentType:
|
|
50
|
-
}, null, 8, ["defaultValue", "requestBody"])) :
|
|
52
|
+
onSelectContentType: h[0] || (h[0] = ({ contentType: l }) => o.value = l)
|
|
53
|
+
}, null, 8, ["defaultValue", "requestBody"])) : p("", !0)
|
|
51
54
|
])
|
|
52
55
|
]),
|
|
53
56
|
_: 2
|
|
54
|
-
}, 1032, ["class"])) :
|
|
55
|
-
r(
|
|
57
|
+
}, 1032, ["class"])) : p("", !0),
|
|
58
|
+
r(n(D), {
|
|
56
59
|
class: "parameter-item-container parameter-item-container-markdown",
|
|
57
60
|
static: !a.value
|
|
58
61
|
}, {
|
|
59
62
|
default: m(() => {
|
|
60
|
-
var l,
|
|
63
|
+
var l, y;
|
|
61
64
|
return [
|
|
62
|
-
e.parameter.headers ? (s(),
|
|
65
|
+
e.parameter.headers ? (s(), u(I, {
|
|
63
66
|
key: 0,
|
|
64
67
|
headers: e.parameter.headers
|
|
65
|
-
}, null, 8, ["headers"])) :
|
|
66
|
-
r(
|
|
68
|
+
}, null, 8, ["headers"])) : p("", !0),
|
|
69
|
+
r(n(N), {
|
|
67
70
|
compact: "",
|
|
68
71
|
description: a.value ? "" : e.parameter.description,
|
|
69
72
|
name: a.value ? "" : e.parameter.name,
|
|
70
73
|
noncollapsible: e.showChildren,
|
|
71
74
|
required: e.parameter.required,
|
|
72
|
-
value: e.parameter.content ? (
|
|
75
|
+
value: e.parameter.content ? (y = (l = e.parameter.content) == null ? void 0 : l[o.value]) == null ? void 0 : y.schema : e.parameter.schema,
|
|
73
76
|
withExamples: e.withExamples
|
|
74
77
|
}, null, 8, ["description", "name", "noncollapsible", "required", "value", "withExamples"])
|
|
75
78
|
];
|
|
@@ -79,9 +82,9 @@ const P = { class: "parameter-item" }, _ = { class: "parameter-item-name" }, j =
|
|
|
79
82
|
]),
|
|
80
83
|
_: 1
|
|
81
84
|
})
|
|
82
|
-
]));
|
|
85
|
+
])) : p("", !0);
|
|
83
86
|
}
|
|
84
87
|
});
|
|
85
88
|
export {
|
|
86
|
-
|
|
89
|
+
K as default
|
|
87
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKpE,KAAK,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/components/RequestBody.vue"],"names":[],"mappings":"AAgJA,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKpE,KAAK,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAqBjD,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBody.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dc8f9923"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdown as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as f, computed as b, ref as k, openBlock as o, createElementBlock as s, createElementVNode as u, renderSlot as g, normalizeClass as C, toDisplayString as q, withDirectives as S, Fragment as _, renderList as V, vModelSelect as N, createCommentVNode as n, createVNode as B, unref as h } from "vue";
|
|
2
|
+
import { ScalarMarkdown as j } from "@scalar/components";
|
|
3
|
+
import w from "../../../components/Content/Schema/Schema.vue.js";
|
|
4
|
+
const D = { key: 0 }, E = { class: "request-body-title" }, M = ["value"], T = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "request-body-description"
|
|
7
7
|
}, z = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "request-body-schema"
|
|
10
|
-
}, R = /* @__PURE__ */
|
|
10
|
+
}, R = /* @__PURE__ */ f({
|
|
11
11
|
__name: "RequestBody",
|
|
12
12
|
props: {
|
|
13
13
|
requestBody: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
var
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
setup(a) {
|
|
16
|
+
var d;
|
|
17
|
+
const l = b(
|
|
18
|
+
() => {
|
|
19
|
+
var e;
|
|
20
|
+
return Object.keys(((e = a.requestBody) == null ? void 0 : e.content) ?? {});
|
|
21
|
+
}
|
|
22
|
+
), t = k("application/json");
|
|
23
|
+
return (d = a.requestBody) != null && d.content && l.value.length > 0 && (t.value = l.value[0]), (e, i) => {
|
|
24
|
+
var c, v, y, m;
|
|
25
|
+
return e.requestBody ? (o(), s("div", D, [
|
|
26
|
+
u("div", E, [
|
|
27
|
+
g(e.$slots, "title", {}, void 0, !0),
|
|
28
|
+
u("div", {
|
|
29
|
+
class: C(["request-body-title-select", {
|
|
30
|
+
"request-body-title-no-select": l.value.length <= 1
|
|
31
|
+
}])
|
|
28
32
|
}, [
|
|
29
|
-
|
|
30
|
-
e
|
|
33
|
+
u("span", null, q(t.value), 1),
|
|
34
|
+
e.requestBody && l.value.length > 1 ? S((o(), s("select", {
|
|
31
35
|
key: 0,
|
|
32
|
-
"onUpdate:modelValue":
|
|
36
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => t.value = p)
|
|
33
37
|
}, [
|
|
34
|
-
(o(!0),
|
|
38
|
+
(o(!0), s(_, null, V((c = e.requestBody) == null ? void 0 : c.content, (p, r) => (o(), s("option", {
|
|
35
39
|
key: r,
|
|
36
40
|
value: r
|
|
37
|
-
},
|
|
41
|
+
}, q(r), 9, M))), 128))
|
|
38
42
|
], 512)), [
|
|
39
|
-
[
|
|
40
|
-
]) :
|
|
43
|
+
[N, t.value]
|
|
44
|
+
]) : n("", !0)
|
|
41
45
|
], 2),
|
|
42
|
-
e
|
|
43
|
-
|
|
46
|
+
e.requestBody.description ? (o(), s("div", T, [
|
|
47
|
+
B(h(j), {
|
|
44
48
|
value: e.requestBody.description
|
|
45
49
|
}, null, 8, ["value"])
|
|
46
|
-
])) :
|
|
50
|
+
])) : n("", !0)
|
|
47
51
|
]),
|
|
48
|
-
(v = e
|
|
49
|
-
|
|
52
|
+
(v = e.requestBody.content) != null && v[t.value] ? (o(), s("div", z, [
|
|
53
|
+
B(h(w), {
|
|
50
54
|
compact: "",
|
|
51
55
|
noncollapsible: "",
|
|
52
|
-
value: (m = (y = e
|
|
56
|
+
value: (m = (y = e.requestBody.content) == null ? void 0 : y[t.value]) == null ? void 0 : m.schema
|
|
53
57
|
}, null, 8, ["value"])
|
|
54
|
-
])) :
|
|
55
|
-
])) :
|
|
58
|
+
])) : n("", !0)
|
|
59
|
+
])) : n("", !0);
|
|
56
60
|
};
|
|
57
61
|
}
|
|
58
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/Operation/layouts/ClassicLayout.vue"],"names":[],"mappings":"AAySA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAQhE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,8CAA8C;IAC9C,SAAS,EAAE,oBAAoB,CAAA;IAC/B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,iBAAiB,EAAE,MAAM,EAAE,CAAA;CAC5B,CAAC;;AAuPF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ClassicLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7420cb77"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as u,
|
|
1
|
+
import { defineComponent as u, openBlock as a, createBlock as s, unref as o, createSlots as f, withCtx as r, createElementVNode as t, createVNode as i, toDisplayString as h, createCommentVNode as _, withModifiers as y } from "vue";
|
|
2
2
|
import C from "../../../components/OperationPath.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { useConfig as v } from "../../../hooks/useConfig.js";
|
|
4
|
+
import { ScalarIcon as q, ScalarIconButton as b, ScalarMarkdown as k } from "@scalar/components";
|
|
5
|
+
import { useClipboard as E } from "@scalar/use-hooks/useClipboard";
|
|
6
|
+
import S from "../components/OperationParameters.vue.js";
|
|
7
|
+
import g from "../components/OperationResponses.vue.js";
|
|
7
8
|
import B from "../../../components/Section/SectionAccordion.vue.js";
|
|
8
9
|
import R from "../../../components/HttpMethod/HttpMethod.vue.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
const $ = { class: "operation-title" }, L = { class: "operation-details" }, M = { class: "endpoint-label" }, O = { class: "endpoint-label-path" }, U = { class: "endpoint-label-name" }, A = { class: "endpoint-content" }, D = { class: "operation-details-card" }, H = { class: "operation-details-card-item" }, P = { class: "operation-details-card-item" }, ie = /* @__PURE__ */ u({
|
|
10
|
+
import w from "../../../components/Anchor/Anchor.vue.js";
|
|
11
|
+
import I from "../../TestRequestButton/TestRequestButton.vue.js";
|
|
12
|
+
import V from "../../ExampleResponses/ExampleResponses.vue.js";
|
|
13
|
+
import $ from "../../ExampleRequest/ExampleRequest.vue.js";
|
|
14
|
+
const N = { class: "operation-title" }, T = { class: "operation-details" }, A = { class: "endpoint-label" }, L = { class: "endpoint-label-path" }, M = { class: "endpoint-label-name" }, P = { class: "endpoint-content" }, z = { class: "operation-details-card" }, D = { class: "operation-details-card-item" }, O = { class: "operation-details-card-item" }, te = /* @__PURE__ */ u({
|
|
15
15
|
__name: "ClassicLayout",
|
|
16
16
|
props: {
|
|
17
17
|
id: {},
|
|
@@ -20,38 +20,38 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
|
|
|
20
20
|
request: {},
|
|
21
21
|
secretCredentials: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const { copyToClipboard: c } =
|
|
23
|
+
setup(U) {
|
|
24
|
+
const { copyToClipboard: c } = E(), m = v();
|
|
25
25
|
return (e, p) => {
|
|
26
26
|
var l;
|
|
27
27
|
return a(), s(o(B), {
|
|
28
28
|
id: e.id,
|
|
29
29
|
class: "reference-endpoint",
|
|
30
30
|
transparent: ""
|
|
31
|
-
},
|
|
31
|
+
}, f({
|
|
32
32
|
title: r(() => [
|
|
33
|
-
t("h3",
|
|
34
|
-
t("div",
|
|
33
|
+
t("h3", N, [
|
|
34
|
+
t("div", T, [
|
|
35
35
|
i(o(R), {
|
|
36
36
|
class: "endpoint-type",
|
|
37
37
|
method: e.operation.httpVerb,
|
|
38
38
|
short: ""
|
|
39
39
|
}, null, 8, ["method"]),
|
|
40
|
-
i(o(
|
|
40
|
+
i(o(w), {
|
|
41
41
|
id: e.id ?? "",
|
|
42
42
|
class: "endpoint-anchor"
|
|
43
43
|
}, {
|
|
44
44
|
default: r(() => {
|
|
45
45
|
var n;
|
|
46
46
|
return [
|
|
47
|
-
t("div",
|
|
48
|
-
t("div",
|
|
47
|
+
t("div", A, [
|
|
48
|
+
t("div", L, [
|
|
49
49
|
i(C, {
|
|
50
50
|
deprecated: (n = e.operation.information) == null ? void 0 : n.deprecated,
|
|
51
51
|
path: e.operation.path
|
|
52
52
|
}, null, 8, ["deprecated", "path"])
|
|
53
53
|
]),
|
|
54
|
-
t("div",
|
|
54
|
+
t("div", M, h(e.operation.name), 1)
|
|
55
55
|
])
|
|
56
56
|
];
|
|
57
57
|
}),
|
|
@@ -63,40 +63,40 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
|
|
|
63
63
|
actions: r(({ active: n }) => {
|
|
64
64
|
var d;
|
|
65
65
|
return [
|
|
66
|
-
n ? (a(), s(o(
|
|
66
|
+
n ? (a(), s(o(I), {
|
|
67
67
|
key: 0,
|
|
68
68
|
operation: e.operation
|
|
69
|
-
}, null, 8, ["operation"])) : (d = o(m)) != null && d
|
|
69
|
+
}, null, 8, ["operation"])) : (d = o(m)) != null && d.hideTestRequestButton ? _("", !0) : (a(), s(o(q), {
|
|
70
70
|
key: 1,
|
|
71
71
|
class: "endpoint-try-hint",
|
|
72
72
|
icon: "Play",
|
|
73
73
|
thickness: "1.75px"
|
|
74
74
|
})),
|
|
75
|
-
i(o(
|
|
75
|
+
i(o(b), {
|
|
76
76
|
class: "endpoint-copy",
|
|
77
77
|
icon: "Clipboard",
|
|
78
78
|
label: "Copy endpoint URL",
|
|
79
79
|
size: "xs",
|
|
80
80
|
variant: "ghost",
|
|
81
|
-
onClick: p[0] || (p[0] =
|
|
81
|
+
onClick: p[0] || (p[0] = y((j) => o(c)(e.operation.path), ["stop"]))
|
|
82
82
|
})
|
|
83
83
|
];
|
|
84
84
|
}),
|
|
85
85
|
default: r(() => [
|
|
86
|
-
t("div",
|
|
87
|
-
t("div",
|
|
88
|
-
t("div",
|
|
89
|
-
i(
|
|
86
|
+
t("div", P, [
|
|
87
|
+
t("div", z, [
|
|
88
|
+
t("div", D, [
|
|
89
|
+
i(S, { operation: e.requestEntity }, null, 8, ["operation"])
|
|
90
90
|
]),
|
|
91
|
-
t("div",
|
|
92
|
-
i(
|
|
91
|
+
t("div", O, [
|
|
92
|
+
i(g, {
|
|
93
93
|
collapsableItems: !1,
|
|
94
94
|
operation: e.operation
|
|
95
95
|
}, null, 8, ["operation"])
|
|
96
96
|
])
|
|
97
97
|
]),
|
|
98
|
-
i(o(
|
|
99
|
-
i(o(
|
|
98
|
+
i(o(V), { operation: e.operation }, null, 8, ["operation"]),
|
|
99
|
+
i(o($), {
|
|
100
100
|
operation: e.operation,
|
|
101
101
|
request: e.request,
|
|
102
102
|
secretCredentials: e.secretCredentials
|
|
@@ -110,7 +110,7 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
|
|
|
110
110
|
fn: r(() => {
|
|
111
111
|
var n;
|
|
112
112
|
return [
|
|
113
|
-
i(o(
|
|
113
|
+
i(o(k), {
|
|
114
114
|
value: (n = e.requestEntity) == null ? void 0 : n.description,
|
|
115
115
|
withImages: ""
|
|
116
116
|
}, null, 8, ["value"])
|
|
@@ -123,5 +123,5 @@ const $ = { class: "operation-title" }, L = { class: "operation-details" }, M =
|
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
export {
|
|
126
|
-
|
|
126
|
+
te as default
|
|
127
127
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ModernLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-00148270"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as c, openBlock as d, createBlock as m, unref as t, withCtx as r, createVNode as o, createTextVNode as s, createCommentVNode as C, createElementVNode as n, normalizeClass as h, toDisplayString as
|
|
2
|
-
import
|
|
3
|
-
import { ScalarMarkdown as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as c, openBlock as d, createBlock as m, unref as t, withCtx as r, createVNode as o, createTextVNode as s, createCommentVNode as C, createElementVNode as n, normalizeClass as h, toDisplayString as q } from "vue";
|
|
2
|
+
import _ from "../../../components/OperationPath.vue.js";
|
|
3
|
+
import { ScalarMarkdown as y, ScalarErrorBoundary as u } from "@scalar/components";
|
|
4
|
+
import S from "../components/OperationParameters.vue.js";
|
|
5
|
+
import E from "../components/OperationResponses.vue.js";
|
|
6
|
+
import v from "../../../components/Section/Section.vue.js";
|
|
7
7
|
import k from "../../../components/Section/SectionContent.vue.js";
|
|
8
8
|
import B from "../../../components/Badge/Badge.vue.js";
|
|
9
9
|
import g from "../../../components/Section/SectionHeader.vue.js";
|
|
@@ -23,7 +23,7 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
|
|
|
23
23
|
secretCredentials: {}
|
|
24
24
|
},
|
|
25
25
|
setup(T) {
|
|
26
|
-
return (e, i) => (d(), m(t(
|
|
26
|
+
return (e, i) => (d(), m(t(v), {
|
|
27
27
|
id: e.id,
|
|
28
28
|
label: e.operation.name
|
|
29
29
|
}, {
|
|
@@ -47,7 +47,7 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
|
|
|
47
47
|
id: e.id ?? ""
|
|
48
48
|
}, {
|
|
49
49
|
default: r(() => [
|
|
50
|
-
s(
|
|
50
|
+
s(q(e.operation.name), 1)
|
|
51
51
|
]),
|
|
52
52
|
_: 1
|
|
53
53
|
}, 8, ["id"])
|
|
@@ -62,12 +62,12 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
|
|
|
62
62
|
var a;
|
|
63
63
|
return [
|
|
64
64
|
n("div", D, [
|
|
65
|
-
o(t(
|
|
65
|
+
o(t(y), {
|
|
66
66
|
value: (a = e.requestEntity) == null ? void 0 : a.description,
|
|
67
67
|
withImages: ""
|
|
68
68
|
}, null, 8, ["value"]),
|
|
69
|
-
o(
|
|
70
|
-
o(
|
|
69
|
+
o(S, { operation: e.requestEntity }, null, 8, ["operation"]),
|
|
70
|
+
o(E, { operation: e.operation }, null, 8, ["operation"])
|
|
71
71
|
])
|
|
72
72
|
];
|
|
73
73
|
}),
|
|
@@ -87,7 +87,7 @@ const D = { class: "operation-details" }, M = { class: "examples" }, W = /* @__P
|
|
|
87
87
|
header: r(() => {
|
|
88
88
|
var a;
|
|
89
89
|
return [
|
|
90
|
-
o(
|
|
90
|
+
o(_, {
|
|
91
91
|
class: "example-path",
|
|
92
92
|
deprecated: (a = e.operation.information) == null ? void 0 : a.deprecated,
|
|
93
93
|
path: e.operation.path
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import N from "fuse.js";
|
|
2
2
|
import { ref as h, watch as R, computed as V } from "vue";
|
|
3
3
|
import { extractRequestBody as A } from "../../helpers/specHelpers.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { useOperation as B } from "../../hooks/useOperation.js";
|
|
5
|
+
import { useNavState as P } from "../../hooks/useNavState.js";
|
|
6
|
+
import { useSidebar as z } from "../../hooks/useSidebar.js";
|
|
7
|
+
import { getHeadingsFromMarkdown as G } from "../../helpers/getHeadingsFromMarkdown.js";
|
|
8
|
+
import { getModels as J } from "../../helpers/getModels.js";
|
|
9
9
|
function te({
|
|
10
10
|
specification: a
|
|
11
11
|
}) {
|
|
12
|
-
const { getHeadingId: T, getWebhookId: j, getModelId: L, getOperationId: W, getTagId: q } =
|
|
12
|
+
const { getHeadingId: T, getWebhookId: j, getModelId: L, getOperationId: W, getTagId: q } = P(), { hideModels: C } = z(), o = h([]), r = h([]), d = h(0), s = h(""), i = new N(o.value, {
|
|
13
13
|
keys: ["title", "description", "body"]
|
|
14
14
|
}), p = () => {
|
|
15
15
|
d.value = 0, r.value = i.search(s.value);
|
|
@@ -33,7 +33,7 @@ function te({
|
|
|
33
33
|
i.setCollection([]);
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
const l = [], u =
|
|
36
|
+
const l = [], u = G(
|
|
37
37
|
((w = (M = a.value) == null ? void 0 : M.info) == null ? void 0 : w.description) ?? ""
|
|
38
38
|
);
|
|
39
39
|
u.length && (u.forEach((e) => {
|
|
@@ -55,7 +55,7 @@ function te({
|
|
|
55
55
|
body: ""
|
|
56
56
|
};
|
|
57
57
|
o.value.push(S), e.operations && e.operations.forEach((t) => {
|
|
58
|
-
const { parameterMap: n } =
|
|
58
|
+
const { parameterMap: n } = B(t), x = A(t) || n.value;
|
|
59
59
|
let f = null;
|
|
60
60
|
typeof x != "boolean" && (f = x);
|
|
61
61
|
const O = {
|
|
@@ -81,7 +81,7 @@ function te({
|
|
|
81
81
|
m.push({
|
|
82
82
|
type: "webhook",
|
|
83
83
|
title: `Webhook: ${(n = c[e][t]) == null ? void 0 : n.name}`,
|
|
84
|
-
href: `#${j(e, t)}`,
|
|
84
|
+
href: `#${j({ name: e, method: t })}`,
|
|
85
85
|
description: e,
|
|
86
86
|
httpVerb: t,
|
|
87
87
|
tag: e,
|
|
@@ -89,12 +89,12 @@ function te({
|
|
|
89
89
|
});
|
|
90
90
|
}), o.value = o.value.concat(m);
|
|
91
91
|
});
|
|
92
|
-
const v = C.value ? {} :
|
|
92
|
+
const v = C.value ? {} : J(a.value), b = [];
|
|
93
93
|
v && (Object.keys(v).forEach((e) => {
|
|
94
94
|
b.push({
|
|
95
95
|
type: "model",
|
|
96
96
|
title: "Model",
|
|
97
|
-
href: `#${L(e)}`,
|
|
97
|
+
href: `#${L({ name: e })}`,
|
|
98
98
|
description: v[e].title ?? e,
|
|
99
99
|
tag: e,
|
|
100
100
|
body: ""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/TestRequestButton/TestRequestButton.vue"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAIhE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,oBAAoB,CAAA;CAChC,CAAC;;AAiGF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./TestRequestButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-7497300b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { defineComponent as d,
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useApiClient as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as d, unref as o, openBlock as p, createElementBlock as i, withModifiers as f, createVNode as s, createElementVNode as h, withCtx as c, createTextVNode as a, toDisplayString as m, Fragment as b } from "vue";
|
|
2
|
+
import V from "../../components/ScreenReader.vue.js";
|
|
3
|
+
import { useConfig as k } from "../../hooks/useConfig.js";
|
|
4
|
+
import { ScalarIcon as y } from "@scalar/components";
|
|
5
|
+
import { useApiClient as C } from "../ApiClientModal/useApiClient.js";
|
|
6
|
+
const g = ["method"], E = /* @__PURE__ */ d({
|
|
7
7
|
__name: "TestRequestButton",
|
|
8
8
|
props: {
|
|
9
9
|
operation: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
return (
|
|
11
|
+
setup(B) {
|
|
12
|
+
const { client: u } = C(), l = k();
|
|
13
|
+
return (e, t) => {
|
|
14
14
|
var n;
|
|
15
|
-
return ((n = o(l)) == null ? void 0 : n
|
|
15
|
+
return ((n = o(l)) == null ? void 0 : n.hideTestRequestButton) !== !0 ? (p(), i("button", {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "show-api-client-button",
|
|
18
|
-
method:
|
|
18
|
+
method: e.operation.httpVerb,
|
|
19
19
|
type: "button",
|
|
20
|
-
onClick:
|
|
20
|
+
onClick: t[0] || (t[0] = f((R) => {
|
|
21
21
|
var r;
|
|
22
22
|
return (r = o(u)) == null ? void 0 : r.open({
|
|
23
|
-
path:
|
|
24
|
-
method:
|
|
23
|
+
path: e.operation.path,
|
|
24
|
+
method: e.operation.httpVerb
|
|
25
25
|
});
|
|
26
26
|
}, ["stop"]))
|
|
27
27
|
}, [
|
|
28
|
-
s(o(
|
|
28
|
+
s(o(y), {
|
|
29
29
|
icon: "Play",
|
|
30
30
|
size: "sm"
|
|
31
31
|
}),
|
|
32
|
-
|
|
33
|
-
s(
|
|
34
|
-
default:
|
|
35
|
-
a("(" + m(
|
|
32
|
+
t[1] || (t[1] = h("span", null, "Test Request", -1)),
|
|
33
|
+
s(V, null, {
|
|
34
|
+
default: c(() => [
|
|
35
|
+
a("(" + m(e.operation.httpVerb) + " " + m(e.operation.path) + ")", 1)
|
|
36
36
|
]),
|
|
37
37
|
_: 1
|
|
38
38
|
})
|
|
39
|
-
], 8,
|
|
39
|
+
], 8, g)) : (p(), i(b, { key: 1 }, [
|
|
40
40
|
a(" ")
|
|
41
41
|
], 64));
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
E as default
|
|
47
47
|
};
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export * from './joinWithSlash.js';
|
|
|
14
14
|
export * from './mapFromObject.js';
|
|
15
15
|
export * from './mergeAllObjects.js';
|
|
16
16
|
export * from './parse.js';
|
|
17
|
-
export * from './provideSymbols.js';
|
|
18
17
|
export * from './scrollToId.js';
|
|
19
18
|
export * from './sleep.js';
|
|
20
19
|
export * from './specDownloads.js';
|