@scalar/api-client 2.34.1 → 2.36.1
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 +88 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +88 -80
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +28 -27
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +6 -4
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts +16 -0
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +17 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +90 -84
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +47 -42
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +76 -50
- 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 +65 -59
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +57 -42
- 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 +44 -41
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +50 -44
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +41 -35
- package/dist/v2/features/app/app-events.d.ts +5 -2
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +58 -44
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +82 -80
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
- package/dist/v2/features/app/components/AppSidebar.vue2.js +78 -76
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +34 -30
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +73 -45
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +20 -20
- package/dist/v2/features/collection/OperationCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.js +7 -7
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +5 -4
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
- package/dist/v2/features/collection/components/Authentication.vue2.js +84 -66
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
- package/dist/v2/features/collection/components/LabelInput.vue2.js +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +5 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +131 -96
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +25 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +42 -36
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +8 -5
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +44 -45
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +19 -19
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarDropdown as
|
|
3
|
-
const
|
|
4
|
-
key:
|
|
1
|
+
import { defineComponent as j, computed as o, createElementBlock as p, openBlock as s, createVNode as a, unref as e, withCtx as l, normalizeClass as x, createElementVNode as t, toDisplayString as h, createBlock as u, createCommentVNode as v, withModifiers as C, Fragment as B, renderList as I } from "vue";
|
|
2
|
+
import { ScalarDropdown as $, ScalarButton as N, ScalarIcon as m, ScalarDropdownItem as b, ScalarDropdownDivider as k } from "@scalar/components";
|
|
3
|
+
const V = { class: "relative flex items-center" }, L = { class: "flex max-w-[220px] min-w-0 items-center gap-1.5" }, M = { class: "text-xxs block max-w-[160px] min-w-0 truncate text-left font-medium" }, U = { class: "min-w-0 flex-1 truncate" }, _ = { class: "bg-c-accent text-b-1 mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full p-[3px]" }, F = { class: "min-w-0 flex-1 text-left" }, G = { class: "block truncate" }, O = { class: "flex h-4 w-4 items-center justify-center" }, P = {
|
|
4
|
+
key: 5,
|
|
5
5
|
class: "text-c-3 px-2 py-1.5 text-xs"
|
|
6
|
-
},
|
|
6
|
+
}, H = /* @__PURE__ */ j({
|
|
7
7
|
__name: "EnvironmentSelector",
|
|
8
8
|
props: {
|
|
9
9
|
environments: { default: () => [] },
|
|
10
10
|
activeEnvironment: {}
|
|
11
11
|
},
|
|
12
12
|
emits: ["select:environment", "add:environment"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
13
|
+
setup(n, { emit: S }) {
|
|
14
|
+
const w = S, r = o(() => !!n.activeEnvironment), c = o(() => n.environments.length > 0), z = o(() => n.activeEnvironment ? n.environments.includes(n.activeEnvironment) : !1), d = o(
|
|
15
|
+
() => r.value && !z.value
|
|
16
|
+
), E = o(() => d.value ? `${n.activeEnvironment} (Unavailable)` : r.value ? n.activeEnvironment : c.value ? "Select Environment" : "Add Environment"), A = o(() => d.value ? "hover:bg-b-2 text-c-2 border-transparent" : r.value ? "bg-c-accent/10 text-c-accent hover:bg-c-accent/20 border-c-accent/30" : c.value ? "hover:bg-b-2 text-c-2 border-transparent" : "hover:bg-b-2 text-c-3 border-transparent"), D = () => {
|
|
17
|
+
w("add:environment");
|
|
18
|
+
}, g = (y) => {
|
|
19
|
+
w("select:environment", y);
|
|
18
20
|
};
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
items:
|
|
22
|
-
|
|
21
|
+
return (y, i) => (s(), p("div", V, [
|
|
22
|
+
a(e($), null, {
|
|
23
|
+
items: l(() => [
|
|
24
|
+
r.value ? (s(), u(e(b), {
|
|
23
25
|
key: 0,
|
|
24
26
|
class: "group/item flex w-full items-center gap-1.5",
|
|
25
|
-
onClick: i[0] || (i[0] =
|
|
27
|
+
onClick: i[0] || (i[0] = C((f) => g(""), ["stop"]))
|
|
26
28
|
}, {
|
|
27
|
-
default:
|
|
29
|
+
default: l(() => [
|
|
28
30
|
t("div", {
|
|
29
|
-
class:
|
|
31
|
+
class: x([
|
|
30
32
|
"flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
|
|
31
|
-
|
|
33
|
+
n.activeEnvironment ? "shadow-border text-transparent" : "bg-c-accent text-b-1"
|
|
32
34
|
])
|
|
33
35
|
}, [
|
|
34
|
-
|
|
36
|
+
a(e(m), {
|
|
35
37
|
class: "size-2.5",
|
|
36
38
|
icon: "Checkmark",
|
|
37
39
|
thickness: "3"
|
|
@@ -40,66 +42,90 @@ const I = { class: "relative flex items-center" }, V = { class: "flex items-cent
|
|
|
40
42
|
i[1] || (i[1] = t("span", { class: "text-c-2" }, "No Environment", -1))
|
|
41
43
|
]),
|
|
42
44
|
_: 1
|
|
43
|
-
})) :
|
|
44
|
-
|
|
45
|
-
(s(!0),
|
|
46
|
-
key:
|
|
47
|
-
class: "group/item flex w-full items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
48
|
-
onClick:
|
|
45
|
+
})) : v("", !0),
|
|
46
|
+
r.value && c.value ? (s(), u(e(k), { key: 1 })) : v("", !0),
|
|
47
|
+
(s(!0), p(B, null, I(n.environments, (f) => (s(), u(e(b), {
|
|
48
|
+
key: f,
|
|
49
|
+
class: "group/item flex w-full min-w-0 items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
50
|
+
onClick: C((R) => g(f), ["stop"])
|
|
49
51
|
}, {
|
|
50
|
-
default:
|
|
52
|
+
default: l(() => [
|
|
51
53
|
t("div", {
|
|
52
|
-
class:
|
|
54
|
+
class: x([
|
|
53
55
|
"flex h-4 w-4 items-center justify-center rounded-full p-[3px]",
|
|
54
|
-
|
|
56
|
+
n.activeEnvironment === f ? "bg-c-accent text-b-1" : "shadow-border text-transparent"
|
|
55
57
|
])
|
|
56
58
|
}, [
|
|
57
|
-
|
|
59
|
+
a(e(m), {
|
|
58
60
|
class: "size-2.5",
|
|
59
61
|
icon: "Checkmark",
|
|
60
62
|
thickness: "3"
|
|
61
63
|
})
|
|
62
64
|
], 2),
|
|
63
|
-
t("span",
|
|
65
|
+
t("span", U, h(f), 1)
|
|
64
66
|
]),
|
|
65
67
|
_: 2
|
|
66
68
|
}, 1032, ["onClick"]))), 128)),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
d.value ? (s(), u(e(k), { key: 2 })) : v("", !0),
|
|
70
|
+
d.value ? (s(), u(e(b), {
|
|
71
|
+
key: 3,
|
|
72
|
+
class: "group/item flex h-auto w-full min-w-0 items-start gap-1.5 overflow-hidden",
|
|
73
|
+
disabled: ""
|
|
74
|
+
}, {
|
|
75
|
+
default: l(() => [
|
|
76
|
+
t("div", _, [
|
|
77
|
+
a(e(m), {
|
|
78
|
+
class: "size-2.5",
|
|
79
|
+
icon: "Checkmark",
|
|
80
|
+
thickness: "3"
|
|
81
|
+
})
|
|
82
|
+
]),
|
|
83
|
+
t("div", F, [
|
|
84
|
+
t("span", G, h(n.activeEnvironment), 1),
|
|
85
|
+
i[2] || (i[2] = t("span", { class: "text-c-3 block truncate text-xs" }, " Not available in this context ", -1))
|
|
86
|
+
])
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
})) : v("", !0),
|
|
90
|
+
c.value ? (s(), u(e(k), { key: 4 })) : v("", !0),
|
|
91
|
+
a(e(b), {
|
|
69
92
|
class: "text-c-accent flex items-center gap-1.5",
|
|
70
|
-
onClick:
|
|
93
|
+
onClick: D
|
|
71
94
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
t("div",
|
|
74
|
-
|
|
95
|
+
default: l(() => [
|
|
96
|
+
t("div", O, [
|
|
97
|
+
a(e(m), {
|
|
75
98
|
icon: "Add",
|
|
76
99
|
size: "sm"
|
|
77
100
|
})
|
|
78
101
|
]),
|
|
79
|
-
t("span", null,
|
|
102
|
+
t("span", null, h(c.value ? "New Environment" : "Create Environment"), 1)
|
|
80
103
|
]),
|
|
81
104
|
_: 1
|
|
82
105
|
}),
|
|
83
|
-
!
|
|
106
|
+
!c.value && !r.value ? (s(), p("div", P, [...i[3] || (i[3] = [
|
|
84
107
|
t("p", { class: "mb-1" }, " Environments let you manage variables like API keys and base URLs across different contexts. ", -1)
|
|
85
|
-
])])) :
|
|
108
|
+
])])) : v("", !0)
|
|
86
109
|
]),
|
|
87
|
-
default:
|
|
88
|
-
|
|
89
|
-
"aria-label": `Current environment: ${
|
|
90
|
-
class:
|
|
110
|
+
default: l(() => [
|
|
111
|
+
a(e(N), {
|
|
112
|
+
"aria-label": `Current environment: ${E.value}`,
|
|
113
|
+
class: x(["line-clamp-1 h-full w-fit justify-start border px-2 py-1 font-normal transition-colors", A.value]),
|
|
91
114
|
size: "sm",
|
|
92
115
|
variant: "ghost"
|
|
93
116
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
t("div",
|
|
96
|
-
|
|
97
|
-
class:
|
|
117
|
+
default: l(() => [
|
|
118
|
+
t("div", L, [
|
|
119
|
+
a(e(m), {
|
|
120
|
+
class: x([
|
|
121
|
+
"shrink-0",
|
|
122
|
+
r.value && !d.value ? "text-c-accent" : "text-c-3"
|
|
123
|
+
]),
|
|
98
124
|
icon: "Globe",
|
|
99
125
|
size: "sm"
|
|
100
126
|
}, null, 8, ["class"]),
|
|
101
|
-
t("span",
|
|
102
|
-
|
|
127
|
+
t("span", M, h(E.value), 1),
|
|
128
|
+
a(e(m), {
|
|
103
129
|
class: "shrink-0",
|
|
104
130
|
icon: "ChevronDown",
|
|
105
131
|
size: "xs"
|
|
@@ -115,5 +141,5 @@ const I = { class: "relative flex items-center" }, V = { class: "flex items-cent
|
|
|
115
141
|
}
|
|
116
142
|
});
|
|
117
143
|
export {
|
|
118
|
-
|
|
144
|
+
H as default
|
|
119
145
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"AAwZA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAO,KAAK,EAEV,YAAY,EACb,MAAM,8DAA8D,CAAA;AAOrE,OAAO,KAAK,EAIV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,6DAA6D,CAAA;AAIpE,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,kBAAkB;IAClB,KAAK,EAAE,sBAAsB,CAAA;IAC7B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,sBAAsB,CAAA;IAClC,sBAAsB;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,sBAAsB;IACtB,MAAM,EAAE,0BAA0B,CAAA;IAClC,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AAmwBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O, computed as C, ref as P, watch as R, createElementBlock as k, openBlock as m, Fragment as p, createVNode as r, unref as o, withCtx as l, createTextVNode as
|
|
1
|
+
import { defineComponent as O, computed as C, ref as P, watch as R, createElementBlock as k, openBlock as m, Fragment as p, createVNode as r, unref as o, withCtx as l, createTextVNode as u, createElementVNode as S, createBlock as v, createCommentVNode as f } from "vue";
|
|
2
2
|
import { useLoadingState as I, ScalarButton as V } from "@scalar/components";
|
|
3
3
|
import { pkceOptions as L } from "@scalar/oas-utils/entities/spec";
|
|
4
4
|
import { useToasts as F } from "@scalar/use-toasts";
|
|
@@ -7,7 +7,7 @@ import E from "./OAuthScopesInput.vue.js";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { authorizeOauth2 as N } from "../helpers/oauth.js";
|
|
9
9
|
import c from "./RequestAuthDataTableInput.vue.js";
|
|
10
|
-
import
|
|
10
|
+
import i from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
11
11
|
const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { class: "flex h-8 w-full items-center justify-end border-t" }, J = /* @__PURE__ */ O({
|
|
12
12
|
__name: "OAuth2",
|
|
13
13
|
props: {
|
|
@@ -23,11 +23,11 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { c
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:selectedScopes"],
|
|
25
25
|
setup(t, { emit: T }) {
|
|
26
|
-
const g = T,
|
|
26
|
+
const g = T, x = I(), { toast: B } = F(), n = C(() => t.flows[t.type]), w = C(
|
|
27
27
|
() => t.selectedScopes.filter((s) => s in (n.value.scopes ?? {}))
|
|
28
|
-
),
|
|
28
|
+
), y = (s) => {
|
|
29
29
|
if (t.scheme.type === "openIdConnect")
|
|
30
|
-
return
|
|
30
|
+
return d(s);
|
|
31
31
|
t.eventBus.emit("auth:update:security-scheme", {
|
|
32
32
|
payload: {
|
|
33
33
|
type: t.scheme.type,
|
|
@@ -37,45 +37,45 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { c
|
|
|
37
37
|
},
|
|
38
38
|
name: t.name
|
|
39
39
|
});
|
|
40
|
-
},
|
|
40
|
+
}, d = (s) => t.eventBus.emit("auth:update:security-scheme-secrets", {
|
|
41
41
|
payload: {
|
|
42
42
|
type: t.scheme.type,
|
|
43
43
|
[t.type]: s
|
|
44
44
|
},
|
|
45
45
|
name: t.name
|
|
46
|
-
}),
|
|
46
|
+
}), b = () => t.eventBus.emit("auth:clear:security-scheme-secrets", {
|
|
47
47
|
name: t.name
|
|
48
|
-
}),
|
|
48
|
+
}), U = P(!1);
|
|
49
49
|
R(
|
|
50
50
|
() => n.value["x-scalar-secret-redirect-uri"],
|
|
51
51
|
(s) => {
|
|
52
|
-
|
|
52
|
+
U.value || s || typeof window > "u" || !("x-scalar-secret-redirect-uri" in n.value) || (U.value = !0, d({
|
|
53
53
|
"x-scalar-secret-redirect-uri": window.location.origin + window.location.pathname
|
|
54
54
|
}));
|
|
55
55
|
},
|
|
56
56
|
{ immediate: !0 }
|
|
57
57
|
);
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
58
|
+
const z = async () => {
|
|
59
|
+
if (x.isLoading)
|
|
60
60
|
return;
|
|
61
|
-
|
|
61
|
+
x.start();
|
|
62
62
|
const [s, e] = await N(
|
|
63
63
|
t.flows,
|
|
64
64
|
t.type,
|
|
65
|
-
|
|
65
|
+
w.value,
|
|
66
66
|
t.server,
|
|
67
67
|
t.proxyUrl,
|
|
68
68
|
A(t.environment)
|
|
69
69
|
);
|
|
70
|
-
await
|
|
70
|
+
await x.clear(), e?.accessToken ? d({
|
|
71
71
|
"x-scalar-secret-token": e.accessToken,
|
|
72
72
|
...e.refreshToken ? { "x-scalar-secret-refresh-token": e.refreshToken } : {}
|
|
73
|
-
}) : (console.error(s),
|
|
74
|
-
}, h = (s) =>
|
|
73
|
+
}) : (console.error(s), B(s?.message ?? "Failed to authorize", "error"));
|
|
74
|
+
}, h = (s) => y({
|
|
75
75
|
"x-scalar-credentials-location": s === "body" ? "body" : "header"
|
|
76
76
|
});
|
|
77
77
|
return (s, e) => n.value["x-scalar-secret-token"] ? (m(), k(p, { key: 0 }, [
|
|
78
|
-
r(o(
|
|
78
|
+
r(o(i), null, {
|
|
79
79
|
default: l(() => [
|
|
80
80
|
r(c, {
|
|
81
81
|
class: "border-r-transparent",
|
|
@@ -83,31 +83,31 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { c
|
|
|
83
83
|
modelValue: n.value["x-scalar-secret-token"],
|
|
84
84
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
85
85
|
type: "password",
|
|
86
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) =>
|
|
86
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => d({ "x-scalar-secret-token": a }))
|
|
87
87
|
}, {
|
|
88
88
|
default: l(() => [...e[12] || (e[12] = [
|
|
89
|
-
|
|
89
|
+
u(" Access Token ", -1)
|
|
90
90
|
])]),
|
|
91
91
|
_: 1
|
|
92
92
|
}, 8, ["environment", "modelValue"])
|
|
93
93
|
]),
|
|
94
94
|
_: 1
|
|
95
95
|
}),
|
|
96
|
-
r(o(
|
|
96
|
+
r(o(i), { class: "min-w-full" }, {
|
|
97
97
|
default: l(() => [
|
|
98
98
|
S("div", j, [
|
|
99
99
|
r(o(V), {
|
|
100
100
|
class: "mr-1 p-0 px-2 py-0.5",
|
|
101
|
-
loader: o(
|
|
101
|
+
loader: o(x),
|
|
102
102
|
size: "sm",
|
|
103
103
|
variant: "outlined",
|
|
104
|
-
onClick: e[1] || (e[1] = () =>
|
|
104
|
+
onClick: e[1] || (e[1] = () => d({
|
|
105
105
|
"x-scalar-secret-token": "",
|
|
106
106
|
"x-scalar-secret-refresh-token": ""
|
|
107
107
|
}))
|
|
108
108
|
}, {
|
|
109
109
|
default: l(() => [...e[13] || (e[13] = [
|
|
110
|
-
|
|
110
|
+
u(" Clear ", -1)
|
|
111
111
|
])]),
|
|
112
112
|
_: 1
|
|
113
113
|
}, 8, ["loader"])
|
|
@@ -116,46 +116,52 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { c
|
|
|
116
116
|
_: 1
|
|
117
117
|
})
|
|
118
118
|
], 64)) : (m(), k(p, { key: 1 }, [
|
|
119
|
-
r(o(
|
|
119
|
+
r(o(i), null, {
|
|
120
120
|
default: l(() => [
|
|
121
121
|
"authorizationUrl" in n.value ? (m(), v(c, {
|
|
122
122
|
key: 0,
|
|
123
123
|
containerClass: "border-r-0",
|
|
124
124
|
environment: t.environment,
|
|
125
|
-
modelValue: n.value
|
|
125
|
+
modelValue: n.value["x-scalar-secret-auth-url"] ?? "",
|
|
126
126
|
placeholder: "https://galaxy.scalar.com/authorize",
|
|
127
|
-
"onUpdate:modelValue": e[2] || (e[2] = (a) =>
|
|
127
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => {
|
|
128
|
+
d({ "x-scalar-secret-auth-url": a }), y({ authorizationUrl: a });
|
|
129
|
+
})
|
|
128
130
|
}, {
|
|
129
131
|
default: l(() => [...e[14] || (e[14] = [
|
|
130
|
-
|
|
132
|
+
u(" Auth URL ", -1)
|
|
131
133
|
])]),
|
|
132
134
|
_: 1
|
|
133
135
|
}, 8, ["environment", "modelValue"])) : f("", !0),
|
|
134
136
|
"tokenUrl" in n.value ? (m(), v(c, {
|
|
135
137
|
key: 1,
|
|
136
138
|
environment: t.environment,
|
|
137
|
-
modelValue: n.value
|
|
139
|
+
modelValue: n.value["x-scalar-secret-token-url"] ?? "",
|
|
138
140
|
placeholder: "https://galaxy.scalar.com/token",
|
|
139
|
-
"onUpdate:modelValue": e[3] || (e[3] = (a) =>
|
|
141
|
+
"onUpdate:modelValue": e[3] || (e[3] = (a) => {
|
|
142
|
+
d({ "x-scalar-secret-token-url": a }), y({ tokenUrl: a });
|
|
143
|
+
})
|
|
140
144
|
}, {
|
|
141
145
|
default: l(() => [...e[15] || (e[15] = [
|
|
142
|
-
|
|
146
|
+
u(" Token URL ", -1)
|
|
143
147
|
])]),
|
|
144
148
|
_: 1
|
|
145
149
|
}, 8, ["environment", "modelValue"])) : f("", !0)
|
|
146
150
|
]),
|
|
147
151
|
_: 1
|
|
148
152
|
}),
|
|
149
|
-
"x-scalar-secret-redirect-uri" in n.value ? (m(), v(o(
|
|
153
|
+
"x-scalar-secret-redirect-uri" in n.value ? (m(), v(o(i), { key: 0 }, {
|
|
150
154
|
default: l(() => [
|
|
151
155
|
r(c, {
|
|
152
156
|
environment: t.environment,
|
|
153
157
|
modelValue: n.value["x-scalar-secret-redirect-uri"],
|
|
154
158
|
placeholder: "https://galaxy.scalar.com/callback",
|
|
155
|
-
"onUpdate:modelValue": e[4] || (e[4] = (a) =>
|
|
159
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => {
|
|
160
|
+
d({ "x-scalar-secret-redirect-uri": a });
|
|
161
|
+
})
|
|
156
162
|
}, {
|
|
157
163
|
default: l(() => [...e[16] || (e[16] = [
|
|
158
|
-
|
|
164
|
+
u(" Redirect URL ", -1)
|
|
159
165
|
])]),
|
|
160
166
|
_: 1
|
|
161
167
|
}, 8, ["environment", "modelValue"])
|
|
@@ -163,34 +169,34 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { c
|
|
|
163
169
|
_: 1
|
|
164
170
|
})) : f("", !0),
|
|
165
171
|
"x-scalar-secret-username" in n.value && "x-scalar-secret-password" in n.value ? (m(), k(p, { key: 1 }, [
|
|
166
|
-
r(o(
|
|
172
|
+
r(o(i), null, {
|
|
167
173
|
default: l(() => [
|
|
168
174
|
r(c, {
|
|
169
175
|
class: "text-c-2",
|
|
170
176
|
environment: t.environment,
|
|
171
177
|
modelValue: n.value["x-scalar-secret-username"],
|
|
172
178
|
placeholder: "janedoe",
|
|
173
|
-
"onUpdate:modelValue": e[5] || (e[5] = (a) =>
|
|
179
|
+
"onUpdate:modelValue": e[5] || (e[5] = (a) => d({ "x-scalar-secret-username": a }))
|
|
174
180
|
}, {
|
|
175
181
|
default: l(() => [...e[17] || (e[17] = [
|
|
176
|
-
|
|
182
|
+
u(" Username ", -1)
|
|
177
183
|
])]),
|
|
178
184
|
_: 1
|
|
179
185
|
}, 8, ["environment", "modelValue"])
|
|
180
186
|
]),
|
|
181
187
|
_: 1
|
|
182
188
|
}),
|
|
183
|
-
r(o(
|
|
189
|
+
r(o(i), null, {
|
|
184
190
|
default: l(() => [
|
|
185
191
|
r(c, {
|
|
186
192
|
environment: t.environment,
|
|
187
193
|
modelValue: n.value["x-scalar-secret-password"],
|
|
188
194
|
placeholder: "********",
|
|
189
195
|
type: "password",
|
|
190
|
-
"onUpdate:modelValue": e[6] || (e[6] = (a) =>
|
|
196
|
+
"onUpdate:modelValue": e[6] || (e[6] = (a) => d({ "x-scalar-secret-password": a }))
|
|
191
197
|
}, {
|
|
192
198
|
default: l(() => [...e[18] || (e[18] = [
|
|
193
|
-
|
|
199
|
+
u(" Password ", -1)
|
|
194
200
|
])]),
|
|
195
201
|
_: 1
|
|
196
202
|
}, 8, ["environment", "modelValue"])
|
|
@@ -198,59 +204,59 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { c
|
|
|
198
204
|
_: 1
|
|
199
205
|
})
|
|
200
206
|
], 64)) : f("", !0),
|
|
201
|
-
r(o(
|
|
207
|
+
r(o(i), null, {
|
|
202
208
|
default: l(() => [
|
|
203
209
|
r(c, {
|
|
204
210
|
environment: t.environment,
|
|
205
211
|
modelValue: n.value["x-scalar-secret-client-id"],
|
|
206
212
|
placeholder: "12345",
|
|
207
|
-
"onUpdate:modelValue": e[7] || (e[7] = (a) =>
|
|
213
|
+
"onUpdate:modelValue": e[7] || (e[7] = (a) => d({ "x-scalar-secret-client-id": a }))
|
|
208
214
|
}, {
|
|
209
215
|
default: l(() => [...e[19] || (e[19] = [
|
|
210
|
-
|
|
216
|
+
u(" Client ID ", -1)
|
|
211
217
|
])]),
|
|
212
218
|
_: 1
|
|
213
219
|
}, 8, ["environment", "modelValue"])
|
|
214
220
|
]),
|
|
215
221
|
_: 1
|
|
216
222
|
}),
|
|
217
|
-
"x-scalar-secret-client-secret" in n.value ? (m(), v(o(
|
|
223
|
+
"x-scalar-secret-client-secret" in n.value ? (m(), v(o(i), { key: 2 }, {
|
|
218
224
|
default: l(() => [
|
|
219
225
|
r(c, {
|
|
220
226
|
environment: t.environment,
|
|
221
227
|
modelValue: n.value["x-scalar-secret-client-secret"],
|
|
222
228
|
placeholder: "XYZ123",
|
|
223
229
|
type: "password",
|
|
224
|
-
"onUpdate:modelValue": e[8] || (e[8] = (a) =>
|
|
230
|
+
"onUpdate:modelValue": e[8] || (e[8] = (a) => d({ "x-scalar-secret-client-secret": a }))
|
|
225
231
|
}, {
|
|
226
232
|
default: l(() => [...e[20] || (e[20] = [
|
|
227
|
-
|
|
233
|
+
u(" Client Secret ", -1)
|
|
228
234
|
])]),
|
|
229
235
|
_: 1
|
|
230
236
|
}, 8, ["environment", "modelValue"])
|
|
231
237
|
]),
|
|
232
238
|
_: 1
|
|
233
239
|
})) : f("", !0),
|
|
234
|
-
"x-usePkce" in n.value ? (m(), v(o(
|
|
240
|
+
"x-usePkce" in n.value ? (m(), v(o(i), { key: 3 }, {
|
|
235
241
|
default: l(() => [
|
|
236
242
|
r(c, {
|
|
237
243
|
enum: o(L),
|
|
238
244
|
environment: t.environment,
|
|
239
245
|
modelValue: n.value["x-usePkce"],
|
|
240
246
|
readOnly: "",
|
|
241
|
-
"onUpdate:modelValue": e[9] || (e[9] = (a) =>
|
|
247
|
+
"onUpdate:modelValue": e[9] || (e[9] = (a) => y({
|
|
242
248
|
"x-usePkce": a
|
|
243
249
|
}))
|
|
244
250
|
}, {
|
|
245
251
|
default: l(() => [...e[21] || (e[21] = [
|
|
246
|
-
|
|
252
|
+
u(" Use PKCE ", -1)
|
|
247
253
|
])]),
|
|
248
254
|
_: 1
|
|
249
255
|
}, 8, ["enum", "environment", "modelValue"])
|
|
250
256
|
]),
|
|
251
257
|
_: 1
|
|
252
258
|
})) : f("", !0),
|
|
253
|
-
t.type !== "implicit" ? (m(), v(o(
|
|
259
|
+
t.type !== "implicit" ? (m(), v(o(i), { key: 4 }, {
|
|
254
260
|
default: l(() => [
|
|
255
261
|
r(c, {
|
|
256
262
|
enum: ["header", "body"],
|
|
@@ -261,49 +267,49 @@ const j = { class: "flex h-8 items-center justify-end gap-2 border-t" }, Q = { c
|
|
|
261
267
|
"onUpdate:modelValue": e[10] || (e[10] = (a) => h(a))
|
|
262
268
|
}, {
|
|
263
269
|
default: l(() => [...e[22] || (e[22] = [
|
|
264
|
-
|
|
270
|
+
u(" Credentials Location ", -1)
|
|
265
271
|
])]),
|
|
266
272
|
_: 1
|
|
267
273
|
}, 8, ["environment", "modelValue"])
|
|
268
274
|
]),
|
|
269
275
|
_: 1
|
|
270
276
|
})) : f("", !0),
|
|
271
|
-
r(o(
|
|
277
|
+
r(o(i), null, {
|
|
272
278
|
default: l(() => [
|
|
273
279
|
r(E, {
|
|
274
280
|
flow: n.value,
|
|
275
281
|
flowType: t.type,
|
|
276
|
-
selectedScopes:
|
|
282
|
+
selectedScopes: w.value,
|
|
277
283
|
"onUpdate:selectedScopes": e[11] || (e[11] = (a) => g("update:selectedScopes", a))
|
|
278
284
|
}, null, 8, ["flow", "flowType", "selectedScopes"])
|
|
279
285
|
]),
|
|
280
286
|
_: 1
|
|
281
287
|
}),
|
|
282
|
-
r(o(
|
|
288
|
+
r(o(i), { class: "min-w-full" }, {
|
|
283
289
|
default: l(() => [
|
|
284
290
|
S("div", Q, [
|
|
285
291
|
t.scheme.type === "openIdConnect" ? (m(), v(o(V), {
|
|
286
292
|
key: 0,
|
|
287
293
|
class: "mr-1 p-0 px-2 py-0.5",
|
|
288
|
-
loader: o(
|
|
294
|
+
loader: o(x),
|
|
289
295
|
size: "sm",
|
|
290
296
|
variant: "outlined",
|
|
291
|
-
onClick:
|
|
297
|
+
onClick: b
|
|
292
298
|
}, {
|
|
293
299
|
default: l(() => [...e[23] || (e[23] = [
|
|
294
|
-
|
|
300
|
+
u(" Clear ", -1)
|
|
295
301
|
])]),
|
|
296
302
|
_: 1
|
|
297
303
|
}, 8, ["loader"])) : f("", !0),
|
|
298
304
|
r(o(V), {
|
|
299
305
|
class: "mr-0.75 p-0 px-2 py-0.5",
|
|
300
|
-
loader: o(
|
|
306
|
+
loader: o(x),
|
|
301
307
|
size: "sm",
|
|
302
308
|
variant: "outlined",
|
|
303
|
-
onClick:
|
|
309
|
+
onClick: z
|
|
304
310
|
}, {
|
|
305
311
|
default: l(() => [...e[24] || (e[24] = [
|
|
306
|
-
|
|
312
|
+
u(" Authorize ", -1)
|
|
307
313
|
])]),
|
|
308
314
|
_: 1
|
|
309
315
|
}, 8, ["loader"])
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAA2C,MAAM,uCAAuC,CAAA;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAOlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG,OAAO,KAAK,EAUV,0BAA0B,EAC3B,MAAM,gBAAgB,CAAA;AAEvB,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"extract-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAA2C,MAAM,uCAAuC,CAAA;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAOlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAA;AAExG,OAAO,KAAK,EAUV,0BAA0B,EAC3B,MAAM,gBAAgB,CAAA;AAEvB,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAA;AAyJjF,6DAA6D;AAC7D,eAAO,MAAM,4BAA4B,GAEvC,QAAQ,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,EAC1D,WAAW,SAAS,EACpB,MAAM,MAAM,EACZ,cAAc,MAAM,KACnB,0BAuDF,CAAA"}
|