@scalar/api-client 2.3.31 → 2.3.33
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 +44 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +63 -61
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +58 -48
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +34 -32
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
- package/dist/hooks/useClientConfig.d.ts +3 -0
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +64 -24
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +128 -48
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +64 -24
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +64 -24
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/index.js +26 -25
- package/dist/libs/local-storage.d.ts +8 -0
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +28 -24
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +8 -8
- package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/decode-buffer.js +4 -4
- package/dist/store/active-entities.d.ts +2 -2
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +22 -22
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +42 -2
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +64 -24
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue2.js +32 -32
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue.js +3 -2
- package/dist/views/Collection/CollectionEnvironment.vue2.js +233 -9
- package/dist/views/Collection/CollectionNavigation.vue.js +36 -36
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServers.vue2.js +6 -6
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +13 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.js +7 -0
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +274 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -13
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +35 -34
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +3 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +74 -31
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +3 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +8 -6
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +32 -28
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +67 -65
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +94 -97
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +116 -99
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +27 -25
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +114 -73
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +54 -59
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +27 -26
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +8 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +17 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +87 -84
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +11 -11
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/consts/index.js +7 -5
- package/dist/views/Request/consts/mediaTypes.d.ts +4 -0
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +22 -4
- package/dist/views/Request/consts/mediaTypes.test.d.ts +2 -0
- package/dist/views/Request/consts/mediaTypes.test.d.ts.map +1 -0
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +53 -47
- package/package.json +16 -16
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as b, ref as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as b, ref as d, computed as y, watch as k, createElementBlock as o, openBlock as s, withModifiers as w, createCommentVNode as m, createBlock as x, createVNode as p, Fragment as S, renderList as g, normalizeClass as h, createElementVNode as v, toDisplayString as A, unref as a, withCtx as C } from "vue";
|
|
2
|
+
import { useModal as V } from "@scalar/components";
|
|
3
3
|
import O from "./DeleteRequestAuthModal.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
4
|
+
import _ from "./RequestAuthTab.vue.js";
|
|
5
|
+
import z from "../../../../components/DataTable/DataTable.vue.js";
|
|
6
|
+
const B = {
|
|
7
7
|
key: 0,
|
|
8
|
-
class: "box-content flex h-8 flex-wrap gap-x-2.5 overflow-hidden border-
|
|
9
|
-
},
|
|
8
|
+
class: "box-content flex h-8 flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3"
|
|
9
|
+
}, M = ["onClick"], N = { class: "relative z-10 whitespace-nowrap font-medium" }, $ = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "z-1 absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 h-px w-full -translate-x-1/2 bg-current"
|
|
12
12
|
}, q = {
|
|
@@ -19,14 +19,15 @@ const N = {
|
|
|
19
19
|
environment: {},
|
|
20
20
|
envVariables: {},
|
|
21
21
|
layout: { default: "client" },
|
|
22
|
+
persistAuth: { type: Boolean, default: !1 },
|
|
22
23
|
selectedSchemeOptions: { default: () => [] },
|
|
23
24
|
server: {},
|
|
24
25
|
workspace: {}
|
|
25
26
|
},
|
|
26
27
|
setup(i) {
|
|
27
|
-
const c =
|
|
28
|
+
const c = V(), f = d(
|
|
28
29
|
null
|
|
29
|
-
), t =
|
|
30
|
+
), t = d(0), u = y(() => {
|
|
30
31
|
const e = i.selectedSchemeOptions[t.value];
|
|
31
32
|
if (!e)
|
|
32
33
|
return [];
|
|
@@ -38,45 +39,46 @@ const N = {
|
|
|
38
39
|
(e) => {
|
|
39
40
|
e[t.value] || (t.value = Math.max(0, t.value - 1));
|
|
40
41
|
}
|
|
41
|
-
), (e, r) => (
|
|
42
|
+
), (e, r) => (s(), o("form", {
|
|
42
43
|
onSubmit: r[1] || (r[1] = w(() => {
|
|
43
44
|
}, ["prevent"]))
|
|
44
45
|
}, [
|
|
45
|
-
e.selectedSchemeOptions.length > 1 ? (
|
|
46
|
-
(
|
|
46
|
+
e.selectedSchemeOptions.length > 1 ? (s(), o("div", B, [
|
|
47
|
+
(s(!0), o(S, null, g(e.selectedSchemeOptions, (l, n) => (s(), o("div", {
|
|
47
48
|
key: l.id,
|
|
48
|
-
class:
|
|
49
|
+
class: h(["z-1 relative -mb-[var(--scalar-border-width)] flex h-8 cursor-pointer", [t.value === n ? "text-c-1" : "text-c-3"]])
|
|
49
50
|
}, [
|
|
50
|
-
|
|
51
|
+
v("button", {
|
|
51
52
|
class: "floating-bg relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium",
|
|
52
53
|
type: "button",
|
|
53
54
|
onClick: (D) => t.value = n
|
|
54
55
|
}, [
|
|
55
|
-
|
|
56
|
-
], 8,
|
|
57
|
-
t.value === n ? (
|
|
56
|
+
v("span", N, A(l.label), 1)
|
|
57
|
+
], 8, M),
|
|
58
|
+
t.value === n ? (s(), o("div", $)) : m("", !0)
|
|
58
59
|
], 2))), 128))
|
|
59
|
-
])) :
|
|
60
|
-
u.value.length ? (
|
|
60
|
+
])) : m("", !0),
|
|
61
|
+
u.value.length ? (s(), x(a(z), {
|
|
61
62
|
key: 1,
|
|
62
|
-
class:
|
|
63
|
+
class: h(["flex-1", e.layout === "reference" && "rounded-b-lg border border-t-0"]),
|
|
63
64
|
columns: [""],
|
|
64
65
|
presentational: ""
|
|
65
66
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
67
|
+
default: C(() => [
|
|
68
|
+
p(_, {
|
|
68
69
|
collection: e.collection,
|
|
69
70
|
envVariables: e.envVariables,
|
|
70
71
|
environment: e.environment,
|
|
71
72
|
layout: e.layout,
|
|
73
|
+
persistAuth: e.persistAuth,
|
|
72
74
|
securitySchemeUids: u.value,
|
|
73
75
|
server: e.server,
|
|
74
76
|
workspace: e.workspace
|
|
75
|
-
}, null, 8, ["collection", "envVariables", "environment", "layout", "securitySchemeUids", "server", "workspace"])
|
|
77
|
+
}, null, 8, ["collection", "envVariables", "environment", "layout", "persistAuth", "securitySchemeUids", "server", "workspace"])
|
|
76
78
|
]),
|
|
77
79
|
_: 1
|
|
78
|
-
}, 8, ["class"])) : (
|
|
79
|
-
|
|
80
|
+
}, 8, ["class"])) : (s(), o("div", q, " No authentication selected ")),
|
|
81
|
+
p(O, {
|
|
80
82
|
scheme: f.value,
|
|
81
83
|
state: a(c),
|
|
82
84
|
onClose: r[0] || (r[0] = (l) => a(c).hide())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"AA6UA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAY1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA+fF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuthTab.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-abdabad2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,80 +1,117 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as L, computed as F, ref as P, onMounted as R, createElementBlock as i, openBlock as l, Fragment as s, renderList as C, createBlock as S, createCommentVNode as v, unref as d, normalizeClass as g, withCtx as n, createVNode as u, createTextVNode as m, toDisplayString as _, mergeProps as V, createElementVNode as A, capitalize as U } from "vue";
|
|
2
|
+
import { ScalarMarkdown as q } from "@scalar/components";
|
|
3
|
+
import { isDefined as I } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { CLIENT_LS_KEYS as N } from "../../../../libs/local-storage.js";
|
|
5
|
+
import { useWorkspace as z } from "../../../../store/store.js";
|
|
6
|
+
import { updateScheme as D } from "../helpers/update-scheme.js";
|
|
7
|
+
import H from "./OAuth2.vue.js";
|
|
4
8
|
import w from "./RequestAuthDataTableInput.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
9
|
+
import f from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
10
|
+
import j from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
11
|
+
const Q = {
|
|
8
12
|
key: 0,
|
|
9
13
|
class: "flex min-h-8 border-t text-sm"
|
|
10
|
-
},
|
|
11
|
-
key: 5,
|
|
12
|
-
class: "text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t px-4 text-sm"
|
|
13
|
-
}, J = /* @__PURE__ */ F({
|
|
14
|
+
}, J = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, Y = ["onClick"], W = { class: "relative z-10" }, ne = /* @__PURE__ */ L({
|
|
14
15
|
__name: "RequestAuthTab",
|
|
15
16
|
props: {
|
|
16
17
|
collection: {},
|
|
17
18
|
environment: {},
|
|
18
19
|
envVariables: {},
|
|
19
20
|
layout: {},
|
|
21
|
+
persistAuth: { type: Boolean, default: !1 },
|
|
20
22
|
securitySchemeUids: {},
|
|
21
23
|
server: {},
|
|
22
24
|
workspace: {}
|
|
23
25
|
},
|
|
24
26
|
setup(c) {
|
|
25
|
-
const {
|
|
27
|
+
const T = z(), { collectionMutators: B, securitySchemes: x, securitySchemeMutators: M } = T, $ = F(
|
|
26
28
|
() => c.securitySchemeUids.map((t) => ({
|
|
27
|
-
scheme:
|
|
29
|
+
scheme: x[t]
|
|
28
30
|
}))
|
|
29
|
-
),
|
|
30
|
-
const r = t.description ? `: ${t.description}` : "", e = `${
|
|
31
|
+
), p = P(""), O = (t) => {
|
|
32
|
+
const r = t.description ? `: ${t.description}` : "", e = `${U(t.nameKey)}${r || `: ${t.type}`}`;
|
|
31
33
|
if (t.type === "apiKey")
|
|
32
|
-
return `${
|
|
34
|
+
return `${U(t.nameKey)}${r || `: ${t.in}`}`;
|
|
33
35
|
if (t.type === "oauth2") {
|
|
34
36
|
const o = Object.values(t.flows ?? {})[0];
|
|
35
|
-
return `${
|
|
37
|
+
return `${U(t.nameKey)}: ${p.value ? p.value : (o == null ? void 0 : o.type) ?? ""}${r}`;
|
|
36
38
|
}
|
|
37
|
-
return t.type === "http" ? `${
|
|
38
|
-
}, k = (t, r, e) =>
|
|
39
|
+
return t.type === "http" ? `${U(t.nameKey)}: ${t.scheme}${r}` : `${e}${r}`;
|
|
40
|
+
}, k = (t, r, e) => {
|
|
41
|
+
D(t, r, e, T, c.persistAuth);
|
|
42
|
+
};
|
|
43
|
+
R(() => {
|
|
44
|
+
if (!c.persistAuth)
|
|
45
|
+
return;
|
|
46
|
+
const t = JSON.parse(
|
|
47
|
+
localStorage.getItem(N.AUTH) ?? "{}"
|
|
48
|
+
), r = Object.keys(x).reduce(
|
|
49
|
+
(e, o) => {
|
|
50
|
+
const a = x[o];
|
|
51
|
+
return a && (e[a.nameKey] = a.uid), e;
|
|
52
|
+
},
|
|
53
|
+
{}
|
|
54
|
+
);
|
|
55
|
+
Object.entries(t).forEach(([e, o]) => {
|
|
56
|
+
const a = r[e];
|
|
57
|
+
a && Object.entries(o).forEach(([E, K]) => {
|
|
58
|
+
M.edit(a, E, K);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
try {
|
|
62
|
+
const o = JSON.parse(
|
|
63
|
+
localStorage.getItem(N.SELECTED_SECURITY_SCHEMES) ?? ""
|
|
64
|
+
).map((a) => Array.isArray(a) ? a.map((y) => r[y]).filter(I) : r[a]).filter(I);
|
|
65
|
+
B.edit(c.collection.uid, "selectedSecuritySchemeUids", o);
|
|
66
|
+
} catch {
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const b = {
|
|
39
70
|
environment: c.environment,
|
|
40
71
|
envVariables: c.envVariables,
|
|
41
72
|
workspace: c.workspace
|
|
42
73
|
};
|
|
43
|
-
return (t, r) => (
|
|
74
|
+
return (t, r) => (l(!0), i(s, null, C($.value, ({ scheme: e }) => (l(), i(s, {
|
|
44
75
|
key: e == null ? void 0 : e.uid
|
|
45
76
|
}, [
|
|
46
|
-
|
|
77
|
+
$.value.length > 1 ? (l(), S(d(f), {
|
|
47
78
|
key: 0,
|
|
48
|
-
class:
|
|
79
|
+
class: g({
|
|
49
80
|
"request-example-references-header": t.layout === "reference"
|
|
50
81
|
})
|
|
51
82
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
u(d(
|
|
54
|
-
class:
|
|
83
|
+
default: n(() => [
|
|
84
|
+
u(d(j), {
|
|
85
|
+
class: g(["text-c-2 flex items-center pl-3", t.layout === "reference" && "border-b"])
|
|
55
86
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
|
|
87
|
+
default: n(() => [
|
|
88
|
+
m(_(O(e)), 1)
|
|
58
89
|
]),
|
|
59
90
|
_: 2
|
|
60
91
|
}, 1032, ["class"])
|
|
61
92
|
]),
|
|
62
93
|
_: 2
|
|
63
94
|
}, 1032, ["class"])) : v("", !0),
|
|
64
|
-
e != null && e.description &&
|
|
65
|
-
default:
|
|
66
|
-
u(d(
|
|
67
|
-
|
|
68
|
-
|
|
95
|
+
e != null && e.description && $.value.length <= 1 ? (l(), S(d(f), { key: 1 }, {
|
|
96
|
+
default: n(() => [
|
|
97
|
+
u(d(j), {
|
|
98
|
+
"aria-label": e.description,
|
|
99
|
+
class: "text-c-2 auth-description-container group/auth -mb-0.25 flex items-center whitespace-nowrap outline-none hover:whitespace-normal"
|
|
100
|
+
}, {
|
|
101
|
+
default: n(() => [
|
|
102
|
+
u(d(q), {
|
|
103
|
+
class: "auth-description z-1 bg-b-1 text-c-2 outline-b-3 top-0 line-clamp-1 h-full w-full px-3 py-1.5 group-hover/auth:line-clamp-none",
|
|
104
|
+
value: e.description
|
|
105
|
+
}, null, 8, ["value"])
|
|
69
106
|
]),
|
|
70
107
|
_: 2
|
|
71
|
-
},
|
|
108
|
+
}, 1032, ["aria-label"])
|
|
72
109
|
]),
|
|
73
110
|
_: 2
|
|
74
111
|
}, 1024)) : v("", !0),
|
|
75
|
-
(e == null ? void 0 : e.type) === "http" ? (
|
|
76
|
-
e.scheme === "bearer" ? (
|
|
77
|
-
default:
|
|
112
|
+
(e == null ? void 0 : e.type) === "http" ? (l(), i(s, { key: 2 }, [
|
|
113
|
+
e.scheme === "bearer" ? (l(), S(d(f), { key: 0 }, {
|
|
114
|
+
default: n(() => [
|
|
78
115
|
u(w, V({ ref_for: !0 }, b, {
|
|
79
116
|
containerClass: t.layout === "reference" && "border-t",
|
|
80
117
|
modelValue: e.token,
|
|
@@ -82,16 +119,16 @@ const R = {
|
|
|
82
119
|
type: "password",
|
|
83
120
|
"onUpdate:modelValue": (o) => k(e.uid, "token", o)
|
|
84
121
|
}), {
|
|
85
|
-
default:
|
|
86
|
-
|
|
122
|
+
default: n(() => r[0] || (r[0] = [
|
|
123
|
+
m(" Bearer Token ")
|
|
87
124
|
])),
|
|
88
125
|
_: 2
|
|
89
126
|
}, 1040, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
90
127
|
]),
|
|
91
128
|
_: 2
|
|
92
|
-
}, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (
|
|
93
|
-
u(d(
|
|
94
|
-
default:
|
|
129
|
+
}, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (l(), i(s, { key: 1 }, [
|
|
130
|
+
u(d(f), null, {
|
|
131
|
+
default: n(() => [
|
|
95
132
|
u(w, V({ ref_for: !0 }, b, {
|
|
96
133
|
class: "text-c-2",
|
|
97
134
|
containerClass: t.layout === "reference" && "auth-blend-required border-t",
|
|
@@ -100,24 +137,24 @@ const R = {
|
|
|
100
137
|
required: "",
|
|
101
138
|
"onUpdate:modelValue": (o) => k(e.uid, "username", o)
|
|
102
139
|
}), {
|
|
103
|
-
default:
|
|
104
|
-
|
|
140
|
+
default: n(() => r[1] || (r[1] = [
|
|
141
|
+
m(" Username ")
|
|
105
142
|
])),
|
|
106
143
|
_: 2
|
|
107
144
|
}, 1040, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
108
145
|
]),
|
|
109
146
|
_: 2
|
|
110
147
|
}, 1024),
|
|
111
|
-
u(d(
|
|
112
|
-
default:
|
|
148
|
+
u(d(f), null, {
|
|
149
|
+
default: n(() => [
|
|
113
150
|
u(w, V({ ref_for: !0 }, b, {
|
|
114
151
|
modelValue: e.password,
|
|
115
152
|
placeholder: "********",
|
|
116
153
|
type: "password",
|
|
117
154
|
"onUpdate:modelValue": (o) => k(e.uid, "password", o)
|
|
118
155
|
}), {
|
|
119
|
-
default:
|
|
120
|
-
|
|
156
|
+
default: n(() => r[2] || (r[2] = [
|
|
157
|
+
m(" Password ")
|
|
121
158
|
])),
|
|
122
159
|
_: 2
|
|
123
160
|
}, 1040, ["modelValue", "onUpdate:modelValue"])
|
|
@@ -125,76 +162,80 @@ const R = {
|
|
|
125
162
|
_: 2
|
|
126
163
|
}, 1024)
|
|
127
164
|
], 64)) : v("", !0)
|
|
128
|
-
], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (
|
|
129
|
-
u(d(
|
|
130
|
-
default:
|
|
165
|
+
], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (l(), i(s, { key: 3 }, [
|
|
166
|
+
u(d(f), null, {
|
|
167
|
+
default: n(() => [
|
|
131
168
|
u(w, V({ ref_for: !0 }, b, {
|
|
132
169
|
containerClass: t.layout === "reference" && "border-t",
|
|
133
170
|
modelValue: e.name,
|
|
134
171
|
placeholder: "api-key",
|
|
135
172
|
"onUpdate:modelValue": (o) => k(e.uid, "name", o)
|
|
136
173
|
}), {
|
|
137
|
-
default:
|
|
138
|
-
|
|
174
|
+
default: n(() => r[3] || (r[3] = [
|
|
175
|
+
m(" Name ")
|
|
139
176
|
])),
|
|
140
177
|
_: 2
|
|
141
178
|
}, 1040, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
142
179
|
]),
|
|
143
180
|
_: 2
|
|
144
181
|
}, 1024),
|
|
145
|
-
u(d(
|
|
146
|
-
default:
|
|
182
|
+
u(d(f), null, {
|
|
183
|
+
default: n(() => [
|
|
147
184
|
u(w, V({ ref_for: !0 }, b, {
|
|
148
185
|
modelValue: e.value,
|
|
149
186
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
150
187
|
type: "password",
|
|
151
188
|
"onUpdate:modelValue": (o) => k(e.uid, "value", o)
|
|
152
189
|
}), {
|
|
153
|
-
default:
|
|
154
|
-
|
|
190
|
+
default: n(() => r[4] || (r[4] = [
|
|
191
|
+
m(" Value ")
|
|
155
192
|
])),
|
|
156
193
|
_: 2
|
|
157
194
|
}, 1040, ["modelValue", "onUpdate:modelValue"])
|
|
158
195
|
]),
|
|
159
196
|
_: 2
|
|
160
197
|
}, 1024)
|
|
161
|
-
], 64)) : (e == null ? void 0 : e.type) === "oauth2" ? (
|
|
162
|
-
u(d(
|
|
163
|
-
default:
|
|
164
|
-
Object.keys(e.flows).length > 1 ? (
|
|
165
|
-
|
|
166
|
-
(
|
|
167
|
-
key:
|
|
168
|
-
class:
|
|
169
|
-
"!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (
|
|
170
|
-
"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (
|
|
198
|
+
], 64)) : (e == null ? void 0 : e.type) === "oauth2" ? (l(), i(s, { key: 4 }, [
|
|
199
|
+
u(d(f), null, {
|
|
200
|
+
default: n(() => [
|
|
201
|
+
Object.keys(e.flows).length > 1 ? (l(), i("div", Q, [
|
|
202
|
+
A("div", J, [
|
|
203
|
+
(l(!0), i(s, null, C(e == null ? void 0 : e.flows, (o, a, y) => (l(), i("button", {
|
|
204
|
+
key: a,
|
|
205
|
+
class: g(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium", {
|
|
206
|
+
"!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (p.value === a || y === 0 && !p.value),
|
|
207
|
+
"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (p.value === a || y === 0 && !p.value)
|
|
171
208
|
}]),
|
|
172
209
|
type: "button",
|
|
173
|
-
onClick: (
|
|
210
|
+
onClick: (E) => p.value = a
|
|
174
211
|
}, [
|
|
175
|
-
|
|
176
|
-
], 10,
|
|
212
|
+
A("span", W, _(a), 1)
|
|
213
|
+
], 10, Y))), 128))
|
|
177
214
|
])
|
|
178
215
|
])) : v("", !0)
|
|
179
216
|
]),
|
|
180
217
|
_: 2
|
|
181
218
|
}, 1024),
|
|
182
|
-
(
|
|
183
|
-
|
|
219
|
+
(l(!0), i(s, null, C(e == null ? void 0 : e.flows, (o, a, y) => (l(), i(s, { key: a }, [
|
|
220
|
+
p.value === a || y === 0 && !p.value ? (l(), S(H, V({
|
|
184
221
|
key: 0,
|
|
185
222
|
ref_for: !0
|
|
186
223
|
}, b, {
|
|
187
224
|
collection: t.collection,
|
|
188
225
|
flow: o,
|
|
226
|
+
persistAuth: t.persistAuth,
|
|
189
227
|
scheme: e,
|
|
190
228
|
server: t.server,
|
|
191
229
|
workspace: t.workspace
|
|
192
|
-
}), null, 16, ["collection", "flow", "scheme", "server", "workspace"])) : v("", !0)
|
|
230
|
+
}), null, 16, ["collection", "flow", "persistAuth", "scheme", "server", "workspace"])) : v("", !0)
|
|
193
231
|
], 64))), 128))
|
|
194
|
-
], 64)) : (e == null ? void 0 : e.type) === "openIdConnect" ? (
|
|
232
|
+
], 64)) : (e == null ? void 0 : e.type) === "openIdConnect" ? (l(), i("div", {
|
|
233
|
+
key: 5,
|
|
234
|
+
class: g(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-b-0 border-t px-4 text-sm", { "rounded-b-lg": t.layout === "reference" }])
|
|
235
|
+
}, " Coming soon ", 2)) : v("", !0)
|
|
195
236
|
], 64))), 128));
|
|
196
237
|
}
|
|
197
238
|
});
|
|
198
239
|
export {
|
|
199
|
-
|
|
240
|
+
ne as default
|
|
200
241
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Collection, Operation, RequestExample, Server } from '@scalar/oas-utils/entities/spec';
|
|
2
2
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
3
|
+
import type { EnvVariables } from '../../../libs/env-helpers';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
collection: Collection;
|
|
5
6
|
example: RequestExample;
|
|
6
7
|
operation: Operation;
|
|
7
8
|
server: Server | undefined;
|
|
8
9
|
workspace: Workspace;
|
|
10
|
+
environment: EnvVariables;
|
|
9
11
|
};
|
|
10
12
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
13
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA8RA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EAEd,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAOrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAMtD,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,WAAW,EAAE,YAAY,CAAA;CAC1B,CAAC;;AA6WF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestCodeExample.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const r = /* @__PURE__ */
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-01b51127"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|