@scalar/api-client 2.2.21 → 2.2.23
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 +16 -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 +70 -71
- package/dist/components/AddressBar/AddressBarServer.vue.js +26 -26
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +46 -46
- package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +42 -38
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
- package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +22 -19
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +57 -49
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
- package/dist/components/Sidebar/Sidebar.vue.d.ts +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +16 -16
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +71 -64
- package/dist/layouts/App/ApiClientApp.vue.js +4 -1
- package/dist/layouts/App/create-api-client-app.d.ts +2 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +2 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +12 -11
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +54 -47
- package/dist/libs/extractAttachmentFilename.d.ts +3 -0
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +7 -7
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +18 -18
- package/dist/libs/normalize-headers.d.ts.map +1 -1
- package/dist/libs/normalize-headers.js +2 -2
- package/dist/libs/parse-curl.js +39 -36
- package/dist/store/active-entities.d.ts +4 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +88 -86
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +29 -29
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +27 -23
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +94 -77
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +27 -27
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +18 -18
- package/dist/store/store.d.ts +5 -5
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +53 -48
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +35 -33
- 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 -9
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +39 -37
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +94 -89
- 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 +118 -119
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
- package/dist/views/Request/RequestSidebar.vue.d.ts +3 -4
- 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 +166 -164
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +44 -49
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +37 -31
- package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +147 -130
- package/dist/views/Request/types/sidebar-item.d.ts +4 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +38 -35
- package/dist/views/Servers/Servers.vue2.js +38 -35
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +15 -15
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
- package/package.json +6 -6
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import {
|
|
5
|
-
import le from "
|
|
6
|
-
import oe from "./
|
|
1
|
+
import { defineComponent as W, ref as x, computed as y, openBlock as r, createElementBlock as c, createVNode as a, unref as s, normalizeClass as k, withCtx as m, Fragment as D, createElementVNode as d, renderList as H, createTextVNode as L, toDisplayString as P, withModifiers as U, withKeys as G, createBlock as J, createCommentVNode as $ } from "vue";
|
|
2
|
+
import { useActiveEntities as Q } from "../../../../store/active-entities.js";
|
|
3
|
+
import { useModal as X, ScalarComboboxMultiselect as Y, ScalarButton as Z, ScalarIconButton as ee, ScalarIcon as te } from "@scalar/components";
|
|
4
|
+
import { isDefined as B } from "@scalar/oas-utils/helpers";
|
|
5
|
+
import { nanoid as le } from "nanoid";
|
|
6
|
+
import oe from "./DeleteRequestAuthModal.vue.js";
|
|
7
|
+
import se from "./RequestExampleAuth.vue.js";
|
|
7
8
|
import { displaySchemeFormatter as R } from "../../libs/auth.js";
|
|
8
|
-
import { ADD_AUTH_OPTIONS as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import { ADD_AUTH_OPTIONS as ie } from "../../consts/new-auth-options.js";
|
|
10
|
+
import ne from "../../../../components/DataTable/DataTable.vue.js";
|
|
11
|
+
import M from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
12
|
+
import re from "../../../../components/DataTable/DataTableHeader.vue.js";
|
|
12
13
|
import { useWorkspace as ae } from "../../../../store/store.js";
|
|
13
|
-
const
|
|
14
|
+
const ce = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "flex relative scroll-timeline-x w-full"
|
|
16
|
-
},
|
|
17
|
+
}, ue = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, me = {
|
|
17
18
|
key: 1,
|
|
18
19
|
class: "pl-2"
|
|
19
|
-
},
|
|
20
|
+
}, de = {
|
|
20
21
|
key: 1,
|
|
21
22
|
class: "text-c-3 uppercase font-medium"
|
|
22
|
-
},
|
|
23
|
+
}, fe = {
|
|
23
24
|
key: 0,
|
|
24
25
|
class: "border-1/2 flex items-center min-h-8 min-w-8 px-2 rounded text-sm"
|
|
25
|
-
},
|
|
26
|
+
}, ge = /* @__PURE__ */ W({
|
|
26
27
|
__name: "RequestAuthDataTable",
|
|
27
28
|
props: {
|
|
28
29
|
selectedSecuritySchemeUids: {},
|
|
29
30
|
layout: { default: "client" }
|
|
30
31
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const { activeCollection: u, activeRequest: f } =
|
|
33
|
-
collectionMutators:
|
|
34
|
-
isReadOnly:
|
|
35
|
-
requestMutators:
|
|
32
|
+
setup(v) {
|
|
33
|
+
const { activeCollection: u, activeRequest: f } = Q(), {
|
|
34
|
+
collectionMutators: V,
|
|
35
|
+
isReadOnly: b,
|
|
36
|
+
requestMutators: N,
|
|
36
37
|
securitySchemes: _,
|
|
37
|
-
securitySchemeMutators:
|
|
38
|
-
} = ae(),
|
|
38
|
+
securitySchemeMutators: T
|
|
39
|
+
} = ae(), E = x(null), w = x(null), S = X(), q = x(void 0), A = `combobox-${le()}`, I = y(() => {
|
|
39
40
|
var l, i, n;
|
|
40
|
-
const e = (
|
|
41
|
+
const e = (v.layout === "client" ? ((l = f.value) == null ? void 0 : l.security) ?? ((i = u.value) == null ? void 0 : i.security) : (n = u.value) == null ? void 0 : n.security) ?? [];
|
|
41
42
|
return { filteredRequirements: e.filter((o) => Object.keys(o).length), requirements: e };
|
|
42
|
-
}),
|
|
43
|
+
}), O = y(() => {
|
|
43
44
|
var t;
|
|
44
|
-
return (((t = u.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => _[l]).filter(
|
|
45
|
-
}),
|
|
45
|
+
return (((t = u.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => _[l]).filter(B);
|
|
46
|
+
}), z = y(
|
|
46
47
|
() => {
|
|
47
|
-
const e = [...
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
(
|
|
48
|
+
const e = [...O.value], t = [];
|
|
49
|
+
I.value.filteredRequirements.forEach((o) => {
|
|
50
|
+
const h = e.findIndex(
|
|
51
|
+
(j) => j.nameKey === Object.keys(o)[0]
|
|
51
52
|
);
|
|
52
|
-
|
|
53
|
+
h > -1 && e[h] && (t.push(e[h]), e.splice(h, 1));
|
|
53
54
|
});
|
|
54
55
|
const l = e.map(
|
|
55
56
|
(o) => R(o)
|
|
@@ -59,32 +60,34 @@ const re = {
|
|
|
59
60
|
{ label: "Required authentication", options: i },
|
|
60
61
|
{ label: "Available authentication", options: l }
|
|
61
62
|
];
|
|
62
|
-
return
|
|
63
|
+
return b ? i.length ? n : l : (n.push({
|
|
63
64
|
label: "Add new authentication",
|
|
64
|
-
options:
|
|
65
|
+
options: ie
|
|
65
66
|
}), n);
|
|
66
67
|
}
|
|
67
68
|
), g = (e) => {
|
|
68
|
-
!u.value || !f.value || (
|
|
69
|
+
!u.value || !f.value || (b ? V.edit(
|
|
69
70
|
u.value.uid,
|
|
70
71
|
"selectedSecuritySchemeUids",
|
|
71
72
|
e
|
|
72
|
-
) :
|
|
73
|
+
) : N.edit(
|
|
73
74
|
f.value.uid,
|
|
74
75
|
"selectedSecuritySchemeUids",
|
|
75
76
|
e
|
|
76
77
|
));
|
|
77
|
-
}, p =
|
|
78
|
-
() =>
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
}, p = y(
|
|
79
|
+
() => v.selectedSecuritySchemeUids.map((e) => {
|
|
80
|
+
const t = _[e ?? ""];
|
|
81
|
+
if (t)
|
|
82
|
+
return R(t);
|
|
83
|
+
}).filter(B)
|
|
81
84
|
);
|
|
82
|
-
function
|
|
85
|
+
function F(e) {
|
|
83
86
|
var i, n;
|
|
84
87
|
if (!((i = u.value) != null && i.uid) || !((n = f.value) != null && n.uid)) return;
|
|
85
88
|
const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => o);
|
|
86
89
|
if (t != null && t.payload) {
|
|
87
|
-
const o =
|
|
90
|
+
const o = T.add(
|
|
88
91
|
t.payload,
|
|
89
92
|
u.value.uid
|
|
90
93
|
);
|
|
@@ -95,41 +98,41 @@ const re = {
|
|
|
95
98
|
const C = (e) => {
|
|
96
99
|
var t;
|
|
97
100
|
g(
|
|
98
|
-
|
|
101
|
+
v.selectedSecuritySchemeUids.filter((l) => l !== e)
|
|
99
102
|
), (t = w.value) == null || t.$el.focus();
|
|
100
103
|
};
|
|
101
|
-
function
|
|
102
|
-
q.value = e,
|
|
104
|
+
function K(e) {
|
|
105
|
+
q.value = e, S.show();
|
|
103
106
|
}
|
|
104
|
-
return (e, t) => (
|
|
105
|
-
|
|
107
|
+
return (e, t) => (r(), c("form", null, [
|
|
108
|
+
a(s(ne), {
|
|
106
109
|
class: k(["flex-1", e.layout === "reference" && "border-0"]),
|
|
107
110
|
columns: [""]
|
|
108
111
|
}, {
|
|
109
112
|
default: m(() => [
|
|
110
|
-
|
|
113
|
+
a(s(M), null, {
|
|
111
114
|
default: m(() => [
|
|
112
|
-
|
|
115
|
+
a(s(re), {
|
|
113
116
|
class: k(["relative col-span-full cursor-pointer py-0 px-0 flex items-center", e.layout === "reference" && "border-0 min-h-0 mb-1.5"])
|
|
114
117
|
}, {
|
|
115
118
|
default: m(() => [
|
|
116
|
-
|
|
119
|
+
a(s(Y), {
|
|
117
120
|
ref_key: "comboboxRef",
|
|
118
|
-
ref:
|
|
121
|
+
ref: E,
|
|
119
122
|
class: "text-xs w-full",
|
|
120
123
|
fullWidth: "",
|
|
121
|
-
isDeletable: !s(
|
|
124
|
+
isDeletable: !s(b),
|
|
122
125
|
modelValue: p.value,
|
|
123
126
|
multiple: "",
|
|
124
|
-
options:
|
|
127
|
+
options: z.value,
|
|
125
128
|
resize: "",
|
|
126
129
|
style: { "margin-left": "120px" },
|
|
127
130
|
teleport: `#${A}`,
|
|
128
|
-
onDelete:
|
|
129
|
-
"onUpdate:modelValue":
|
|
131
|
+
onDelete: K,
|
|
132
|
+
"onUpdate:modelValue": F
|
|
130
133
|
}, {
|
|
131
134
|
default: m(() => [
|
|
132
|
-
|
|
135
|
+
a(s(Z), {
|
|
133
136
|
ref_key: "comboboxButtonRef",
|
|
134
137
|
ref: w,
|
|
135
138
|
class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start -outline-offset-2",
|
|
@@ -137,30 +140,30 @@ const re = {
|
|
|
137
140
|
variant: "ghost"
|
|
138
141
|
}, {
|
|
139
142
|
default: m(() => [
|
|
140
|
-
e.layout === "client" ? (
|
|
143
|
+
e.layout === "client" ? (r(), c(D, { key: 0 }, [
|
|
141
144
|
t[3] || (t[3] = d("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
|
|
142
|
-
p.value.length ? (
|
|
145
|
+
p.value.length ? (r(), c("div", ce, [
|
|
143
146
|
t[1] || (t[1] = d("div", { class: "fade-left" }, null, -1)),
|
|
144
|
-
d("div",
|
|
145
|
-
(
|
|
147
|
+
d("div", ue, [
|
|
148
|
+
(r(!0), c(D, null, H(p.value, (l) => (r(), c("span", {
|
|
146
149
|
key: l.id,
|
|
147
150
|
class: "cm-pill flex items-center mx-0 h-fit pr-0.5 !bg-b-2 text-c-1"
|
|
148
151
|
}, [
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
L(P(l.label) + " ", 1),
|
|
153
|
+
a(s(ee), {
|
|
151
154
|
class: "cursor-pointer -ml-0.5 text-c-3 hover:text-c-1 rounded-full",
|
|
152
155
|
icon: "Close",
|
|
153
156
|
label: `Remove ${l.label}`,
|
|
154
157
|
size: "xs",
|
|
155
|
-
onClick:
|
|
156
|
-
onKeydown:
|
|
158
|
+
onClick: U((i) => C(l.id), ["stop"]),
|
|
159
|
+
onKeydown: G(U((i) => C(l.id), ["stop"]), ["enter"])
|
|
157
160
|
}, null, 8, ["label", "onClick", "onKeydown"])
|
|
158
161
|
]))), 128))
|
|
159
162
|
]),
|
|
160
163
|
t[2] || (t[2] = d("div", { class: "fade-right" }, null, -1))
|
|
161
|
-
])) : (
|
|
162
|
-
], 64)) : (
|
|
163
|
-
|
|
164
|
+
])) : (r(), c("div", me, " None "))
|
|
165
|
+
], 64)) : (r(), c("div", de, " Authentication ")),
|
|
166
|
+
a(s(te), {
|
|
164
167
|
class: k(["min-w-3 mr-2.5", {
|
|
165
168
|
"ml-auto": e.layout === "client",
|
|
166
169
|
"ml-1": e.layout === "reference"
|
|
@@ -177,31 +180,31 @@ const re = {
|
|
|
177
180
|
]),
|
|
178
181
|
_: 1
|
|
179
182
|
}, 8, ["class"]),
|
|
180
|
-
e.layout === "reference" ? (
|
|
183
|
+
e.layout === "reference" ? (r(), J(s(M), { key: 0 }, {
|
|
181
184
|
default: m(() => [
|
|
182
|
-
p.value.length ? $("", !0) : (
|
|
185
|
+
p.value.length ? $("", !0) : (r(), c("div", fe, " None "))
|
|
183
186
|
]),
|
|
184
187
|
_: 1
|
|
185
188
|
})) : $("", !0)
|
|
186
189
|
]),
|
|
187
190
|
_: 1
|
|
188
191
|
}),
|
|
189
|
-
|
|
192
|
+
a(se, {
|
|
190
193
|
layout: e.layout,
|
|
191
194
|
selectedSecuritySchemeUids: e.selectedSecuritySchemeUids
|
|
192
195
|
}, null, 8, ["layout", "selectedSecuritySchemeUids"])
|
|
193
196
|
]),
|
|
194
197
|
_: 1
|
|
195
198
|
}, 8, ["class"]),
|
|
196
|
-
|
|
199
|
+
a(oe, {
|
|
197
200
|
scheme: q.value,
|
|
198
|
-
state: s(
|
|
199
|
-
onClose: t[0] || (t[0] = (l) => s(
|
|
201
|
+
state: s(S),
|
|
202
|
+
onClose: t[0] || (t[0] = (l) => s(S).hide())
|
|
200
203
|
}, null, 8, ["scheme", "state"]),
|
|
201
204
|
d("div", { id: A })
|
|
202
205
|
]));
|
|
203
206
|
}
|
|
204
207
|
});
|
|
205
208
|
export {
|
|
206
|
-
|
|
209
|
+
ge as default
|
|
207
210
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestExampleAuth.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b2583e23"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as u, Fragment as
|
|
1
|
+
import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as u, Fragment as i, renderList as x, createBlock as C, unref as b, normalizeClass as k, withCtx as a, createVNode as n, createTextVNode as y, toDisplayString as _, createCommentVNode as m, createElementVNode as c, capitalize as w } from "vue";
|
|
2
2
|
import j from "./OAuth2.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import g from "./RequestAuthDataTableInput.vue.js";
|
|
4
|
+
import s from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
5
5
|
import q from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
6
6
|
import { useWorkspace as I } from "../../../../store/store.js";
|
|
7
7
|
const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"], H = /* @__PURE__ */ K({
|
|
@@ -10,167 +10,167 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
|
|
|
10
10
|
selectedSecuritySchemeUids: {},
|
|
11
11
|
layout: { default: "client" }
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const { securitySchemes: S, securitySchemeMutators:
|
|
15
|
-
() =>
|
|
16
|
-
scheme: S[
|
|
13
|
+
setup(U) {
|
|
14
|
+
const { securitySchemes: S, securitySchemeMutators: T } = I(), $ = N(
|
|
15
|
+
() => U.selectedSecuritySchemeUids.map((t) => ({
|
|
16
|
+
scheme: S[t]
|
|
17
17
|
}))
|
|
18
|
-
), d = R(""),
|
|
19
|
-
if (
|
|
20
|
-
return `${w(
|
|
21
|
-
if (
|
|
22
|
-
const l = Object.values(
|
|
23
|
-
return `${w(
|
|
18
|
+
), d = R(""), B = (t) => {
|
|
19
|
+
if (t.type === "apiKey")
|
|
20
|
+
return `${w(t.nameKey)}: ${t.in}`;
|
|
21
|
+
if (t.type === "oauth2") {
|
|
22
|
+
const l = Object.values(t.flows ?? {})[0];
|
|
23
|
+
return `${w(t.nameKey)}: ${d.value ? d.value : (l == null ? void 0 : l.type) ?? ""}`;
|
|
24
24
|
}
|
|
25
|
-
return
|
|
26
|
-
},
|
|
27
|
-
return (
|
|
28
|
-
key:
|
|
25
|
+
return t.type === "http" ? `${w(t.nameKey)}: ${t.scheme}` : `${w(t.nameKey)}: ${t.type}`;
|
|
26
|
+
}, V = (t, l, e) => T.edit(t, l, e), f = (t = "") => U.layout === "reference" ? `bg-b-2 border-l-1/2 last:border-r-1/2 group-last:border-b-border ${t}` : "";
|
|
27
|
+
return (t, l) => (r(!0), u(i, null, x($.value, ({ scheme: e }, F) => (r(), u(i, {
|
|
28
|
+
key: e == null ? void 0 : e.uid
|
|
29
29
|
}, [
|
|
30
|
-
|
|
30
|
+
$.value.length > 1 ? (r(), C(b(s), {
|
|
31
31
|
key: 0,
|
|
32
|
-
class:
|
|
32
|
+
class: k({ "request-example-references-header": t.layout === "reference" })
|
|
33
33
|
}, {
|
|
34
34
|
default: a(() => [
|
|
35
|
-
n(
|
|
36
|
-
class:
|
|
35
|
+
n(b(q), {
|
|
36
|
+
class: k([
|
|
37
37
|
"text-c-3 pl-2 font-medium flex items-center",
|
|
38
|
-
|
|
39
|
-
`bg-b-1 rounded-t border-t-1/2 ${
|
|
38
|
+
f(
|
|
39
|
+
`bg-b-1 rounded-t border-t-1/2 ${F !== 0 ? "mt-2" : ""}`
|
|
40
40
|
)
|
|
41
41
|
])
|
|
42
42
|
}, {
|
|
43
43
|
default: a(() => [
|
|
44
|
-
|
|
44
|
+
y(_(B(e)), 1)
|
|
45
45
|
]),
|
|
46
46
|
_: 2
|
|
47
47
|
}, 1032, ["class"])
|
|
48
48
|
]),
|
|
49
49
|
_: 2
|
|
50
|
-
}, 1032, ["class"])) :
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
}, 1032, ["class"])) : m("", !0),
|
|
51
|
+
(e == null ? void 0 : e.type) === "http" ? (r(), u(i, { key: 1 }, [
|
|
52
|
+
e.scheme === "bearer" ? (r(), C(b(s), { key: 0 }, {
|
|
53
53
|
default: a(() => [
|
|
54
|
-
n(
|
|
55
|
-
containerClass:
|
|
56
|
-
modelValue:
|
|
54
|
+
n(g, {
|
|
55
|
+
containerClass: f("bg-b-2 rounded border-1/2"),
|
|
56
|
+
modelValue: e.token,
|
|
57
57
|
placeholder: "Token",
|
|
58
58
|
type: "password",
|
|
59
|
-
"onUpdate:modelValue": (o) =>
|
|
59
|
+
"onUpdate:modelValue": (o) => V(e.uid, "token", o)
|
|
60
60
|
}, {
|
|
61
61
|
default: a(() => l[0] || (l[0] = [
|
|
62
|
-
|
|
62
|
+
y(" Bearer Token ")
|
|
63
63
|
])),
|
|
64
64
|
_: 2
|
|
65
65
|
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
66
66
|
]),
|
|
67
67
|
_: 2
|
|
68
|
-
}, 1024)) :
|
|
69
|
-
n(
|
|
68
|
+
}, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (r(), u(i, { key: 1 }, [
|
|
69
|
+
n(b(s), null, {
|
|
70
70
|
default: a(() => [
|
|
71
|
-
n(
|
|
71
|
+
n(g, {
|
|
72
72
|
class: "text-c-2",
|
|
73
|
-
containerClass:
|
|
73
|
+
containerClass: f(
|
|
74
74
|
"auth-blend-required bg-b-2 rounded-t border-t-1/2"
|
|
75
75
|
),
|
|
76
|
-
modelValue:
|
|
76
|
+
modelValue: e.username,
|
|
77
77
|
placeholder: "janedoe",
|
|
78
78
|
required: "",
|
|
79
|
-
"onUpdate:modelValue": (o) =>
|
|
79
|
+
"onUpdate:modelValue": (o) => V(e.uid, "username", o)
|
|
80
80
|
}, {
|
|
81
81
|
default: a(() => l[1] || (l[1] = [
|
|
82
|
-
|
|
82
|
+
y(" Username ")
|
|
83
83
|
])),
|
|
84
84
|
_: 2
|
|
85
85
|
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
86
86
|
]),
|
|
87
87
|
_: 2
|
|
88
88
|
}, 1024),
|
|
89
|
-
n(
|
|
89
|
+
n(b(s), null, {
|
|
90
90
|
default: a(() => [
|
|
91
|
-
n(
|
|
92
|
-
containerClass:
|
|
93
|
-
modelValue:
|
|
91
|
+
n(g, {
|
|
92
|
+
containerClass: f("bg-b-2 rounded-b border-b-1/2"),
|
|
93
|
+
modelValue: e.password,
|
|
94
94
|
placeholder: "********",
|
|
95
95
|
type: "password",
|
|
96
|
-
"onUpdate:modelValue": (o) =>
|
|
96
|
+
"onUpdate:modelValue": (o) => V(e.uid, "password", o)
|
|
97
97
|
}, {
|
|
98
98
|
default: a(() => l[2] || (l[2] = [
|
|
99
|
-
|
|
99
|
+
y(" Password ")
|
|
100
100
|
])),
|
|
101
101
|
_: 2
|
|
102
102
|
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
103
103
|
]),
|
|
104
104
|
_: 2
|
|
105
105
|
}, 1024)
|
|
106
|
-
], 64)) :
|
|
107
|
-
], 64)) :
|
|
108
|
-
n(
|
|
106
|
+
], 64)) : m("", !0)
|
|
107
|
+
], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (r(), u(i, { key: 2 }, [
|
|
108
|
+
n(b(s), null, {
|
|
109
109
|
default: a(() => [
|
|
110
|
-
n(
|
|
111
|
-
containerClass:
|
|
112
|
-
modelValue:
|
|
110
|
+
n(g, {
|
|
111
|
+
containerClass: f("bg-b-2 rounded-t border-t-1/2"),
|
|
112
|
+
modelValue: e.name,
|
|
113
113
|
placeholder: "api-key",
|
|
114
|
-
"onUpdate:modelValue": (o) =>
|
|
114
|
+
"onUpdate:modelValue": (o) => V(e.uid, "name", o)
|
|
115
115
|
}, {
|
|
116
116
|
default: a(() => l[3] || (l[3] = [
|
|
117
|
-
|
|
117
|
+
y(" Name ")
|
|
118
118
|
])),
|
|
119
119
|
_: 2
|
|
120
120
|
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
121
121
|
]),
|
|
122
122
|
_: 2
|
|
123
123
|
}, 1024),
|
|
124
|
-
n(
|
|
124
|
+
n(b(s), null, {
|
|
125
125
|
default: a(() => [
|
|
126
|
-
n(
|
|
127
|
-
containerClass:
|
|
128
|
-
modelValue:
|
|
126
|
+
n(g, {
|
|
127
|
+
containerClass: f("bg-b-2 rounded-b border-b-1/2"),
|
|
128
|
+
modelValue: e.value,
|
|
129
129
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
130
|
-
"onUpdate:modelValue": (o) =>
|
|
130
|
+
"onUpdate:modelValue": (o) => V(e.uid, "value", o)
|
|
131
131
|
}, {
|
|
132
132
|
default: a(() => l[4] || (l[4] = [
|
|
133
|
-
|
|
133
|
+
y(" Value ")
|
|
134
134
|
])),
|
|
135
135
|
_: 2
|
|
136
136
|
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
137
137
|
]),
|
|
138
138
|
_: 2
|
|
139
139
|
}, 1024)
|
|
140
|
-
], 64)) :
|
|
141
|
-
n(
|
|
140
|
+
], 64)) : (e == null ? void 0 : e.type) === "oauth2" ? (r(), u(i, { key: 3 }, [
|
|
141
|
+
n(b(s), null, {
|
|
142
142
|
default: a(() => [
|
|
143
|
-
Object.keys(
|
|
143
|
+
Object.keys(e.flows).length > 1 ? (r(), u("div", {
|
|
144
144
|
key: 0,
|
|
145
|
-
class:
|
|
146
|
-
"border-1/2 border-b-0 rounded-t bg-b-2":
|
|
145
|
+
class: k(["min-h-8 min-w-8 flex text-sm border-t-1/2 last:border-r-0 p-0 m-0 relative row", {
|
|
146
|
+
"border-1/2 border-b-0 rounded-t bg-b-2": t.layout === "reference"
|
|
147
147
|
}])
|
|
148
148
|
}, [
|
|
149
|
-
l[5] || (l[5] =
|
|
150
|
-
|
|
151
|
-
(r(!0), u(
|
|
152
|
-
key:
|
|
153
|
-
class:
|
|
154
|
-
"bg-b-3":
|
|
155
|
-
"bg-b-1":
|
|
149
|
+
l[5] || (l[5] = c("div", { class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0" }, " Flow ", -1)),
|
|
150
|
+
c("div", E, [
|
|
151
|
+
(r(!0), u(i, null, x(e == null ? void 0 : e.flows, (o, p, v) => (r(), u("button", {
|
|
152
|
+
key: p,
|
|
153
|
+
class: k(["h-6 scalar-button scalar-row cursor-pointer items-center justify-center rounded font-medium text-xs scalar-button-outlined border border-solid border-border text-c-1 hover:bg-b-2 p-0 px-2", {
|
|
154
|
+
"bg-b-3": t.layout === "client" && (d.value === p || v === 0 && !d.value),
|
|
155
|
+
"bg-b-1": t.layout === "reference" && (d.value === p || v === 0 && !d.value)
|
|
156
156
|
}]),
|
|
157
157
|
type: "button",
|
|
158
|
-
onClick: (P) => d.value =
|
|
159
|
-
},
|
|
158
|
+
onClick: (P) => d.value = p
|
|
159
|
+
}, _(p), 11, M))), 128))
|
|
160
160
|
])
|
|
161
|
-
], 2)) :
|
|
161
|
+
], 2)) : m("", !0)
|
|
162
162
|
]),
|
|
163
163
|
_: 2
|
|
164
164
|
}, 1024),
|
|
165
|
-
(r(!0), u(
|
|
166
|
-
d.value ===
|
|
165
|
+
(r(!0), u(i, null, x(e == null ? void 0 : e.flows, (o, p, v) => (r(), u(i, { key: p }, [
|
|
166
|
+
d.value === p || v === 0 && !d.value ? (r(), C(j, {
|
|
167
167
|
key: 0,
|
|
168
168
|
flow: o,
|
|
169
|
-
layout:
|
|
170
|
-
scheme:
|
|
171
|
-
}, null, 8, ["flow", "layout", "scheme"])) :
|
|
169
|
+
layout: t.layout,
|
|
170
|
+
scheme: e
|
|
171
|
+
}, null, 8, ["flow", "layout", "scheme"])) : m("", !0)
|
|
172
172
|
], 64))), 128))
|
|
173
|
-
], 64)) :
|
|
173
|
+
], 64)) : m("", !0)
|
|
174
174
|
], 64))), 128));
|
|
175
175
|
}
|
|
176
176
|
});
|
|
@@ -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":"AAumBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AA05BF,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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-556dd256"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|