@scalar/api-client 2.1.32 → 2.1.34
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 +28 -0
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/ScalarHotkey.vue.d.ts +5 -6
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.js +9 -18
- package/dist/components/Sidebar/SidebarButton.vue.d.ts +4 -0
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +19 -17
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +35 -29
- package/dist/layouts/App/create-api-client-app.d.ts +257 -45
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +10 -10
- package/dist/layouts/App/hotkeys.js +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +514 -90
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +24 -22
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +33 -27
- package/dist/layouts/Web/create-api-client-web.d.ts +258 -46
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +9 -9
- package/dist/libs/create-client.d.ts +280 -50
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +25 -24
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/local-storage.d.ts +2 -2
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/send-request.d.ts +2 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +98 -97
- package/dist/router.d.ts +5 -5
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +32 -32
- package/dist/store/collections.d.ts +14 -4
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/events.d.ts +1 -1
- package/dist/store/import-spec.d.ts +16 -31
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +43 -56
- package/dist/store/requests.d.ts +14 -14
- package/dist/store/store.d.ts +514 -90
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +43 -43
- package/dist/store/workspace.d.ts +10 -10
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts +5 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +64 -55
- package/dist/views/Environment/Environment.vue.d.ts +5 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +75 -66
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +98 -91
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +104 -111
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +5 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +37 -34
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +5 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +43 -37
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +4 -4
- package/dist/views/Request/RequestSidebar.vue2.js +43 -42
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -26
- package/dist/views/Settings/SettingsGeneral.vue.js +3 -3
- package/dist/views/Settings/SettingsGeneralMode.vue.js +3 -3
- package/package.json +9 -9
|
@@ -1,162 +1,169 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { importCurlCommand as
|
|
6
|
-
import { createRequestOperation as
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as K, ref as R, computed as N, watch as P, onMounted as X, onBeforeUnmount as Y, openBlock as w, createElementBlock as Z, Fragment as ee, createElementVNode as te, normalizeClass as V, unref as a, createVNode as c, withCtx as B, createBlock as g, createCommentVNode as I } from "vue";
|
|
2
|
+
import oe from "../../components/ImportCurl/ImportCurlModal.vue.js";
|
|
3
|
+
import re from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
4
|
+
import se from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
5
|
+
import { importCurlCommand as ae } from "../../libs/importers/curl.js";
|
|
6
|
+
import { createRequestOperation as ue } from "../../libs/send-request.js";
|
|
7
|
+
import le from "./RequestSection/RequestSection.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useOpenApiWatcher as
|
|
12
|
-
import { safeJSON as
|
|
13
|
-
import { useToasts as
|
|
9
|
+
import ne from "./RequestSubpageHeader.vue.js";
|
|
10
|
+
import ie from "./ResponseSection/ResponseSection.vue.js";
|
|
11
|
+
import { useOpenApiWatcher as me } from "./hooks/useOpenApiWatcher.js";
|
|
12
|
+
import { safeJSON as ce } from "@scalar/object-utils/parse";
|
|
13
|
+
import { useToasts as de } from "@scalar/use-toasts";
|
|
14
14
|
import { useMediaQuery as ve } from "@vueuse/core";
|
|
15
|
-
import { useRouter as
|
|
16
|
-
import
|
|
17
|
-
import { ERRORS as
|
|
18
|
-
import { useWorkspace as
|
|
19
|
-
const
|
|
15
|
+
import { useRouter as pe } from "vue-router";
|
|
16
|
+
import fe from "./RequestSidebar.vue.js";
|
|
17
|
+
import { ERRORS as ye } from "../../libs/errors.js";
|
|
18
|
+
import { useWorkspace as Re } from "../../store/store.js";
|
|
19
|
+
const Ae = /* @__PURE__ */ K({
|
|
20
20
|
__name: "Request",
|
|
21
21
|
emits: ["newTab"],
|
|
22
|
-
setup(
|
|
23
|
-
var
|
|
24
|
-
const
|
|
25
|
-
activeCollection:
|
|
22
|
+
setup(Se) {
|
|
23
|
+
var E;
|
|
24
|
+
const M = Re(), { toast: b } = de(), {
|
|
25
|
+
activeCollection: S,
|
|
26
26
|
activeExample: d,
|
|
27
|
-
activeEnvironment:
|
|
28
|
-
activeRequest:
|
|
29
|
-
activeWorkspace:
|
|
30
|
-
activeServer:
|
|
31
|
-
cookies:
|
|
27
|
+
activeEnvironment: T,
|
|
28
|
+
activeRequest: q,
|
|
29
|
+
activeWorkspace: s,
|
|
30
|
+
activeServer: $,
|
|
31
|
+
cookies: A,
|
|
32
|
+
isReadOnly: H,
|
|
32
33
|
modalState: l,
|
|
33
|
-
requestHistory:
|
|
34
|
-
securitySchemes:
|
|
35
|
-
requestMutators:
|
|
36
|
-
serverMutators:
|
|
37
|
-
servers:
|
|
38
|
-
events:
|
|
39
|
-
} =
|
|
40
|
-
() =>
|
|
34
|
+
requestHistory: x,
|
|
35
|
+
securitySchemes: L,
|
|
36
|
+
requestMutators: _,
|
|
37
|
+
serverMutators: W,
|
|
38
|
+
servers: j,
|
|
39
|
+
events: v
|
|
40
|
+
} = M, u = R(!((E = s.value) != null && E.isReadOnly)), O = R(), e = R(), h = R(""), D = pe(), F = N(
|
|
41
|
+
() => x.findLast((o) => {
|
|
41
42
|
var t;
|
|
42
43
|
return o.request.uid === ((t = d.value) == null ? void 0 : t.uid);
|
|
43
44
|
})
|
|
44
|
-
),
|
|
45
|
-
|
|
46
|
-
const
|
|
45
|
+
), Q = ve("(max-width: 800px)");
|
|
46
|
+
P(Q, (o) => u.value = !o);
|
|
47
|
+
const U = N(
|
|
48
|
+
() => {
|
|
49
|
+
var o, t;
|
|
50
|
+
return (H.value ? (o = S.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = q.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
|
|
51
|
+
}
|
|
52
|
+
), k = async () => {
|
|
47
53
|
var f;
|
|
48
|
-
if (!
|
|
54
|
+
if (!q.value || !d.value || !S.value)
|
|
49
55
|
return;
|
|
50
|
-
const o =
|
|
56
|
+
const o = ce.parse(((f = T.value) == null ? void 0 : f.value) || "{}");
|
|
51
57
|
o.error && console.error("INVALID ENVIRONMENT!");
|
|
52
|
-
const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r =
|
|
53
|
-
auth:
|
|
54
|
-
request:
|
|
58
|
+
const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = s.value.cookies.map((y) => A[y]), [n, i] = ue({
|
|
59
|
+
auth: S.value.auth,
|
|
60
|
+
request: q.value,
|
|
55
61
|
example: d.value,
|
|
56
|
-
|
|
62
|
+
selectedSecuritySchemeUids: U.value,
|
|
63
|
+
proxy: s.value.proxyUrl ?? "",
|
|
57
64
|
environment: t,
|
|
58
65
|
globalCookies: r,
|
|
59
|
-
status:
|
|
60
|
-
securitySchemes:
|
|
61
|
-
server:
|
|
66
|
+
status: v.requestStatus,
|
|
67
|
+
securitySchemes: L,
|
|
68
|
+
server: $.value
|
|
62
69
|
});
|
|
63
70
|
if (n) {
|
|
64
71
|
b(n.message, "error");
|
|
65
72
|
return;
|
|
66
73
|
}
|
|
67
|
-
|
|
74
|
+
O.value = i.controller;
|
|
68
75
|
const [m, p] = await i.sendRequest();
|
|
69
|
-
m ? b(m.message, "error") :
|
|
70
|
-
},
|
|
76
|
+
m ? b(m.message, "error") : x.push(p);
|
|
77
|
+
}, z = async () => {
|
|
71
78
|
var o;
|
|
72
|
-
return (o =
|
|
79
|
+
return (o = O.value) == null ? void 0 : o.abort(ye.REQUEST_ABORTED);
|
|
73
80
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}),
|
|
77
|
-
function
|
|
81
|
+
X(() => {
|
|
82
|
+
v.executeRequest.on(k), v.cancelRequest.on(z);
|
|
83
|
+
}), me(), Y(() => v.executeRequest.off(k));
|
|
84
|
+
function J({ requestName: o }) {
|
|
78
85
|
var r, n, i, m;
|
|
79
86
|
if (!e.value) return;
|
|
80
87
|
if (e.value.servers) {
|
|
81
|
-
const p = Object.values(
|
|
88
|
+
const p = Object.values(j).find(
|
|
82
89
|
(f) => {
|
|
83
|
-
var
|
|
84
|
-
return f.url === ((C = (
|
|
90
|
+
var y, C;
|
|
91
|
+
return f.url === ((C = (y = e == null ? void 0 : e.value) == null ? void 0 : y.servers) == null ? void 0 : C[0]);
|
|
85
92
|
}
|
|
86
93
|
);
|
|
87
|
-
p ?
|
|
94
|
+
p ? h.value = p.uid : h.value = W.add(
|
|
88
95
|
{ url: e.value.servers[0] },
|
|
89
|
-
|
|
96
|
+
s.value.collections[0]
|
|
90
97
|
).uid;
|
|
91
98
|
}
|
|
92
|
-
const t =
|
|
99
|
+
const t = _.add(
|
|
93
100
|
{
|
|
94
101
|
summary: o,
|
|
95
102
|
path: (r = e == null ? void 0 : e.value) == null ? void 0 : r.path,
|
|
96
103
|
method: (n = e == null ? void 0 : e.value) == null ? void 0 : n.method,
|
|
97
104
|
parameters: (i = e == null ? void 0 : e.value) == null ? void 0 : i.parameters,
|
|
98
|
-
selectedServerUid:
|
|
105
|
+
selectedServerUid: h.value,
|
|
99
106
|
requestBody: (m = e == null ? void 0 : e.value) == null ? void 0 : m.requestBody
|
|
100
107
|
},
|
|
101
|
-
|
|
108
|
+
s.value.collections[0]
|
|
102
109
|
);
|
|
103
|
-
t &&
|
|
104
|
-
`/workspace/${
|
|
110
|
+
t && D.push(
|
|
111
|
+
`/workspace/${s.value.uid}/request/${t.uid}`
|
|
105
112
|
), l.hide();
|
|
106
113
|
}
|
|
107
|
-
function
|
|
108
|
-
e.value =
|
|
114
|
+
function G(o) {
|
|
115
|
+
e.value = ae(o), l.show();
|
|
109
116
|
}
|
|
110
|
-
return (o, t) => (w(),
|
|
111
|
-
|
|
112
|
-
class:
|
|
113
|
-
"!mr-0 !mb-0 !border-0": s
|
|
117
|
+
return (o, t) => (w(), Z(ee, null, [
|
|
118
|
+
te("div", {
|
|
119
|
+
class: V(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative overflow-hidden", {
|
|
120
|
+
"!mr-0 !mb-0 !border-0": a(s).isReadOnly
|
|
114
121
|
}])
|
|
115
122
|
}, [
|
|
116
|
-
|
|
123
|
+
c(ne, {
|
|
117
124
|
modelValue: u.value,
|
|
118
125
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => u.value = r),
|
|
119
|
-
isReadonly: s
|
|
120
|
-
onHideModal: t[1] || (t[1] = () =>
|
|
121
|
-
onImportCurl:
|
|
126
|
+
isReadonly: a(s).isReadOnly,
|
|
127
|
+
onHideModal: t[1] || (t[1] = () => a(l).hide()),
|
|
128
|
+
onImportCurl: G
|
|
122
129
|
}, null, 8, ["modelValue", "isReadonly"]),
|
|
123
|
-
|
|
124
|
-
default:
|
|
125
|
-
|
|
126
|
-
isReadonly: s
|
|
130
|
+
c(re, null, {
|
|
131
|
+
default: B(() => [
|
|
132
|
+
c(fe, {
|
|
133
|
+
isReadonly: a(s).isReadOnly,
|
|
127
134
|
showSidebar: u.value,
|
|
128
135
|
onNewTab: t[2] || (t[2] = (r) => o.$emit("newTab", r)),
|
|
129
136
|
"onUpdate:showSidebar": t[3] || (t[3] = (r) => u.value = r)
|
|
130
137
|
}, null, 8, ["isReadonly", "showSidebar"]),
|
|
131
|
-
|
|
138
|
+
a(d) ? (w(), g(se, {
|
|
132
139
|
key: 0,
|
|
133
|
-
class:
|
|
140
|
+
class: V(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
|
|
134
141
|
}, {
|
|
135
|
-
default:
|
|
142
|
+
default: B(() => {
|
|
136
143
|
var r;
|
|
137
144
|
return [
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
response: (r =
|
|
145
|
+
c(le, { selectedSecuritySchemeUids: U.value }, null, 8, ["selectedSecuritySchemeUids"]),
|
|
146
|
+
c(ie, {
|
|
147
|
+
response: (r = F.value) == null ? void 0 : r.response
|
|
141
148
|
}, null, 8, ["response"])
|
|
142
149
|
];
|
|
143
150
|
}),
|
|
144
151
|
_: 1
|
|
145
|
-
}, 8, ["class"])) :
|
|
152
|
+
}, 8, ["class"])) : I("", !0)
|
|
146
153
|
]),
|
|
147
154
|
_: 1
|
|
148
155
|
})
|
|
149
156
|
], 2),
|
|
150
|
-
e.value ? (w(),
|
|
157
|
+
e.value ? (w(), g(oe, {
|
|
151
158
|
key: 0,
|
|
152
159
|
parsedCurl: e.value,
|
|
153
|
-
state:
|
|
154
|
-
onClose: t[4] || (t[4] = (r) =>
|
|
155
|
-
onImportCurl:
|
|
156
|
-
}, null, 8, ["parsedCurl", "state"])) :
|
|
160
|
+
state: a(l),
|
|
161
|
+
onClose: t[4] || (t[4] = (r) => a(l).hide()),
|
|
162
|
+
onImportCurl: J
|
|
163
|
+
}, null, 8, ["parsedCurl", "state"])) : I("", !0)
|
|
157
164
|
], 64));
|
|
158
165
|
}
|
|
159
166
|
});
|
|
160
167
|
export {
|
|
161
|
-
|
|
168
|
+
Ae as default
|
|
162
169
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
selectedSecuritySchemeUids: string[];
|
|
2
3
|
title: string;
|
|
3
4
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
5
|
+
selectedSecuritySchemeUids: string[];
|
|
4
6
|
title: string;
|
|
5
7
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";gCAwV8B,MAAM,EAAE;WAC7B,MAAM;;gCADe,MAAM,EAAE;WAC7B,MAAM;;AAsdf,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuth.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-7a05f8f1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,157 +1,150 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { nanoid as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { displaySchemeFormatter as $, createSchemeValueSet as
|
|
8
|
-
import { ADD_AUTH_OPTIONS as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
const
|
|
1
|
+
import { defineComponent as I, ref as w, computed as v, openBlock as u, createBlock as O, withCtx as c, createElementVNode as r, toDisplayString as A, createVNode as i, unref as s, createElementBlock as m, Fragment as W, renderList as z, createTextVNode as E, withModifiers as j } from "vue";
|
|
2
|
+
import H from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import { useModal as L, ScalarComboboxMultiselect as P, ScalarButton as G, ScalarIcon as D } from "@scalar/components";
|
|
4
|
+
import { nanoid as J } from "nanoid";
|
|
5
|
+
import K from "./DeleteRequestAuthModal.vue.js";
|
|
6
|
+
import Q from "./RequestExampleAuth.vue.js";
|
|
7
|
+
import { displaySchemeFormatter as $, createSchemeValueSet as X } from "../../libs/auth.js";
|
|
8
|
+
import { ADD_AUTH_OPTIONS as Y } from "../../consts/new-auth-options.js";
|
|
9
|
+
import Z from "../../../../components/DataTable/DataTable.vue.js";
|
|
10
|
+
import ee from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
11
|
+
import te from "../../../../components/DataTable/DataTableHeader.vue.js";
|
|
12
|
+
import { useWorkspace as le } from "../../../../store/store.js";
|
|
13
|
+
const oe = { class: "flex gap-1" }, se = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex relative scroll-timeline-x w-full"
|
|
16
|
-
},
|
|
16
|
+
}, ie = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, ae = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "pl-2"
|
|
19
|
-
},
|
|
19
|
+
}, ye = /* @__PURE__ */ I({
|
|
20
20
|
__name: "RequestAuth",
|
|
21
21
|
props: {
|
|
22
|
+
selectedSecuritySchemeUids: {},
|
|
22
23
|
title: {}
|
|
23
24
|
},
|
|
24
|
-
setup(
|
|
25
|
+
setup(S) {
|
|
25
26
|
const {
|
|
26
|
-
activeCollection:
|
|
27
|
-
activeRequest:
|
|
28
|
-
collectionMutators:
|
|
29
|
-
isReadOnly:
|
|
30
|
-
requestMutators:
|
|
31
|
-
securitySchemes:
|
|
32
|
-
securitySchemeMutators:
|
|
33
|
-
} =
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
);
|
|
38
|
-
return ((S.value && (t != null && t.length) ? t.map((s) => {
|
|
39
|
-
var f;
|
|
40
|
-
const l = Object.keys(s)[0];
|
|
41
|
-
return ((f = Object.values(v).find((B) => B.nameKey === l)) == null ? void 0 : f.uid) ?? "";
|
|
42
|
-
}) : (d = u.value) == null ? void 0 : d.securitySchemes) ?? []).map((s) => v[s]).filter((s) => s);
|
|
43
|
-
}), R = _(
|
|
27
|
+
activeCollection: a,
|
|
28
|
+
activeRequest: d,
|
|
29
|
+
collectionMutators: x,
|
|
30
|
+
isReadOnly: f,
|
|
31
|
+
requestMutators: M,
|
|
32
|
+
securitySchemes: p,
|
|
33
|
+
securitySchemeMutators: V
|
|
34
|
+
} = le(), R = w(null), h = L(), y = w(void 0), _ = `combobox-${J()}`, T = v(() => {
|
|
35
|
+
var e;
|
|
36
|
+
return (((e = a.value) == null ? void 0 : e.securitySchemes) ?? []).map((l) => p[l]).filter((l) => l);
|
|
37
|
+
}), B = v(
|
|
44
38
|
() => {
|
|
45
|
-
const t =
|
|
39
|
+
const t = T.value.map(
|
|
46
40
|
(e) => $(e)
|
|
47
41
|
);
|
|
48
|
-
return
|
|
42
|
+
return f.value ? t : [
|
|
49
43
|
{ label: "Select auth", options: t },
|
|
50
44
|
{
|
|
51
45
|
label: "Add new auth",
|
|
52
|
-
options:
|
|
46
|
+
options: Y
|
|
53
47
|
}
|
|
54
48
|
];
|
|
55
49
|
}
|
|
56
|
-
),
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
), b = (t) => {
|
|
51
|
+
!a.value || !d.value || (f.value ? x.edit(
|
|
52
|
+
a.value.uid,
|
|
53
|
+
"selectedSecuritySchemeUids",
|
|
54
|
+
t
|
|
55
|
+
) : M.edit(
|
|
56
|
+
d.value.uid,
|
|
57
|
+
"selectedSecuritySchemeUids",
|
|
58
|
+
t
|
|
59
|
+
));
|
|
60
|
+
}, n = v(
|
|
61
|
+
() => S.selectedSecuritySchemeUids.map(
|
|
62
|
+
(t) => $(p[t])
|
|
63
|
+
)
|
|
63
64
|
);
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
if (!((
|
|
67
|
-
const e = t.find((
|
|
65
|
+
function N(t) {
|
|
66
|
+
var U, g;
|
|
67
|
+
if (!((U = a.value) != null && U.uid) || !((g = d.value) != null && g.uid)) return;
|
|
68
|
+
const e = t.find((o) => o.payload), l = t.filter((o) => !o.payload).map(({ id: o }) => o);
|
|
68
69
|
if (e != null && e.payload) {
|
|
69
|
-
const
|
|
70
|
+
const o = V.add(
|
|
70
71
|
e.payload,
|
|
71
|
-
|
|
72
|
+
a.value.uid
|
|
72
73
|
);
|
|
73
|
-
|
|
74
|
+
l.push(o.uid);
|
|
74
75
|
}
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const C = l.filter((o) => !a.value.auth[o]);
|
|
77
|
+
x.edit(
|
|
78
|
+
a.value.uid,
|
|
78
79
|
"auth",
|
|
79
|
-
|
|
80
|
-
), b
|
|
81
|
-
r.value.uid,
|
|
82
|
-
"selectedSecuritySchemeUids",
|
|
83
|
-
o
|
|
84
|
-
);
|
|
80
|
+
C.reduce((o, k) => (o[k] = X(p[k]), o), a.value.auth)
|
|
81
|
+
), b(l);
|
|
85
82
|
}
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
"selectedSecuritySchemeUids",
|
|
89
|
-
r.value.selectedSecuritySchemeUids.filter(
|
|
90
|
-
(e) => e !== t
|
|
91
|
-
)
|
|
83
|
+
const q = (t) => b(
|
|
84
|
+
S.selectedSecuritySchemeUids.filter((e) => e !== t)
|
|
92
85
|
);
|
|
93
|
-
function
|
|
94
|
-
|
|
86
|
+
function F(t) {
|
|
87
|
+
y.value = t, h.show();
|
|
95
88
|
}
|
|
96
|
-
return (t, e) => (
|
|
89
|
+
return (t, e) => (u(), O(H, {
|
|
97
90
|
class: "group/params",
|
|
98
|
-
itemCount:
|
|
91
|
+
itemCount: n.value.length
|
|
99
92
|
}, {
|
|
100
|
-
title:
|
|
101
|
-
|
|
93
|
+
title: c(() => [
|
|
94
|
+
r("div", oe, A(t.title), 1)
|
|
102
95
|
]),
|
|
103
|
-
default:
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
default: c(() => [
|
|
97
|
+
r("form", null, [
|
|
98
|
+
i(s(Z), {
|
|
106
99
|
class: "flex-1",
|
|
107
100
|
columns: [""]
|
|
108
101
|
}, {
|
|
109
|
-
default:
|
|
110
|
-
|
|
111
|
-
default:
|
|
112
|
-
|
|
113
|
-
default:
|
|
114
|
-
|
|
102
|
+
default: c(() => [
|
|
103
|
+
i(s(ee), null, {
|
|
104
|
+
default: c(() => [
|
|
105
|
+
i(s(te), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
|
|
106
|
+
default: c(() => [
|
|
107
|
+
i(s(P), {
|
|
115
108
|
ref_key: "comboboxRef",
|
|
116
|
-
ref:
|
|
109
|
+
ref: R,
|
|
117
110
|
class: "text-xs w-full",
|
|
118
111
|
fullWidth: "",
|
|
119
|
-
isDeletable:
|
|
120
|
-
modelValue:
|
|
112
|
+
isDeletable: !s(f),
|
|
113
|
+
modelValue: n.value,
|
|
121
114
|
multiple: "",
|
|
122
|
-
options:
|
|
115
|
+
options: B.value,
|
|
123
116
|
style: { "margin-left": "120px" },
|
|
124
|
-
teleport: `#${
|
|
125
|
-
onDelete:
|
|
126
|
-
"onUpdate:modelValue":
|
|
117
|
+
teleport: `#${_}`,
|
|
118
|
+
onDelete: F,
|
|
119
|
+
"onUpdate:modelValue": N
|
|
127
120
|
}, {
|
|
128
|
-
default:
|
|
129
|
-
|
|
121
|
+
default: c(() => [
|
|
122
|
+
i(s(G), {
|
|
130
123
|
class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
|
|
131
124
|
fullWidth: "",
|
|
132
125
|
variant: "ghost"
|
|
133
126
|
}, {
|
|
134
|
-
default:
|
|
135
|
-
e[3] || (e[3] =
|
|
136
|
-
|
|
137
|
-
e[1] || (e[1] =
|
|
138
|
-
|
|
139
|
-
(
|
|
140
|
-
key:
|
|
127
|
+
default: c(() => [
|
|
128
|
+
e[3] || (e[3] = r("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)),
|
|
129
|
+
n.value.length ? (u(), m("div", se, [
|
|
130
|
+
e[1] || (e[1] = r("div", { class: "fade-left" }, null, -1)),
|
|
131
|
+
r("div", ie, [
|
|
132
|
+
(u(!0), m(W, null, z(n.value, (l) => (u(), m("span", {
|
|
133
|
+
key: l.id,
|
|
141
134
|
class: "cm-pill flex items-center mx-0 h-fit pr-1"
|
|
142
135
|
}, [
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
E(A(l.label) + " ", 1),
|
|
137
|
+
i(s(D), {
|
|
145
138
|
class: "ml-1 cursor-pointer text-c-3 hover:text-c-1",
|
|
146
139
|
icon: "Close",
|
|
147
140
|
size: "xs",
|
|
148
|
-
onClick:
|
|
141
|
+
onClick: j((C) => q(l.id), ["stop"])
|
|
149
142
|
}, null, 8, ["onClick"])
|
|
150
143
|
]))), 128))
|
|
151
144
|
]),
|
|
152
|
-
e[2] || (e[2] =
|
|
153
|
-
])) : (
|
|
154
|
-
|
|
145
|
+
e[2] || (e[2] = r("div", { class: "fade-right" }, null, -1))
|
|
146
|
+
])) : (u(), m("div", ae, " None ")),
|
|
147
|
+
i(s(D), {
|
|
155
148
|
class: "min-w-3 ml-auto mr-2.5",
|
|
156
149
|
icon: "ChevronDown",
|
|
157
150
|
size: "xs"
|
|
@@ -161,23 +154,23 @@ const le = { class: "flex gap-1" }, oe = {
|
|
|
161
154
|
})
|
|
162
155
|
]),
|
|
163
156
|
_: 1
|
|
164
|
-
}, 8, ["modelValue", "options", "teleport"])
|
|
157
|
+
}, 8, ["isDeletable", "modelValue", "options", "teleport"])
|
|
165
158
|
]),
|
|
166
159
|
_: 1
|
|
167
160
|
})
|
|
168
161
|
]),
|
|
169
162
|
_: 1
|
|
170
163
|
}),
|
|
171
|
-
|
|
164
|
+
i(Q, { selectedSecuritySchemeUids: t.selectedSecuritySchemeUids }, null, 8, ["selectedSecuritySchemeUids"])
|
|
172
165
|
]),
|
|
173
166
|
_: 1
|
|
174
167
|
}),
|
|
175
|
-
|
|
176
|
-
scheme:
|
|
177
|
-
state:
|
|
178
|
-
onClose: e[0] || (e[0] = (
|
|
168
|
+
i(K, {
|
|
169
|
+
scheme: y.value,
|
|
170
|
+
state: s(h),
|
|
171
|
+
onClose: e[0] || (e[0] = (l) => s(h).hide())
|
|
179
172
|
}, null, 8, ["scheme", "state"]),
|
|
180
|
-
|
|
173
|
+
r("div", { id: _ })
|
|
181
174
|
])
|
|
182
175
|
]),
|
|
183
176
|
_: 1
|
|
@@ -185,5 +178,5 @@ const le = { class: "flex gap-1" }, oe = {
|
|
|
185
178
|
}
|
|
186
179
|
});
|
|
187
180
|
export {
|
|
188
|
-
|
|
181
|
+
ye as default
|
|
189
182
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
selectedSecuritySchemeUids: string[];
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
selectedSecuritySchemeUids: string[];
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
6
|
export default _default;
|
|
3
7
|
//# sourceMappingURL=RequestExampleAuth.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":";gCA+J8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AAqVtC,wBAMG"}
|