@scalar/api-client 2.17.7 → 2.18.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 +74 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.js +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +5 -5
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +18 -18
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +7 -7
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +44 -5
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +2 -44
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.js +46 -51
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts +9 -0
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +7 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +12 -10
- package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts +3 -0
- package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js +12 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +149 -126
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts +20 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +76 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +22 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +79 -64
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +16 -8
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +84 -82
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +115 -144
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/code-input/CodeInput.vue2.js +120 -107
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +3 -3
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +2 -2
- package/dist/v2/components/data-table/DataTableInput.vue2.js +27 -27
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +3 -2
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +42 -39
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.js +43 -5
- package/dist/v2/components/forms/ConfirmationForm.vue2.js +2 -43
- package/dist/v2/components/modals/DeleteModal.vue.js +11 -11
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +5 -3
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +5 -3
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +25 -30
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +89 -141
- package/dist/v2/features/app/app-events.d.ts +22 -0
- package/dist/v2/features/app/app-events.d.ts.map +1 -0
- package/dist/v2/features/app/app-events.js +136 -0
- package/dist/v2/features/app/app-state.d.ts +135 -0
- package/dist/v2/features/app/app-state.d.ts.map +1 -0
- package/dist/v2/features/app/app-state.js +316 -0
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +6 -3
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +4 -4
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +4 -2
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +25 -22
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts +9 -5
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +62 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +14 -10
- package/dist/v2/features/app/helpers/routes.d.ts +5 -2
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +7 -7
- package/dist/v2/features/collection/components/Form.vue.d.ts +1 -1
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +2 -2
- package/dist/v2/features/modal/Modal.vue2.js +40 -41
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +38 -28
- package/dist/v2/features/operation/helpers/combine-params.d.ts +4 -0
- package/dist/v2/features/operation/helpers/combine-params.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/combine-params.js +13 -0
- package/dist/v2/features/operation/index.d.ts +1 -0
- package/dist/v2/features/operation/index.d.ts.map +1 -1
- package/dist/v2/features/operation/index.js +10 -8
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +104 -5
- package/dist/v2/features/settings/DocumentSettings.vue2.js +2 -104
- package/dist/v2/helpers/get-tab-details.d.ts +2 -2
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
- package/dist/views/Collection/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionSettings.vue.js +1 -4
- package/dist/views/Collection/CollectionSettings.vue2.js +5 -5
- package/dist/views/Environment/EnvironmentColorModal.vue.js +6 -6
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -17
- package/dist/v2/features/app/hooks/use-app-sidebar.d.ts +0 -40
- package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-app-sidebar.js +0 -134
- package/dist/v2/features/app/hooks/use-sync-path.d.ts +0 -11
- package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-sync-path.js +0 -52
- package/dist/v2/features/app/hooks/use-tabs.d.ts +0 -31
- package/dist/v2/features/app/hooks/use-tabs.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-tabs.js +0 -44
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts +0 -18
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.js +0 -156
- package/dist/v2/features/app/hooks/use-workspace-selector.d.ts +0 -28
- package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +0 -1
- package/dist/v2/features/app/hooks/use-workspace-selector.js +0 -81
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useLoadingState as
|
|
3
|
-
import { pkceOptions as
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import
|
|
6
|
-
import { authorizeOauth2 as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as b, computed as x, watch as B, createElementBlock as y, openBlock as m, Fragment as V, createVNode as a, unref as o, withCtx as l, createTextVNode as d, createElementVNode as U, createBlock as f, createCommentVNode as v } from "vue";
|
|
2
|
+
import { useLoadingState as L, ScalarButton as S } from "@scalar/components";
|
|
3
|
+
import { pkceOptions as P } from "@scalar/oas-utils/entities/spec";
|
|
4
|
+
import { useToasts as R } from "@scalar/use-toasts";
|
|
5
|
+
import F from "./OAuthScopesInput.vue.js";
|
|
6
|
+
import { authorizeOauth2 as O } from "../helpers/oauth.js";
|
|
7
|
+
import i from "./RequestAuthDataTableInput.vue.js";
|
|
8
|
+
import u from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
9
|
+
const A = { class: "flex h-8 items-center justify-end gap-2 border-t" }, I = { class: "flex h-8 w-full items-center justify-end border-t" }, K = /* @__PURE__ */ b({
|
|
10
10
|
__name: "OAuth2",
|
|
11
11
|
props: {
|
|
12
12
|
environment: {},
|
|
@@ -17,66 +17,70 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, A = { c
|
|
|
17
17
|
proxyUrl: {}
|
|
18
18
|
},
|
|
19
19
|
emits: ["update:securityScheme", "update:selectedScopes"],
|
|
20
|
-
setup(p, { emit:
|
|
21
|
-
const
|
|
20
|
+
setup(p, { emit: g }) {
|
|
21
|
+
const k = g, c = L(), { toast: C } = R(), r = x(() => p.flows[p.type]), w = x(
|
|
22
|
+
() => p.selectedScopes.filter((t) => t in (r.value.scopes ?? {}))
|
|
23
|
+
), s = (t) => k("update:securityScheme", {
|
|
22
24
|
type: "oauth2",
|
|
23
25
|
flows: {
|
|
24
|
-
[p.type]:
|
|
26
|
+
[p.type]: t
|
|
25
27
|
}
|
|
26
28
|
});
|
|
27
|
-
|
|
28
|
-
() =>
|
|
29
|
-
(
|
|
30
|
-
|
|
29
|
+
B(
|
|
30
|
+
() => r.value["x-scalar-secret-redirect-uri"],
|
|
31
|
+
(t) => {
|
|
32
|
+
t || typeof window > "u" || !("x-scalar-secret-redirect-uri" in r.value) || s({
|
|
31
33
|
"x-scalar-secret-redirect-uri": window.location.origin + window.location.pathname
|
|
32
34
|
});
|
|
33
35
|
},
|
|
34
36
|
{ immediate: !0 }
|
|
35
37
|
);
|
|
36
|
-
const
|
|
38
|
+
const T = async () => {
|
|
37
39
|
if (c.isLoading)
|
|
38
40
|
return;
|
|
39
41
|
c.start();
|
|
40
|
-
const [
|
|
42
|
+
const [t, e] = await O(
|
|
41
43
|
p.flows,
|
|
42
44
|
p.type,
|
|
43
|
-
|
|
45
|
+
w.value,
|
|
44
46
|
p.server,
|
|
45
47
|
p.proxyUrl
|
|
46
48
|
);
|
|
47
|
-
await c.clear(), e ? s({ "x-scalar-secret-token": e }) : (console.error(
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
await c.clear(), e ? s({ "x-scalar-secret-token": e }) : (console.error(t), C(t?.message ?? "Failed to authorize", "error"));
|
|
50
|
+
}, z = (t) => s({
|
|
51
|
+
"x-scalar-credentials-location": t === "body" ? "body" : "header"
|
|
52
|
+
});
|
|
53
|
+
return (t, e) => r.value["x-scalar-secret-token"] ? (m(), y(V, { key: 0 }, [
|
|
54
|
+
a(o(u), null, {
|
|
55
|
+
default: l(() => [
|
|
56
|
+
a(i, {
|
|
53
57
|
class: "border-r-transparent",
|
|
54
|
-
environment:
|
|
55
|
-
modelValue:
|
|
58
|
+
environment: t.environment,
|
|
59
|
+
modelValue: r.value["x-scalar-secret-token"],
|
|
56
60
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
57
61
|
type: "password",
|
|
58
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
62
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => s({ "x-scalar-secret-token": n }))
|
|
59
63
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
64
|
+
default: l(() => [...e[12] || (e[12] = [
|
|
65
|
+
d(" Access Token ", -1)
|
|
62
66
|
])]),
|
|
63
67
|
_: 1
|
|
64
68
|
}, 8, ["environment", "modelValue"])
|
|
65
69
|
]),
|
|
66
70
|
_: 1
|
|
67
71
|
}),
|
|
68
|
-
o(
|
|
69
|
-
default:
|
|
70
|
-
|
|
71
|
-
o(
|
|
72
|
+
a(o(u), { class: "min-w-full" }, {
|
|
73
|
+
default: l(() => [
|
|
74
|
+
U("div", A, [
|
|
75
|
+
a(o(S), {
|
|
72
76
|
class: "mr-1 p-0 px-2 py-0.5",
|
|
73
|
-
loader:
|
|
77
|
+
loader: o(c),
|
|
74
78
|
size: "sm",
|
|
75
79
|
variant: "outlined",
|
|
76
80
|
onClick: e[1] || (e[1] = () => s({ "x-scalar-secret-token": "" }))
|
|
77
81
|
}, {
|
|
78
|
-
default:
|
|
79
|
-
|
|
82
|
+
default: l(() => [...e[13] || (e[13] = [
|
|
83
|
+
d(" Clear ", -1)
|
|
80
84
|
])]),
|
|
81
85
|
_: 1
|
|
82
86
|
}, 8, ["loader"])
|
|
@@ -84,163 +88,182 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, A = { c
|
|
|
84
88
|
]),
|
|
85
89
|
_: 1
|
|
86
90
|
})
|
|
87
|
-
], 64)) : (
|
|
88
|
-
o(
|
|
89
|
-
default:
|
|
90
|
-
"authorizationUrl" in
|
|
91
|
+
], 64)) : (m(), y(V, { key: 1 }, [
|
|
92
|
+
a(o(u), null, {
|
|
93
|
+
default: l(() => [
|
|
94
|
+
"authorizationUrl" in r.value ? (m(), f(i, {
|
|
91
95
|
key: 0,
|
|
92
96
|
containerClass: "border-r-0",
|
|
93
|
-
environment:
|
|
94
|
-
modelValue:
|
|
97
|
+
environment: t.environment,
|
|
98
|
+
modelValue: r.value.authorizationUrl,
|
|
95
99
|
placeholder: "https://galaxy.scalar.com/authorize",
|
|
96
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
100
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => s({ authorizationUrl: n }))
|
|
97
101
|
}, {
|
|
98
|
-
default:
|
|
99
|
-
|
|
102
|
+
default: l(() => [...e[14] || (e[14] = [
|
|
103
|
+
d(" Auth URL ", -1)
|
|
100
104
|
])]),
|
|
101
105
|
_: 1
|
|
102
|
-
}, 8, ["environment", "modelValue"])) :
|
|
103
|
-
"tokenUrl" in
|
|
106
|
+
}, 8, ["environment", "modelValue"])) : v("", !0),
|
|
107
|
+
"tokenUrl" in r.value ? (m(), f(i, {
|
|
104
108
|
key: 1,
|
|
105
|
-
environment:
|
|
106
|
-
modelValue:
|
|
109
|
+
environment: t.environment,
|
|
110
|
+
modelValue: r.value.tokenUrl,
|
|
107
111
|
placeholder: "https://galaxy.scalar.com/token",
|
|
108
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
112
|
+
"onUpdate:modelValue": e[3] || (e[3] = (n) => s({ tokenUrl: n }))
|
|
109
113
|
}, {
|
|
110
|
-
default:
|
|
111
|
-
|
|
114
|
+
default: l(() => [...e[15] || (e[15] = [
|
|
115
|
+
d(" Token URL ", -1)
|
|
112
116
|
])]),
|
|
113
117
|
_: 1
|
|
114
|
-
}, 8, ["environment", "modelValue"])) :
|
|
118
|
+
}, 8, ["environment", "modelValue"])) : v("", !0)
|
|
115
119
|
]),
|
|
116
120
|
_: 1
|
|
117
121
|
}),
|
|
118
|
-
"x-scalar-secret-redirect-uri" in
|
|
119
|
-
default:
|
|
120
|
-
|
|
121
|
-
environment:
|
|
122
|
-
modelValue:
|
|
122
|
+
"x-scalar-secret-redirect-uri" in r.value ? (m(), f(o(u), { key: 0 }, {
|
|
123
|
+
default: l(() => [
|
|
124
|
+
a(i, {
|
|
125
|
+
environment: t.environment,
|
|
126
|
+
modelValue: r.value["x-scalar-secret-redirect-uri"],
|
|
123
127
|
placeholder: "https://galaxy.scalar.com/callback",
|
|
124
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
128
|
+
"onUpdate:modelValue": e[4] || (e[4] = (n) => s({ "x-scalar-secret-redirect-uri": n }))
|
|
125
129
|
}, {
|
|
126
|
-
default:
|
|
127
|
-
|
|
130
|
+
default: l(() => [...e[16] || (e[16] = [
|
|
131
|
+
d(" Redirect URL ", -1)
|
|
128
132
|
])]),
|
|
129
133
|
_: 1
|
|
130
134
|
}, 8, ["environment", "modelValue"])
|
|
131
135
|
]),
|
|
132
136
|
_: 1
|
|
133
|
-
})) :
|
|
134
|
-
"x-scalar-secret-username" in
|
|
135
|
-
o(
|
|
136
|
-
default:
|
|
137
|
-
|
|
137
|
+
})) : v("", !0),
|
|
138
|
+
"x-scalar-secret-username" in r.value && "x-scalar-secret-password" in r.value ? (m(), y(V, { key: 1 }, [
|
|
139
|
+
a(o(u), null, {
|
|
140
|
+
default: l(() => [
|
|
141
|
+
a(i, {
|
|
138
142
|
class: "text-c-2",
|
|
139
|
-
environment:
|
|
140
|
-
modelValue:
|
|
143
|
+
environment: t.environment,
|
|
144
|
+
modelValue: r.value["x-scalar-secret-username"],
|
|
141
145
|
placeholder: "janedoe",
|
|
142
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
|
146
|
+
"onUpdate:modelValue": e[5] || (e[5] = (n) => s({ "x-scalar-secret-username": n }))
|
|
143
147
|
}, {
|
|
144
|
-
default:
|
|
145
|
-
|
|
148
|
+
default: l(() => [...e[17] || (e[17] = [
|
|
149
|
+
d(" Username ", -1)
|
|
146
150
|
])]),
|
|
147
151
|
_: 1
|
|
148
152
|
}, 8, ["environment", "modelValue"])
|
|
149
153
|
]),
|
|
150
154
|
_: 1
|
|
151
155
|
}),
|
|
152
|
-
o(
|
|
153
|
-
default:
|
|
154
|
-
|
|
155
|
-
environment:
|
|
156
|
-
modelValue:
|
|
156
|
+
a(o(u), null, {
|
|
157
|
+
default: l(() => [
|
|
158
|
+
a(i, {
|
|
159
|
+
environment: t.environment,
|
|
160
|
+
modelValue: r.value["x-scalar-secret-password"],
|
|
157
161
|
placeholder: "********",
|
|
158
162
|
type: "password",
|
|
159
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
163
|
+
"onUpdate:modelValue": e[6] || (e[6] = (n) => s({ "x-scalar-secret-password": n }))
|
|
160
164
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
|
|
165
|
+
default: l(() => [...e[18] || (e[18] = [
|
|
166
|
+
d(" Password ", -1)
|
|
163
167
|
])]),
|
|
164
168
|
_: 1
|
|
165
169
|
}, 8, ["environment", "modelValue"])
|
|
166
170
|
]),
|
|
167
171
|
_: 1
|
|
168
172
|
})
|
|
169
|
-
], 64)) :
|
|
170
|
-
o(
|
|
171
|
-
default:
|
|
172
|
-
|
|
173
|
-
environment:
|
|
174
|
-
modelValue:
|
|
173
|
+
], 64)) : v("", !0),
|
|
174
|
+
a(o(u), null, {
|
|
175
|
+
default: l(() => [
|
|
176
|
+
a(i, {
|
|
177
|
+
environment: t.environment,
|
|
178
|
+
modelValue: r.value["x-scalar-secret-client-id"],
|
|
175
179
|
placeholder: "12345",
|
|
176
|
-
"onUpdate:modelValue": e[7] || (e[7] = (
|
|
180
|
+
"onUpdate:modelValue": e[7] || (e[7] = (n) => s({ "x-scalar-secret-client-id": n }))
|
|
177
181
|
}, {
|
|
178
|
-
default:
|
|
179
|
-
|
|
182
|
+
default: l(() => [...e[19] || (e[19] = [
|
|
183
|
+
d(" Client ID ", -1)
|
|
180
184
|
])]),
|
|
181
185
|
_: 1
|
|
182
186
|
}, 8, ["environment", "modelValue"])
|
|
183
187
|
]),
|
|
184
188
|
_: 1
|
|
185
189
|
}),
|
|
186
|
-
"x-scalar-secret-client-secret" in
|
|
187
|
-
default:
|
|
188
|
-
|
|
189
|
-
environment:
|
|
190
|
-
modelValue:
|
|
190
|
+
"x-scalar-secret-client-secret" in r.value ? (m(), f(o(u), { key: 2 }, {
|
|
191
|
+
default: l(() => [
|
|
192
|
+
a(i, {
|
|
193
|
+
environment: t.environment,
|
|
194
|
+
modelValue: r.value["x-scalar-secret-client-secret"],
|
|
191
195
|
placeholder: "XYZ123",
|
|
192
196
|
type: "password",
|
|
193
|
-
"onUpdate:modelValue": e[8] || (e[8] = (
|
|
197
|
+
"onUpdate:modelValue": e[8] || (e[8] = (n) => s({ "x-scalar-secret-client-secret": n }))
|
|
194
198
|
}, {
|
|
195
|
-
default:
|
|
196
|
-
|
|
199
|
+
default: l(() => [...e[20] || (e[20] = [
|
|
200
|
+
d(" Client Secret ", -1)
|
|
197
201
|
])]),
|
|
198
202
|
_: 1
|
|
199
203
|
}, 8, ["environment", "modelValue"])
|
|
200
204
|
]),
|
|
201
205
|
_: 1
|
|
202
|
-
})) :
|
|
203
|
-
"x-usePkce" in
|
|
204
|
-
default:
|
|
205
|
-
|
|
206
|
-
enum:
|
|
207
|
-
environment:
|
|
208
|
-
modelValue:
|
|
206
|
+
})) : v("", !0),
|
|
207
|
+
"x-usePkce" in r.value ? (m(), f(o(u), { key: 3 }, {
|
|
208
|
+
default: l(() => [
|
|
209
|
+
a(i, {
|
|
210
|
+
enum: o(P),
|
|
211
|
+
environment: t.environment,
|
|
212
|
+
modelValue: r.value["x-usePkce"],
|
|
209
213
|
readOnly: "",
|
|
210
|
-
"onUpdate:modelValue": e[9] || (e[9] = (
|
|
211
|
-
"x-usePkce":
|
|
214
|
+
"onUpdate:modelValue": e[9] || (e[9] = (n) => s({
|
|
215
|
+
"x-usePkce": n
|
|
212
216
|
}))
|
|
213
217
|
}, {
|
|
214
|
-
default:
|
|
215
|
-
|
|
218
|
+
default: l(() => [...e[21] || (e[21] = [
|
|
219
|
+
d(" Use PKCE ", -1)
|
|
216
220
|
])]),
|
|
217
221
|
_: 1
|
|
218
222
|
}, 8, ["enum", "environment", "modelValue"])
|
|
219
223
|
]),
|
|
220
224
|
_: 1
|
|
221
|
-
})) :
|
|
222
|
-
|
|
223
|
-
default:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
})) : v("", !0),
|
|
226
|
+
t.type !== "implicit" ? (m(), f(o(u), { key: 4 }, {
|
|
227
|
+
default: l(() => [
|
|
228
|
+
a(i, {
|
|
229
|
+
enum: ["header", "body"],
|
|
230
|
+
environment: t.environment,
|
|
231
|
+
modelValue: r.value["x-scalar-credentials-location"] || "header",
|
|
232
|
+
placeholder: "header",
|
|
233
|
+
readOnly: "",
|
|
234
|
+
"onUpdate:modelValue": e[10] || (e[10] = (n) => z(n))
|
|
235
|
+
}, {
|
|
236
|
+
default: l(() => [...e[22] || (e[22] = [
|
|
237
|
+
d(" Credentials Location ", -1)
|
|
238
|
+
])]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["environment", "modelValue"])
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
})) : v("", !0),
|
|
244
|
+
a(o(u), null, {
|
|
245
|
+
default: l(() => [
|
|
246
|
+
a(F, {
|
|
247
|
+
flow: r.value,
|
|
248
|
+
flowType: t.type,
|
|
249
|
+
selectedScopes: w.value,
|
|
250
|
+
"onUpdate:selectedScopes": e[11] || (e[11] = (n) => k("update:selectedScopes", n))
|
|
251
|
+
}, null, 8, ["flow", "flowType", "selectedScopes"])
|
|
229
252
|
]),
|
|
230
253
|
_: 1
|
|
231
|
-
})
|
|
232
|
-
o(
|
|
233
|
-
default:
|
|
234
|
-
|
|
235
|
-
o(
|
|
254
|
+
}),
|
|
255
|
+
a(o(u), { class: "min-w-full" }, {
|
|
256
|
+
default: l(() => [
|
|
257
|
+
U("div", I, [
|
|
258
|
+
a(o(S), {
|
|
236
259
|
class: "mr-0.75 p-0 px-2 py-0.5",
|
|
237
|
-
loader:
|
|
260
|
+
loader: o(c),
|
|
238
261
|
size: "sm",
|
|
239
262
|
variant: "outlined",
|
|
240
|
-
onClick:
|
|
263
|
+
onClick: T
|
|
241
264
|
}, {
|
|
242
|
-
default:
|
|
243
|
-
|
|
265
|
+
default: l(() => [...e[23] || (e[23] = [
|
|
266
|
+
d(" Authorize ", -1)
|
|
244
267
|
])]),
|
|
245
268
|
_: 1
|
|
246
269
|
}, 8, ["loader"])
|
|
@@ -252,5 +275,5 @@ const O = { class: "flex h-8 items-center justify-end gap-2 border-t" }, A = { c
|
|
|
252
275
|
}
|
|
253
276
|
});
|
|
254
277
|
export {
|
|
255
|
-
|
|
278
|
+
K as default
|
|
256
279
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ModalState } from '@scalar/components';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
state: ModalState;
|
|
4
|
+
scopes: string[];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
submit: (scopeData: {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}) => any;
|
|
11
|
+
cancel: () => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onSubmit?: ((scopeData: {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}) => any) | undefined;
|
|
17
|
+
onCancel?: (() => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=OAuthScopesAddModal.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OAuthScopesAddModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue"],"names":[],"mappings":"AAoGA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAC;;;cAQU,MAAM;qBACC,MAAM;;;;;cADb,MAAM;qBACC,MAAM;;;;AAiKzB,wBAOG"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent as c, ref as v, watch as V, createBlock as b, openBlock as x, unref as S, withCtx as o, createVNode as l, createElementVNode as m, createTextVNode as n } from "vue";
|
|
2
|
+
import { ScalarModal as A } from "@scalar/components";
|
|
3
|
+
import { useToasts as N } from "@scalar/use-toasts";
|
|
4
|
+
import g from "../../../../components/CommandPalette/CommandActionForm.vue.js";
|
|
5
|
+
import r from "../../../../components/CommandPalette/CommandActionInput.vue.js";
|
|
6
|
+
const C = { class: "flex h-8 items-start gap-2 text-sm" }, $ = { class: "flex h-8 items-start gap-2 text-sm" }, T = /* @__PURE__ */ c({
|
|
7
|
+
__name: "OAuthScopesAddModal",
|
|
8
|
+
props: {
|
|
9
|
+
state: {},
|
|
10
|
+
scopes: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["cancel", "submit"],
|
|
13
|
+
setup(d, { emit: u }) {
|
|
14
|
+
const i = u, t = v({
|
|
15
|
+
name: "",
|
|
16
|
+
description: ""
|
|
17
|
+
}), { toast: p } = N(), f = () => {
|
|
18
|
+
if (!t.value.name) {
|
|
19
|
+
p("Please fill in the name before adding a scope.", "error");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
i("submit", t.value), d.state.hide();
|
|
23
|
+
};
|
|
24
|
+
return V(
|
|
25
|
+
() => d.state.open,
|
|
26
|
+
(a) => {
|
|
27
|
+
a && (t.value = {
|
|
28
|
+
name: "",
|
|
29
|
+
description: ""
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
), (a, e) => (x(), b(S(A), {
|
|
33
|
+
size: "xs",
|
|
34
|
+
state: a.state,
|
|
35
|
+
title: "Add Scope"
|
|
36
|
+
}, {
|
|
37
|
+
default: o(() => [
|
|
38
|
+
l(g, {
|
|
39
|
+
disabled: !t.value.name || a.scopes.includes(t.value.name),
|
|
40
|
+
onCancel: e[2] || (e[2] = (s) => i("cancel")),
|
|
41
|
+
onSubmit: f
|
|
42
|
+
}, {
|
|
43
|
+
submit: o(() => [...e[5] || (e[5] = [
|
|
44
|
+
n("Add Scope", -1)
|
|
45
|
+
])]),
|
|
46
|
+
default: o(() => [
|
|
47
|
+
m("div", C, [
|
|
48
|
+
e[3] || (e[3] = n(" Name: ", -1)),
|
|
49
|
+
l(r, {
|
|
50
|
+
modelValue: t.value.name,
|
|
51
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => t.value.name = s),
|
|
52
|
+
autofocus: "",
|
|
53
|
+
class: "!p-0",
|
|
54
|
+
placeholder: "read:user"
|
|
55
|
+
}, null, 8, ["modelValue"])
|
|
56
|
+
]),
|
|
57
|
+
m("div", $, [
|
|
58
|
+
e[4] || (e[4] = n(" Description: ", -1)),
|
|
59
|
+
l(r, {
|
|
60
|
+
modelValue: t.value.description,
|
|
61
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => t.value.description = s),
|
|
62
|
+
class: "!p-0",
|
|
63
|
+
placeholder: "Read user data"
|
|
64
|
+
}, null, 8, ["modelValue"])
|
|
65
|
+
])
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["disabled"])
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["state"]));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
T as default
|
|
76
|
+
};
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
import type { OAuthFlow } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
1
|
+
import type { OAuthFlow, OAuthFlowsObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
flowType: keyof OAuthFlowsObject;
|
|
3
4
|
flow: OAuthFlow;
|
|
4
5
|
selectedScopes: string[];
|
|
5
6
|
};
|
|
6
7
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
-
"update:selectedScopes": (payload: {
|
|
8
|
+
"update:selectedScopes": (payload: Pick<{
|
|
9
|
+
id: string[];
|
|
10
|
+
name: string;
|
|
8
11
|
scopes: string[];
|
|
9
|
-
|
|
12
|
+
newScopePayload?: {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
flowType: keyof OAuthFlowsObject;
|
|
16
|
+
};
|
|
17
|
+
meta: import("@scalar/workspace-store/mutators").AuthMeta;
|
|
18
|
+
}, "scopes" | "newScopePayload">) => any;
|
|
10
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
"onUpdate:selectedScopes"?: ((payload: {
|
|
20
|
+
"onUpdate:selectedScopes"?: ((payload: Pick<{
|
|
21
|
+
id: string[];
|
|
22
|
+
name: string;
|
|
12
23
|
scopes: string[];
|
|
13
|
-
|
|
24
|
+
newScopePayload?: {
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
flowType: keyof OAuthFlowsObject;
|
|
28
|
+
};
|
|
29
|
+
meta: import("@scalar/workspace-store/mutators").AuthMeta;
|
|
30
|
+
}, "scopes" | "newScopePayload">) => any) | undefined;
|
|
14
31
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
32
|
export default _default;
|
|
16
33
|
//# sourceMappingURL=OAuthScopesInput.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue"],"names":[],"mappings":"AA2KA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EACjB,MAAM,8DAA8D,CAAA;AAWrE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,gBAAgB,CAAA;IAChC,IAAI,EAAE,SAAS,CAAA;IACf,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AAyYF,wBAOG"}
|