@scalar/api-client 2.1.51 → 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 +47 -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 +16 -15
- 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/IconSelector.vue.js +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/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +37 -39
- 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 +670 -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 +1384 -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 +670 -1232
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +675 -1236
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +100 -95
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request.d.ts +3 -7
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +126 -119
- package/dist/libs/string-template.d.ts.map +1 -1
- package/dist/libs/string-template.js +23 -22
- 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 +94 -94
- 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/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +27 -27
- 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 +74 -75
- 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/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +35 -15
- 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 +12 -12
- 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,67 +1,61 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import B from "
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as C, 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 T } from "../../../../store/active-entities.js";
|
|
3
|
+
import n from "../RequestAuthDataTableInput.vue.js";
|
|
4
|
+
import { useLoadingState as P, ScalarButton as U } from "@scalar/components";
|
|
5
|
+
import { pkceOptions as A } from "@scalar/oas-utils/entities/spec";
|
|
6
|
+
import { useToasts as B } from "@scalar/use-toasts";
|
|
7
|
+
import F from "./OAuthScopesInput.vue.js";
|
|
8
|
+
import u from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
8
9
|
import { authorizeOauth2 as O } from "../../libs/oauth2.js";
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
10
|
+
import { useWorkspace as E } from "../../../../store/store.js";
|
|
11
|
+
const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8 flex items-center justify-self-end" }, X = /* @__PURE__ */ C({
|
|
11
12
|
__name: "OAuth2",
|
|
12
13
|
props: {
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
scheme: {},
|
|
15
|
+
flow: {}
|
|
15
16
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const p = g,
|
|
18
|
-
activeCollection: V,
|
|
19
|
-
activeServer: v,
|
|
20
|
-
collectionMutators: S,
|
|
21
|
-
isReadOnly: z,
|
|
22
|
-
securitySchemeMutators: C
|
|
23
|
-
} = I(), f = (l, e) => V.value && S.edit(V.value.uid, l, e), k = (l, e) => C.edit(p.scheme.uid, l, e), T = async () => {
|
|
17
|
+
setup(w) {
|
|
18
|
+
const p = P(), { toast: $ } = B(), { activeCollection: g, activeServer: S } = T(), { isReadOnly: v, securitySchemeMutators: z } = E(), r = (l, e) => z.edit(w.scheme.uid, l, e), h = async () => {
|
|
24
19
|
var t;
|
|
25
|
-
if (
|
|
26
|
-
|
|
20
|
+
if (p.isLoading || !((t = g.value) != null && t.uid)) return;
|
|
21
|
+
p.startLoading();
|
|
27
22
|
const [l, e] = await O(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
).
|
|
32
|
-
e ? f(`auth.${p.scheme.uid}.token`, e) : (console.error(l), $((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
|
|
23
|
+
w.flow,
|
|
24
|
+
S.value
|
|
25
|
+
).finally(() => p.stopLoading());
|
|
26
|
+
e ? r(`flows.${w.flow.type}.token`, e) : (console.error(l), $((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
|
|
33
27
|
};
|
|
34
|
-
return (l, e) => l.
|
|
35
|
-
d(a(
|
|
28
|
+
return (l, e) => l.flow.token ? (i(), k(y, { key: 0 }, [
|
|
29
|
+
d(a(u), null, {
|
|
36
30
|
default: o(() => [
|
|
37
|
-
d(
|
|
31
|
+
d(n, {
|
|
38
32
|
id: "oauth2-access-token",
|
|
39
33
|
class: "border-r-transparent",
|
|
40
|
-
modelValue: l.
|
|
34
|
+
modelValue: l.flow.token,
|
|
41
35
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
42
36
|
type: "password",
|
|
43
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) =>
|
|
37
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => r(`flows.${l.flow.type}.token`, t))
|
|
44
38
|
}, {
|
|
45
39
|
default: o(() => e[10] || (e[10] = [
|
|
46
|
-
|
|
40
|
+
s(" Access Token ")
|
|
47
41
|
])),
|
|
48
42
|
_: 1
|
|
49
43
|
}, 8, ["modelValue"])
|
|
50
44
|
]),
|
|
51
45
|
_: 1
|
|
52
46
|
}),
|
|
53
|
-
d(a(
|
|
47
|
+
d(a(u), { class: "min-w-full" }, {
|
|
54
48
|
default: o(() => [
|
|
55
|
-
|
|
56
|
-
d(a(
|
|
49
|
+
V("div", I, [
|
|
50
|
+
d(a(U), {
|
|
57
51
|
class: "p-0 py-0.5 px-2 mr-1",
|
|
58
|
-
loading: a(
|
|
52
|
+
loading: a(p),
|
|
59
53
|
size: "sm",
|
|
60
54
|
variant: "outlined",
|
|
61
|
-
onClick: e[1] || (e[1] = (t) =>
|
|
55
|
+
onClick: e[1] || (e[1] = (t) => r(`flows.${l.flow.type}.token`, ""))
|
|
62
56
|
}, {
|
|
63
57
|
default: o(() => e[11] || (e[11] = [
|
|
64
|
-
|
|
58
|
+
s(" Clear ")
|
|
65
59
|
])),
|
|
66
60
|
_: 1
|
|
67
61
|
}, 8, ["loading"])
|
|
@@ -69,159 +63,162 @@ const R = { class: "h-8 flex items-center justify-self-end" }, b = { class: "h-8
|
|
|
69
63
|
]),
|
|
70
64
|
_: 1
|
|
71
65
|
})
|
|
72
|
-
], 64)) : (
|
|
73
|
-
a(
|
|
66
|
+
], 64)) : (i(), k(y, { key: 1 }, [
|
|
67
|
+
a(v) ? f("", !0) : (i(), m(a(u), { key: 0 }, {
|
|
74
68
|
default: o(() => [
|
|
75
|
-
"authorizationUrl" in l.
|
|
69
|
+
"authorizationUrl" in l.flow ? (i(), m(n, {
|
|
76
70
|
key: 0,
|
|
77
71
|
id: `oauth2-authorization-url-${l.scheme.uid}`,
|
|
78
|
-
modelValue: l.
|
|
72
|
+
modelValue: l.flow.authorizationUrl,
|
|
79
73
|
placeholder: "https://galaxy.scalar.com/authorize",
|
|
80
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) =>
|
|
74
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => r(`flows.${l.flow.type}.authorizationUrl`, t))
|
|
81
75
|
}, {
|
|
82
76
|
default: o(() => e[12] || (e[12] = [
|
|
83
|
-
|
|
77
|
+
s(" Auth Url ")
|
|
84
78
|
])),
|
|
85
79
|
_: 1
|
|
86
|
-
}, 8, ["id", "modelValue"])) :
|
|
87
|
-
"tokenUrl" in l.
|
|
80
|
+
}, 8, ["id", "modelValue"])) : f("", !0),
|
|
81
|
+
"tokenUrl" in l.flow ? (i(), m(n, {
|
|
88
82
|
key: 1,
|
|
89
83
|
id: `oauth2-token-url-${l.scheme.uid}`,
|
|
90
|
-
modelValue: l.
|
|
84
|
+
modelValue: l.flow.tokenUrl,
|
|
91
85
|
placeholder: "https://galaxy.scalar.com/token",
|
|
92
|
-
"onUpdate:modelValue": e[3] || (e[3] = (t) =>
|
|
86
|
+
"onUpdate:modelValue": e[3] || (e[3] = (t) => r(`flows.${l.flow.type}.tokenUrl`, t))
|
|
93
87
|
}, {
|
|
94
88
|
default: o(() => e[13] || (e[13] = [
|
|
95
|
-
|
|
89
|
+
s(" Token Url ")
|
|
96
90
|
])),
|
|
97
91
|
_: 1
|
|
98
|
-
}, 8, ["id", "modelValue"])) :
|
|
92
|
+
}, 8, ["id", "modelValue"])) : f("", !0)
|
|
99
93
|
]),
|
|
100
94
|
_: 1
|
|
101
95
|
})),
|
|
102
|
-
"x-scalar-redirect-uri" in l.
|
|
96
|
+
"x-scalar-redirect-uri" in l.flow ? (i(), m(a(u), { key: 1 }, {
|
|
103
97
|
default: o(() => [
|
|
104
|
-
d(
|
|
98
|
+
d(n, {
|
|
105
99
|
id: `oauth2-redirect-uri-${l.scheme.uid}`,
|
|
106
|
-
modelValue: l.
|
|
100
|
+
modelValue: l.flow["x-scalar-redirect-uri"],
|
|
107
101
|
placeholder: "https://galaxy.scalar.com/callback",
|
|
108
|
-
"onUpdate:modelValue": e[4] || (e[4] = (t) =>
|
|
102
|
+
"onUpdate:modelValue": e[4] || (e[4] = (t) => r(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
|
|
109
103
|
}, {
|
|
110
104
|
default: o(() => e[14] || (e[14] = [
|
|
111
|
-
|
|
105
|
+
s(" Redirect Url ")
|
|
112
106
|
])),
|
|
113
107
|
_: 1
|
|
114
108
|
}, 8, ["id", "modelValue"])
|
|
115
109
|
]),
|
|
116
110
|
_: 1
|
|
117
|
-
})) :
|
|
118
|
-
l.
|
|
119
|
-
d(a(
|
|
111
|
+
})) : f("", !0),
|
|
112
|
+
l.flow.type === "password" ? (i(), k(y, { key: 2 }, [
|
|
113
|
+
d(a(u), null, {
|
|
120
114
|
default: o(() => [
|
|
121
|
-
d(
|
|
115
|
+
d(n, {
|
|
122
116
|
id: `oauth2-password-username-${l.scheme.uid}`,
|
|
123
117
|
class: "text-c-2",
|
|
124
|
-
modelValue: l.
|
|
118
|
+
modelValue: l.flow.username,
|
|
125
119
|
placeholder: "ScalarEnjoyer01",
|
|
126
|
-
"onUpdate:modelValue": e[5] || (e[5] = (t) =>
|
|
120
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => r(`flows.${l.flow.type}.username`, t))
|
|
127
121
|
}, {
|
|
128
122
|
default: o(() => e[15] || (e[15] = [
|
|
129
|
-
|
|
123
|
+
s(" Username ")
|
|
130
124
|
])),
|
|
131
125
|
_: 1
|
|
132
126
|
}, 8, ["id", "modelValue"])
|
|
133
127
|
]),
|
|
134
128
|
_: 1
|
|
135
129
|
}),
|
|
136
|
-
d(a(
|
|
130
|
+
d(a(u), null, {
|
|
137
131
|
default: o(() => [
|
|
138
|
-
d(
|
|
132
|
+
d(n, {
|
|
139
133
|
id: `oauth2-password-password-${l.scheme.uid}`,
|
|
140
|
-
modelValue: l.
|
|
134
|
+
modelValue: l.flow.password,
|
|
141
135
|
placeholder: "xxxxxx",
|
|
142
136
|
type: "password",
|
|
143
|
-
"onUpdate:modelValue": e[6] || (e[6] = (t) =>
|
|
137
|
+
"onUpdate:modelValue": e[6] || (e[6] = (t) => r(`flows.${l.flow.type}.password`, t))
|
|
144
138
|
}, {
|
|
145
139
|
default: o(() => e[16] || (e[16] = [
|
|
146
|
-
|
|
140
|
+
s(" Password ")
|
|
147
141
|
])),
|
|
148
142
|
_: 1
|
|
149
143
|
}, 8, ["id", "modelValue"])
|
|
150
144
|
]),
|
|
151
145
|
_: 1
|
|
152
146
|
})
|
|
153
|
-
], 64)) :
|
|
154
|
-
d(a(
|
|
147
|
+
], 64)) : f("", !0),
|
|
148
|
+
d(a(u), null, {
|
|
155
149
|
default: o(() => [
|
|
156
|
-
d(
|
|
150
|
+
d(n, {
|
|
157
151
|
id: `oauth2-client-id-${l.scheme.uid}`,
|
|
158
|
-
modelValue: l.
|
|
152
|
+
modelValue: l.flow["x-scalar-client-id"],
|
|
159
153
|
placeholder: "12345",
|
|
160
|
-
"onUpdate:modelValue": e[7] || (e[7] = (t) =>
|
|
154
|
+
"onUpdate:modelValue": e[7] || (e[7] = (t) => r(`flows.${l.flow.type}.x-scalar-client-id`, t))
|
|
161
155
|
}, {
|
|
162
156
|
default: o(() => e[17] || (e[17] = [
|
|
163
|
-
|
|
157
|
+
s(" Client ID ")
|
|
164
158
|
])),
|
|
165
159
|
_: 1
|
|
166
160
|
}, 8, ["id", "modelValue"])
|
|
167
161
|
]),
|
|
168
162
|
_: 1
|
|
169
163
|
}),
|
|
170
|
-
"clientSecret" in l.
|
|
164
|
+
"clientSecret" in l.flow ? (i(), m(a(u), { key: 3 }, {
|
|
171
165
|
default: o(() => [
|
|
172
|
-
d(
|
|
166
|
+
d(n, {
|
|
173
167
|
id: `oauth2-client-secret-${l.scheme.uid}`,
|
|
174
|
-
modelValue: l.
|
|
168
|
+
modelValue: l.flow.clientSecret,
|
|
175
169
|
placeholder: "XYZ123",
|
|
176
170
|
type: "password",
|
|
177
|
-
"onUpdate:modelValue": e[8] || (e[8] = (t) =>
|
|
171
|
+
"onUpdate:modelValue": e[8] || (e[8] = (t) => r(`flows.${l.flow.type}.clientSecret`, t))
|
|
178
172
|
}, {
|
|
179
173
|
default: o(() => e[18] || (e[18] = [
|
|
180
|
-
|
|
174
|
+
s(" Client Secret ")
|
|
181
175
|
])),
|
|
182
176
|
_: 1
|
|
183
177
|
}, 8, ["id", "modelValue"])
|
|
184
178
|
]),
|
|
185
179
|
_: 1
|
|
186
|
-
})) :
|
|
187
|
-
"x-usePkce" in l.
|
|
180
|
+
})) : f("", !0),
|
|
181
|
+
"x-usePkce" in l.flow ? (i(), m(a(u), { key: 4 }, {
|
|
188
182
|
default: o(() => [
|
|
189
|
-
d(
|
|
183
|
+
d(n, {
|
|
190
184
|
id: `oauth2-use-pkce-${l.scheme.uid}`,
|
|
191
|
-
enum: a(
|
|
192
|
-
modelValue: l.
|
|
185
|
+
enum: a(A),
|
|
186
|
+
modelValue: l.flow["x-usePkce"],
|
|
193
187
|
readOnly: "",
|
|
194
|
-
"onUpdate:modelValue": e[9] || (e[9] = (t) =>
|
|
188
|
+
"onUpdate:modelValue": e[9] || (e[9] = (t) => r(
|
|
189
|
+
`flows.${l.flow.type}.x-usePkce`,
|
|
190
|
+
t
|
|
191
|
+
))
|
|
195
192
|
}, {
|
|
196
193
|
default: o(() => e[19] || (e[19] = [
|
|
197
|
-
|
|
194
|
+
s(" Use PKCE ")
|
|
198
195
|
])),
|
|
199
196
|
_: 1
|
|
200
197
|
}, 8, ["id", "enum", "modelValue"])
|
|
201
198
|
]),
|
|
202
199
|
_: 1
|
|
203
|
-
})) :
|
|
204
|
-
Object.keys(l.
|
|
200
|
+
})) : f("", !0),
|
|
201
|
+
Object.keys(l.flow.scopes ?? {}).length ? (i(), m(a(u), { key: 5 }, {
|
|
205
202
|
default: o(() => [
|
|
206
|
-
d(
|
|
207
|
-
|
|
208
|
-
updateScheme:
|
|
209
|
-
}, null, 8, ["
|
|
203
|
+
d(F, {
|
|
204
|
+
flow: l.flow,
|
|
205
|
+
updateScheme: r
|
|
206
|
+
}, null, 8, ["flow"])
|
|
210
207
|
]),
|
|
211
208
|
_: 1
|
|
212
|
-
})) :
|
|
213
|
-
d(a(
|
|
209
|
+
})) : f("", !0),
|
|
210
|
+
d(a(u), { class: "min-w-full" }, {
|
|
214
211
|
default: o(() => [
|
|
215
|
-
|
|
216
|
-
d(a(
|
|
212
|
+
V("div", R, [
|
|
213
|
+
d(a(U), {
|
|
217
214
|
class: "p-0 py-0.5 px-2 mr-1",
|
|
218
|
-
loading: a(
|
|
215
|
+
loading: a(p),
|
|
219
216
|
size: "sm",
|
|
220
217
|
variant: "outlined",
|
|
221
|
-
onClick:
|
|
218
|
+
onClick: h
|
|
222
219
|
}, {
|
|
223
220
|
default: o(() => e[20] || (e[20] = [
|
|
224
|
-
|
|
221
|
+
s(" Authorize ")
|
|
225
222
|
])),
|
|
226
223
|
_: 1
|
|
227
224
|
}, 8, ["loading"])
|
|
@@ -233,5 +230,5 @@ const R = { class: "h-8 flex items-center justify-self-end" }, b = { class: "h-8
|
|
|
233
230
|
}
|
|
234
231
|
});
|
|
235
232
|
export {
|
|
236
|
-
|
|
233
|
+
X as default
|
|
237
234
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UpdateScheme } from '../../../../store/index.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Oauth2Flow } from '@scalar/oas-utils/entities/spec';
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
|
|
4
|
+
flow: Oauth2Flow;
|
|
5
5
|
updateScheme: UpdateScheme;
|
|
6
6
|
};
|
|
7
7
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAKjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAyPF,wBAOG"}
|
|
@@ -1,90 +1,93 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as V, DisclosureButton as
|
|
3
|
-
import { ScalarIcon as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as C, computed as x, openBlock as p, createBlock as w, unref as t, withCtx as a, createElementVNode as o, createVNode as r, normalizeClass as y, toDisplayString as d, createElementBlock as v, Fragment as b, renderList as k, createCommentVNode as D } from "vue";
|
|
2
|
+
import { Disclosure as V, DisclosureButton as $, DisclosurePanel as B } from "@headlessui/vue";
|
|
3
|
+
import { ScalarIcon as N } from "@scalar/components";
|
|
4
|
+
import S from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
5
|
+
import O from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
6
6
|
import j from "../../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
7
|
-
const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" },
|
|
7
|
+
const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
|
|
8
8
|
class: "grid auto-rows-auto border-t-1/2",
|
|
9
9
|
style: { gridTemplateColumns: "1fr auto" }
|
|
10
|
-
},
|
|
10
|
+
}, I = { class: "font-code text-xs" }, R = { key: 0 }, G = /* @__PURE__ */ C({
|
|
11
11
|
__name: "OAuthScopesInput",
|
|
12
12
|
props: {
|
|
13
|
-
|
|
13
|
+
flow: {},
|
|
14
14
|
updateScheme: { type: Function }
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
16
|
+
setup(s) {
|
|
17
|
+
const g = x(
|
|
18
18
|
() => {
|
|
19
19
|
var e;
|
|
20
|
-
return Object.entries(((e =
|
|
21
|
-
id:
|
|
22
|
-
label:
|
|
23
|
-
description:
|
|
20
|
+
return Object.entries(((e = s.flow) == null ? void 0 : e.scopes) ?? {}).map(([l, c]) => ({
|
|
21
|
+
id: l,
|
|
22
|
+
label: l,
|
|
23
|
+
description: c
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
26
|
-
),
|
|
26
|
+
), i = x(() => {
|
|
27
27
|
var e;
|
|
28
|
-
return ((e =
|
|
28
|
+
return ((e = s.flow) == null ? void 0 : e.selectedScopes) || [];
|
|
29
29
|
});
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
function _(e, l) {
|
|
31
|
+
l ? s.updateScheme(`flows.${s.flow.type}.selectedScopes`, [
|
|
32
|
+
...i.value,
|
|
33
|
+
e
|
|
34
|
+
]) : s.updateScheme(
|
|
35
|
+
`flows.${s.flow.type}.selectedScopes`,
|
|
36
|
+
i.value.filter((c) => c !== e)
|
|
34
37
|
);
|
|
35
38
|
}
|
|
36
|
-
return (e,
|
|
39
|
+
return (e, l) => (p(), w(t(S), { class: "items-center min-h-8 h-auto" }, {
|
|
37
40
|
default: a(() => [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
o("div", z, [
|
|
42
|
+
l[0] || (l[0] = o("div", { class: "text-c-1 min-w-[94px] items-center pl-2 h-full" }, [
|
|
43
|
+
o("span", { class: "h-8 flex items-center" }, " Scopes ")
|
|
41
44
|
], -1)),
|
|
42
|
-
|
|
45
|
+
r(t(V), {
|
|
43
46
|
as: "div",
|
|
44
47
|
class: "flex flex-col w-full bl"
|
|
45
48
|
}, {
|
|
46
49
|
default: a(() => {
|
|
47
|
-
var
|
|
50
|
+
var c, h;
|
|
48
51
|
return [
|
|
49
|
-
|
|
50
|
-
class:
|
|
52
|
+
r(t($), {
|
|
53
|
+
class: y([
|
|
51
54
|
"group/scopes-accordion flex items-center text-left min-h-8 gap-1.5 h-auto pl-2 hover:text-c-1 pr-2.5 cursor-pointer",
|
|
52
|
-
(((h = (
|
|
55
|
+
(((h = (c = e.flow) == null ? void 0 : c.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
|
|
53
56
|
])
|
|
54
57
|
}, {
|
|
55
|
-
default: a(({ open:
|
|
56
|
-
var
|
|
58
|
+
default: a(({ open: n }) => {
|
|
59
|
+
var f, u, m;
|
|
57
60
|
return [
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
o("div", E, " Selected " + d(((u = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : u.length) || 0) + " / " + d(Object.keys(((m = e.flow) == null ? void 0 : m.scopes) ?? {}).length || 0), 1),
|
|
62
|
+
r(t(N), {
|
|
60
63
|
class: "text-c-3 group-hover/scopes-accordion:text-c-2",
|
|
61
|
-
icon:
|
|
64
|
+
icon: n ? "ChevronDown" : "ChevronRight",
|
|
62
65
|
size: "xs"
|
|
63
66
|
}, null, 8, ["icon"])
|
|
64
67
|
];
|
|
65
68
|
}),
|
|
66
69
|
_: 1
|
|
67
70
|
}, 8, ["class"]),
|
|
68
|
-
|
|
71
|
+
r(t(B), { as: "template" }, {
|
|
69
72
|
default: a(() => [
|
|
70
|
-
|
|
71
|
-
(
|
|
72
|
-
key:
|
|
73
|
+
o("table", F, [
|
|
74
|
+
(p(!0), v(b, null, k(g.value, ({ id: n, label: f, description: u }) => (p(), w(t(O), {
|
|
75
|
+
key: n,
|
|
73
76
|
class: "text-c-2",
|
|
74
|
-
onClick: (
|
|
77
|
+
onClick: (m) => _(n, !i.value.includes(n))
|
|
75
78
|
}, {
|
|
76
79
|
default: a(() => [
|
|
77
|
-
|
|
80
|
+
r(t(S), { class: "w-full px-2 py-1.5 hover:text-c-1 cursor-pointer" }, {
|
|
78
81
|
default: a(() => [
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
o("span", null, [
|
|
83
|
+
o("span", I, d(f), 1),
|
|
84
|
+
u ? (p(), v("span", R, " – " + d(u), 1)) : D("", !0)
|
|
82
85
|
])
|
|
83
86
|
]),
|
|
84
87
|
_: 2
|
|
85
88
|
}, 1024),
|
|
86
|
-
|
|
87
|
-
modelValue:
|
|
89
|
+
r(t(j), {
|
|
90
|
+
modelValue: i.value.includes(n),
|
|
88
91
|
"onUpdate:modelValue": () => {
|
|
89
92
|
}
|
|
90
93
|
}, null, 8, ["modelValue"])
|
|
@@ -106,5 +109,5 @@ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, I = {
|
|
|
106
109
|
}
|
|
107
110
|
});
|
|
108
111
|
export {
|
|
109
|
-
|
|
112
|
+
G as default
|
|
110
113
|
};
|
|
@@ -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":"AA8YA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAkgBF,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
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fb32077d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|