@scalar/api-client 2.26.2 → 2.27.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 +72 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/style.css +1 -1
- 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 +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +6 -6
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +62 -69
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +37 -41
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- 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 +107 -87
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- 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 +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +29 -37
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +24 -23
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +5 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +48 -46
- 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 +64 -63
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -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 +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +2 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +13 -12
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -33
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +13 -6
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +18 -17
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { themePresets as y, defaultFonts as S } from "@scalar/themes";
|
|
2
|
+
import { computed as T, toValue as a } from "vue";
|
|
3
|
+
const p = new Map(y.map((e) => [e.slug, e])), l = (e, s = "scalar-theme") => `<style id="scalar-theme" data-testid="${s}">${e}</style>`, o = (e, s) => {
|
|
4
|
+
const r = (t) => `${t}
|
|
5
|
+
${S}`;
|
|
6
|
+
if (p.has(e))
|
|
7
|
+
return r(p.get(e)?.theme ?? "");
|
|
8
|
+
const c = s.find((t) => t.slug === e);
|
|
9
|
+
if (c)
|
|
10
|
+
return r(c.theme);
|
|
11
|
+
}, w = ({
|
|
12
|
+
fallbackThemeSlug: e,
|
|
13
|
+
store: s,
|
|
14
|
+
customThemes: r
|
|
15
|
+
}) => ({
|
|
16
|
+
themeStyleTag: T(() => {
|
|
17
|
+
const t = l(o("default", []), "default"), m = a(s), n = a(e);
|
|
18
|
+
if (m === null)
|
|
19
|
+
return t;
|
|
20
|
+
const f = m.workspace["x-scalar-theme"], u = f === "none" ? n : f;
|
|
21
|
+
if (!u) {
|
|
22
|
+
const i = o(n, a(r));
|
|
23
|
+
return i ? l(i, n) : t;
|
|
24
|
+
}
|
|
25
|
+
const h = o(u, a(r));
|
|
26
|
+
if (h)
|
|
27
|
+
return l(h, u);
|
|
28
|
+
const d = o(n, a(r));
|
|
29
|
+
return d ? l(d, n) : t;
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
w as useTheme
|
|
34
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"AAyJA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"AAyJA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY,gSA4Vd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, computed as p, createElementBlock as c, openBlock as u, createElementVNode as t, createVNode as o, createBlock as f, createCommentVNode as y, withCtx as l, unref as s, resolveDynamicComponent as g, mergeProps as k } from "vue";
|
|
2
2
|
import { ScalarButton as i } from "@scalar/components";
|
|
3
3
|
import { ScalarIconFloppyDisk as b } from "@scalar/icons";
|
|
4
4
|
import { LibraryIcon as w } from "@scalar/icons/library";
|
|
@@ -9,14 +9,14 @@ import V from "./components/LabelInput.vue.js";
|
|
|
9
9
|
import B from "./components/Tabs.vue.js";
|
|
10
10
|
const D = { class: "custom-scroll h-full" }, N = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "w-full md:mx-auto md:max-w-
|
|
13
|
-
}, z = ["aria-label"], I = { class: "flex flex-row items-center gap-2" }, U = { class: "group relative ml-1.25" },
|
|
12
|
+
class: "w-full md:mx-auto md:max-w-180"
|
|
13
|
+
}, z = ["aria-label"], I = { class: "flex flex-row items-center gap-2" }, U = { class: "group relative ml-1.25" }, T = { class: "px-1.5 py-8" }, $ = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "flex w-full flex-1 items-center justify-center"
|
|
16
|
-
},
|
|
16
|
+
}, j = {
|
|
17
17
|
name: "DocumentCollection"
|
|
18
|
-
}, H = /* @__PURE__ */
|
|
19
|
-
...
|
|
18
|
+
}, H = /* @__PURE__ */ h({
|
|
19
|
+
...j,
|
|
20
20
|
props: {
|
|
21
21
|
documentSlug: {},
|
|
22
22
|
document: {},
|
|
@@ -29,21 +29,22 @@ const D = { class: "custom-scroll h-full" }, N = {
|
|
|
29
29
|
securitySchemes: {},
|
|
30
30
|
workspaceStore: {},
|
|
31
31
|
activeWorkspace: {},
|
|
32
|
-
plugins: {}
|
|
32
|
+
plugins: {},
|
|
33
|
+
customThemes: {}
|
|
33
34
|
},
|
|
34
35
|
setup(a) {
|
|
35
36
|
const n = a, m = p(() => n.document?.info?.title || "Untitled Document"), d = p(
|
|
36
37
|
() => n.document?.["x-scalar-icon"] || "interface-content-folder"
|
|
37
|
-
),
|
|
38
|
+
), v = () => {
|
|
38
39
|
n.workspaceStore.revertDocumentChanges(n.documentSlug);
|
|
39
|
-
},
|
|
40
|
+
}, x = () => {
|
|
40
41
|
n.workspaceStore.saveDocument(n.documentSlug);
|
|
41
42
|
};
|
|
42
|
-
return (
|
|
43
|
+
return (E, e) => (u(), c("div", D, [
|
|
43
44
|
a.document ? (u(), c("div", N, [
|
|
44
45
|
t("div", {
|
|
45
46
|
"aria-label": `title: ${m.value}`,
|
|
46
|
-
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:
|
|
47
|
+
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:max-w-180"
|
|
47
48
|
}, [
|
|
48
49
|
a.document?.["x-scalar-is-dirty"] ? (u(), f(S, {
|
|
49
50
|
key: 0,
|
|
@@ -56,7 +57,7 @@ const D = { class: "custom-scroll h-full" }, N = {
|
|
|
56
57
|
size: "xs",
|
|
57
58
|
type: "button",
|
|
58
59
|
variant: "outlined",
|
|
59
|
-
onClick:
|
|
60
|
+
onClick: v
|
|
60
61
|
}, {
|
|
61
62
|
default: l(() => [...e[2] || (e[2] = [
|
|
62
63
|
t("span", null, "Undo", -1)
|
|
@@ -68,7 +69,7 @@ const D = { class: "custom-scroll h-full" }, N = {
|
|
|
68
69
|
size: "xs",
|
|
69
70
|
type: "button",
|
|
70
71
|
variant: "solid",
|
|
71
|
-
onClick:
|
|
72
|
+
onClick: x
|
|
72
73
|
}, {
|
|
73
74
|
default: l(() => [
|
|
74
75
|
o(s(b), {
|
|
@@ -84,7 +85,7 @@ const D = { class: "custom-scroll h-full" }, N = {
|
|
|
84
85
|
e[4] || (e[4] = t("p", null, " You have unsaved changes. Save your work to keep your changes, or undo to revert them. ", -1))
|
|
85
86
|
]),
|
|
86
87
|
_: 1
|
|
87
|
-
})) :
|
|
88
|
+
})) : y("", !0),
|
|
88
89
|
t("div", I, [
|
|
89
90
|
o(C, {
|
|
90
91
|
modelValue: d.value,
|
|
@@ -107,27 +108,27 @@ const D = { class: "custom-scroll h-full" }, N = {
|
|
|
107
108
|
})
|
|
108
109
|
]),
|
|
109
110
|
_: 1
|
|
110
|
-
}, 8, ["modelValue"])
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
}, 8, ["modelValue"]),
|
|
112
|
+
t("div", U, [
|
|
113
|
+
o(V, {
|
|
114
|
+
class: "text-xl font-bold",
|
|
115
|
+
inputId: "documentName",
|
|
116
|
+
modelValue: m.value,
|
|
117
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => a.eventBus.emit("document:update:info", { title: r }))
|
|
118
|
+
}, null, 8, ["modelValue"])
|
|
119
|
+
])
|
|
119
120
|
])
|
|
120
121
|
], 8, z),
|
|
121
122
|
o(B, { type: "document" }),
|
|
122
|
-
t("div",
|
|
123
|
+
t("div", T, [
|
|
123
124
|
o(s(_), null, {
|
|
124
125
|
default: l(({ Component: r }) => [
|
|
125
|
-
(u(), f(
|
|
126
|
+
(u(), f(g(r), k(n, { collectionType: "document" }), null, 16))
|
|
126
127
|
]),
|
|
127
128
|
_: 1
|
|
128
129
|
})
|
|
129
130
|
])
|
|
130
|
-
])) : (u(), c("div",
|
|
131
|
+
])) : (u(), c("div", $, [...e[5] || (e[5] = [
|
|
131
132
|
t("div", { class: "flex h-full flex-col items-center justify-center" }, [
|
|
132
133
|
t("h1", { class: "text-2xl font-bold" }, "Document not found"),
|
|
133
134
|
t("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as a, createElementBlock as l, openBlock as r, createElementVNode as e, createVNode as o, unref as
|
|
1
|
+
import { defineComponent as a, createElementBlock as l, openBlock as r, createElementVNode as e, createVNode as o, unref as s, toDisplayString as i, mergeProps as n } from "vue";
|
|
2
2
|
import { ScalarIconGlobe as m } from "@scalar/icons";
|
|
3
3
|
import { RouterView as p } from "vue-router";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import u from "./components/Tabs.vue.js";
|
|
5
|
+
const d = { class: "custom-scroll h-full" }, _ = { class: "w-full md:mx-auto md:max-w-180" }, f = ["aria-label"], h = { class: "group relative ml-1.25" }, x = { class: "text-c-1 flex h-8 items-center" }, v = { class: "px-1.5 py-8" }, k = {}, B = /* @__PURE__ */ a({
|
|
6
6
|
...k,
|
|
7
7
|
__name: "WorkspaceCollection",
|
|
8
8
|
props: {
|
|
@@ -17,24 +17,25 @@ const u = { class: "custom-scroll h-full" }, _ = { class: "w-full md:mx-auto md:
|
|
|
17
17
|
securitySchemes: {},
|
|
18
18
|
workspaceStore: {},
|
|
19
19
|
activeWorkspace: {},
|
|
20
|
-
plugins: {}
|
|
20
|
+
plugins: {},
|
|
21
|
+
customThemes: {}
|
|
21
22
|
},
|
|
22
23
|
setup(t) {
|
|
23
|
-
const
|
|
24
|
-
return (w, b) => (r(), l("div",
|
|
24
|
+
const c = t;
|
|
25
|
+
return (w, b) => (r(), l("div", d, [
|
|
25
26
|
e("div", _, [
|
|
26
27
|
e("div", {
|
|
27
28
|
"aria-label": `title: ${t.activeWorkspace.label}`,
|
|
28
|
-
class: "mx-auto flex h-fit w-full flex-
|
|
29
|
+
class: "mx-auto flex h-fit w-full flex-row items-center gap-2 pt-8 pb-3 md:max-w-180"
|
|
29
30
|
}, [
|
|
30
|
-
o(
|
|
31
|
-
e("div",
|
|
32
|
-
e("span",
|
|
31
|
+
o(s(m), { class: "text-c-2 size-6" }),
|
|
32
|
+
e("div", h, [
|
|
33
|
+
e("span", x, i(t.activeWorkspace.label), 1)
|
|
33
34
|
])
|
|
34
35
|
], 8, f),
|
|
35
|
-
o(
|
|
36
|
+
o(u, { type: "workspace" }),
|
|
36
37
|
e("div", v, [
|
|
37
|
-
o(
|
|
38
|
+
o(s(p), n(c, { collectionType: "workspace" }), null, 16)
|
|
38
39
|
])
|
|
39
40
|
])
|
|
40
41
|
]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":"AA2OA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./Authentication.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9d8e1c09"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarToggle as
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as d, computed as c, createBlock as v, openBlock as y, withCtx as n, createElementVNode as i, normalizeClass as a, createVNode as s, unref as r, createTextVNode as u } from "vue";
|
|
2
|
+
import { ScalarToggle as h } from "@scalar/components";
|
|
3
|
+
import p from "../../settings/components/Section.vue.js";
|
|
4
|
+
import S from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
5
|
+
const f = { class: "flex h-8 items-center" }, B = /* @__PURE__ */ d({
|
|
5
6
|
__name: "Authentication",
|
|
6
7
|
props: {
|
|
7
8
|
documentSlug: {},
|
|
@@ -16,54 +17,62 @@ const h = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
16
17
|
workspaceStore: {},
|
|
17
18
|
activeWorkspace: {},
|
|
18
19
|
plugins: {},
|
|
20
|
+
customThemes: {},
|
|
19
21
|
collectionType: {}
|
|
20
22
|
},
|
|
21
23
|
setup(e) {
|
|
22
|
-
const
|
|
24
|
+
const o = c(
|
|
23
25
|
() => e.document?.["x-scalar-set-operation-security"] ?? !1
|
|
24
|
-
),
|
|
26
|
+
), m = c(
|
|
25
27
|
() => e.document?.servers?.find(
|
|
26
|
-
({ url:
|
|
28
|
+
({ url: l }) => l === e.document?.["x-scalar-selected-server"]
|
|
27
29
|
) ?? null
|
|
28
30
|
);
|
|
29
|
-
return (
|
|
30
|
-
n(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
return (l, t) => (y(), v(p, null, {
|
|
32
|
+
title: n(() => [...t[1] || (t[1] = [
|
|
33
|
+
u("Authentication", -1)
|
|
34
|
+
])]),
|
|
35
|
+
description: n(() => [...t[2] || (t[2] = [
|
|
36
|
+
u(" If enabled, all selected authentication will apply to all operations in this document. You can override this by disabling the toggle and authentication will then be applied at the operation level. ", -1)
|
|
37
|
+
])]),
|
|
38
|
+
actions: n(() => [
|
|
39
|
+
i("div", f, [
|
|
40
|
+
s(r(h), {
|
|
34
41
|
class: "w-4",
|
|
35
|
-
modelValue:
|
|
42
|
+
modelValue: o.value,
|
|
36
43
|
"onUpdate:modelValue": t[0] || (t[0] = () => e.eventBus.emit("document:toggle:security"))
|
|
37
44
|
}, null, 8, ["modelValue"])
|
|
38
|
-
])
|
|
39
|
-
t[2] || (t[2] = n("p", { class: "pr-6 text-sm" }, " If enabled, all selected authentication will apply to all operations in this document. You can override this by disabling the toggle and authentication will then be applied at the operation level. ", -1))
|
|
45
|
+
])
|
|
40
46
|
]),
|
|
41
|
-
n(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
default: n(() => [
|
|
48
|
+
i("div", {
|
|
49
|
+
class: a(!o.value && "cursor-not-allowed")
|
|
50
|
+
}, [
|
|
51
|
+
s(r(S), {
|
|
52
|
+
class: a([
|
|
53
|
+
"scalar-collection-auth border-none!",
|
|
54
|
+
!o.value && "pointer-events-none opacity-50 mix-blend-luminosity"
|
|
55
|
+
]),
|
|
56
|
+
environment: e.environment,
|
|
57
|
+
eventBus: e.eventBus,
|
|
58
|
+
isStatic: "",
|
|
59
|
+
meta: { type: "document" },
|
|
60
|
+
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
61
|
+
securityRequirements: e.document?.security ?? [],
|
|
62
|
+
securitySchemes: e.securitySchemes,
|
|
63
|
+
selectedSecurity: e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
64
|
+
type: "document",
|
|
65
|
+
documentName: e.documentSlug
|
|
66
|
+
}),
|
|
67
|
+
server: m.value,
|
|
68
|
+
title: "Authentication"
|
|
69
|
+
}, null, 8, ["class", "environment", "eventBus", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"])
|
|
70
|
+
], 2)
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
}));
|
|
65
74
|
}
|
|
66
75
|
});
|
|
67
76
|
export {
|
|
68
|
-
|
|
77
|
+
B as default
|
|
69
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Cookies.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Cookies.vue"],"names":[],"mappings":"AAgHA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as c, computed as i, createBlock as r, openBlock as u, withCtx as t, createVNode as a, unref as m, createTextVNode as n, createElementVNode as s } from "vue";
|
|
2
|
+
import k from "../../settings/components/Section.vue.js";
|
|
3
|
+
import d from "../../global-cookies/components/CookiesTable.vue.js";
|
|
4
|
+
const T = /* @__PURE__ */ c({
|
|
4
5
|
__name: "Cookies",
|
|
5
6
|
props: {
|
|
6
7
|
documentSlug: {},
|
|
@@ -15,20 +16,32 @@ const d = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ s({
|
|
|
15
16
|
workspaceStore: {},
|
|
16
17
|
activeWorkspace: {},
|
|
17
18
|
plugins: {},
|
|
19
|
+
customThemes: {},
|
|
18
20
|
collectionType: {}
|
|
19
21
|
},
|
|
20
22
|
setup(e) {
|
|
21
|
-
const
|
|
22
|
-
return (
|
|
23
|
-
o[0] || (o[0] =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
const l = i(() => (e.collectionType === "document" ? e.document["x-scalar-cookies"] : e.workspaceStore.workspace["x-scalar-cookies"]) ?? []);
|
|
24
|
+
return (p, o) => (u(), r(k, null, {
|
|
25
|
+
title: t(() => [...o[0] || (o[0] = [
|
|
26
|
+
n("Cookies", -1)
|
|
27
|
+
])]),
|
|
28
|
+
description: t(() => [...o[1] || (o[1] = [
|
|
29
|
+
n(" Manage your collection's cookies here.", -1),
|
|
30
|
+
s("br", null, null, -1),
|
|
31
|
+
n("Cookies allow you to store and send key-value data with your API requests—often used for things like session tokens, authentication, and saving user preferences.", -1),
|
|
32
|
+
s("br", null, null, -1)
|
|
33
|
+
])]),
|
|
34
|
+
default: t(() => [
|
|
35
|
+
a(m(d), {
|
|
36
|
+
collectionType: e.collectionType,
|
|
37
|
+
cookies: l.value,
|
|
38
|
+
eventBus: e.eventBus
|
|
39
|
+
}, null, 8, ["collectionType", "cookies", "eventBus"])
|
|
40
|
+
]),
|
|
41
|
+
_: 1
|
|
42
|
+
}));
|
|
30
43
|
}
|
|
31
44
|
});
|
|
32
45
|
export {
|
|
33
|
-
|
|
46
|
+
T as default
|
|
34
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Environment.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Environment.vue"],"names":[],"mappings":"AAkIA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as i, computed as r, createBlock as l, openBlock as s, withCtx as t, createVNode as m, unref as u, createTextVNode as o, createElementVNode as v } from "vue";
|
|
2
|
+
import d from "../../settings/components/Section.vue.js";
|
|
3
|
+
import p from "../../environments/EnvironmentsList.vue.js";
|
|
4
|
+
const T = /* @__PURE__ */ i({
|
|
4
5
|
__name: "Environment",
|
|
5
6
|
props: {
|
|
6
7
|
documentSlug: {},
|
|
@@ -15,23 +16,34 @@ const u = { class: "flex flex-col gap-4" }, x = /* @__PURE__ */ a({
|
|
|
15
16
|
workspaceStore: {},
|
|
16
17
|
activeWorkspace: {},
|
|
17
18
|
plugins: {},
|
|
19
|
+
customThemes: {},
|
|
18
20
|
collectionType: {}
|
|
19
21
|
},
|
|
20
22
|
setup(e) {
|
|
21
|
-
const
|
|
23
|
+
const c = r(
|
|
22
24
|
() => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {}
|
|
23
|
-
),
|
|
24
|
-
return (
|
|
25
|
-
t[0] || (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
), a = r(() => e.workspaceStore.workspace["x-scalar-active-environment"]);
|
|
26
|
+
return (f, n) => (s(), l(d, null, {
|
|
27
|
+
title: t(() => [...n[0] || (n[0] = [
|
|
28
|
+
o("Environment Variables", -1)
|
|
29
|
+
])]),
|
|
30
|
+
description: t(() => [...n[1] || (n[1] = [
|
|
31
|
+
o(" Set environment variables at your collection level. Use ", -1),
|
|
32
|
+
v("code", { class: "font-code text-c-2" }, " {{ variable }} ", -1),
|
|
33
|
+
o(" to add / search among the selected environment's variables in your request inputs. ", -1)
|
|
34
|
+
])]),
|
|
35
|
+
default: t(() => [
|
|
36
|
+
m(u(p), {
|
|
37
|
+
activeEnvironment: a.value,
|
|
38
|
+
collectionType: e.collectionType,
|
|
39
|
+
environments: c.value,
|
|
40
|
+
eventBus: e.eventBus
|
|
41
|
+
}, null, 8, ["activeEnvironment", "collectionType", "environments", "eventBus"])
|
|
42
|
+
]),
|
|
43
|
+
_: 1
|
|
44
|
+
}));
|
|
33
45
|
}
|
|
34
46
|
});
|
|
35
47
|
export {
|
|
36
|
-
|
|
48
|
+
T as default
|
|
37
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Overview.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Overview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Overview.vue"],"names":[],"mappings":"AA2aA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Overview.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-59dae578"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|