@scalar/api-client 2.0.39 → 2.0.41
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 +24 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +1 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.d.ts.map +1 -1
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +11 -11
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchButton.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchButton.vue.js +5 -28
- package/dist/components/Search/SearchButton.vue2.js +28 -2
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideHelp.vue.js +26 -28
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue2.js +5 -5
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +6 -6
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +14 -10
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +4 -4
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +20 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +40 -40
- package/dist/libs/create-client.d.ts +20 -20
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +87 -70
- package/dist/store/workspace.d.ts +64 -64
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +129 -132
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +206 -146
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +4 -4
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItem.vue2.js +105 -92
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +44 -44
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +3 -17
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +89 -5
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +2 -37
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +18 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +34 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts +12 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +14 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +23 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +65 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +19 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +29 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +20 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +25 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +61 -63
- package/dist/views/Request/consts/index.d.ts +2 -0
- package/dist/views/Request/consts/index.d.ts.map +1 -1
- package/dist/views/Request/consts/index.js +6 -3
- package/dist/views/Request/consts/mediaTypes.d.ts +16 -0
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -0
- package/dist/views/Request/consts/mediaTypes.js +108 -0
- package/package.json +9 -7
|
@@ -1,39 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import y from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
-
import { useCodeMirror as g } from "@scalar/use-codemirror";
|
|
4
|
-
const x = /* @__PURE__ */ s({
|
|
5
|
-
__name: "ResponseBody",
|
|
6
|
-
props: {
|
|
7
|
-
title: {},
|
|
8
|
-
data: { default: null },
|
|
9
|
-
headers: {}
|
|
10
|
-
},
|
|
11
|
-
setup(a) {
|
|
12
|
-
const r = a, l = u(() => {
|
|
13
|
-
var t;
|
|
14
|
-
const e = ((t = r.headers.find((c) => c.name.toLowerCase() === "content-type")) == null ? void 0 : t.value) ?? "";
|
|
15
|
-
return e.includes("json") ? "json" : (e.includes("html"), "html");
|
|
16
|
-
}), n = d(null);
|
|
17
|
-
return g({
|
|
18
|
-
codeMirrorRef: n,
|
|
19
|
-
readOnly: !0,
|
|
20
|
-
lineNumbers: !0,
|
|
21
|
-
content: i(() => r.data),
|
|
22
|
-
language: l
|
|
23
|
-
}), (e, t) => (f(), m(y, null, {
|
|
24
|
-
title: o(() => [
|
|
25
|
-
p(_(e.title), 1)
|
|
26
|
-
]),
|
|
27
|
-
default: o(() => [
|
|
28
|
-
h("div", {
|
|
29
|
-
ref_key: "codeMirrorRef",
|
|
30
|
-
ref: n
|
|
31
|
-
}, null, 512)
|
|
32
|
-
]),
|
|
33
|
-
_: 1
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
});
|
|
1
|
+
import f from "./ResponseBody.vue.js";
|
|
37
2
|
export {
|
|
38
|
-
|
|
3
|
+
f as default
|
|
39
4
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
href: string;
|
|
3
|
+
type?: string;
|
|
4
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
5
|
+
href: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
}>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToOption<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=ResponseBodyDownload.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyDownload.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyDownload.vue"],"names":[],"mappings":";UAmCQ,MAAM;WACL,MAAM;;UADP,MAAM;WACL,MAAM;;AAqEf,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as s, computed as p, openBlock as d, createElementBlock as a, withModifiers as i, createVNode as l, unref as c, createElementVNode as m } from "vue";
|
|
2
|
+
import { ScalarIcon as f } from "@scalar/components";
|
|
3
|
+
import { mediaTypes as u } from "../consts/mediaTypes.js";
|
|
4
|
+
const x = ["download", "href"], h = /* @__PURE__ */ m("span", null, "Download", -1), k = /* @__PURE__ */ s({
|
|
5
|
+
__name: "ResponseBodyDownload",
|
|
6
|
+
props: {
|
|
7
|
+
href: {},
|
|
8
|
+
type: {}
|
|
9
|
+
},
|
|
10
|
+
setup(n) {
|
|
11
|
+
const t = n, r = p(
|
|
12
|
+
() => {
|
|
13
|
+
var e;
|
|
14
|
+
return ((e = u[t.type ?? ""]) == null ? void 0 : e.extension) ?? ".unknown";
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
return (e, o) => (d(), a("a", {
|
|
18
|
+
class: "flex gap-1 text-c-3 text-xxs no-underline items-center hover:bg-b-3 rounded py-0.5 px-1.5",
|
|
19
|
+
download: `response${r.value}`,
|
|
20
|
+
href: e.href,
|
|
21
|
+
onClick: o[0] || (o[0] = i(() => {
|
|
22
|
+
}, ["stop"]))
|
|
23
|
+
}, [
|
|
24
|
+
l(c(f), {
|
|
25
|
+
icon: "Download",
|
|
26
|
+
size: "xs"
|
|
27
|
+
}),
|
|
28
|
+
h
|
|
29
|
+
], 8, x));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
k as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=ResponseBodyInfo.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyInfo.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyInfo.vue"],"names":[],"mappings":"AAcA,iBAAS,cAAc;qBAyBM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { openBlock as t, createElementBlock as o, createElementVNode as s, renderSlot as c } from "vue";
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const r = {}, d = { class: "flex justify-center px-2 py-3" }, f = { class: "text-c-3 p-2 text-sm" };
|
|
4
|
+
function l(e, _) {
|
|
5
|
+
return t(), o("div", d, [
|
|
6
|
+
s("div", f, [
|
|
7
|
+
c(e.$slots, "default")
|
|
8
|
+
])
|
|
9
|
+
]);
|
|
10
|
+
}
|
|
11
|
+
const p = /* @__PURE__ */ n(r, [["render", l]]);
|
|
12
|
+
export {
|
|
13
|
+
p as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MediaPreview } from '../../../views/Request/consts/index.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
+
src: string;
|
|
4
|
+
type: string;
|
|
5
|
+
mode?: MediaPreview;
|
|
6
|
+
alpha?: boolean;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
8
|
+
src: string;
|
|
9
|
+
type: string;
|
|
10
|
+
mode?: MediaPreview;
|
|
11
|
+
alpha?: boolean;
|
|
12
|
+
}>>>, {}, {}>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
+
type __VLS_TypePropsToOption<T> = {
|
|
16
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
+
} : {
|
|
19
|
+
type: import('vue').PropType<T[K]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=ResponseBodyPreview.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyPreview.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyPreview.vue"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;;SAQnD,MAAM;UACL,MAAM;WACL,YAAY;YACX,OAAO;;SAHV,MAAM;UACL,MAAM;WACL,YAAY;YACX,OAAO;;AA8HjB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineComponent as d, ref as i, watch as y, openBlock as s, createElementBlock as t, normalizeClass as n, createElementVNode as a, createBlock as m, withCtx as v, createTextVNode as f } from "vue";
|
|
2
|
+
import c from "./ResponseBodyInfo.vue.js";
|
|
3
|
+
const k = ["src"], w = ["src", "type"], B = ["src", "type"], E = ["data", "type"], $ = /* @__PURE__ */ d({
|
|
4
|
+
__name: "ResponseBodyPreview",
|
|
5
|
+
props: {
|
|
6
|
+
src: {},
|
|
7
|
+
type: {},
|
|
8
|
+
mode: {},
|
|
9
|
+
alpha: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
setup(p) {
|
|
12
|
+
const u = p, r = i(!1);
|
|
13
|
+
return y(
|
|
14
|
+
() => u.src,
|
|
15
|
+
() => r.value = !1
|
|
16
|
+
), (e, o) => !r.value && e.src ? (s(), t("div", {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: n(["flex justify-center overflow-hidden rounded-b", { "p-2 bg-preview": e.alpha }])
|
|
19
|
+
}, [
|
|
20
|
+
e.mode === "image" ? (s(), t("img", {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: n(["max-w-full", { rounded: e.alpha }]),
|
|
23
|
+
src: e.src,
|
|
24
|
+
onError: o[0] || (o[0] = (l) => r.value = !0)
|
|
25
|
+
}, null, 42, k)) : e.mode === "video" ? (s(), t("video", {
|
|
26
|
+
key: 1,
|
|
27
|
+
autoplay: "",
|
|
28
|
+
controls: "",
|
|
29
|
+
loop: "",
|
|
30
|
+
width: "100%",
|
|
31
|
+
onError: o[1] || (o[1] = (l) => r.value = !0)
|
|
32
|
+
}, [
|
|
33
|
+
a("source", {
|
|
34
|
+
src: e.src,
|
|
35
|
+
type: e.type
|
|
36
|
+
}, null, 8, w)
|
|
37
|
+
], 32)) : e.mode === "audio" ? (s(), t("audio", {
|
|
38
|
+
key: 2,
|
|
39
|
+
class: "my-12",
|
|
40
|
+
controls: "",
|
|
41
|
+
loop: "",
|
|
42
|
+
onError: o[2] || (o[2] = (l) => r.value = !0)
|
|
43
|
+
}, [
|
|
44
|
+
a("source", {
|
|
45
|
+
src: e.src,
|
|
46
|
+
type: e.type
|
|
47
|
+
}, null, 8, B)
|
|
48
|
+
], 32)) : (s(), t("object", {
|
|
49
|
+
key: 3,
|
|
50
|
+
class: "w-full aspect-[4/3]",
|
|
51
|
+
data: e.src,
|
|
52
|
+
type: e.type,
|
|
53
|
+
onError: o[3] || (o[3] = (l) => r.value = !0)
|
|
54
|
+
}, null, 40, E))
|
|
55
|
+
], 2)) : (s(), m(c, { key: 1 }, {
|
|
56
|
+
default: v(() => [
|
|
57
|
+
f("Preview unavailable")
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
$ as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CodeMirrorLanguage } from '@scalar/use-codemirror';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
+
data: any;
|
|
4
|
+
language?: CodeMirrorLanguage;
|
|
5
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
6
|
+
data: any;
|
|
7
|
+
language?: CodeMirrorLanguage;
|
|
8
|
+
}>>>, {}, {}>;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToOption<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: import('vue').PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=ResponseBodyRaw.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyRaw.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyRaw.vue"],"names":[],"mappings":"AAkDA,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,wBAAwB,CAAA;;UAMvE,GAAG;eACE,kBAAkB;;UADvB,GAAG;eACE,kBAAkB;;AAoE/B,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as a, ref as s, computed as u, toRaw as l, openBlock as i, createElementBlock as c } from "vue";
|
|
2
|
+
import { isJsonString as f } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { useCodeMirror as p } from "@scalar/use-codemirror";
|
|
4
|
+
const y = /* @__PURE__ */ a({
|
|
5
|
+
__name: "ResponseBodyRaw",
|
|
6
|
+
props: {
|
|
7
|
+
data: {},
|
|
8
|
+
language: {}
|
|
9
|
+
},
|
|
10
|
+
setup(o) {
|
|
11
|
+
const r = o, n = s(null), t = u(() => {
|
|
12
|
+
const e = r.data;
|
|
13
|
+
return e && f(e) ? JSON.stringify(JSON.parse(e), null, 2) : e && typeof l(e) == "object" ? JSON.stringify(e, null, 2) : e;
|
|
14
|
+
});
|
|
15
|
+
return p({
|
|
16
|
+
codeMirrorRef: n,
|
|
17
|
+
readOnly: !0,
|
|
18
|
+
lineNumbers: !0,
|
|
19
|
+
content: t,
|
|
20
|
+
language: r.language
|
|
21
|
+
}), (e, m) => (i(), c("div", {
|
|
22
|
+
ref_key: "codeMirrorRef",
|
|
23
|
+
ref: n
|
|
24
|
+
}, null, 512));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
y as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
"update:modelValue": (v: boolean) => void;
|
|
5
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
6
|
+
modelValue: boolean;
|
|
7
|
+
}>>> & {
|
|
8
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
12
|
+
type __VLS_TypePropsToOption<T> = {
|
|
13
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
14
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
15
|
+
} : {
|
|
16
|
+
type: import('vue').PropType<T[K]>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=ResponseBodyToggle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyToggle.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyToggle.vue"],"names":[],"mappings":";gBAgCc,OAAO;;;;gBAAP,OAAO;;;;AAyErB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as u, openBlock as r, createElementBlock as d, createElementVNode as o, normalizeClass as l, withModifiers as n } from "vue";
|
|
2
|
+
const a = { class: "text-c-3 flex -my-1 justify-center rounded text-xxs p-0.5 gap-0.5" }, i = /* @__PURE__ */ u({
|
|
3
|
+
__name: "ResponseBodyToggle",
|
|
4
|
+
props: {
|
|
5
|
+
modelValue: { type: Boolean }
|
|
6
|
+
},
|
|
7
|
+
emits: ["update:modelValue"],
|
|
8
|
+
setup(p) {
|
|
9
|
+
return (e, t) => (r(), d("div", a, [
|
|
10
|
+
o("button", {
|
|
11
|
+
class: l(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": e.modelValue }]),
|
|
12
|
+
type: "button",
|
|
13
|
+
onClick: t[0] || (t[0] = n((s) => e.$emit("update:modelValue", !0), ["stop"]))
|
|
14
|
+
}, " Preview ", 2),
|
|
15
|
+
o("button", {
|
|
16
|
+
class: l(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": !e.modelValue }]),
|
|
17
|
+
type: "button",
|
|
18
|
+
onClick: t[1] || (t[1] = n((s) => e.$emit("update:modelValue", !1), ["stop"]))
|
|
19
|
+
}, " Raw ", 2)
|
|
20
|
+
]));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
i as default
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAyGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cASrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkNxC,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,91 +1,89 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ScalarIcon as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const j = { class: "flex items-center flex-1" }, H = { class: "custom-scroll flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, G = /* @__PURE__ */ y({
|
|
1
|
+
import { defineComponent as _, computed as m, ref as h, openBlock as n, createBlock as r, withCtx as p, createVNode as u, unref as x, createElementVNode as d, createTextVNode as y, createCommentVNode as l, createElementBlock as C, Fragment as A } from "vue";
|
|
2
|
+
import S from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import B from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import $ from "./ResponseBody.vue.js";
|
|
5
|
+
import E from "./ResponseEmpty.vue.js";
|
|
6
|
+
import N from "./ResponseMetaInformation.vue.js";
|
|
7
|
+
import { ScalarIcon as V } from "@scalar/components";
|
|
8
|
+
import g from "./ResponseCookies.vue.js";
|
|
9
|
+
import H from "./ResponseHeaders.vue.js";
|
|
10
|
+
const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll flex flex-1 flex-col px-2 xl:px-6 py-2.5" }, T = /* @__PURE__ */ _({
|
|
12
11
|
__name: "ResponseSection",
|
|
13
12
|
props: {
|
|
14
13
|
response: {}
|
|
15
14
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
const e = (
|
|
20
|
-
return e ? Object.keys(e).map((
|
|
21
|
-
name:
|
|
22
|
-
value: e[
|
|
15
|
+
setup(f) {
|
|
16
|
+
const c = f, i = m(() => {
|
|
17
|
+
var t;
|
|
18
|
+
const e = (t = c.response) == null ? void 0 : t.headers;
|
|
19
|
+
return e ? Object.keys(e).map((o) => ({
|
|
20
|
+
name: o,
|
|
21
|
+
value: e[o],
|
|
23
22
|
required: !1
|
|
24
23
|
})).filter(
|
|
25
|
-
(
|
|
24
|
+
(o) => ![
|
|
26
25
|
"rest-api-client-content-length",
|
|
27
26
|
"X-API-Client-Content-Length"
|
|
28
|
-
].includes(
|
|
27
|
+
].includes(o.name)
|
|
29
28
|
) : [];
|
|
30
|
-
}), v =
|
|
31
|
-
var
|
|
32
|
-
const e = (
|
|
33
|
-
return e ? Object.keys(e).map((
|
|
34
|
-
name:
|
|
35
|
-
value: e[
|
|
29
|
+
}), v = m(() => {
|
|
30
|
+
var t, o;
|
|
31
|
+
const e = (o = (t = c.response) == null ? void 0 : t.headers) == null ? void 0 : o.cookies;
|
|
32
|
+
return e ? Object.keys(e).map((a) => ({
|
|
33
|
+
name: a,
|
|
34
|
+
value: e[a],
|
|
36
35
|
required: !1
|
|
37
36
|
})) : [];
|
|
38
|
-
}), k =
|
|
39
|
-
|
|
40
|
-
const e = (o = a.response) == null ? void 0 : o.data;
|
|
41
|
-
return e && J(e) ? JSON.stringify(JSON.parse(e), null, 2) : e && typeof h(e) == "object" ? JSON.stringify(e, null, 2) : e;
|
|
42
|
-
}), _ = ["All", "Body", "Headers", "Cookies"], s = x("All");
|
|
43
|
-
return (e, o) => (r(), n(g, null, {
|
|
37
|
+
}), k = ["All", "Body", "Headers", "Cookies"], s = h("All");
|
|
38
|
+
return (e, t) => (n(), r(B, null, {
|
|
44
39
|
title: p(() => [
|
|
45
|
-
u(
|
|
40
|
+
u(x(V), {
|
|
46
41
|
class: "text-c-3 mr-2 rotate-180",
|
|
47
42
|
icon: "ExternalLink",
|
|
48
43
|
size: "sm",
|
|
49
44
|
thickness: "2.5"
|
|
50
45
|
}),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
e.response ? (
|
|
46
|
+
d("div", R, [
|
|
47
|
+
y(" Response "),
|
|
48
|
+
e.response ? (n(), r(N, {
|
|
54
49
|
key: 0,
|
|
55
50
|
response: e.response
|
|
56
51
|
}, null, 8, ["response"])) : l("", !0)
|
|
57
52
|
])
|
|
58
53
|
]),
|
|
59
|
-
default: p(() =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
54
|
+
default: p(() => {
|
|
55
|
+
var o;
|
|
56
|
+
return [
|
|
57
|
+
d("div", b, [
|
|
58
|
+
e.response ? (n(), C(A, { key: 1 }, [
|
|
59
|
+
u(S, {
|
|
60
|
+
activeSection: s.value,
|
|
61
|
+
sections: k,
|
|
62
|
+
onSetActiveSection: t[0] || (t[0] = (a) => s.value = a)
|
|
63
|
+
}, null, 8, ["activeSection"]),
|
|
64
|
+
s.value === "All" || s.value === "Cookies" ? (n(), r(g, {
|
|
65
|
+
key: 0,
|
|
66
|
+
cookies: v.value
|
|
67
|
+
}, null, 8, ["cookies"])) : l("", !0),
|
|
68
|
+
s.value === "All" || s.value === "Headers" ? (n(), r(H, {
|
|
69
|
+
key: 1,
|
|
70
|
+
headers: i.value
|
|
71
|
+
}, null, 8, ["headers"])) : l("", !0),
|
|
72
|
+
s.value === "All" || s.value === "Body" ? (n(), r($, {
|
|
73
|
+
key: 2,
|
|
74
|
+
active: !0,
|
|
75
|
+
data: (o = c.response) == null ? void 0 : o.data,
|
|
76
|
+
headers: i.value,
|
|
77
|
+
title: "Body"
|
|
78
|
+
}, null, 8, ["data", "headers"])) : l("", !0)
|
|
79
|
+
], 64)) : (n(), r(E, { key: 0 }))
|
|
80
|
+
])
|
|
81
|
+
];
|
|
82
|
+
}),
|
|
85
83
|
_: 1
|
|
86
84
|
}));
|
|
87
85
|
}
|
|
88
86
|
});
|
|
89
87
|
export {
|
|
90
|
-
|
|
88
|
+
T as default
|
|
91
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,mBAAmB,cAAc,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mediaTypes as D, textMediaTypes as o } from "./mediaTypes.js";
|
|
2
|
+
import { ADD_AUTH_DICT as r, ADD_AUTH_OPTIONS as t } from "./new-auth-options.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
r as ADD_AUTH_DICT,
|
|
5
|
+
t as ADD_AUTH_OPTIONS,
|
|
6
|
+
D as mediaTypes,
|
|
7
|
+
o as textMediaTypes
|
|
5
8
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CodeMirrorLanguage } from '@scalar/use-codemirror';
|
|
2
|
+
export type MediaPreview = 'object' | 'image' | 'video' | 'audio';
|
|
3
|
+
export type MediaConfig = {
|
|
4
|
+
preview?: MediaPreview;
|
|
5
|
+
alpha?: boolean;
|
|
6
|
+
raw?: boolean;
|
|
7
|
+
language?: CodeMirrorLanguage;
|
|
8
|
+
extension: string;
|
|
9
|
+
};
|
|
10
|
+
/** Media Type (MIME Type) Definitions */
|
|
11
|
+
export declare const mediaTypes: {
|
|
12
|
+
[type: string]: MediaConfig | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** Media Types (MIME Types) that can be displayed as raw text */
|
|
15
|
+
export declare const textMediaTypes: string[];
|
|
16
|
+
//# sourceMappingURL=mediaTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CAuGjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
|