@scalar/api-client 2.3.8 → 2.3.10
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 +30 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +8 -8
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.d.ts +1 -1
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +2 -2
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts +2 -0
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts +658 -473
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1337 -967
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +4 -4
- package/dist/layouts/Web/create-api-client-web.d.ts +658 -473
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +651 -466
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +18 -20
- package/dist/libs/find-request.d.ts +4 -4
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/send-request/build-request-security.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.test.d.ts +49 -47
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +67 -61
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +44 -34
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +18 -18
- package/dist/store/environment.d.ts +9 -9
- package/dist/store/import-spec.d.ts +154 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +272 -272
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +44 -44
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +10 -10
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/servers.d.ts +50 -30
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +655 -470
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +10 -10
- package/dist/store/workspace.d.ts +44 -44
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.js +5 -2
- package/dist/views/Collection/CollectionAuthentication.vue2.js +52 -11
- package/dist/views/Collection/CollectionNavigation.vue.js +34 -34
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionSettings.vue.js +2 -2
- package/dist/views/Collection/CollectionSettings.vue2.js +1 -1
- package/dist/views/Request/Request.vue.d.ts +2 -0
- 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 +71 -75
- 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 +49 -46
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +24 -24
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- 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/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- 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 +26 -19
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +191 -193
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts +2 -0
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +50 -47
- package/package.json +13 -13
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
2
|
export default _default;
|
|
3
3
|
//# sourceMappingURL=CollectionAuthentication.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionAuthentication.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionAuthentication.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CollectionAuthentication.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionAuthentication.vue"],"names":[],"mappings":";AAsOA,wBAMG"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./CollectionAuthentication.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49cb1b32"]]);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
a as default
|
|
4
7
|
};
|
|
@@ -1,16 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as h, openBlock as r, createElementBlock as v, createElementVNode as o, createVNode as x, unref as e, createBlock as S, createCommentVNode as y } from "vue";
|
|
2
|
+
import { ScalarToggle as _ } from "@scalar/components";
|
|
3
|
+
import { useActiveEntities as b } from "../../store/active-entities.js";
|
|
4
|
+
import { useWorkspace as C } from "../../store/store.js";
|
|
5
|
+
import V from "../Request/RequestSection/RequestAuth/RequestAuth.vue.js";
|
|
6
|
+
const g = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, k = { class: "flex flex-col gap-4" }, w = { class: "bg-b-1 flex items-center justify-between gap-4 text-sm" }, T = /* @__PURE__ */ h({
|
|
4
7
|
__name: "CollectionAuthentication",
|
|
5
|
-
setup(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
setup(A) {
|
|
9
|
+
const {
|
|
10
|
+
activeCollection: t,
|
|
11
|
+
activeEnvVariables: u,
|
|
12
|
+
activeEnvironment: m,
|
|
13
|
+
activeServer: d,
|
|
14
|
+
activeWorkspace: i
|
|
15
|
+
} = b(), { collectionMutators: f } = C(), p = () => {
|
|
16
|
+
var c;
|
|
17
|
+
(c = t.value) != null && c.uid && f.edit(
|
|
18
|
+
t.value.uid,
|
|
19
|
+
"useCollectionSecurity",
|
|
20
|
+
!t.value.useCollectionSecurity
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
return (c, l) => {
|
|
24
|
+
var n, s, a;
|
|
25
|
+
return r(), v("div", g, [
|
|
26
|
+
o("div", k, [
|
|
27
|
+
l[1] || (l[1] = o("div", { class: "flex h-8 items-center" }, [
|
|
28
|
+
o("h3", { class: "font-bold" }, "Authenticate with the API once")
|
|
29
|
+
], -1)),
|
|
30
|
+
o("div", w, [
|
|
31
|
+
l[0] || (l[0] = o("p", { class: "text-c-2 flex flex-1 text-balance" }, " Don’t want to set up the authentication for each request? Enable this option to set the authentication once for the whole collection. ", -1)),
|
|
32
|
+
x(e(_), {
|
|
33
|
+
class: "w-4",
|
|
34
|
+
modelValue: ((n = e(t)) == null ? void 0 : n.useCollectionSecurity) ?? !1,
|
|
35
|
+
"onUpdate:modelValue": p
|
|
36
|
+
}, null, 8, ["modelValue"])
|
|
37
|
+
]),
|
|
38
|
+
(s = e(t)) != null && s.useCollectionSecurity && e(i) ? (r(), S(e(V), {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "scalar-collection-auth",
|
|
41
|
+
collection: e(t),
|
|
42
|
+
envVariables: e(u),
|
|
43
|
+
environment: e(m),
|
|
44
|
+
layout: "reference",
|
|
45
|
+
selectedSecuritySchemeUids: ((a = e(t)) == null ? void 0 : a.selectedSecuritySchemeUids) ?? [],
|
|
46
|
+
server: e(d),
|
|
47
|
+
title: "Authentication",
|
|
48
|
+
workspace: e(i)
|
|
49
|
+
}, null, 8, ["collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) : y("", !0)
|
|
50
|
+
])
|
|
51
|
+
]);
|
|
52
|
+
};
|
|
12
53
|
}
|
|
13
54
|
});
|
|
14
55
|
export {
|
|
15
|
-
|
|
56
|
+
T as default
|
|
16
57
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as b, computed as k, openBlock as r, createElementBlock as
|
|
1
|
+
import { defineComponent as b, computed as k, openBlock as r, createElementBlock as a, createVNode as x, createElementVNode as n, normalizeClass as c, unref as t, toDisplayString as h, createCommentVNode as _, Fragment as g, renderList as C, createBlock as N, withCtx as S } from "vue";
|
|
2
2
|
import { LibraryIcon as B } from "@scalar/icons";
|
|
3
3
|
import { useRouter as z, RouterLink as E } from "vue-router";
|
|
4
|
-
import { PathId as
|
|
4
|
+
import { PathId as m } from "../../routes.js";
|
|
5
5
|
import I from "./CollectionInfoForm.vue.js";
|
|
6
6
|
import { useActiveEntities as L } from "../../store/active-entities.js";
|
|
7
7
|
const R = { class: "bg-b-1 sticky -top-[104px] z-10 mx-auto w-full" }, V = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "flex max-w-40 items-center"
|
|
10
|
-
},
|
|
10
|
+
}, A = { class: "text-c-1 mr-[6.25px] hidden overflow-hidden text-ellipsis whitespace-nowrap px-2 font-medium md:block" }, G = /* @__PURE__ */ b({
|
|
11
11
|
__name: "CollectionNavigation",
|
|
12
12
|
props: {
|
|
13
13
|
isSticky: { type: Boolean }
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const { currentRoute:
|
|
17
|
-
var e, s;
|
|
15
|
+
setup(F) {
|
|
16
|
+
const { currentRoute: d } = z(), { activeCollection: o } = L(), v = k(() => {
|
|
17
|
+
var e, s, i;
|
|
18
18
|
return [
|
|
19
19
|
{
|
|
20
20
|
displayName: "Overview",
|
|
@@ -22,27 +22,27 @@ const R = { class: "bg-b-1 sticky -top-[104px] z-10 mx-auto w-full" }, V = {
|
|
|
22
22
|
to: {
|
|
23
23
|
name: "collection.overview",
|
|
24
24
|
params: {
|
|
25
|
-
[
|
|
25
|
+
[m.Collection]: (e = o.value) == null ? void 0 : e.uid
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
// {
|
|
30
|
-
// displayName: 'Authentication',
|
|
31
|
-
// // icon: 'Lock',
|
|
32
|
-
// to: {
|
|
33
|
-
// name: 'collection.authentication',
|
|
34
|
-
// params: {
|
|
35
|
-
// [PathId.Collection]: activeCollection.value?.uid,
|
|
36
|
-
// },
|
|
37
|
-
// },
|
|
38
|
-
// },
|
|
39
29
|
{
|
|
40
30
|
displayName: "Servers",
|
|
41
31
|
// icon: 'Server',
|
|
42
32
|
to: {
|
|
43
33
|
name: "collection.servers",
|
|
44
34
|
params: {
|
|
45
|
-
[
|
|
35
|
+
[m.Collection]: (s = o.value) == null ? void 0 : s.uid
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: "Authentication",
|
|
41
|
+
// icon: 'Lock',
|
|
42
|
+
to: {
|
|
43
|
+
name: "collection.authentication",
|
|
44
|
+
params: {
|
|
45
|
+
[m.Collection]: (i = o.value) == null ? void 0 : i.uid
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
},
|
|
@@ -93,40 +93,40 @@ const R = { class: "bg-b-1 sticky -top-[104px] z-10 mx-auto w-full" }, V = {
|
|
|
93
93
|
];
|
|
94
94
|
});
|
|
95
95
|
return (e, s) => {
|
|
96
|
-
var
|
|
97
|
-
return r(),
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
var i, p, u;
|
|
97
|
+
return r(), a("div", R, [
|
|
98
|
+
x(I),
|
|
99
|
+
n("div", {
|
|
100
100
|
class: c([
|
|
101
101
|
"items-center text-sm font-medium",
|
|
102
102
|
e.isSticky ? "h-fit border-b md:grid md:grid-cols-[1fr_720px_1fr] md:px-4" : "flex md:mx-auto md:max-w-[720px]"
|
|
103
103
|
])
|
|
104
104
|
}, [
|
|
105
|
-
e.isSticky ? (r(),
|
|
106
|
-
|
|
105
|
+
e.isSticky ? (r(), a("div", V, [
|
|
106
|
+
x(t(B), {
|
|
107
107
|
class: "text-c-2 hidden size-3.5 md:block",
|
|
108
|
-
src: ((
|
|
108
|
+
src: ((i = t(o)) == null ? void 0 : i["x-scalar-icon"]) || "interface-content-folder",
|
|
109
109
|
"stroke-width": "2"
|
|
110
110
|
}, null, 8, ["src"]),
|
|
111
|
-
|
|
111
|
+
n("span", A, h((u = (p = t(o)) == null ? void 0 : p.info) == null ? void 0 : u.title), 1)
|
|
112
112
|
])) : _("", !0),
|
|
113
|
-
|
|
113
|
+
n("div", {
|
|
114
114
|
class: c(["flex w-full max-w-[720px] gap-2 pl-1.5 md:ml-1.5 md:pl-0", !e.isSticky && "border-b"])
|
|
115
115
|
}, [
|
|
116
|
-
(r(!0),
|
|
117
|
-
key:
|
|
116
|
+
(r(!0), a(g, null, C(v.value, ({ to: l, displayName: y }, w) => (r(), N(t(E), {
|
|
117
|
+
key: w,
|
|
118
118
|
class: "-ml-2 flex h-10 cursor-pointer items-center whitespace-nowrap px-2 text-center text-sm font-medium no-underline -outline-offset-1 has-[:focus-visible]:outline",
|
|
119
|
-
to:
|
|
119
|
+
to: l
|
|
120
120
|
}, {
|
|
121
121
|
default: S(() => {
|
|
122
|
-
var
|
|
122
|
+
var f;
|
|
123
123
|
return [
|
|
124
|
-
|
|
124
|
+
n("span", {
|
|
125
125
|
class: c([
|
|
126
126
|
"flex-center h-full w-full border-b",
|
|
127
|
-
typeof
|
|
127
|
+
typeof l.name == "string" && typeof t(d).name == "string" && ((f = t(d).name) != null && f.startsWith(l.name)) ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"
|
|
128
128
|
])
|
|
129
|
-
},
|
|
129
|
+
}, h(y), 3)
|
|
130
130
|
];
|
|
131
131
|
}),
|
|
132
132
|
_: 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionServerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionServerForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollectionServerForm.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionServerForm.vue"],"names":[],"mappings":"AA2IA,KAAK,WAAW,GAAG;IACf,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC/B,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC7B,CAAC;;kBAFc,MAAM,GAAG,MAAM,EAAE;eACpB,MAAM,GAAG,MAAM,EAAE;;AAqMhC,wBAQG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionSettings.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionSettings.vue"],"names":[],"mappings":";AA0eA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CollectionSettings.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-00fdb693"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|
|
@@ -5,7 +5,7 @@ import B from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js"
|
|
|
5
5
|
import { useActiveEntities as E } from "../../store/active-entities.js";
|
|
6
6
|
import { PathId as k } from "../../routes.js";
|
|
7
7
|
import { useWorkspace as I } from "../../store/store.js";
|
|
8
|
-
const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { class: "flex flex-col gap-2" }, O = { class: "bg-b-2 rounded-lg border text-sm" }, P = { class: "bg-b-1 -m-1/2 flex items-center justify-between gap-4 rounded-t-lg border p-3" }, R = { class: "text-c-1 flex items-center overflow-x-auto whitespace-nowrap py-1.5" }, j = { class: "flex items-center" }, z = ["href"], F = { class: "flex flex-col gap-4" }, Z = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, te = /* @__PURE__ */ D({
|
|
8
|
+
const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { class: "flex flex-col gap-2" }, O = { class: "bg-b-2 rounded-lg border text-sm" }, P = { class: "bg-b-1 -m-1/2 flex items-center justify-between gap-4 rounded-t-lg border-l p-3" }, R = { class: "text-c-1 flex items-center overflow-x-auto whitespace-nowrap border-t py-1.5" }, j = { class: "flex items-center" }, z = ["href"], F = { class: "flex flex-col gap-4" }, Z = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, te = /* @__PURE__ */ D({
|
|
9
9
|
__name: "CollectionSettings",
|
|
10
10
|
setup(q) {
|
|
11
11
|
const { activeCollection: o, activeWorkspace: a, activeWorkspaceCollections: C } = E(), { collectionMutators: m } = I(), { replace: y } = A(), i = S();
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { SelectedSecuritySchemeUids } from '@scalar/oas-utils/entities/shared';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
invalidParams: Set<string>;
|
|
4
|
+
selectedSecuritySchemeUids: SelectedSecuritySchemeUids;
|
|
3
5
|
};
|
|
4
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
7
|
newTab: (item: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":"AAgIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAiBnF,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,0BAA0B,EAAE,0BAA0B,CAAA;CACvD,CAAC;;;cAG4C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAsNjE,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Request.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-24f1f04a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,111 +1,107 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useSidebar as
|
|
6
|
-
import { importCurlCommand as
|
|
7
|
-
import { useActiveEntities as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useWorkspace as
|
|
12
|
-
import { useLayout as
|
|
13
|
-
const
|
|
1
|
+
import { defineComponent as E, computed as U, unref as e, openBlock as r, createElementBlock as f, normalizeClass as k, createElementVNode as P, createVNode as l, isRef as W, withCtx as y, createBlock as u, createCommentVNode as H } from "vue";
|
|
2
|
+
import S from "../../components/EmptyState.vue.js";
|
|
3
|
+
import L from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
4
|
+
import N from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
5
|
+
import { useSidebar as g } from "../../hooks/useSidebar.js";
|
|
6
|
+
import { importCurlCommand as B } from "../../libs/importers/curl.js";
|
|
7
|
+
import { useActiveEntities as I } from "../../store/active-entities.js";
|
|
8
|
+
import z from "./RequestSection/RequestSection.vue.js";
|
|
9
|
+
import A from "./RequestSubpageHeader.vue.js";
|
|
10
|
+
import D from "./ResponseSection/ResponseSection.vue.js";
|
|
11
|
+
import { useWorkspace as b } from "../../store/store.js";
|
|
12
|
+
import { useLayout as M } from "../../hooks/useLayout.js";
|
|
13
|
+
const O = { class: "flex h-full" }, T = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex h-full flex-1 flex-col"
|
|
16
|
-
},
|
|
16
|
+
}, re = /* @__PURE__ */ E({
|
|
17
17
|
__name: "Request",
|
|
18
18
|
props: {
|
|
19
|
-
invalidParams: {}
|
|
19
|
+
invalidParams: {},
|
|
20
|
+
selectedSecuritySchemeUids: {}
|
|
20
21
|
},
|
|
21
22
|
emits: ["newTab"],
|
|
22
|
-
setup(
|
|
23
|
-
const { events:
|
|
24
|
-
activeCollection:
|
|
25
|
-
activeExample:
|
|
26
|
-
activeRequest:
|
|
23
|
+
setup($) {
|
|
24
|
+
const { events: x } = b(), { isSidebarOpen: a } = g(), h = b(), { layout: C } = M(), {
|
|
25
|
+
activeCollection: i,
|
|
26
|
+
activeExample: n,
|
|
27
|
+
activeRequest: m,
|
|
27
28
|
activeWorkspace: c,
|
|
28
|
-
activeServer:
|
|
29
|
-
activeEnvVariables:
|
|
30
|
-
activeEnvironment:
|
|
31
|
-
activeWorkspaceRequests:
|
|
32
|
-
} =
|
|
33
|
-
() =>
|
|
34
|
-
var
|
|
35
|
-
return
|
|
29
|
+
activeServer: d,
|
|
30
|
+
activeEnvVariables: p,
|
|
31
|
+
activeEnvironment: v,
|
|
32
|
+
activeWorkspaceRequests: V
|
|
33
|
+
} = I(), { modalState: R, requestHistory: _ } = h, q = U(
|
|
34
|
+
() => _.findLast((t) => {
|
|
35
|
+
var o;
|
|
36
|
+
return t.request.uid === ((o = n.value) == null ? void 0 : o.uid);
|
|
36
37
|
})
|
|
37
|
-
), E = k(
|
|
38
|
-
() => {
|
|
39
|
-
var o, t;
|
|
40
|
-
return (d === "modal" ? (o = r.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = s.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
|
|
41
|
-
}
|
|
42
38
|
);
|
|
43
|
-
function
|
|
44
|
-
var
|
|
45
|
-
|
|
39
|
+
function w(t) {
|
|
40
|
+
var o;
|
|
41
|
+
x.commandPalette.emit({
|
|
46
42
|
commandName: "Import from cURL",
|
|
47
43
|
metaData: {
|
|
48
|
-
parsedCurl:
|
|
49
|
-
collectionUid: (
|
|
44
|
+
parsedCurl: B(t),
|
|
45
|
+
collectionUid: (o = i.value) == null ? void 0 : o.uid
|
|
50
46
|
}
|
|
51
47
|
});
|
|
52
48
|
}
|
|
53
|
-
return (
|
|
49
|
+
return (t, o) => e(i) && e(c) ? (r(), f("div", {
|
|
54
50
|
key: 0,
|
|
55
|
-
class:
|
|
56
|
-
"!mb-0 !mr-0 !border-0": e(
|
|
51
|
+
class: k(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
|
|
52
|
+
"!mb-0 !mr-0 !border-0": e(C) === "modal"
|
|
57
53
|
}])
|
|
58
54
|
}, [
|
|
59
|
-
|
|
60
|
-
e(
|
|
61
|
-
|
|
62
|
-
modelValue: e(
|
|
63
|
-
"onUpdate:modelValue":
|
|
64
|
-
collection: e(
|
|
65
|
-
envVariables: e(
|
|
66
|
-
environment: e(
|
|
67
|
-
operation: e(
|
|
68
|
-
server: e(
|
|
55
|
+
P("div", O, [
|
|
56
|
+
e(m) ? (r(), f("div", T, [
|
|
57
|
+
l(A, {
|
|
58
|
+
modelValue: e(a),
|
|
59
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => W(a) ? a.value = s : null),
|
|
60
|
+
collection: e(i),
|
|
61
|
+
envVariables: e(p),
|
|
62
|
+
environment: e(v),
|
|
63
|
+
operation: e(m),
|
|
64
|
+
server: e(d),
|
|
69
65
|
workspace: e(c),
|
|
70
|
-
onHideModal:
|
|
71
|
-
onImportCurl:
|
|
66
|
+
onHideModal: o[1] || (o[1] = () => e(R).hide()),
|
|
67
|
+
onImportCurl: w
|
|
72
68
|
}, null, 8, ["modelValue", "collection", "envVariables", "environment", "operation", "server", "workspace"]),
|
|
73
|
-
|
|
74
|
-
default:
|
|
75
|
-
e(
|
|
69
|
+
l(L, null, {
|
|
70
|
+
default: y(() => [
|
|
71
|
+
e(n) ? (r(), u(N, {
|
|
76
72
|
key: 0,
|
|
77
|
-
class:
|
|
73
|
+
class: k(["flex-1", [e(a) ? "sidebar-active-hide-layout" : ""]])
|
|
78
74
|
}, {
|
|
79
|
-
default:
|
|
80
|
-
var
|
|
75
|
+
default: y(() => {
|
|
76
|
+
var s;
|
|
81
77
|
return [
|
|
82
|
-
|
|
83
|
-
collection: e(
|
|
84
|
-
envVariables: e(
|
|
85
|
-
environment: e(
|
|
86
|
-
example: e(
|
|
87
|
-
invalidParams:
|
|
88
|
-
operation: e(
|
|
89
|
-
selectedSecuritySchemeUids:
|
|
90
|
-
server: e(
|
|
78
|
+
l(z, {
|
|
79
|
+
collection: e(i),
|
|
80
|
+
envVariables: e(p),
|
|
81
|
+
environment: e(v),
|
|
82
|
+
example: e(n),
|
|
83
|
+
invalidParams: t.invalidParams,
|
|
84
|
+
operation: e(m),
|
|
85
|
+
selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
|
|
86
|
+
server: e(d),
|
|
91
87
|
workspace: e(c)
|
|
92
88
|
}, null, 8, ["collection", "envVariables", "environment", "example", "invalidParams", "operation", "selectedSecuritySchemeUids", "server", "workspace"]),
|
|
93
|
-
|
|
94
|
-
numWorkspaceRequests: e(
|
|
95
|
-
response: (
|
|
89
|
+
l(D, {
|
|
90
|
+
numWorkspaceRequests: e(V).length,
|
|
91
|
+
response: (s = q.value) == null ? void 0 : s.response
|
|
96
92
|
}, null, 8, ["numWorkspaceRequests", "response"])
|
|
97
93
|
];
|
|
98
94
|
}),
|
|
99
95
|
_: 1
|
|
100
|
-
}, 8, ["class"])) :
|
|
96
|
+
}, 8, ["class"])) : H("", !0)
|
|
101
97
|
]),
|
|
102
98
|
_: 1
|
|
103
99
|
})
|
|
104
|
-
])) : (
|
|
100
|
+
])) : (r(), u(S, { key: 1 }))
|
|
105
101
|
])
|
|
106
|
-
], 2)) : (
|
|
102
|
+
], 2)) : (r(), u(S, { key: 1 }));
|
|
107
103
|
}
|
|
108
104
|
});
|
|
109
105
|
export {
|
|
110
|
-
|
|
106
|
+
re as default
|
|
111
107
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cA0N8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA+QjE,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestRoot.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-fc9d46fd"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as j, ref as
|
|
1
|
+
import { defineComponent as j, ref as c, computed as L, onMounted as M, onBeforeUnmount as $, watch as H, openBlock as m, createElementBlock as Q, normalizeClass as _, unref as r, createBlock as w, isRef as F, createCommentVNode as O, createElementVNode as V, createVNode as G } from "vue";
|
|
2
2
|
import { isDefined as K } from "@scalar/oas-utils/helpers";
|
|
3
3
|
import { safeJSON as X } from "@scalar/object-utils/parse";
|
|
4
4
|
import { useToasts as Y } from "@scalar/use-toasts";
|
|
@@ -10,94 +10,97 @@ import { useActiveEntities as re } from "../../store/active-entities.js";
|
|
|
10
10
|
import { useOpenApiWatcher as se } from "./hooks/useOpenApiWatcher.js";
|
|
11
11
|
import ae from "./RequestSidebar.vue.js";
|
|
12
12
|
import { createRequestOperation as le } from "../../libs/send-request/create-request-operation.js";
|
|
13
|
-
import { ERRORS as
|
|
14
|
-
import { useWorkspace as
|
|
13
|
+
import { ERRORS as ie } from "../../libs/errors.js";
|
|
14
|
+
import { useWorkspace as ne } from "../../store/store.js";
|
|
15
15
|
import { useLayout as ue } from "../../hooks/useLayout.js";
|
|
16
|
-
const ce = { class: "flex h-full" }, me = { class: "flex h-full flex-1 flex-col" },
|
|
16
|
+
const ce = { class: "flex h-full" }, me = { class: "flex h-full flex-1 flex-col" }, we = /* @__PURE__ */ j({
|
|
17
17
|
__name: "RequestRoot",
|
|
18
18
|
emits: ["newTab"],
|
|
19
19
|
setup(fe) {
|
|
20
|
-
const
|
|
21
|
-
activeCollection:
|
|
22
|
-
activeExample:
|
|
20
|
+
const C = ne(), { toast: f } = Y(), { layout: d } = ue(), {
|
|
21
|
+
activeCollection: a,
|
|
22
|
+
activeExample: l,
|
|
23
23
|
activeEnvironment: v,
|
|
24
|
-
activeRequest:
|
|
24
|
+
activeRequest: n,
|
|
25
25
|
activeWorkspace: p,
|
|
26
|
-
activeServer:
|
|
27
|
-
} = re(), { cookies:
|
|
26
|
+
activeServer: T
|
|
27
|
+
} = re(), { cookies: g, requestHistory: A, showSidebar: S, securitySchemes: B, events: i } = C, { isSidebarOpen: s } = te(), D = c(), y = c(), u = c(/* @__PURE__ */ new Set()), R = L(
|
|
28
28
|
() => {
|
|
29
|
-
var e, t;
|
|
30
|
-
return (
|
|
29
|
+
var e, t, o;
|
|
30
|
+
return ((e = a.value) != null && e.useCollectionSecurity ? (t = a.value) == null ? void 0 : t.selectedSecuritySchemeUids : (o = n.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
|
|
31
31
|
}
|
|
32
32
|
), x = async () => {
|
|
33
|
-
var
|
|
34
|
-
if (!
|
|
33
|
+
var k, E, N, U;
|
|
34
|
+
if (!n.value || !l.value || !a.value)
|
|
35
35
|
return;
|
|
36
|
-
|
|
36
|
+
u.value = oe(l.value);
|
|
37
37
|
const e = typeof v.value == "object" ? v.value.value : "{}", t = X.parse(e);
|
|
38
38
|
t.error && console.error("INVALID ENVIRONMENT!");
|
|
39
|
-
const
|
|
40
|
-
request:
|
|
41
|
-
example:
|
|
42
|
-
selectedSecuritySchemeUids:
|
|
43
|
-
proxyUrl: ((
|
|
44
|
-
environment:
|
|
39
|
+
const o = t.error || typeof t.data != "object" ? {} : t.data ?? {}, z = ((k = p.value) == null ? void 0 : k.cookies.map((W) => g[W]).filter(K)) ?? [], I = ((N = (E = a.value) == null ? void 0 : E.info) == null ? void 0 : N.title) === "Drafts" ? void 0 : T.value, [b, q] = le({
|
|
40
|
+
request: n.value,
|
|
41
|
+
example: l.value,
|
|
42
|
+
selectedSecuritySchemeUids: R.value,
|
|
43
|
+
proxyUrl: ((U = p.value) == null ? void 0 : U.proxyUrl) ?? "",
|
|
44
|
+
environment: o,
|
|
45
45
|
globalCookies: z,
|
|
46
|
-
status:
|
|
47
|
-
securitySchemes:
|
|
46
|
+
status: i.requestStatus,
|
|
47
|
+
securitySchemes: B,
|
|
48
48
|
server: I
|
|
49
49
|
});
|
|
50
|
-
if (
|
|
51
|
-
|
|
50
|
+
if (b) {
|
|
51
|
+
f(b.message, "error");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
const [
|
|
56
|
-
|
|
54
|
+
y.value = q.controller;
|
|
55
|
+
const [h, J] = await q.sendRequest();
|
|
56
|
+
h ? f(h.message, "error") : A.push(JSON.parse(JSON.stringify(J)));
|
|
57
57
|
}, P = async () => {
|
|
58
58
|
var e;
|
|
59
|
-
return (e =
|
|
59
|
+
return (e = y.value) == null ? void 0 : e.abort(ie.REQUEST_ABORTED);
|
|
60
60
|
};
|
|
61
61
|
return M(() => {
|
|
62
|
-
|
|
63
|
-
}), se(), $(() =>
|
|
62
|
+
i.executeRequest.on(x), i.cancelRequest.on(P);
|
|
63
|
+
}), se(), $(() => i.executeRequest.off(x)), H(
|
|
64
64
|
() => {
|
|
65
65
|
var e;
|
|
66
|
-
return (e =
|
|
66
|
+
return (e = l.value) == null ? void 0 : e.parameters;
|
|
67
67
|
},
|
|
68
68
|
() => {
|
|
69
|
-
|
|
69
|
+
u.value.clear();
|
|
70
70
|
},
|
|
71
71
|
{ deep: !0 }
|
|
72
|
-
), (e, t) => (
|
|
72
|
+
), (e, t) => (m(), Q("div", {
|
|
73
73
|
ref_key: "element",
|
|
74
|
-
ref:
|
|
74
|
+
ref: D,
|
|
75
75
|
class: _(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
|
|
76
|
-
"!mb-0 !mr-0 !border-0":
|
|
76
|
+
"!mb-0 !mr-0 !border-0": r(d) === "modal"
|
|
77
77
|
}])
|
|
78
78
|
}, [
|
|
79
|
-
|
|
79
|
+
r(S) ? (m(), w(ee, {
|
|
80
80
|
key: 0,
|
|
81
|
-
modelValue:
|
|
82
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
81
|
+
modelValue: r(s),
|
|
82
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => F(s) ? s.value = o : null),
|
|
83
83
|
class: _(["absolute left-3 top-2 z-50", [
|
|
84
|
-
{ hidden:
|
|
85
|
-
{ "xl:!flex": !
|
|
86
|
-
{ "!flex":
|
|
84
|
+
{ hidden: r(s) },
|
|
85
|
+
{ "xl:!flex": !r(s) },
|
|
86
|
+
{ "!flex": r(d) === "modal" }
|
|
87
87
|
]])
|
|
88
88
|
}, null, 8, ["modelValue", "class"])) : O("", !0),
|
|
89
89
|
V("div", ce, [
|
|
90
|
-
|
|
90
|
+
r(S) ? (m(), w(ae, {
|
|
91
91
|
key: 0,
|
|
92
|
-
onNewTab: t[1] || (t[1] = (
|
|
92
|
+
onNewTab: t[1] || (t[1] = (o) => e.$emit("newTab", o))
|
|
93
93
|
})) : O("", !0),
|
|
94
94
|
V("div", me, [
|
|
95
|
-
G(
|
|
95
|
+
G(r(Z), {
|
|
96
|
+
invalidParams: u.value,
|
|
97
|
+
selectedSecuritySchemeUids: R.value
|
|
98
|
+
}, null, 8, ["invalidParams", "selectedSecuritySchemeUids"])
|
|
96
99
|
])
|
|
97
100
|
])
|
|
98
101
|
], 2));
|
|
99
102
|
}
|
|
100
103
|
});
|
|
101
104
|
export {
|
|
102
|
-
|
|
105
|
+
we as default
|
|
103
106
|
};
|