@scalar/api-reference 1.24.21 → 1.24.24
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 +41 -0
- package/dist/browser/standalone.js +21905 -22407
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/components/ApiClientModal.vue.js +19 -18
- package/dist/components/ApiReference.vue.js +14 -14
- package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +130 -151
- package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
- package/dist/components/Content/Authentication/Authentication.vue.js +2 -2
- package/dist/components/Content/Authentication/Authentication.vue2.js +20 -18
- package/dist/components/Content/Content.vue.d.ts +3 -0
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +2 -2
- package/dist/components/Content/Content.vue2.js +29 -27
- package/dist/components/Content/Introduction/Introduction.vue.d.ts +2 -2
- package/dist/components/Content/Lazy/Loading.vue.js +1 -1
- package/dist/components/Content/Operation/CustomRequestExamples.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/CustomRequestExamples.vue.js +1 -1
- package/dist/components/Content/Operation/CustomRequestExamples.vue2.js +19 -19
- package/dist/components/Content/Operation/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/ExampleRequest.vue.js +2 -2
- package/dist/components/Content/Operation/ExampleRequest.vue2.js +63 -59
- package/dist/components/Content/Operation/OperationAccordion.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/OperationAccordion.vue.js +1 -1
- package/dist/components/Content/Operation/OperationAccordion.vue2.js +26 -26
- package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
- package/dist/components/Content/Operation/TestRequestButton.vue2.js +18 -36
- package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
- package/dist/components/Content/Tag/Endpoints.vue2.js +23 -23
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +42 -0
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js +28 -0
- package/dist/components/HttpMethod/HttpMethod.vue2.js +4 -0
- package/dist/components/HttpMethod/constants.d.ts +9 -0
- package/dist/components/HttpMethod/constants.d.ts.map +1 -0
- package/dist/components/HttpMethod/constants.js +36 -0
- package/dist/components/HttpMethod/index.d.ts +2 -0
- package/dist/components/HttpMethod/index.d.ts.map +1 -0
- package/dist/components/HttpMethod/utils/isRequestMethod.d.ts +4 -0
- package/dist/components/HttpMethod/utils/isRequestMethod.d.ts.map +1 -0
- package/dist/components/HttpMethod/utils/isRequestMethod.js +7 -0
- package/dist/components/Sidebar/SidebarHttpBadge.vue.js +1 -1
- package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +6 -6
- package/dist/components/api-client-bus.d.ts +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts +9 -0
- package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/BaseUrl.vue.js +43 -33
- package/dist/helpers/getApiClientRequest.d.ts +1 -1
- package/dist/helpers/getApiClientRequest.d.ts.map +1 -1
- package/dist/helpers/getApiClientRequest.js +12 -11
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/openClientFor.js +10 -7
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/parse.js +33 -31
- package/dist/hooks/useReactiveSpec.d.ts +1 -1
- package/dist/hooks/useSidebar.js +18 -17
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +101 -102
- package/dist/legacy/components/CardForm.vue.d.ts +10 -0
- package/dist/legacy/components/CardForm.vue.d.ts.map +1 -0
- package/dist/legacy/components/CardForm.vue.js +13 -0
- package/dist/legacy/components/CardFormButton.vue.d.ts +12 -0
- package/dist/legacy/components/CardFormButton.vue.d.ts.map +1 -0
- package/dist/legacy/components/CardFormButton.vue.js +7 -0
- package/dist/legacy/components/CardFormButton.vue2.js +18 -0
- package/dist/legacy/components/CardFormGroup.vue.d.ts +10 -0
- package/dist/legacy/components/CardFormGroup.vue.d.ts.map +1 -0
- package/dist/legacy/components/CardFormGroup.vue.js +13 -0
- package/dist/legacy/components/CardFormRows.vue.d.ts +10 -0
- package/dist/legacy/components/CardFormRows.vue.d.ts.map +1 -0
- package/dist/legacy/components/CardFormRows.vue.js +13 -0
- package/dist/legacy/components/CardFormTextInput.vue.d.ts +25 -0
- package/dist/legacy/components/CardFormTextInput.vue.d.ts.map +1 -0
- package/dist/legacy/components/CardFormTextInput.vue.js +7 -0
- package/dist/legacy/components/CardFormTextInput.vue2.js +37 -0
- package/dist/legacy/components/SecurityScheme.vue.d.ts +19 -0
- package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -0
- package/dist/legacy/components/SecurityScheme.vue.js +7 -0
- package/dist/legacy/components/SecurityScheme.vue2.js +364 -0
- package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts +26 -0
- package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts.map +1 -0
- package/dist/legacy/components/SecuritySchemeScopes.vue.js +7 -0
- package/dist/legacy/components/SecuritySchemeScopes.vue2.js +91 -0
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts +25 -0
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -0
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +7 -0
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +64 -0
- package/dist/legacy/fixtures/httpHeaders.d.ts +6 -0
- package/dist/legacy/fixtures/httpHeaders.d.ts.map +1 -0
- package/dist/legacy/fixtures/httpRequestMethods.d.ts +10 -0
- package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +1 -0
- package/dist/legacy/fixtures/httpRequestMethods.js +18 -0
- package/dist/legacy/fixtures/index.d.ts +3 -0
- package/dist/legacy/fixtures/index.d.ts.map +1 -0
- package/dist/legacy/helpers/createPlaceholderRequest.d.ts +6 -0
- package/dist/legacy/helpers/createPlaceholderRequest.d.ts.map +1 -0
- package/dist/legacy/helpers/createPlaceholderRequest.js +14 -0
- package/dist/legacy/helpers/encodeStringAsBase64.d.ts +5 -0
- package/dist/legacy/helpers/encodeStringAsBase64.d.ts.map +1 -0
- package/dist/legacy/helpers/encodeStringAsBase64.js +6 -0
- package/dist/legacy/helpers/getRequestFromAuthentication.d.ts +10 -0
- package/dist/legacy/helpers/getRequestFromAuthentication.d.ts.map +1 -0
- package/dist/legacy/helpers/getRequestFromAuthentication.js +83 -0
- package/dist/legacy/helpers/getUrlFromServerState.d.ts +6 -0
- package/dist/legacy/helpers/getUrlFromServerState.d.ts.map +1 -0
- package/dist/legacy/helpers/getUrlFromServerState.js +9 -0
- package/dist/legacy/helpers/humanDiff.d.ts +5 -0
- package/dist/legacy/helpers/humanDiff.d.ts.map +1 -0
- package/dist/legacy/helpers/index.d.ts +12 -0
- package/dist/legacy/helpers/index.d.ts.map +1 -0
- package/dist/legacy/helpers/mapFromArray.d.ts +5 -0
- package/dist/legacy/helpers/mapFromArray.d.ts.map +1 -0
- package/dist/legacy/helpers/normalizeHeaders.d.ts +9 -0
- package/dist/legacy/helpers/normalizeHeaders.d.ts.map +1 -0
- package/dist/legacy/helpers/normalizePath.d.ts +5 -0
- package/dist/legacy/helpers/normalizePath.d.ts.map +1 -0
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts +6 -0
- package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -0
- package/dist/legacy/helpers/normalizeRequestMethod.js +14 -0
- package/dist/legacy/helpers/normalizeUrl.d.ts +5 -0
- package/dist/legacy/helpers/normalizeUrl.d.ts.map +1 -0
- package/dist/legacy/helpers/prepareClientRequestConfig.d.ts +24 -0
- package/dist/legacy/helpers/prepareClientRequestConfig.d.ts.map +1 -0
- package/dist/legacy/index.d.ts +5 -0
- package/dist/legacy/index.d.ts.map +1 -0
- package/dist/legacy/stores/index.d.ts +6 -0
- package/dist/legacy/stores/index.d.ts.map +1 -0
- package/dist/legacy/stores/useApiClientStore.d.ts +18 -0
- package/dist/legacy/stores/useApiClientStore.d.ts.map +1 -0
- package/dist/legacy/stores/useApiClientStore.js +32 -0
- package/dist/legacy/stores/useAuthenticationStore.d.ts +59 -0
- package/dist/legacy/stores/useAuthenticationStore.d.ts.map +1 -0
- package/dist/legacy/stores/useAuthenticationStore.js +36 -0
- package/dist/legacy/stores/useOpenApiStore.d.ts +95 -0
- package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -0
- package/dist/legacy/stores/useOpenApiStore.js +23 -0
- package/dist/legacy/stores/useRequestStore.d.ts +58 -0
- package/dist/legacy/stores/useRequestStore.d.ts.map +1 -0
- package/dist/legacy/stores/useRequestStore.js +33 -0
- package/dist/legacy/stores/useServerStore.d.ts +18 -0
- package/dist/legacy/stores/useServerStore.d.ts.map +1 -0
- package/dist/legacy/stores/useServerStore.js +18 -0
- package/dist/legacy/types.d.ts +117 -0
- package/dist/legacy/types.d.ts.map +1 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +7 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -13
- package/dist/components/ApiClientModalOld.vue.d.ts +0 -36
- package/dist/components/ApiClientModalOld.vue.d.ts.map +0 -1
- package/dist/components/ApiClientModalOld.vue.js +0 -7
- package/dist/components/ApiClientModalOld.vue2.js +0 -88
- package/dist/components/Content/Schema/SchemaProperty.spec.d.ts +0 -2
- package/dist/components/Content/Schema/SchemaProperty.spec.d.ts.map +0 -1
- package/dist/features.d.ts +0 -8
- package/dist/features.d.ts.map +0 -1
- package/dist/features.js +0 -5
- package/dist/standalone.spec.d.ts +0 -2
- package/dist/standalone.spec.d.ts.map +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent as y, ref as h, computed as x, openBlock as d, createBlock as a, unref as t, withCtx as n, createElementVNode as e, normalizeClass as C, createVNode as p, createTextVNode as _, toDisplayString as r, Teleport as V, normalizeStyle as B, createElementBlock as L, Fragment as O, renderList as I, createCommentVNode as N, pushScopeId as j, popScopeId as z } from "vue";
|
|
2
|
+
import { useFloating as E, autoUpdate as F, offset as U, flip as D, shift as T } from "@floating-ui/vue";
|
|
3
|
+
import { Listbox as M, ListboxButton as q, ListboxOptions as A, ListboxOption as G } from "@headlessui/vue";
|
|
4
|
+
import { ScalarIcon as H } from "@scalar/components";
|
|
5
|
+
import J from "./CardFormButton.vue.js";
|
|
6
|
+
const K = (o) => (j("data-v-0957134f"), o = o(), z(), o), P = { class: "scopes-label" }, Q = /* @__PURE__ */ K(() => /* @__PURE__ */ e("em", null, "/", -1)), R = ["checked"], W = { class: "dropdown-item-title" }, X = { class: "dropdown-item-description" }, oe = /* @__PURE__ */ y({
|
|
7
|
+
__name: "SecuritySchemeScopes",
|
|
8
|
+
props: {
|
|
9
|
+
scopes: {},
|
|
10
|
+
selected: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:selected"],
|
|
13
|
+
setup(o, { emit: w }) {
|
|
14
|
+
const g = o, b = w, m = h(), u = h(), { floatingStyles: v } = E(m, u, {
|
|
15
|
+
placement: "bottom-end",
|
|
16
|
+
whileElementsMounted: F,
|
|
17
|
+
middleware: [U(5), D(), T()]
|
|
18
|
+
}), c = x({
|
|
19
|
+
get: () => g.selected,
|
|
20
|
+
set: (s) => b("update:selected", s)
|
|
21
|
+
});
|
|
22
|
+
return (s, f) => Object.keys(s.scopes ?? {}).length ? (d(), a(t(M), {
|
|
23
|
+
key: 0,
|
|
24
|
+
modelValue: c.value,
|
|
25
|
+
"onUpdate:modelValue": f[0] || (f[0] = (l) => c.value = l),
|
|
26
|
+
multiple: ""
|
|
27
|
+
}, {
|
|
28
|
+
default: n(({ open: l }) => [
|
|
29
|
+
e("div", {
|
|
30
|
+
ref_key: "trigger",
|
|
31
|
+
ref: m,
|
|
32
|
+
class: C(["wrapper", { "wrapper-open": l }])
|
|
33
|
+
}, [
|
|
34
|
+
p(t(q), { as: J }, {
|
|
35
|
+
default: n(() => [
|
|
36
|
+
e("div", P, [
|
|
37
|
+
_(" Scopes " + r(c.value.length), 1),
|
|
38
|
+
Q,
|
|
39
|
+
_(r(Object.entries(s.scopes ?? {}).length) + " ", 1),
|
|
40
|
+
p(t(H), {
|
|
41
|
+
icon: l ? "ChevronUp" : "ChevronDown",
|
|
42
|
+
size: "sm"
|
|
43
|
+
}, null, 8, ["icon"])
|
|
44
|
+
])
|
|
45
|
+
]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, 1024)
|
|
48
|
+
], 2),
|
|
49
|
+
(d(), a(V, { to: "body" }, [
|
|
50
|
+
e("div", {
|
|
51
|
+
ref_key: "dropdown",
|
|
52
|
+
ref: u,
|
|
53
|
+
class: "floating",
|
|
54
|
+
style: B(t(v))
|
|
55
|
+
}, [
|
|
56
|
+
p(t(A), {
|
|
57
|
+
as: "dl",
|
|
58
|
+
class: "dropdown"
|
|
59
|
+
}, {
|
|
60
|
+
default: n(() => [
|
|
61
|
+
(d(!0), L(O, null, I(Object.entries(s.scopes ?? {}), ([i, S]) => (d(), a(t(G), {
|
|
62
|
+
key: i,
|
|
63
|
+
as: "div",
|
|
64
|
+
class: "dropdown-item",
|
|
65
|
+
value: i
|
|
66
|
+
}, {
|
|
67
|
+
default: n(({ selected: k }) => [
|
|
68
|
+
e("input", {
|
|
69
|
+
checked: k,
|
|
70
|
+
class: "dropdown-item-check",
|
|
71
|
+
tabindex: "-1",
|
|
72
|
+
type: "checkbox"
|
|
73
|
+
}, null, 8, R),
|
|
74
|
+
e("dt", W, r(i), 1),
|
|
75
|
+
e("dd", X, r(S), 1)
|
|
76
|
+
]),
|
|
77
|
+
_: 2
|
|
78
|
+
}, 1032, ["value"]))), 128))
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
})
|
|
82
|
+
], 4)
|
|
83
|
+
]))
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["modelValue"])) : N("", !0);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export {
|
|
90
|
+
oe as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
+
value?: OpenAPIV2.SecurityDefinitionsObject | {
|
|
4
|
+
[key: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject;
|
|
5
|
+
} | Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | undefined;
|
|
6
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
input: (key: string) => void;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
|
+
value?: OpenAPIV2.SecurityDefinitionsObject | {
|
|
10
|
+
[key: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject;
|
|
11
|
+
} | Record<string, OpenAPIV3_1.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | undefined;
|
|
12
|
+
}>>> & {
|
|
13
|
+
onInput?: ((key: string) => any) | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToOption<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: import('vue').PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=SecuritySchemeSelector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecuritySchemeSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/legacy/components/SecuritySchemeSelector.vue"],"names":[],"mappings":"AAmLA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;;;;;AA8L/E,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as N, onMounted as O, onServerPrefetch as k, computed as B, openBlock as a, createElementBlock as i, toDisplayString as d, createElementVNode as y, unref as c, createVNode as j, withModifiers as K, Fragment as P, renderList as V, createCommentVNode as $, pushScopeId as D, popScopeId as E } from "vue";
|
|
2
|
+
import { ScalarIcon as F } from "@scalar/components";
|
|
3
|
+
import { useAuthenticationStore as H } from "../stores/useAuthenticationStore.js";
|
|
4
|
+
const M = (r) => (D("data-v-d4d9bca1"), r = r(), E(), r), T = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "security-scheme-label"
|
|
7
|
+
}, z = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "security-scheme-selector"
|
|
10
|
+
}, q = { class: "security-scheme-label" }, G = ["value"], J = /* @__PURE__ */ M(() => /* @__PURE__ */ y("option", { value: "" }, "None", -1)), Q = ["value"], X = /* @__PURE__ */ N({
|
|
11
|
+
__name: "SecuritySchemeSelector",
|
|
12
|
+
props: {
|
|
13
|
+
value: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["input"],
|
|
16
|
+
setup(r, { emit: v }) {
|
|
17
|
+
const l = r, m = v, { authentication: o, setAuthentication: _ } = H(), A = (e) => {
|
|
18
|
+
p(e.target.value);
|
|
19
|
+
};
|
|
20
|
+
O(() => {
|
|
21
|
+
o.preferredSecurityScheme || p(Object.keys(l.value ?? {})[0] ?? null);
|
|
22
|
+
});
|
|
23
|
+
const p = (e) => {
|
|
24
|
+
_({
|
|
25
|
+
preferredSecurityScheme: e
|
|
26
|
+
}), m("input", e);
|
|
27
|
+
};
|
|
28
|
+
k(
|
|
29
|
+
() => p(Object.keys(l.value ?? {})[0] ?? null)
|
|
30
|
+
);
|
|
31
|
+
const w = (e) => !(e != null && e.type), b = (e) => e.type.toLowerCase() === "apikey", C = (e) => e.type === "http" && e.scheme.toLowerCase() === "basic" || e.type.toLowerCase() === "basic", I = (e) => e.type === "http" && e.scheme.toLowerCase() === "bearer", L = (e) => e.type.toLowerCase() === "oauth2", h = (e, t) => `${g(e)} (${t})`, g = (e) => {
|
|
32
|
+
var t, s;
|
|
33
|
+
return w(e) ? "No Authentication" : b(e) ? "API Key" : C(e) ? "Basic Authentication" : I(e) ? "Bearer Authentication" : L(e) ? (t = e.flows) != null && t.implicit ? "OAuth 2.0 Implicit" : (s = e.flows) != null && s.password ? "OAuth 2.0 Password" : "OAuth 2.0" : `${e.type} (not yet supported)`;
|
|
34
|
+
}, n = B(() => Object.keys(l.value ?? {}));
|
|
35
|
+
return (e, t) => {
|
|
36
|
+
var s, f;
|
|
37
|
+
return n.value.length === 1 ? (a(), i("div", T, d(h((s = e.value) == null ? void 0 : s[n.value[0]], n.value[0])), 1)) : n.value.length > 1 ? (a(), i("div", z, [
|
|
38
|
+
y("span", q, d(c(o).preferredSecurityScheme ? h(
|
|
39
|
+
(f = e.value) == null ? void 0 : f[c(o).preferredSecurityScheme],
|
|
40
|
+
c(o).preferredSecurityScheme
|
|
41
|
+
) : "None"), 1),
|
|
42
|
+
j(c(F), { icon: "ChevronDown" }),
|
|
43
|
+
y("select", {
|
|
44
|
+
value: c(o).preferredSecurityScheme,
|
|
45
|
+
onClick: t[0] || (t[0] = K(() => {
|
|
46
|
+
}, ["prevent"])),
|
|
47
|
+
onInput: A
|
|
48
|
+
}, [
|
|
49
|
+
J,
|
|
50
|
+
(a(!0), i(P, null, V(n.value, (u) => {
|
|
51
|
+
var S;
|
|
52
|
+
return a(), i("option", {
|
|
53
|
+
key: u,
|
|
54
|
+
value: u ?? null
|
|
55
|
+
}, d(h((S = e.value) == null ? void 0 : S[u], u)), 9, Q);
|
|
56
|
+
}), 128))
|
|
57
|
+
], 40, G)
|
|
58
|
+
])) : $("", !0);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
X as default
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpHeaders.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpHeaders.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,eAAO,MAAM,WAAW,EAAE,UAAU,EA6gBnC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const validRequestMethods: readonly ["GET", "POST", "PUT", "HEAD", "DELETE", "PATCH", "OPTIONS", "CONNECT", "TRACE"];
|
|
2
|
+
export type RequestMethod = typeof validRequestMethods[number];
|
|
3
|
+
export declare function isRequestMethod(s: string): s is RequestMethod;
|
|
4
|
+
export declare const requestMethodColors: {
|
|
5
|
+
[x in RequestMethod]: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const requestMethodAbbreviations: {
|
|
8
|
+
[x in RequestMethod]: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=httpRequestMethods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpRequestMethods.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/httpRequestMethods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2FAUtB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE/D,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,aAAa,CAE7D;AAED,eAAO,MAAM,mBAAmB,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAU/D,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE;KAAG,CAAC,IAAI,aAAa,GAAG,MAAM;CAUtE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/fixtures/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPlaceholderRequest.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/createPlaceholderRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAO,mBAU1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeStringAsBase64.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/encodeStringAsBase64.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,UAQjD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuthenticationState } from '@scalar/oas-utils';
|
|
2
|
+
import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
|
|
3
|
+
import type { HarRequest } from 'httpsnippet-lite';
|
|
4
|
+
/**
|
|
5
|
+
* Get the request object from the authentication state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getRequestFromAuthentication(authentication: AuthenticationState, operationSecurity?: (OpenAPIV2.SecurityDefinitionsObject | OpenAPIV3.SecurityRequirementObject | OpenAPIV3_1.SecurityRequirementObject)[]): Partial<HarRequest>;
|
|
8
|
+
export declare function getBase64Token(username: string, password: string): string;
|
|
9
|
+
export declare function getSecretCredentialsFromAuthentication(authentication: AuthenticationState): string[];
|
|
10
|
+
//# sourceMappingURL=getRequestFromAuthentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRequestFromAuthentication.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/getRequestFromAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAoClD;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,mBAAmB,EACnC,iBAAiB,CAAC,EAAE,CAChB,SAAS,CAAC,yBAAyB,GACnC,SAAS,CAAC,yBAAyB,GACnC,WAAW,CAAC,yBAAyB,CACxC,EAAE,GACF,OAAO,CAAC,UAAU,CAAC,CAuIrB;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAIhE;AAED,wBAAgB,sCAAsC,CACpD,cAAc,EAAE,mBAAmB,YAcpC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { encodeStringAsBase64 as k } from "./encodeStringAsBase64.js";
|
|
2
|
+
function i(e) {
|
|
3
|
+
return !(!e || Array.isArray(e) && !e.length || (e ?? []).some(
|
|
4
|
+
(r) => !Object.keys(r).length
|
|
5
|
+
));
|
|
6
|
+
}
|
|
7
|
+
function K(e, r) {
|
|
8
|
+
var o, c;
|
|
9
|
+
const n = [], p = [], l = [];
|
|
10
|
+
if (!e.customSecurity && (!e.preferredSecurityScheme || !i(r)))
|
|
11
|
+
return { headers: n, queryString: p, cookies: l };
|
|
12
|
+
const m = (r == null ? void 0 : r.some(
|
|
13
|
+
(t) => e.preferredSecurityScheme && Object.keys(t).includes(
|
|
14
|
+
e.preferredSecurityScheme
|
|
15
|
+
)
|
|
16
|
+
)) || e.customSecurity ? e.preferredSecurityScheme : Object.keys((r == null ? void 0 : r[0]) ?? {}).pop(), s = (o = e.securitySchemes) == null ? void 0 : o[m ?? ""];
|
|
17
|
+
if (s) {
|
|
18
|
+
if ("type" in s && s.type === "apiKey") {
|
|
19
|
+
if ("in" in s && s.in === "header") {
|
|
20
|
+
const t = (c = e.apiKey.token) != null && c.length ? e.apiKey.token : "YOUR_TOKEN";
|
|
21
|
+
n.push({
|
|
22
|
+
name: "name" in s ? s.name : "",
|
|
23
|
+
value: t
|
|
24
|
+
});
|
|
25
|
+
} else if ("in" in s && s.in === "cookie") {
|
|
26
|
+
const t = e.apiKey.token.length ? e.apiKey.token : "YOUR_TOKEN";
|
|
27
|
+
l.push({
|
|
28
|
+
name: s.name,
|
|
29
|
+
value: t
|
|
30
|
+
});
|
|
31
|
+
} else if ("in" in s && s.in === "query") {
|
|
32
|
+
const t = e.apiKey.token.length ? e.apiKey.token : "YOUR_TOKEN";
|
|
33
|
+
p.push({
|
|
34
|
+
name: s.name,
|
|
35
|
+
value: t
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
} else if ("type" in s && (s.type === "http" || s.type === "basic")) {
|
|
39
|
+
if ("type" in s && (s.type === "basic" || s.type === "http" && s.scheme === "basic")) {
|
|
40
|
+
const { username: t, password: y } = e.http.basic, h = f(t, y);
|
|
41
|
+
n.push({
|
|
42
|
+
name: "Authorization",
|
|
43
|
+
value: `Basic ${h}`.trim()
|
|
44
|
+
});
|
|
45
|
+
} else if ("type" in s && s.type === "http" && s.scheme === "bearer") {
|
|
46
|
+
const t = e.http.bearer.token.length ? e.http.bearer.token : "YOUR_SECRET_TOKEN";
|
|
47
|
+
n.push({
|
|
48
|
+
name: "Authorization",
|
|
49
|
+
value: `Bearer ${t}`
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
} else if ("type" in s && s.type.toLowerCase() === "oauth2") {
|
|
53
|
+
const t = e.oAuth2.accessToken || "YOUR_SECRET_TOKEN";
|
|
54
|
+
n.push({
|
|
55
|
+
name: "Authorization",
|
|
56
|
+
value: `Bearer ${t}`
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return { headers: n, queryString: p, cookies: l };
|
|
61
|
+
}
|
|
62
|
+
function f(e, r) {
|
|
63
|
+
return e != null && e.length || r != null && r.length ? k(`${e}:${r}`) : "";
|
|
64
|
+
}
|
|
65
|
+
function S(e) {
|
|
66
|
+
return [
|
|
67
|
+
e.apiKey.token,
|
|
68
|
+
e.http.bearer.token,
|
|
69
|
+
e.oAuth2.accessToken,
|
|
70
|
+
// The basic auth token is the base64 encoded username and password
|
|
71
|
+
f(
|
|
72
|
+
e.http.basic.username,
|
|
73
|
+
e.http.basic.password
|
|
74
|
+
),
|
|
75
|
+
// The plain text password shouldn’t appear anyway, but just in case
|
|
76
|
+
e.http.basic.password
|
|
77
|
+
].filter(Boolean);
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
f as getBase64Token,
|
|
81
|
+
K as getRequestFromAuthentication,
|
|
82
|
+
S as getSecretCredentialsFromAuthentication
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUrlFromServerState.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/getUrlFromServerState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,sBAWvD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { replaceVariables as u } from "@scalar/oas-utils/helpers";
|
|
2
|
+
function i(l) {
|
|
3
|
+
var o;
|
|
4
|
+
const r = (o = l == null ? void 0 : l.servers) == null ? void 0 : o[l.selectedServer ?? 0];
|
|
5
|
+
return typeof (r == null ? void 0 : r.url) == "string" ? u(r == null ? void 0 : r.url, l.variables) : r == null ? void 0 : r.url;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
i as getUrlFromServerState
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanDiff.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/humanDiff.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,SAAS,CAAC,aAAa,EAAE,MAAM,UAqC9C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './createPlaceholderRequest.js';
|
|
2
|
+
export * from './encodeStringAsBase64.js';
|
|
3
|
+
export * from './getRequestFromAuthentication.js';
|
|
4
|
+
export * from './getUrlFromServerState.js';
|
|
5
|
+
export * from './humanDiff';
|
|
6
|
+
export * from './mapFromArray';
|
|
7
|
+
export * from './normalizeHeaders';
|
|
8
|
+
export * from './normalizePath';
|
|
9
|
+
export * from './normalizeRequestMethod.js';
|
|
10
|
+
export * from './normalizeUrl';
|
|
11
|
+
export * from './prepareClientRequestConfig';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A utility function to convert an array of objects to an object of objects.
|
|
3
|
+
*/
|
|
4
|
+
export declare function mapFromArray<T extends Record<string, unknown>, K extends keyof T & string, V extends keyof T & string>(arr: T[], key: K, valueKey: V): Record<string, T[V]>;
|
|
5
|
+
//# sourceMappingURL=mapFromArray.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapFromArray.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/mapFromArray.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAC1B,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAC1B,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,wBAQ9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms all header keys to lowercase
|
|
3
|
+
*
|
|
4
|
+
* { 'Content-Type': 'application/json' } -> { 'content-type': 'application/json' }
|
|
5
|
+
*/
|
|
6
|
+
export declare const normalizeHeaders: (headers?: Record<string, any>) => {
|
|
7
|
+
[k: string]: any;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=normalizeHeaders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeHeaders.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeHeaders.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,aAAc,OAAO,MAAM,EAAE,GAAG,CAAC;;CAK3D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizePath.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizePath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,WAY1C,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RequestMethod } from '@scalar/oas-utils/helpers';
|
|
2
|
+
/**
|
|
3
|
+
* Get a normalized request method (e.g. GET, POST, etc.)
|
|
4
|
+
*/
|
|
5
|
+
export declare const normalizeRequestMethod: (method?: string) => RequestMethod;
|
|
6
|
+
//# sourceMappingURL=normalizeRequestMethod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAM9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,aAsBxD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isRequestMethod as s } from "../fixtures/httpRequestMethods.js";
|
|
2
|
+
const e = "GET", r = (t) => {
|
|
3
|
+
if (typeof t != "string")
|
|
4
|
+
return console.warn(
|
|
5
|
+
`Request method is not a string. Using ${e} as the default.`
|
|
6
|
+
), e;
|
|
7
|
+
const o = t.trim().toUpperCase();
|
|
8
|
+
return s(o) ? o : (console.warn(
|
|
9
|
+
`${t} is not a valid request method. Using ${e} as the default.`
|
|
10
|
+
), e);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
r as normalizeRequestMethod
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeUrl.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeUrl.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM,WAuBxC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ClientRequestConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Before a request is sent to the server, we’ll do some final preparation.
|
|
4
|
+
*
|
|
5
|
+
* - Add Content-Type header if request.body is JSON
|
|
6
|
+
* - Parse request.body if it’s JSON
|
|
7
|
+
* - Remove duplicate headers
|
|
8
|
+
*/
|
|
9
|
+
export declare const prepareClientRequestConfig: (configuration: {
|
|
10
|
+
request: ClientRequestConfig;
|
|
11
|
+
}) => {
|
|
12
|
+
id?: string | undefined;
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
url: string;
|
|
15
|
+
type: string;
|
|
16
|
+
path: string;
|
|
17
|
+
variables?: import("@scalar/oas-utils").BaseParameter[] | undefined;
|
|
18
|
+
query?: import("@scalar/oas-utils").BaseParameter[] | undefined;
|
|
19
|
+
cookies?: import("@scalar/oas-utils").BaseParameter[] | undefined;
|
|
20
|
+
headers?: import("@scalar/oas-utils").BaseParameter[] | undefined;
|
|
21
|
+
body?: string | undefined;
|
|
22
|
+
formData?: import("@scalar/oas-utils").BaseParameter[] | undefined;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=prepareClientRequestConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareClientRequestConfig.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/prepareClientRequestConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAUnD;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,kBAAmB;IACxD,OAAO,EAAE,mBAAmB,CAAA;CAC7B;;;;;;;;;;;;CAuDA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare function toggleApiClient(item?: any, forceShow?: boolean): void;
|
|
2
|
+
declare function hideApiClient(): void;
|
|
3
|
+
declare function setActiveApiClientEndpointId(id: string): void;
|
|
4
|
+
declare function setSnippetType(type: string): void;
|
|
5
|
+
export declare const useApiClientStore: () => {
|
|
6
|
+
state: {
|
|
7
|
+
readonly showApiClient: boolean;
|
|
8
|
+
readonly activeApiClientEndpointId: string;
|
|
9
|
+
readonly activeItem: any;
|
|
10
|
+
readonly snippetType: string;
|
|
11
|
+
};
|
|
12
|
+
toggleApiClient: typeof toggleApiClient;
|
|
13
|
+
setActiveApiClientEndpointId: typeof setActiveApiClientEndpointId;
|
|
14
|
+
setSnippetType: typeof setSnippetType;
|
|
15
|
+
hideApiClient: typeof hideApiClient;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useApiClientStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useApiClientStore.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/useApiClientStore.ts"],"names":[],"mappings":"AAoBA,iBAAS,eAAe,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,UAAQ,QASrD;AAED,iBAAS,aAAa,SAErB;AAED,iBAAS,4BAA4B,CAAC,EAAE,EAAE,MAAM,QAE/C;AAED,iBAAS,cAAc,CAAC,IAAI,EAAE,MAAM,QAEnC;AAED,eAAO,MAAM,iBAAiB;;gCAxCb,OAAO;4CACK,MAAM;6BACrB,GAAG;8BACF,MAAM;;;;;;CA2CnB,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { reactive as n, readonly as p } from "vue";
|
|
2
|
+
function o() {
|
|
3
|
+
return {
|
|
4
|
+
showApiClient: !1,
|
|
5
|
+
activeApiClientEndpointId: "",
|
|
6
|
+
activeItem: {},
|
|
7
|
+
snippetType: "javascript"
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
const t = n(o());
|
|
11
|
+
function s(e, i = !1) {
|
|
12
|
+
i ? t.showApiClient = !0 : t.showApiClient = !t.showApiClient, e && (t.activeItem = e);
|
|
13
|
+
}
|
|
14
|
+
function l() {
|
|
15
|
+
t.showApiClient = !1;
|
|
16
|
+
}
|
|
17
|
+
function a(e) {
|
|
18
|
+
t.activeApiClientEndpointId = e;
|
|
19
|
+
}
|
|
20
|
+
function c(e) {
|
|
21
|
+
t.snippetType = e;
|
|
22
|
+
}
|
|
23
|
+
const A = () => ({
|
|
24
|
+
state: p(t),
|
|
25
|
+
toggleApiClient: s,
|
|
26
|
+
setActiveApiClientEndpointId: a,
|
|
27
|
+
setSnippetType: c,
|
|
28
|
+
hideApiClient: l
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
A as useApiClientStore
|
|
32
|
+
};
|