@scalar/api-client 2.1.52 → 2.2.0
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 +22 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +35 -42
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
- package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +20 -19
- package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +20 -19
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/useLayout.d.ts +2 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useLayout.js +4 -3
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +38 -37
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
- package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +673 -1236
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -102
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request.d.ts +2 -3
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +127 -123
- package/dist/store/active-entities.d.ts +333 -0
- package/dist/store/active-entities.d.ts.map +1 -0
- package/dist/store/active-entities.js +97 -0
- package/dist/store/collections.d.ts +4 -274
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts +0 -54
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.js +4 -3
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +15 -15
- package/dist/store/security-schemes.d.ts +527 -317
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +33 -41
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store-context.d.ts +0 -3
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +640 -5297
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +111 -189
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +14 -24
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -13
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +14 -13
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +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 +92 -92
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
- 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 +94 -100
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +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/RequestBody.vue2.js +29 -28
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
- 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 +19 -18
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -73
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
- 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 +15 -16
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
- 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 +23 -22
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
- package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +16 -8
- package/dist/views/Request/handle-drag.d.ts +2 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +23 -25
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
- package/dist/views/Request/libs/auth.d.ts +1 -29
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +2 -9
- package/dist/views/Request/libs/index.js +6 -8
- package/dist/views/Request/libs/live-sync.d.ts +6 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +164 -185
- package/dist/views/Request/libs/oauth2.d.ts +6 -10
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +54 -69
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +14 -13
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +18 -17
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
- package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
- package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
- package/package.json +8 -8
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as b, computed as f, openBlock as m, createBlock as W, withCtx as r, createElementVNode as a, createTextVNode as _, toDisplayString as g, createElementBlock as p, createVNode as c, unref as i, createCommentVNode as L, Fragment as H, renderList as P, withModifiers as O, withKeys as G } from "vue";
|
|
2
2
|
import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import te from "
|
|
6
|
-
import le from "./
|
|
7
|
-
import
|
|
3
|
+
import { useActiveEntities as Q } from "../../../../store/active-entities.js";
|
|
4
|
+
import { useModal as X, ScalarIcon as B, ScalarComboboxMultiselect as Y, ScalarButton as Z, ScalarIconButton as ee } from "@scalar/components";
|
|
5
|
+
import { nanoid as te } from "nanoid";
|
|
6
|
+
import le from "./DeleteRequestAuthModal.vue.js";
|
|
7
|
+
import oe from "./RequestExampleAuth.vue.js";
|
|
8
|
+
import { displaySchemeFormatter as k } from "../../libs/auth.js";
|
|
8
9
|
import { ADD_AUTH_OPTIONS as se } from "../../consts/new-auth-options.js";
|
|
9
10
|
import ie from "../../../../components/DataTable/DataTable.vue.js";
|
|
10
11
|
import ne from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
11
12
|
import ce from "../../../../components/DataTable/DataTableHeader.vue.js";
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
const
|
|
13
|
+
import { useWorkspace as re } from "../../../../store/store.js";
|
|
14
|
+
const ae = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "flex items-center gap-1 text-c-3"
|
|
16
17
|
}, me = {
|
|
@@ -19,170 +20,163 @@ const re = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
|
|
|
19
20
|
}, de = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, fe = {
|
|
20
21
|
key: 1,
|
|
21
22
|
class: "pl-2"
|
|
22
|
-
}, we = /* @__PURE__ */
|
|
23
|
+
}, we = /* @__PURE__ */ z({
|
|
23
24
|
__name: "RequestAuth",
|
|
24
25
|
props: {
|
|
25
26
|
selectedSecuritySchemeUids: {},
|
|
26
27
|
title: {}
|
|
27
28
|
},
|
|
28
|
-
setup(
|
|
29
|
-
const {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
securitySchemeMutators: K
|
|
37
|
-
} = ae(), T = g(null), C = g(null), b = Q(), U = g(void 0), A = `combobox-${ee()}`, D = f(() => {
|
|
29
|
+
setup(R) {
|
|
30
|
+
const { activeCollection: u, activeRequest: h } = Q(), {
|
|
31
|
+
collectionMutators: M,
|
|
32
|
+
isReadOnly: x,
|
|
33
|
+
requestMutators: V,
|
|
34
|
+
securitySchemes: q,
|
|
35
|
+
securitySchemeMutators: I
|
|
36
|
+
} = re(), K = b(null), $ = b(null), y = X(), w = b(void 0), C = `combobox-${te()}`, U = f(() => {
|
|
38
37
|
var l, s;
|
|
39
|
-
const e = ((l = h.value) == null ? void 0 : l.security) ?? ((s =
|
|
38
|
+
const e = ((l = h.value) == null ? void 0 : l.security) ?? ((s = u.value) == null ? void 0 : s.security) ?? [];
|
|
40
39
|
return { filteredRequirements: e.filter((n) => Object.keys(n).length), requirements: e };
|
|
41
|
-
}),
|
|
40
|
+
}), T = f(() => {
|
|
42
41
|
var t;
|
|
43
|
-
return (((t =
|
|
44
|
-
}),
|
|
42
|
+
return (((t = u.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => q[l]).filter((l) => l);
|
|
43
|
+
}), j = f(
|
|
45
44
|
() => {
|
|
46
|
-
const e = [...
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
(
|
|
45
|
+
const e = [...T.value], t = [];
|
|
46
|
+
U.value.filteredRequirements.forEach((o) => {
|
|
47
|
+
const d = e.findIndex(
|
|
48
|
+
(F) => F.nameKey === Object.keys(o)[0]
|
|
50
49
|
);
|
|
51
|
-
|
|
50
|
+
d > -1 && (t.push(e[d]), e.splice(d, 1));
|
|
52
51
|
});
|
|
53
52
|
const l = e.map(
|
|
54
|
-
(
|
|
53
|
+
(o) => k(o)
|
|
55
54
|
), s = t.map(
|
|
56
|
-
(
|
|
55
|
+
(o) => k(o)
|
|
57
56
|
), n = [
|
|
58
57
|
{ label: "Required authentication", options: s },
|
|
59
58
|
{ label: "Available authentication", options: l }
|
|
60
59
|
];
|
|
61
|
-
return
|
|
60
|
+
return x ? s.length ? n : l : (n.push({
|
|
62
61
|
label: "Add new authentication",
|
|
63
62
|
options: se
|
|
64
63
|
}), n);
|
|
65
64
|
}
|
|
66
|
-
),
|
|
67
|
-
const { filteredRequirements: e, requirements: t } =
|
|
65
|
+
), S = f(() => {
|
|
66
|
+
const { filteredRequirements: e, requirements: t } = U.value;
|
|
68
67
|
if (!t.length) return null;
|
|
69
|
-
const l = e.length < t.length, s = l ? "Unlock" : "Lock", n = l ? "Optional" : "Required",
|
|
70
|
-
return { icon: s, text:
|
|
71
|
-
}),
|
|
72
|
-
!
|
|
73
|
-
|
|
68
|
+
const l = e.length < t.length, s = l ? "Unlock" : "Lock", n = l ? "Optional" : "Required", d = `${e.length === 1 ? Object.keys(e[0])[0] : "Authentication"} ${n}`;
|
|
69
|
+
return { icon: s, text: d };
|
|
70
|
+
}), A = (e) => {
|
|
71
|
+
!u.value || !h.value || (x ? M.edit(
|
|
72
|
+
u.value.uid,
|
|
74
73
|
"selectedSecuritySchemeUids",
|
|
75
74
|
e
|
|
76
|
-
) :
|
|
75
|
+
) : V.edit(
|
|
77
76
|
h.value.uid,
|
|
78
77
|
"selectedSecuritySchemeUids",
|
|
79
78
|
e
|
|
80
79
|
));
|
|
81
80
|
}, v = f(
|
|
82
|
-
() =>
|
|
83
|
-
(e) => q
|
|
81
|
+
() => R.selectedSecuritySchemeUids.map(
|
|
82
|
+
(e) => k(q[e])
|
|
84
83
|
)
|
|
85
84
|
);
|
|
86
|
-
function
|
|
87
|
-
var
|
|
88
|
-
if (!((
|
|
85
|
+
function N(e) {
|
|
86
|
+
var s, n;
|
|
87
|
+
if (!((s = u.value) != null && s.uid) || !((n = h.value) != null && n.uid)) return;
|
|
89
88
|
const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => o);
|
|
90
89
|
if (t != null && t.payload) {
|
|
91
|
-
const o =
|
|
90
|
+
const o = I.add(
|
|
92
91
|
t.payload,
|
|
93
|
-
|
|
92
|
+
u.value.uid
|
|
94
93
|
);
|
|
95
94
|
o && l.push(o.uid);
|
|
96
95
|
}
|
|
97
|
-
|
|
98
|
-
$.edit(
|
|
99
|
-
a.value.uid,
|
|
100
|
-
"auth",
|
|
101
|
-
s.reduce((o, x) => (o[x] = oe(S[x]), o), a.value.auth)
|
|
102
|
-
), O(l);
|
|
96
|
+
A(l);
|
|
103
97
|
}
|
|
104
|
-
const
|
|
98
|
+
const D = (e) => {
|
|
105
99
|
var t;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
), (t =
|
|
100
|
+
A(
|
|
101
|
+
R.selectedSecuritySchemeUids.filter((l) => l !== e)
|
|
102
|
+
), (t = $.value) == null || t.$el.focus();
|
|
109
103
|
};
|
|
110
|
-
function
|
|
111
|
-
|
|
104
|
+
function E(e) {
|
|
105
|
+
w.value = e, y.show();
|
|
112
106
|
}
|
|
113
|
-
return (e, t) => (
|
|
107
|
+
return (e, t) => (m(), W(J, {
|
|
114
108
|
class: "group/params",
|
|
115
109
|
itemCount: v.value.length
|
|
116
110
|
}, {
|
|
117
|
-
title:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
c(i(
|
|
111
|
+
title: r(() => [
|
|
112
|
+
a("div", ae, [
|
|
113
|
+
_(g(e.title) + " ", 1),
|
|
114
|
+
S.value ? (m(), p("div", ue, [
|
|
115
|
+
_(g(S.value.text) + " ", 1),
|
|
116
|
+
c(i(B), {
|
|
123
117
|
class: "text-c-3",
|
|
124
|
-
icon:
|
|
118
|
+
icon: S.value.icon,
|
|
125
119
|
size: "xs"
|
|
126
120
|
}, null, 8, ["icon"])
|
|
127
121
|
])) : L("", !0)
|
|
128
122
|
])
|
|
129
123
|
]),
|
|
130
|
-
default:
|
|
131
|
-
|
|
124
|
+
default: r(() => [
|
|
125
|
+
a("form", null, [
|
|
132
126
|
c(i(ie), {
|
|
133
127
|
class: "flex-1",
|
|
134
128
|
columns: [""]
|
|
135
129
|
}, {
|
|
136
|
-
default:
|
|
130
|
+
default: r(() => [
|
|
137
131
|
c(i(ne), null, {
|
|
138
|
-
default:
|
|
132
|
+
default: r(() => [
|
|
139
133
|
c(i(ce), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
|
|
140
|
-
default:
|
|
141
|
-
c(i(
|
|
134
|
+
default: r(() => [
|
|
135
|
+
c(i(Y), {
|
|
142
136
|
ref_key: "comboboxRef",
|
|
143
|
-
ref:
|
|
137
|
+
ref: K,
|
|
144
138
|
class: "text-xs w-full",
|
|
145
139
|
fullWidth: "",
|
|
146
|
-
isDeletable: !i(
|
|
140
|
+
isDeletable: !i(x),
|
|
147
141
|
modelValue: v.value,
|
|
148
142
|
multiple: "",
|
|
149
|
-
options:
|
|
143
|
+
options: j.value,
|
|
150
144
|
style: { "margin-left": "120px" },
|
|
151
|
-
teleport: `#${
|
|
152
|
-
onDelete:
|
|
153
|
-
"onUpdate:modelValue":
|
|
145
|
+
teleport: `#${C}`,
|
|
146
|
+
onDelete: E,
|
|
147
|
+
"onUpdate:modelValue": N
|
|
154
148
|
}, {
|
|
155
|
-
default:
|
|
156
|
-
c(i(
|
|
149
|
+
default: r(() => [
|
|
150
|
+
c(i(Z), {
|
|
157
151
|
ref_key: "comboboxButtonRef",
|
|
158
|
-
ref:
|
|
152
|
+
ref: $,
|
|
159
153
|
class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start -outline-offset-2",
|
|
160
154
|
fullWidth: "",
|
|
161
155
|
variant: "ghost"
|
|
162
156
|
}, {
|
|
163
|
-
default:
|
|
164
|
-
t[3] || (t[3] =
|
|
165
|
-
v.value.length ? (
|
|
166
|
-
t[1] || (t[1] =
|
|
167
|
-
|
|
168
|
-
(
|
|
157
|
+
default: r(() => [
|
|
158
|
+
t[3] || (t[3] = a("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
|
|
159
|
+
v.value.length ? (m(), p("div", me, [
|
|
160
|
+
t[1] || (t[1] = a("div", { class: "fade-left" }, null, -1)),
|
|
161
|
+
a("div", de, [
|
|
162
|
+
(m(!0), p(H, null, P(v.value, (l) => (m(), p("span", {
|
|
169
163
|
key: l.id,
|
|
170
164
|
class: "cm-pill flex items-center mx-0 h-fit pr-0.5 !bg-b-2 text-c-1"
|
|
171
165
|
}, [
|
|
172
|
-
|
|
173
|
-
c(i(
|
|
166
|
+
_(g(l.label) + " ", 1),
|
|
167
|
+
c(i(ee), {
|
|
174
168
|
class: "cursor-pointer -ml-0.5 text-c-3 hover:text-c-1 rounded-full",
|
|
175
169
|
icon: "Close",
|
|
176
170
|
label: `Remove ${l.label}`,
|
|
177
171
|
size: "xs",
|
|
178
|
-
onClick:
|
|
179
|
-
onKeydown: G(
|
|
172
|
+
onClick: O((s) => D(l.id), ["stop"]),
|
|
173
|
+
onKeydown: G(O((s) => D(l.id), ["stop"]), ["enter"])
|
|
180
174
|
}, null, 8, ["label", "onClick", "onKeydown"])
|
|
181
175
|
]))), 128))
|
|
182
176
|
]),
|
|
183
|
-
t[2] || (t[2] =
|
|
184
|
-
])) : (
|
|
185
|
-
c(i(
|
|
177
|
+
t[2] || (t[2] = a("div", { class: "fade-right" }, null, -1))
|
|
178
|
+
])) : (m(), p("div", fe, " None ")),
|
|
179
|
+
c(i(B), {
|
|
186
180
|
class: "min-w-3 ml-auto mr-2.5",
|
|
187
181
|
icon: "ChevronDown",
|
|
188
182
|
size: "xs"
|
|
@@ -199,16 +193,16 @@ const re = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
|
|
|
199
193
|
]),
|
|
200
194
|
_: 1
|
|
201
195
|
}),
|
|
202
|
-
c(
|
|
196
|
+
c(oe, { selectedSecuritySchemeUids: e.selectedSecuritySchemeUids }, null, 8, ["selectedSecuritySchemeUids"])
|
|
203
197
|
]),
|
|
204
198
|
_: 1
|
|
205
199
|
}),
|
|
206
|
-
c(
|
|
207
|
-
scheme:
|
|
208
|
-
state: i(
|
|
209
|
-
onClose: t[0] || (t[0] = (l) => i(
|
|
200
|
+
c(le, {
|
|
201
|
+
scheme: w.value,
|
|
202
|
+
state: i(y),
|
|
203
|
+
onClose: t[0] || (t[0] = (l) => i(y).hide())
|
|
210
204
|
}, null, 8, ["scheme", "state"]),
|
|
211
|
-
|
|
205
|
+
a("div", { id: C })
|
|
212
206
|
])
|
|
213
207
|
]),
|
|
214
208
|
_: 1
|
|
@@ -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":"AA6IA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAkRF,wBAMG"}
|
|
@@ -1,143 +1,136 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as g, computed as T, openBlock as d, createElementBlock as n, Fragment as i, renderList as U, createVNode as u, unref as r, withCtx as l, createBlock as y, createTextVNode as p, toDisplayString as B, createCommentVNode as V, capitalize as x } from "vue";
|
|
2
|
+
import { useActiveEntities as F } from "../../../../store/active-entities.js";
|
|
3
|
+
import f from "../RequestAuthDataTableInput.vue.js";
|
|
4
|
+
import R from "./OAuth2.vue.js";
|
|
5
|
+
import m from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
6
|
+
import C from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
7
|
+
import { useWorkspace as E } from "../../../../store/store.js";
|
|
8
|
+
const j = /* @__PURE__ */ g({
|
|
9
9
|
__name: "RequestExampleAuth",
|
|
10
10
|
props: {
|
|
11
11
|
selectedSecuritySchemeUids: {}
|
|
12
12
|
},
|
|
13
13
|
setup(_) {
|
|
14
|
-
const { activeCollection:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(a = V.value) != null && a.uid && v.edit(
|
|
24
|
-
V.value.uid,
|
|
25
|
-
`auth.${d}.${e}`,
|
|
26
|
-
t
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
return (d, u) => (r(!0), s(f, null, x(U.value, ({ scheme: e, example: t }) => (r(), s(f, {
|
|
14
|
+
const { activeCollection: $, activeRequest: c } = F(), { securitySchemes: w, securitySchemeMutators: v } = E(), k = T(() => !$.value || !c.value ? [] : _.selectedSecuritySchemeUids.map((a) => ({
|
|
15
|
+
scheme: w[a]
|
|
16
|
+
}))), S = (a) => {
|
|
17
|
+
if (a.type !== "oauth2")
|
|
18
|
+
return `${x(a.nameKey)}: ${a.type}`;
|
|
19
|
+
const t = Object.values(a.flows ?? {})[0];
|
|
20
|
+
return `${x(a.nameKey)}: ${a.type} ${a.type === "oauth2" && t ? t.type : ""}`;
|
|
21
|
+
}, s = (a, t, e) => v.edit(a, t, e);
|
|
22
|
+
return (a, t) => (d(!0), n(i, null, U(k.value, ({ scheme: e }) => (d(), n(i, {
|
|
30
23
|
key: e.uid
|
|
31
24
|
}, [
|
|
32
|
-
|
|
25
|
+
u(r(m), { class: "group/delete" }, {
|
|
33
26
|
default: l(() => [
|
|
34
|
-
|
|
27
|
+
k.value.length > 1 ? (d(), y(r(C), {
|
|
35
28
|
key: 0,
|
|
36
29
|
class: "text-c-3 pl-2 font-medium flex items-center"
|
|
37
30
|
}, {
|
|
38
31
|
default: l(() => [
|
|
39
|
-
|
|
32
|
+
p(B(S(e)), 1)
|
|
40
33
|
]),
|
|
41
34
|
_: 2
|
|
42
|
-
}, 1024)) :
|
|
35
|
+
}, 1024)) : V("", !0)
|
|
43
36
|
]),
|
|
44
37
|
_: 2
|
|
45
38
|
}, 1024),
|
|
46
|
-
e.type === "http"
|
|
47
|
-
e.scheme === "bearer" ? (
|
|
39
|
+
e.type === "http" ? (d(), n(i, { key: 0 }, [
|
|
40
|
+
e.scheme === "bearer" ? (d(), y(r(m), { key: 0 }, {
|
|
48
41
|
default: l(() => [
|
|
49
|
-
|
|
42
|
+
u(f, {
|
|
50
43
|
id: `http-bearer-token-${e.uid}`,
|
|
51
|
-
modelValue:
|
|
44
|
+
modelValue: e.token,
|
|
52
45
|
placeholder: "Token",
|
|
53
46
|
type: "password",
|
|
54
|
-
"onUpdate:modelValue": (
|
|
47
|
+
"onUpdate:modelValue": (o) => s(e.uid, "token", o)
|
|
55
48
|
}, {
|
|
56
|
-
default: l(() =>
|
|
57
|
-
|
|
49
|
+
default: l(() => t[0] || (t[0] = [
|
|
50
|
+
p(" Bearer Token ")
|
|
58
51
|
])),
|
|
59
52
|
_: 2
|
|
60
53
|
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
61
54
|
]),
|
|
62
55
|
_: 2
|
|
63
|
-
}, 1024)) : e.scheme === "basic" ? (
|
|
64
|
-
|
|
56
|
+
}, 1024)) : e.scheme === "basic" ? (d(), n(i, { key: 1 }, [
|
|
57
|
+
u(r(m), null, {
|
|
65
58
|
default: l(() => [
|
|
66
|
-
|
|
59
|
+
u(f, {
|
|
67
60
|
id: `http-basic-username-${e.uid}`,
|
|
68
61
|
class: "text-c-2",
|
|
69
|
-
modelValue:
|
|
62
|
+
modelValue: e.username,
|
|
70
63
|
placeholder: "ScalarEnjoyer01",
|
|
71
64
|
required: "",
|
|
72
|
-
"onUpdate:modelValue": (
|
|
65
|
+
"onUpdate:modelValue": (o) => s(e.uid, "username", o)
|
|
73
66
|
}, {
|
|
74
|
-
default: l(() =>
|
|
75
|
-
|
|
67
|
+
default: l(() => t[1] || (t[1] = [
|
|
68
|
+
p(" Username ")
|
|
76
69
|
])),
|
|
77
70
|
_: 2
|
|
78
71
|
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
79
72
|
]),
|
|
80
73
|
_: 2
|
|
81
74
|
}, 1024),
|
|
82
|
-
|
|
75
|
+
u(r(m), null, {
|
|
83
76
|
default: l(() => [
|
|
84
|
-
|
|
77
|
+
u(f, {
|
|
85
78
|
id: `http-basic-password-${e.uid}`,
|
|
86
|
-
modelValue:
|
|
79
|
+
modelValue: e.password,
|
|
87
80
|
placeholder: "xxxxxx",
|
|
88
81
|
type: "password",
|
|
89
|
-
"onUpdate:modelValue": (
|
|
82
|
+
"onUpdate:modelValue": (o) => s(e.uid, "password", o)
|
|
90
83
|
}, {
|
|
91
|
-
default: l(() =>
|
|
92
|
-
|
|
84
|
+
default: l(() => t[2] || (t[2] = [
|
|
85
|
+
p(" Password ")
|
|
93
86
|
])),
|
|
94
87
|
_: 2
|
|
95
88
|
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
96
89
|
]),
|
|
97
90
|
_: 2
|
|
98
91
|
}, 1024)
|
|
99
|
-
], 64)) :
|
|
100
|
-
], 64)) : e.type === "apiKey"
|
|
101
|
-
|
|
92
|
+
], 64)) : V("", !0)
|
|
93
|
+
], 64)) : e.type === "apiKey" ? (d(), n(i, { key: 1 }, [
|
|
94
|
+
u(r(m), null, {
|
|
102
95
|
default: l(() => [
|
|
103
|
-
|
|
96
|
+
u(f, {
|
|
104
97
|
id: `api-key-name-${e.uid}`,
|
|
105
|
-
modelValue:
|
|
98
|
+
modelValue: e.name,
|
|
106
99
|
placeholder: "api-key",
|
|
107
|
-
"onUpdate:modelValue": (
|
|
100
|
+
"onUpdate:modelValue": (o) => s(e.uid, "name", o)
|
|
108
101
|
}, {
|
|
109
|
-
default: l(() =>
|
|
110
|
-
|
|
102
|
+
default: l(() => t[3] || (t[3] = [
|
|
103
|
+
p(" Name ")
|
|
111
104
|
])),
|
|
112
105
|
_: 2
|
|
113
106
|
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
114
107
|
]),
|
|
115
108
|
_: 2
|
|
116
109
|
}, 1024),
|
|
117
|
-
|
|
110
|
+
u(r(m), null, {
|
|
118
111
|
default: l(() => [
|
|
119
|
-
|
|
112
|
+
u(f, {
|
|
120
113
|
id: `api-key-value-add-${e.uid}`,
|
|
121
|
-
modelValue:
|
|
114
|
+
modelValue: e.value,
|
|
122
115
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
123
|
-
"onUpdate:modelValue": (
|
|
116
|
+
"onUpdate:modelValue": (o) => s(e.uid, "value", o)
|
|
124
117
|
}, {
|
|
125
|
-
default: l(() =>
|
|
126
|
-
|
|
118
|
+
default: l(() => t[4] || (t[4] = [
|
|
119
|
+
p(" Value ")
|
|
127
120
|
])),
|
|
128
121
|
_: 2
|
|
129
122
|
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
130
123
|
]),
|
|
131
124
|
_: 2
|
|
132
125
|
}, 1024)
|
|
133
|
-
], 64)) : e.type === "oauth2"
|
|
134
|
-
key:
|
|
135
|
-
|
|
126
|
+
], 64)) : e.type === "oauth2" ? (d(!0), n(i, { key: 2 }, U(e.flows, (o, b) => (d(), y(R, {
|
|
127
|
+
key: b,
|
|
128
|
+
flow: o,
|
|
136
129
|
scheme: e
|
|
137
|
-
}, null, 8, ["
|
|
130
|
+
}, null, 8, ["flow", "scheme"]))), 128)) : V("", !0)
|
|
138
131
|
], 64))), 128));
|
|
139
132
|
}
|
|
140
133
|
});
|
|
141
134
|
export {
|
|
142
|
-
|
|
135
|
+
j as default
|
|
143
136
|
};
|
|
@@ -27,8 +27,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
27
27
|
onInputFocus?: (() => any) | undefined;
|
|
28
28
|
onInputBlur?: (() => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
-
readOnly: boolean;
|
|
31
30
|
required: boolean;
|
|
31
|
+
readOnly: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
34
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAoDA,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAqBJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBATpB,GAAG;sBACN,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAoDA,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAqBJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBATpB,GAAG;sBACN,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cAtJN,OAAO;cAEP,OAAO;6EA6JpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAshBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAy0BF,wBAOG"}
|
|
@@ -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
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-14721732"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|