@scalar/api-reference 1.36.0 → 1.36.2
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 +30 -0
- package/dist/browser/standalone.js +15482 -15086
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -0
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +52 -41
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +9 -8
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +46 -42
- package/dist/components/Content/Schema/Schema.vue.d.ts +3 -4
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue2.js +71 -74
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +29 -40
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -5
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +72 -76
- package/dist/components/Content/Schema/types.d.ts +17 -0
- package/dist/components/Content/Schema/types.d.ts.map +1 -0
- package/dist/components/OperationsList/OperationsList.vue.js +2 -2
- package/dist/components/Section/Section.vue.js +1 -1
- package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
- package/dist/consts/urls.d.ts +17 -0
- package/dist/consts/urls.d.ts.map +1 -0
- package/dist/consts/urls.js +7 -0
- package/dist/features/Operation/components/Header.vue.d.ts +2 -0
- package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Header.vue.js +15 -10
- package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
- package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/Headers.vue.js +2 -2
- package/dist/features/Operation/components/Headers.vue2.js +26 -24
- package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
- package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +74 -61
- package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +3 -3
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
- package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
- package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts +4 -2
- package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
- package/dist/features/multiple-documents/useMultipleDocuments.js +49 -43
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts +16 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue.js +43 -0
- package/dist/features/toolbar/ApiReferenceToolbar.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts +13 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.js +12 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts +14 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +95 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfig.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts +10 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.js +27 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +25 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.js +123 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +11 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +41 -0
- package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts +26 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +46 -0
- package/dist/features/toolbar/ApiReferenceToolbarPopover.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts +25 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.js +58 -0
- package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +84 -0
- package/dist/features/toolbar/ApiReferenceToolbarSdks.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +42 -0
- package/dist/features/toolbar/ApiReferenceToolbarShare.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts +7 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +50 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts +14 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.js +83 -0
- package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue2.js +4 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts +3 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts.map +1 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +51 -0
- package/dist/features/toolbar/ApiReferenceToolbarTitle.vue2.js +4 -0
- package/dist/features/toolbar/uploadTempDocument.d.ts +3 -0
- package/dist/features/toolbar/uploadTempDocument.d.ts.map +1 -0
- package/dist/features/toolbar/uploadTempDocument.js +21 -0
- package/dist/helpers/convert-security-scheme.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts +6 -6
- package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
- package/dist/v2/ApiReferenceWorkspace.vue.js +90 -82
- package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +2 -2
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as p, createElementBlock as t, openBlock as o, Fragment as c, createElementVNode as l, createVNode as n, renderList as m, createBlock as u, createTextVNode as a, resolveDynamicComponent as d, toDisplayString as S, withCtx as f } from "vue";
|
|
2
|
+
import { ScalarIconLockSimple as g, ScalarIconGlobeSimple as b, ScalarIconWarningOctagon as k, ScalarIconGitBranch as _, ScalarIconFileMd as w, ScalarIconBracketsCurly as h } from "@scalar/icons";
|
|
3
|
+
import x from "./ApiReferenceToolbarBlurb.vue.js";
|
|
4
|
+
import B from "./ApiReferenceToolbarRegisterButton.vue.js";
|
|
5
|
+
const I = { class: "text-c-2 grid grid-cols-2 gap-2.5 font-medium" }, T = /* @__PURE__ */ p({
|
|
6
|
+
__name: "ApiReferenceToolbarShareRegister",
|
|
7
|
+
props: {
|
|
8
|
+
workspace: {}
|
|
9
|
+
},
|
|
10
|
+
setup(R) {
|
|
11
|
+
const i = [
|
|
12
|
+
{ icon: g, label: "Password Protected" },
|
|
13
|
+
{ icon: b, label: "Custom Domains" },
|
|
14
|
+
{ icon: k, label: "Spectral Rules" },
|
|
15
|
+
{ icon: _, label: "Bi-directional Git" },
|
|
16
|
+
{ icon: w, label: "Markdown Files" },
|
|
17
|
+
{ icon: h, label: "Json Schema Support" }
|
|
18
|
+
];
|
|
19
|
+
return (s, r) => (o(), t(c, null, [
|
|
20
|
+
l("ul", I, [
|
|
21
|
+
(o(), t(c, null, m(i, (e) => l("li", {
|
|
22
|
+
key: e.label,
|
|
23
|
+
class: "flex items-center gap-2"
|
|
24
|
+
}, [
|
|
25
|
+
(o(), u(d(e.icon), {
|
|
26
|
+
weight: "bold",
|
|
27
|
+
class: "text-c-3 size-3.5"
|
|
28
|
+
})),
|
|
29
|
+
a(" " + S(e.label), 1)
|
|
30
|
+
])), 64))
|
|
31
|
+
]),
|
|
32
|
+
n(B, { workspace: s.workspace }, null, 8, ["workspace"]),
|
|
33
|
+
n(x, null, {
|
|
34
|
+
default: f(() => r[0] || (r[0] = [
|
|
35
|
+
a(" Uploading links to Scalar Registry, is part of Scalar's Premium features. Explore all features on our "),
|
|
36
|
+
l("a", {
|
|
37
|
+
href: "https://guides.scalar.com/",
|
|
38
|
+
target: "_blank"
|
|
39
|
+
}, " guides", -1),
|
|
40
|
+
a(". ")
|
|
41
|
+
])),
|
|
42
|
+
_: 1,
|
|
43
|
+
__: [0]
|
|
44
|
+
})
|
|
45
|
+
], 64));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
T as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
workspace: WorkspaceStore;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
'url'?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:url": (value: string | undefined) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:url"?: ((value: string | undefined) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=ApiReferenceToolbarShareTemporary.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarShareTemporary.vue"],"names":[],"mappings":"AA8FA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAMpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;CAC1B,CAAC;AAyCF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;;;;;;AAqIF,wBAOG"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as f, useModel as v, createElementBlock as k, openBlock as b, Fragment as g, createVNode as t, unref as r, createSlots as y, withCtx as s, createTextVNode as m } from "vue";
|
|
2
|
+
import { useLoadingState as S, ScalarTextInput as T, ScalarIconButton as C, ScalarButton as w } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCopy as x } from "@scalar/icons";
|
|
4
|
+
import { useClipboard as R } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
import { useToasts as A } from "@scalar/use-toasts";
|
|
6
|
+
import { REGISTRY_SHARE_URL as B } from "../../consts/urls.js";
|
|
7
|
+
import L from "./ApiReferenceToolbarBlurb.vue.js";
|
|
8
|
+
import { uploadTempDocument as E } from "./uploadTempDocument.js";
|
|
9
|
+
const N = /* @__PURE__ */ p({
|
|
10
|
+
__name: "ApiReferenceToolbarShareTemporary",
|
|
11
|
+
props: /* @__PURE__ */ f({
|
|
12
|
+
workspace: {}
|
|
13
|
+
}, {
|
|
14
|
+
url: {},
|
|
15
|
+
urlModifiers: {}
|
|
16
|
+
}),
|
|
17
|
+
emits: ["update:url"],
|
|
18
|
+
setup(l) {
|
|
19
|
+
const { toast: d } = A(), a = S(), o = v(l, "url");
|
|
20
|
+
async function c() {
|
|
21
|
+
if (a.isLoading || !l.workspace || o.value)
|
|
22
|
+
return;
|
|
23
|
+
a.startLoading();
|
|
24
|
+
const i = l.workspace.exportActiveDocument("json");
|
|
25
|
+
if (!i) {
|
|
26
|
+
d("Unable to export active document", "error"), a.invalidate();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
o.value = await E(i), n(o.value), a.validate();
|
|
31
|
+
} catch (e) {
|
|
32
|
+
const u = e instanceof Error ? e.message : "An unknown error occurred";
|
|
33
|
+
d(u, "error"), a.invalidate();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const { copyToClipboard: n } = R();
|
|
37
|
+
return (i, e) => (b(), k(g, null, [
|
|
38
|
+
t(r(T), {
|
|
39
|
+
readonly: "",
|
|
40
|
+
placeholder: `${r(B)}/apis/...`,
|
|
41
|
+
modelValue: o.value,
|
|
42
|
+
onClick: e[1] || (e[1] = (u) => o.value && r(n)(o.value))
|
|
43
|
+
}, y({ _: 2 }, [
|
|
44
|
+
o.value ? {
|
|
45
|
+
name: "aside",
|
|
46
|
+
fn: s(() => [
|
|
47
|
+
t(r(C), {
|
|
48
|
+
icon: r(x),
|
|
49
|
+
label: "Copy link to clipboard",
|
|
50
|
+
class: "-m-1.5 -ml-1",
|
|
51
|
+
size: "sm",
|
|
52
|
+
onClick: e[0] || (e[0] = (u) => r(n)(o.value))
|
|
53
|
+
}, null, 8, ["icon"])
|
|
54
|
+
]),
|
|
55
|
+
key: "0"
|
|
56
|
+
} : void 0
|
|
57
|
+
]), 1032, ["placeholder", "modelValue"]),
|
|
58
|
+
t(r(w), {
|
|
59
|
+
class: "h-auto p-2.5",
|
|
60
|
+
loading: r(a),
|
|
61
|
+
variant: "outlined",
|
|
62
|
+
disabled: !!o.value,
|
|
63
|
+
onClick: c
|
|
64
|
+
}, {
|
|
65
|
+
default: s(() => e[2] || (e[2] = [
|
|
66
|
+
m(" Generate ")
|
|
67
|
+
])),
|
|
68
|
+
_: 1,
|
|
69
|
+
__: [2]
|
|
70
|
+
}, 8, ["loading", "disabled"]),
|
|
71
|
+
t(L, { class: "-mt-1" }, {
|
|
72
|
+
default: s(() => e[3] || (e[3] = [
|
|
73
|
+
m(" Shared documents will automatically be deleted after 7 days. ")
|
|
74
|
+
])),
|
|
75
|
+
_: 1,
|
|
76
|
+
__: [3]
|
|
77
|
+
})
|
|
78
|
+
], 64));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
N as default
|
|
83
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=ApiReferenceToolbarTitle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarTitle.vue.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/ApiReferenceToolbarTitle.vue"],"names":[],"mappings":";AA+LA,wBAKG"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as s, createBlock as p, openBlock as d, withCtx as r, createElementVNode as t, createTextVNode as e, createVNode as l, toDisplayString as u, unref as n } from "vue";
|
|
2
|
+
import { ScalarIconButton as c } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCopy as m, ScalarIconInfo as f } from "@scalar/icons";
|
|
4
|
+
import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
|
|
5
|
+
import g from "./ApiReferenceToolbarPopover.vue.js";
|
|
6
|
+
const x = {
|
|
7
|
+
type: "button",
|
|
8
|
+
class: "text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none"
|
|
9
|
+
}, y = { class: "-m-2 flex flex-col gap-2 leading-relaxed" }, T = { class: "bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm" }, i = 'showToolbar: "never"', k = /* @__PURE__ */ s({
|
|
10
|
+
__name: "ApiReferenceToolbarTitle",
|
|
11
|
+
setup(v) {
|
|
12
|
+
const { copyToClipboard: a } = b();
|
|
13
|
+
return (C, o) => (d(), p(g, {
|
|
14
|
+
class: "w-120",
|
|
15
|
+
placement: "bottom-start"
|
|
16
|
+
}, {
|
|
17
|
+
button: r(() => [
|
|
18
|
+
t("button", x, [
|
|
19
|
+
o[1] || (o[1] = e(" Configuration Toolbar ")),
|
|
20
|
+
l(n(f))
|
|
21
|
+
])
|
|
22
|
+
]),
|
|
23
|
+
info: r(() => o[5] || (o[5] = [
|
|
24
|
+
e(" The configuration toolbar will only appear when running on localhost ")
|
|
25
|
+
])),
|
|
26
|
+
default: r(() => [
|
|
27
|
+
t("div", y, [
|
|
28
|
+
o[4] || (o[4] = t("div", null, " The configuration toolbar allows you to customize the appearance and behavior of your documentation. You can also share your documentation using the Scalar Registry. ", -1)),
|
|
29
|
+
t("div", null, [
|
|
30
|
+
o[2] || (o[2] = e(" To disable the toolbar, set ")),
|
|
31
|
+
t("div", T, [
|
|
32
|
+
t("code", { class: "font-code" }, u(i)),
|
|
33
|
+
l(n(c), {
|
|
34
|
+
icon: n(m),
|
|
35
|
+
label: "Copy link to clipboard",
|
|
36
|
+
class: "-m-1 p-1.25",
|
|
37
|
+
size: "sm",
|
|
38
|
+
onClick: o[0] || (o[0] = (w) => n(a)(i))
|
|
39
|
+
}, null, 8, ["icon"])
|
|
40
|
+
]),
|
|
41
|
+
o[3] || (o[3] = e(" in your configuration. "))
|
|
42
|
+
])
|
|
43
|
+
])
|
|
44
|
+
]),
|
|
45
|
+
_: 1
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
k as default
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadTempDocument.d.ts","sourceRoot":"","sources":["../../../src/features/toolbar/uploadTempDocument.ts"],"names":[],"mappings":"AASA,mDAAmD;AACnD,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAoB1E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { redirectToProxy as n } from "@scalar/oas-utils/helpers";
|
|
2
|
+
import { PROXY_URL as i, UPLOAD_TEMP_API_URL as s } from "../../consts/urls.js";
|
|
3
|
+
function p(e) {
|
|
4
|
+
return !!e && typeof e == "object" && "url" in e && typeof e.url == "string";
|
|
5
|
+
}
|
|
6
|
+
async function f(e) {
|
|
7
|
+
const t = JSON.stringify({ document: e }), r = await fetch(n(i, s), {
|
|
8
|
+
method: "POST",
|
|
9
|
+
headers: { "Content-Type": "application/json" },
|
|
10
|
+
body: t
|
|
11
|
+
});
|
|
12
|
+
if (!r.ok)
|
|
13
|
+
throw new Error(` Failed to generate temporary link, server responded with ${r.status}`);
|
|
14
|
+
const o = await r.json();
|
|
15
|
+
if (!p(o))
|
|
16
|
+
throw new Error("Failed to generate temporary link, invalid response from server");
|
|
17
|
+
return o.url;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
f as uploadTempDocument
|
|
21
|
+
};
|
|
@@ -3,7 +3,7 @@ import type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/
|
|
|
3
3
|
/**
|
|
4
4
|
* Convert the old security scheme to the new one with secret extensions
|
|
5
5
|
*
|
|
6
|
-
* Remove this once we are migrated to the workspace store
|
|
6
|
+
* Remove this once we are migrated to the workspace store. We are going to double up on secrets temporarily.
|
|
7
7
|
*/
|
|
8
8
|
export declare const convertSecurityScheme: (scheme: SecurityScheme) => SecuritySchemeObject;
|
|
9
9
|
//# sourceMappingURL=convert-security-scheme.d.ts.map
|