@scalar/api-client 2.17.6 → 2.17.8
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 +40 -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 +22 -17
- 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/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/features/operation/Operation.vue.js +1 -1
- 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/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 +12 -12
|
@@ -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"}
|
|
@@ -1,115 +1,122 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Disclosure as
|
|
3
|
-
import { ScalarButton as
|
|
1
|
+
import { defineComponent as T, computed as y, createBlock as p, openBlock as a, unref as s, withCtx as l, createElementVNode as r, createVNode as c, normalizeClass as j, toDisplayString as d, createCommentVNode as u, withModifiers as m, createTextVNode as f, createElementBlock as b, Fragment as z, renderList as B } from "vue";
|
|
2
|
+
import { Disclosure as N, DisclosureButton as M, DisclosurePanel as $ } from "@headlessui/vue";
|
|
3
|
+
import { useModal as E, ScalarButton as S, ScalarIcon as I } from "@scalar/components";
|
|
4
|
+
import P from "./OAuthScopesAddModal.vue.js";
|
|
4
5
|
import C from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import R from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
7
|
+
import U from "../../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
8
|
+
const F = { class: "flex h-fit w-full" }, L = { class: "flex-1" }, _ = { class: "flex items-center gap-1.75" }, q = {
|
|
8
9
|
class: "grid auto-rows-auto",
|
|
9
10
|
style: { gridTemplateColumns: "1fr auto" }
|
|
10
|
-
},
|
|
11
|
+
}, G = { class: "font-code text-xs" }, H = { key: 0 }, ee = /* @__PURE__ */ T({
|
|
11
12
|
__name: "OAuthScopesInput",
|
|
12
13
|
props: {
|
|
14
|
+
flowType: {},
|
|
13
15
|
flow: {},
|
|
14
16
|
selectedScopes: {}
|
|
15
17
|
},
|
|
16
18
|
emits: ["update:selectedScopes"],
|
|
17
|
-
setup(
|
|
18
|
-
const i =
|
|
19
|
-
() => Object.entries(
|
|
20
|
-
id:
|
|
21
|
-
label:
|
|
22
|
-
description:
|
|
19
|
+
setup(n, { emit: A }) {
|
|
20
|
+
const i = A, V = y(
|
|
21
|
+
() => Object.entries(n.flow?.scopes ?? {}).map(([t, e]) => ({
|
|
22
|
+
id: t,
|
|
23
|
+
label: t,
|
|
24
|
+
description: e
|
|
23
25
|
}))
|
|
24
|
-
),
|
|
25
|
-
() =>
|
|
26
|
+
), h = y(
|
|
27
|
+
() => n.selectedScopes.length === Object.keys(n.flow?.scopes ?? {}).length
|
|
26
28
|
);
|
|
27
|
-
function
|
|
28
|
-
if (
|
|
29
|
+
function w(t, e) {
|
|
30
|
+
if (e)
|
|
29
31
|
return i("update:selectedScopes", {
|
|
30
|
-
scopes: Array.from(/* @__PURE__ */ new Set([...
|
|
32
|
+
scopes: Array.from(/* @__PURE__ */ new Set([...n.selectedScopes, t]))
|
|
31
33
|
});
|
|
32
34
|
i("update:selectedScopes", {
|
|
33
|
-
scopes:
|
|
35
|
+
scopes: n.selectedScopes.filter((o) => o !== t)
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
default: o(() => [
|
|
43
|
-
a("div", R, [
|
|
44
|
-
t[2] || (t[2] = a("div", { class: "text-c-1 h-full items-center" }, null, -1)),
|
|
45
|
-
r(s(z), {
|
|
38
|
+
const D = () => i("update:selectedScopes", { scopes: Object.keys(n.flow?.scopes ?? {}) }), O = () => i("update:selectedScopes", { scopes: [] }), v = E();
|
|
39
|
+
return (t, e) => (a(), p(s(C), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
|
|
40
|
+
default: l(() => [
|
|
41
|
+
r("div", F, [
|
|
42
|
+
e[5] || (e[5] = r("div", { class: "text-c-1 h-full items-center" }, null, -1)),
|
|
43
|
+
c(s(N), {
|
|
46
44
|
as: "div",
|
|
47
45
|
class: "bl flex w-full flex-col"
|
|
48
46
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
51
|
-
class:
|
|
47
|
+
default: l(() => [
|
|
48
|
+
c(s(M), {
|
|
49
|
+
class: j([
|
|
52
50
|
"group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left",
|
|
53
|
-
(
|
|
51
|
+
(t.selectedScopes.length || 0) > 0 ? "text-c-1" : "text-c-3"
|
|
54
52
|
])
|
|
55
53
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
default: l(({ open: o }) => [
|
|
55
|
+
r("div", L, " Scopes Selected " + d(t.selectedScopes.length || 0) + " / " + d(Object.keys(t.flow?.scopes ?? {}).length || 0), 1),
|
|
56
|
+
r("div", _, [
|
|
57
|
+
c(s(S), {
|
|
58
|
+
class: "pr-0.75 pl-1 transition-none",
|
|
59
|
+
size: "sm",
|
|
60
|
+
variant: "ghost",
|
|
61
|
+
onClick: e[0] || (e[0] = m((g) => s(v).show(), ["stop"]))
|
|
62
|
+
}, {
|
|
63
|
+
default: l(() => [...e[2] || (e[2] = [
|
|
64
|
+
f(" Add Scope ", -1)
|
|
65
|
+
])]),
|
|
66
|
+
_: 1
|
|
67
|
+
}),
|
|
68
|
+
h.value ? (a(), p(s(S), {
|
|
60
69
|
key: 0,
|
|
61
70
|
class: "pr-0.75 pl-1 transition-none",
|
|
62
71
|
size: "sm",
|
|
63
72
|
variant: "ghost",
|
|
64
|
-
onClick:
|
|
73
|
+
onClick: m(O, ["stop"])
|
|
65
74
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
75
|
+
default: l(() => [...e[3] || (e[3] = [
|
|
76
|
+
f(" Deselect All ", -1)
|
|
68
77
|
])]),
|
|
69
78
|
_: 1
|
|
70
79
|
})) : u("", !0),
|
|
71
|
-
|
|
80
|
+
h.value ? u("", !0) : (a(), p(s(S), {
|
|
72
81
|
key: 1,
|
|
73
82
|
class: "pr-0.75 pl-1 transition-none",
|
|
74
83
|
size: "sm",
|
|
75
84
|
variant: "ghost",
|
|
76
|
-
onClick:
|
|
85
|
+
onClick: m(D, ["stop"])
|
|
77
86
|
}, {
|
|
78
|
-
default:
|
|
79
|
-
|
|
87
|
+
default: l(() => [...e[4] || (e[4] = [
|
|
88
|
+
f(" Select All ", -1)
|
|
80
89
|
])]),
|
|
81
90
|
_: 1
|
|
82
91
|
})),
|
|
83
|
-
|
|
92
|
+
c(s(I), {
|
|
84
93
|
class: "text-c-3 group-hover/scopes-accordion:text-c-2",
|
|
85
|
-
icon:
|
|
94
|
+
icon: o ? "ChevronDown" : "ChevronRight",
|
|
86
95
|
size: "md"
|
|
87
96
|
}, null, 8, ["icon"])
|
|
88
97
|
])
|
|
89
98
|
]),
|
|
90
99
|
_: 1
|
|
91
100
|
}, 8, ["class"]),
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
|
|
95
|
-
(
|
|
96
|
-
key:
|
|
101
|
+
c(s($), { as: "template" }, {
|
|
102
|
+
default: l(() => [
|
|
103
|
+
r("table", q, [
|
|
104
|
+
(a(!0), b(z, null, B(V.value, ({ id: o, label: g, description: x }) => (a(), p(s(R), {
|
|
105
|
+
key: o,
|
|
97
106
|
class: "text-c-2",
|
|
98
|
-
onClick: (
|
|
107
|
+
onClick: (k) => w(o, !t.selectedScopes.includes(o))
|
|
99
108
|
}, {
|
|
100
|
-
default:
|
|
101
|
-
|
|
102
|
-
default:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
m(" – " + p(h), 1)
|
|
106
|
-
])) : u("", !0)
|
|
109
|
+
default: l(() => [
|
|
110
|
+
c(s(C), { class: "hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5" }, {
|
|
111
|
+
default: l(() => [
|
|
112
|
+
r("span", G, d(g), 1),
|
|
113
|
+
x ? (a(), b("span", H, " – " + d(x), 1)) : u("", !0)
|
|
107
114
|
]),
|
|
108
115
|
_: 2
|
|
109
116
|
}, 1024),
|
|
110
|
-
|
|
111
|
-
modelValue:
|
|
112
|
-
"onUpdate:modelValue": (
|
|
117
|
+
c(s(U), {
|
|
118
|
+
modelValue: t.selectedScopes.includes(o),
|
|
119
|
+
"onUpdate:modelValue": (k) => w(o, k)
|
|
113
120
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
114
121
|
]),
|
|
115
122
|
_: 2
|
|
@@ -121,12 +128,20 @@ const R = { class: "flex h-fit w-full" }, U = { class: "flex-1" }, F = { class:
|
|
|
121
128
|
]),
|
|
122
129
|
_: 1
|
|
123
130
|
})
|
|
124
|
-
])
|
|
131
|
+
]),
|
|
132
|
+
c(P, {
|
|
133
|
+
scopes: Object.keys(t.flow.scopes ?? {}),
|
|
134
|
+
state: s(v),
|
|
135
|
+
onSubmit: e[1] || (e[1] = (o) => i("update:selectedScopes", {
|
|
136
|
+
scopes: t.selectedScopes,
|
|
137
|
+
newScopePayload: { ...o, flowType: t.flowType }
|
|
138
|
+
}))
|
|
139
|
+
}, null, 8, ["scopes", "state"])
|
|
125
140
|
]),
|
|
126
141
|
_: 1
|
|
127
142
|
}));
|
|
128
143
|
}
|
|
129
144
|
});
|
|
130
145
|
export {
|
|
131
|
-
|
|
146
|
+
ee as default
|
|
132
147
|
};
|
|
@@ -14,6 +14,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
14
14
|
id: string[];
|
|
15
15
|
name: string;
|
|
16
16
|
scopes: string[];
|
|
17
|
+
newScopePayload?: {
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
flowType: keyof import("@scalar/workspace-store/schemas/v3.1/strict/oauthflows").OAuthFlowsObject;
|
|
21
|
+
};
|
|
17
22
|
meta: import("@scalar/workspace-store/mutators").AuthMeta;
|
|
18
23
|
}, "meta">) => any;
|
|
19
24
|
"update:securityScheme": (payload: ({
|
|
@@ -40,7 +45,6 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
40
45
|
[x: string]: string | undefined;
|
|
41
46
|
} | undefined;
|
|
42
47
|
'x-tokenName'?: string | undefined;
|
|
43
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
44
48
|
authorizationUrl?: string | undefined;
|
|
45
49
|
'x-scalar-secret-redirect-uri'?: string | undefined;
|
|
46
50
|
} | undefined;
|
|
@@ -58,11 +62,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
58
62
|
[x: string]: string | undefined;
|
|
59
63
|
} | undefined;
|
|
60
64
|
'x-tokenName'?: string | undefined;
|
|
61
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
62
65
|
tokenUrl?: string | undefined;
|
|
63
66
|
'x-scalar-secret-username'?: string | undefined;
|
|
64
67
|
'x-scalar-secret-password'?: string | undefined;
|
|
65
68
|
'x-scalar-secret-client-secret'?: string | undefined;
|
|
69
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
66
70
|
} | undefined;
|
|
67
71
|
clientCredentials?: {
|
|
68
72
|
refreshUrl?: string | undefined;
|
|
@@ -78,9 +82,9 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
78
82
|
[x: string]: string | undefined;
|
|
79
83
|
} | undefined;
|
|
80
84
|
'x-tokenName'?: string | undefined;
|
|
81
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
82
85
|
tokenUrl?: string | undefined;
|
|
83
86
|
'x-scalar-secret-client-secret'?: string | undefined;
|
|
87
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
84
88
|
} | undefined;
|
|
85
89
|
authorizationCode?: {
|
|
86
90
|
refreshUrl?: string | undefined;
|
|
@@ -96,12 +100,12 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
96
100
|
[x: string]: string | undefined;
|
|
97
101
|
} | undefined;
|
|
98
102
|
'x-tokenName'?: string | undefined;
|
|
99
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
100
103
|
authorizationUrl?: string | undefined;
|
|
101
104
|
tokenUrl?: string | undefined;
|
|
102
105
|
'x-scalar-secret-client-secret'?: string | undefined;
|
|
103
106
|
'x-scalar-secret-redirect-uri'?: string | undefined;
|
|
104
107
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
108
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
105
109
|
} | undefined;
|
|
106
110
|
} | undefined;
|
|
107
111
|
})) => any;
|
|
@@ -110,6 +114,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
110
114
|
id: string[];
|
|
111
115
|
name: string;
|
|
112
116
|
scopes: string[];
|
|
117
|
+
newScopePayload?: {
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
flowType: keyof import("@scalar/workspace-store/schemas/v3.1/strict/oauthflows").OAuthFlowsObject;
|
|
121
|
+
};
|
|
113
122
|
meta: import("@scalar/workspace-store/mutators").AuthMeta;
|
|
114
123
|
}, "meta">) => any) | undefined;
|
|
115
124
|
"onUpdate:securityScheme"?: ((payload: ({
|
|
@@ -136,7 +145,6 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
136
145
|
[x: string]: string | undefined;
|
|
137
146
|
} | undefined;
|
|
138
147
|
'x-tokenName'?: string | undefined;
|
|
139
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
140
148
|
authorizationUrl?: string | undefined;
|
|
141
149
|
'x-scalar-secret-redirect-uri'?: string | undefined;
|
|
142
150
|
} | undefined;
|
|
@@ -154,11 +162,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
154
162
|
[x: string]: string | undefined;
|
|
155
163
|
} | undefined;
|
|
156
164
|
'x-tokenName'?: string | undefined;
|
|
157
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
158
165
|
tokenUrl?: string | undefined;
|
|
159
166
|
'x-scalar-secret-username'?: string | undefined;
|
|
160
167
|
'x-scalar-secret-password'?: string | undefined;
|
|
161
168
|
'x-scalar-secret-client-secret'?: string | undefined;
|
|
169
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
162
170
|
} | undefined;
|
|
163
171
|
clientCredentials?: {
|
|
164
172
|
refreshUrl?: string | undefined;
|
|
@@ -174,9 +182,9 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
174
182
|
[x: string]: string | undefined;
|
|
175
183
|
} | undefined;
|
|
176
184
|
'x-tokenName'?: string | undefined;
|
|
177
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
178
185
|
tokenUrl?: string | undefined;
|
|
179
186
|
'x-scalar-secret-client-secret'?: string | undefined;
|
|
187
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
180
188
|
} | undefined;
|
|
181
189
|
authorizationCode?: {
|
|
182
190
|
refreshUrl?: string | undefined;
|
|
@@ -192,12 +200,12 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
192
200
|
[x: string]: string | undefined;
|
|
193
201
|
} | undefined;
|
|
194
202
|
'x-tokenName'?: string | undefined;
|
|
195
|
-
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
196
203
|
authorizationUrl?: string | undefined;
|
|
197
204
|
tokenUrl?: string | undefined;
|
|
198
205
|
'x-scalar-secret-client-secret'?: string | undefined;
|
|
199
206
|
'x-scalar-secret-redirect-uri'?: string | undefined;
|
|
200
207
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
208
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
201
209
|
} | undefined;
|
|
202
210
|
} | undefined;
|
|
203
211
|
})) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"AAmTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,yBAAyB,EAEzB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,uBAAuB,EAAE,yBAAyB,CAAA;IAClD,eAAe,EAAE,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAA;IACjE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"AAmTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,yBAAyB,EAEzB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,uBAAuB,EAAE,yBAAyB,CAAA;IAClD,eAAe,EAAE,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAA;IACjE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmiBF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OAuthFlowsObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
2
|
import type { ErrorResponse } from '../../../../libs/errors.js';
|
|
3
3
|
/** Oauth2 security schemes which are not implicit */
|
|
4
|
-
type
|
|
4
|
+
type NonImplicitFlows = Omit<OAuthFlowsObject, 'implicit'>;
|
|
5
5
|
type PKCEState = {
|
|
6
6
|
codeVerifier: string;
|
|
7
7
|
codeChallenge: string;
|
|
@@ -25,7 +25,7 @@ proxyUrl: string) => Promise<ErrorResponse<string>>;
|
|
|
25
25
|
* Makes the BE authorization call to grab the token server to server
|
|
26
26
|
* Used for clientCredentials and authorizationCode
|
|
27
27
|
*/
|
|
28
|
-
export declare const authorizeServers: (flows:
|
|
28
|
+
export declare const authorizeServers: (flows: NonImplicitFlows, type: keyof NonImplicitFlows, scopes: string, { code, pkce, proxyUrl, }: {
|
|
29
29
|
code?: string;
|
|
30
30
|
pkce?: PKCEState | null;
|
|
31
31
|
proxyUrl?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGlH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAGlH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,qDAAqD;AACrD,KAAK,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAE1D,KAAK,SAAS,GAAG;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,UAAU,MAAM,EAAE,UAAU,SAAS,GAAG,OAAO,KAAG,OAAO,CAAC,MAAM,CAkB3G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,gBAAgB,EACvB,MAAM,MAAM,gBAAgB,EAC5B,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,IAAI;AACjC,kCAAkC;AAClC,UAAU,MAAM,KACf,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAiL/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,gBAAgB,EACvB,MAAM,MAAM,gBAAgB,EAC5B,QAAQ,MAAM,EACd,2BAIG;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,YAAK,EACN,cAAc,YAAY,GAAG,IAAI,KAChC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAwF/B,CAAA"}
|