@scalar/api-client 2.2.4 → 2.2.7
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 +62 -0
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +28 -28
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +41 -41
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -5
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +5 -6
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -8
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +9 -10
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +24 -25
- package/dist/components/HttpMethod/index.d.ts +0 -1
- package/dist/components/HttpMethod/index.d.ts.map +1 -1
- package/dist/components/HttpMethod/index.js +2 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +121 -103
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +24 -26
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +6 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +28 -23
- package/dist/components/OpenApiClientButton.vue.d.ts +1 -0
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/components/OpenApiClientButton.vue.js +2 -2
- package/dist/components/OpenApiClientButton.vue2.js +21 -15
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +45 -41
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +5 -6
- package/dist/layouts/App/create-api-client-app.d.ts +1 -0
- 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 +28 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -0
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1 -0
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +3 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +50 -48
- package/dist/store/store.d.ts +3 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +47 -45
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +18 -20
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +63 -60
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +20 -19
- 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 +84 -86
- 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 +37 -36
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +60 -61
- 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 +187 -195
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue2.js +34 -36
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +5 -5
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +30 -25
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +41 -30
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +3 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +77 -78
- package/dist/views/Request/libs/oauth2.d.ts +6 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +43 -37
- package/package.json +10 -11
- package/dist/components/HttpMethod/helpers.d.ts +0 -4
- package/dist/components/HttpMethod/helpers.d.ts.map +0 -1
- package/dist/components/HttpMethod/helpers.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AAwgBA,wBAMG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, computed as D, onMounted as M, onBeforeUnmount as R, openBlock as n, createBlock as O, withCtx as a, createVNode as s, unref as l, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as x, normalizeClass as $, createTextVNode as
|
|
1
|
+
import { defineComponent as B, computed as D, onMounted as M, onBeforeUnmount as R, openBlock as n, createBlock as O, withCtx as a, createVNode as s, unref as l, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as x, normalizeClass as $, createTextVNode as v, toDisplayString as j, withDirectives as E, vShow as N } from "vue";
|
|
2
2
|
import F from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
3
|
import K from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
4
|
import A from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
@@ -12,10 +12,10 @@ import q from "./CookieRaw.vue.js";
|
|
|
12
12
|
import { useWorkspace as G } from "../../store/store.js";
|
|
13
13
|
import J from "../../components/Sidebar/Sidebar.vue.js";
|
|
14
14
|
import { useSidebar as Q } from "../../hooks/useSidebar.js";
|
|
15
|
-
const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-
|
|
15
|
+
const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, ee = ["onClick"], te = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, xe = /* @__PURE__ */ B({
|
|
16
16
|
__name: "Cookies",
|
|
17
17
|
setup(oe) {
|
|
18
|
-
const { cookies: p, cookieMutators:
|
|
18
|
+
const { cookies: p, cookieMutators: k, events: g } = G(), { collapsedSidebarFolders: i, toggleSidebarFolder: y } = Q(), b = T(), L = U(), C = () => {
|
|
19
19
|
const t = Object.keys(p).length, e = P.parse({
|
|
20
20
|
name: `Cookie ${t}`,
|
|
21
21
|
value: "",
|
|
@@ -25,9 +25,9 @@ const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border b
|
|
|
25
25
|
httpOnly: !1,
|
|
26
26
|
sameSite: "None"
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
k.add(e), b.push(e.uid);
|
|
29
29
|
}, V = (t) => {
|
|
30
|
-
|
|
30
|
+
k.delete(t);
|
|
31
31
|
const e = Object.values(p).filter(
|
|
32
32
|
(o) => o.uid !== t
|
|
33
33
|
);
|
|
@@ -70,38 +70,36 @@ const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border b
|
|
|
70
70
|
"rotate-90": l(i)[r]
|
|
71
71
|
}]),
|
|
72
72
|
icon: "ChevronRight",
|
|
73
|
-
size: "
|
|
74
|
-
thickness: "2.5"
|
|
73
|
+
size: "md"
|
|
75
74
|
}, null, 8, ["class"]),
|
|
76
|
-
|
|
75
|
+
v(" " + j(r), 1)
|
|
77
76
|
], 8, Y),
|
|
78
77
|
E(f("div", Z, [
|
|
79
|
-
(n(!0), m(_, null, x(o, (d,
|
|
78
|
+
(n(!0), m(_, null, x(o, (d, u) => (n(), m("div", { key: u }, [
|
|
80
79
|
f("button", {
|
|
81
80
|
class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
82
81
|
type: "button",
|
|
83
|
-
onClick: (
|
|
82
|
+
onClick: (c) => l(y)(r + u)
|
|
84
83
|
}, [
|
|
85
84
|
s(l(z), {
|
|
86
85
|
class: $(["text-c-3", {
|
|
87
|
-
"rotate-90": l(i)[r +
|
|
86
|
+
"rotate-90": l(i)[r + u]
|
|
88
87
|
}]),
|
|
89
88
|
icon: "ChevronRight",
|
|
90
|
-
size: "
|
|
91
|
-
thickness: "2.5"
|
|
89
|
+
size: "md"
|
|
92
90
|
}, null, 8, ["class"]),
|
|
93
|
-
|
|
91
|
+
v(" " + j(u), 1)
|
|
94
92
|
], 8, ee),
|
|
95
93
|
E(f("div", te, [
|
|
96
|
-
(n(!0), m(_, null, x(d, (
|
|
97
|
-
key:
|
|
94
|
+
(n(!0), m(_, null, x(d, (c) => (n(), O(A, {
|
|
95
|
+
key: c.uid,
|
|
98
96
|
class: "cookie text-xs",
|
|
99
|
-
variable: { name:
|
|
97
|
+
variable: { name: c.name, uid: c.uid },
|
|
100
98
|
warningMessage: "Are you sure you want to delete this cookie?",
|
|
101
|
-
onDelete: (re) => V(
|
|
99
|
+
onDelete: (re) => V(c.uid)
|
|
102
100
|
}, null, 8, ["variable", "onDelete"]))), 128))
|
|
103
101
|
], 512), [
|
|
104
|
-
[N, w(r +
|
|
102
|
+
[N, w(r + u)]
|
|
105
103
|
])
|
|
106
104
|
]))), 128))
|
|
107
105
|
], 512), [
|
|
@@ -119,7 +117,7 @@ const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border b
|
|
|
119
117
|
hotkey: "N"
|
|
120
118
|
}, {
|
|
121
119
|
title: a(() => e[0] || (e[0] = [
|
|
122
|
-
|
|
120
|
+
v("Add Cookie")
|
|
123
121
|
])),
|
|
124
122
|
_: 1
|
|
125
123
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAgLA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAKlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;IAC3D,kBAAkB,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;IAC7D,MAAM,EAAE,MAAM,CAAA;IAEd,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCAkEiC,IAAI,GAAG,MAAM;;;;;;;
|
|
1
|
+
{"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAgLA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAKlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAA;IAC3D,kBAAkB,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;IAC7D,MAAM,EAAE,MAAM,CAAA;IAEd,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCAkEiC,IAAI,GAAG,MAAM;;;;;;;AAuOhD,wBAQG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as K, ScalarIcon as O } from "@scalar/components";
|
|
1
|
+
import { defineComponent as I, ref as d, computed as m, onMounted as P, openBlock as s, createBlock as h, unref as p, withCtx as w, createElementVNode as a, normalizeStyle as y, createElementBlock as f, Fragment as R, renderList as T, normalizeClass as j, createTextVNode as b, toDisplayString as x, createVNode as q, createCommentVNode as D } from "vue";
|
|
2
|
+
import { ScalarTeleport as F, ScalarButton as K, ScalarIcon as O } from "@scalar/components";
|
|
3
3
|
import { onClickOutside as L } from "@vueuse/core";
|
|
4
4
|
import M from "fuse.js";
|
|
5
|
-
import { parseEnvVariables as
|
|
6
|
-
const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, oe = /* @__PURE__ */
|
|
5
|
+
import { parseEnvVariables as k } from "../../libs/environment-parser.js";
|
|
6
|
+
const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right whitespace-nowrap" }, oe = /* @__PURE__ */ I({
|
|
7
7
|
__name: "EnvironmentVariableDropdown",
|
|
8
8
|
props: {
|
|
9
9
|
query: {},
|
|
@@ -13,27 +13,27 @@ const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 w
|
|
|
13
13
|
dropdownPosition: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["select"],
|
|
16
|
-
setup(
|
|
17
|
-
const r =
|
|
18
|
-
const e =
|
|
19
|
-
|
|
16
|
+
setup(g, { expose: V, emit: E }) {
|
|
17
|
+
const r = g, _ = E, c = d(!0), u = d(null), n = d(0), C = () => {
|
|
18
|
+
const e = z.value.params.workspace;
|
|
19
|
+
S({
|
|
20
20
|
name: "environment.default",
|
|
21
21
|
params: {
|
|
22
22
|
workspace: e
|
|
23
23
|
}
|
|
24
24
|
}), c.value = !1;
|
|
25
|
-
}, { push:
|
|
25
|
+
}, { push: S, currentRoute: z } = r.router, A = new M(k(r.activeEnvVariables.value), {
|
|
26
26
|
keys: ["key", "value"]
|
|
27
|
-
}), i =
|
|
27
|
+
}), i = m(() => {
|
|
28
28
|
const e = r.query;
|
|
29
29
|
if (!e)
|
|
30
|
-
return
|
|
30
|
+
return k(r.activeEnvVariables.value).slice(-4).filter(({ key: t, value: l }) => t !== "" || l !== "");
|
|
31
31
|
const o = A.search(e, { limit: 10 });
|
|
32
32
|
return o.length > 0 ? o.map((t) => t.item).filter(({ key: t, value: l }) => t !== "" || l !== "") : [];
|
|
33
|
-
}),
|
|
34
|
-
|
|
33
|
+
}), v = (e) => {
|
|
34
|
+
_("select", e);
|
|
35
35
|
}, B = (e) => e.value ? e.value.color : "#8E8E8E";
|
|
36
|
-
|
|
36
|
+
V({
|
|
37
37
|
handleArrowKey: (e) => {
|
|
38
38
|
const o = e === "up" ? -1 : 1, t = i.value.length;
|
|
39
39
|
t !== 0 && (n.value = (n.value + o + t) % t);
|
|
@@ -41,13 +41,13 @@ const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 w
|
|
|
41
41
|
handleSelect: () => {
|
|
42
42
|
if (n.value >= 0) {
|
|
43
43
|
const e = i.value[n.value];
|
|
44
|
-
e &&
|
|
44
|
+
e && v(e.key);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
47
|
+
}), P(() => {
|
|
48
48
|
n.value = 0;
|
|
49
49
|
});
|
|
50
|
-
const N =
|
|
50
|
+
const N = m(() => {
|
|
51
51
|
var e, o;
|
|
52
52
|
return {
|
|
53
53
|
left: (((e = r.dropdownPosition) == null ? void 0 : e.left) ?? 0) + "px",
|
|
@@ -61,51 +61,54 @@ const Q = { key: 0 }, $ = ["onClick"], G = { class: "flex items-center gap-1.5 w
|
|
|
61
61
|
c.value = !1;
|
|
62
62
|
},
|
|
63
63
|
{ ignore: [u] }
|
|
64
|
-
), (e, o) => c.value ? (s(),
|
|
64
|
+
), (e, o) => c.value ? (s(), h(p(F), {
|
|
65
65
|
key: 0,
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
a("
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
66
|
+
class: "scalar-client"
|
|
67
|
+
}, {
|
|
68
|
+
default: w(() => [
|
|
69
|
+
a("div", {
|
|
70
|
+
ref_key: "dropdownRef",
|
|
71
|
+
ref: u,
|
|
72
|
+
class: "fixed left-0 top-0 flex flex-col p-0.75 max-h-[60svh] w-56 rounded border custom-scroll",
|
|
73
|
+
style: y(N.value)
|
|
74
|
+
}, [
|
|
75
|
+
i.value.length ? (s(), f("ul", Q, [
|
|
76
|
+
(s(!0), f(R, null, T(i.value, (t, l) => (s(), f("li", {
|
|
77
|
+
key: t.key,
|
|
78
|
+
class: j(["h-8 font-code text-xxs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": l === n.value }]),
|
|
79
|
+
onClick: (W) => v(t.key)
|
|
80
|
+
}, [
|
|
81
|
+
a("div", G, [
|
|
82
|
+
a("span", {
|
|
83
|
+
class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
|
|
84
|
+
style: y({
|
|
85
|
+
backgroundColor: B(e.activeEnvironment)
|
|
86
|
+
})
|
|
87
|
+
}, null, 4),
|
|
88
|
+
b(" " + x(t.key), 1)
|
|
89
|
+
]),
|
|
90
|
+
a("span", H, x(t.value), 1)
|
|
91
|
+
], 10, $))), 128))
|
|
92
|
+
])) : (s(), h(p(K), {
|
|
93
|
+
key: 1,
|
|
94
|
+
class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
|
|
95
|
+
variant: "secondary",
|
|
96
|
+
onClick: C
|
|
97
|
+
}, {
|
|
98
|
+
default: w(() => [
|
|
99
|
+
q(p(O), {
|
|
100
|
+
icon: "Add",
|
|
101
|
+
size: "sm"
|
|
102
|
+
}),
|
|
103
|
+
o[0] || (o[0] = b(" Add Variable "))
|
|
88
104
|
]),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, {
|
|
97
|
-
default: q(() => [
|
|
98
|
-
D(b(O), {
|
|
99
|
-
class: "w-2.5",
|
|
100
|
-
icon: "Add"
|
|
101
|
-
}),
|
|
102
|
-
o[0] || (o[0] = h(" Add Variable "))
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
})),
|
|
106
|
-
o[1] || (o[1] = a("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1))
|
|
107
|
-
], 4)
|
|
108
|
-
])) : F("", !0);
|
|
105
|
+
_: 1
|
|
106
|
+
})),
|
|
107
|
+
o[1] || (o[1] = a("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1))
|
|
108
|
+
], 4)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
})) : D("", !0);
|
|
109
112
|
}
|
|
110
113
|
});
|
|
111
114
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAyOA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,oBAAoB,EAE1B,MAAM,iCAAiC,CAAA;AAOxC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,UAAU,CAAA;CACjB,CAAC;;AAwdF,wBAMG"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
1
|
+
import { defineComponent as T, openBlock as i, createElementBlock as k, Fragment as y, createVNode as d, unref as a, withCtx as o, createTextVNode as s, createElementVNode as V, createBlock as m, createCommentVNode as f } from "vue";
|
|
2
|
+
import { useActiveEntities as P } from "../../../../store/active-entities.js";
|
|
3
3
|
import n from "../RequestAuthDataTableInput.vue.js";
|
|
4
|
-
import { useLoadingState as
|
|
5
|
-
import { pkceOptions as
|
|
6
|
-
import { useToasts as
|
|
7
|
-
import
|
|
4
|
+
import { useLoadingState as A, ScalarButton as U } from "@scalar/components";
|
|
5
|
+
import { pkceOptions as B } from "@scalar/oas-utils/entities/spec";
|
|
6
|
+
import { useToasts as F } from "@scalar/use-toasts";
|
|
7
|
+
import O from "./OAuthScopesInput.vue.js";
|
|
8
8
|
import u from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
9
|
-
import { authorizeOauth2 as
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const
|
|
9
|
+
import { authorizeOauth2 as E } from "../../libs/oauth2.js";
|
|
10
|
+
import { useWorkspace as I } from "../../../../store/store.js";
|
|
11
|
+
const R = { class: "h-8 flex items-center justify-self-end" }, b = { class: "h-8 flex items-center justify-self-end" }, Y = /* @__PURE__ */ T({
|
|
12
12
|
__name: "OAuth2",
|
|
13
13
|
props: {
|
|
14
14
|
scheme: {},
|
|
15
15
|
flow: {}
|
|
16
16
|
},
|
|
17
17
|
setup(w) {
|
|
18
|
-
const p =
|
|
18
|
+
const p = A(), { toast: $ } = F(), { activeCollection: g, activeServer: v, activeWorkspace: S } = P(), { isReadOnly: z, securitySchemeMutators: h } = I(), r = (l, e) => h.edit(w.scheme.uid, l, e), C = async () => {
|
|
19
19
|
var t;
|
|
20
20
|
if (p.isLoading || !((t = g.value) != null && t.uid)) return;
|
|
21
21
|
p.startLoading();
|
|
22
|
-
const [l, e] = await
|
|
22
|
+
const [l, e] = await E(
|
|
23
23
|
w.flow,
|
|
24
|
-
|
|
24
|
+
v.value,
|
|
25
|
+
S.value.proxyUrl
|
|
25
26
|
).finally(() => p.stopLoading());
|
|
26
27
|
e ? r(`flows.${w.flow.type}.token`, e) : (console.error(l), $((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
|
|
27
28
|
};
|
|
@@ -46,7 +47,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
|
|
|
46
47
|
}),
|
|
47
48
|
d(a(u), { class: "min-w-full" }, {
|
|
48
49
|
default: o(() => [
|
|
49
|
-
V("div",
|
|
50
|
+
V("div", R, [
|
|
50
51
|
d(a(U), {
|
|
51
52
|
class: "p-0 py-0.5 px-2 mr-1",
|
|
52
53
|
loading: a(p),
|
|
@@ -64,7 +65,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
|
|
|
64
65
|
_: 1
|
|
65
66
|
})
|
|
66
67
|
], 64)) : (i(), k(y, { key: 1 }, [
|
|
67
|
-
a(
|
|
68
|
+
a(z) ? f("", !0) : (i(), m(a(u), { key: 0 }, {
|
|
68
69
|
default: o(() => [
|
|
69
70
|
"authorizationUrl" in l.flow ? (i(), m(n, {
|
|
70
71
|
key: 0,
|
|
@@ -182,7 +183,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
|
|
|
182
183
|
default: o(() => [
|
|
183
184
|
d(n, {
|
|
184
185
|
id: `oauth2-use-pkce-${l.scheme.uid}`,
|
|
185
|
-
enum: a(
|
|
186
|
+
enum: a(B),
|
|
186
187
|
modelValue: l.flow["x-usePkce"],
|
|
187
188
|
readOnly: "",
|
|
188
189
|
"onUpdate:modelValue": e[9] || (e[9] = (t) => r(
|
|
@@ -200,7 +201,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
|
|
|
200
201
|
})) : f("", !0),
|
|
201
202
|
Object.keys(l.flow.scopes ?? {}).length ? (i(), m(a(u), { key: 5 }, {
|
|
202
203
|
default: o(() => [
|
|
203
|
-
d(
|
|
204
|
+
d(O, {
|
|
204
205
|
flow: l.flow,
|
|
205
206
|
updateScheme: r
|
|
206
207
|
}, null, 8, ["flow"])
|
|
@@ -209,13 +210,13 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
|
|
|
209
210
|
})) : f("", !0),
|
|
210
211
|
d(a(u), { class: "min-w-full" }, {
|
|
211
212
|
default: o(() => [
|
|
212
|
-
V("div",
|
|
213
|
+
V("div", b, [
|
|
213
214
|
d(a(U), {
|
|
214
215
|
class: "p-0 py-0.5 px-2 mr-1",
|
|
215
216
|
loading: a(p),
|
|
216
217
|
size: "sm",
|
|
217
218
|
variant: "outlined",
|
|
218
|
-
onClick:
|
|
219
|
+
onClick: C
|
|
219
220
|
}, {
|
|
220
221
|
default: o(() => e[20] || (e[20] = [
|
|
221
222
|
s(" Authorize ")
|
|
@@ -230,5 +231,5 @@ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8
|
|
|
230
231
|
}
|
|
231
232
|
});
|
|
232
233
|
export {
|
|
233
|
-
|
|
234
|
+
Y as default
|
|
234
235
|
};
|
|
@@ -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":"AAwYA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AA2fF,wBAOG"}
|
|
@@ -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 m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-5f5171f4"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|