@scalar/api-reference 1.25.76 → 1.25.77
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 +18 -0
- package/dist/browser/standalone.js +23395 -23409
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +41 -56
- 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 +3 -3
- package/dist/components/ApiReferenceLayout.vue2.js +140 -123
- package/dist/components/Content/Content.vue.d.ts +0 -1
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +1 -1
- package/dist/components/Content/Content.vue2.js +67 -62
- package/dist/components/Content/Lazy/Loading.vue.d.ts.map +1 -1
- package/dist/components/Content/Lazy/Loading.vue.js +74 -69
- package/dist/components/Content/Tag/TagList.vue.d.ts.map +1 -1
- package/dist/components/Content/Tag/TagList.vue.js +37 -33
- package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts +1 -1
- package/dist/embeds/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts +60 -60
- package/dist/embeds/OpenApiDocument/OpenApiDocument.vue.d.ts.map +1 -1
- package/dist/embeds/OpenApiDocument/types.d.ts +1 -1
- package/dist/embeds/OpenApiDocument/types.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/features/ApiClientModal/ApiClientModal.vue.js +20 -18
- package/dist/features/ApiClientModal/useApiClient.d.ts +149 -138
- package/dist/features/ApiClientModal/useApiClient.d.ts.map +1 -1
- package/dist/features/ApiClientModal/useApiClient.js +6 -6
- package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerUrlSelect.vue.js +2 -2
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +3 -3
- package/dist/features/BaseUrl/ServerVariablesSelect.vue2.js +3 -3
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/features/BaseUrl/ServerVariablesTextbox.vue.js +2 -2
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts +3 -0
- package/dist/features/ExampleRequest/ExampleRequest.vue.d.ts.map +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue.js +1 -1
- package/dist/features/ExampleRequest/ExampleRequest.vue2.js +121 -147
- package/dist/features/Operation/Operation.vue.d.ts +6 -4
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +30 -13
- package/dist/features/Operation/hooks/useRequestExample.d.ts +17 -0
- package/dist/features/Operation/hooks/useRequestExample.d.ts.map +1 -0
- package/dist/features/Operation/hooks/useRequestExample.js +68 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +2 -0
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue2.js +47 -41
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +2 -0
- 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/Operation/layouts/ModernLayout.vue2.js +52 -48
- package/dist/helpers/convertRequestToHarRequest.d.ts +7 -0
- package/dist/helpers/convertRequestToHarRequest.d.ts.map +1 -0
- package/dist/helpers/convertRequestToHarRequest.js +64 -0
- package/dist/helpers/get-request.d.ts +40 -0
- package/dist/helpers/get-request.d.ts.map +1 -0
- package/dist/helpers/get-request.js +6 -0
- package/dist/helpers/getExampleCode.d.ts +2 -2
- package/dist/helpers/getExampleCode.d.ts.map +1 -1
- package/dist/helpers/getExampleCode.js +19 -16
- package/dist/helpers/index.d.ts +1 -3
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/provideSymbols.d.ts +0 -5
- package/dist/helpers/provideSymbols.d.ts.map +1 -1
- package/dist/helpers/provideSymbols.js +3 -4
- package/dist/hooks/useReactiveSpec.d.ts +1 -1
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/index.js +77 -85
- package/dist/legacy/helpers/getUrlFromServerState.js +8 -8
- package/dist/legacy/helpers/index.d.ts +0 -10
- package/dist/legacy/helpers/index.d.ts.map +1 -1
- package/dist/legacy/stores/index.d.ts +0 -3
- package/dist/legacy/stores/index.d.ts.map +1 -1
- package/dist/stores/index.d.ts +0 -1
- package/dist/stores/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/components/Content/Authentication/Authentication.vue.d.ts +0 -8
- package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +0 -1
- package/dist/components/Content/Authentication/Authentication.vue.js +0 -7
- package/dist/components/Content/Authentication/Authentication.vue2.js +0 -62
- package/dist/components/Content/Authentication/index.d.ts +0 -2
- package/dist/components/Content/Authentication/index.d.ts.map +0 -1
- package/dist/helpers/createRequest.d.ts +0 -6
- package/dist/helpers/createRequest.d.ts.map +0 -1
- package/dist/helpers/createRequest.js +0 -16
- package/dist/helpers/getApiClientRequest.d.ts +0 -13
- package/dist/helpers/getApiClientRequest.d.ts.map +0 -1
- package/dist/helpers/getApiClientRequest.js +0 -43
- package/dist/helpers/getHarRequest.d.ts +0 -4
- package/dist/helpers/getHarRequest.d.ts.map +0 -1
- package/dist/helpers/getHarRequest.js +0 -34
- package/dist/legacy/components/CardForm.vue.d.ts +0 -18
- package/dist/legacy/components/CardForm.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardForm.vue.js +0 -13
- package/dist/legacy/components/CardFormButton.vue.d.ts +0 -22
- package/dist/legacy/components/CardFormButton.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormButton.vue.js +0 -7
- package/dist/legacy/components/CardFormButton.vue2.js +0 -18
- package/dist/legacy/components/CardFormGroup.vue.d.ts +0 -18
- package/dist/legacy/components/CardFormGroup.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormGroup.vue.js +0 -13
- package/dist/legacy/components/CardFormRows.vue.d.ts +0 -18
- package/dist/legacy/components/CardFormRows.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormRows.vue.js +0 -13
- package/dist/legacy/components/CardFormTextInput.vue.d.ts +0 -23
- package/dist/legacy/components/CardFormTextInput.vue.d.ts.map +0 -1
- package/dist/legacy/components/CardFormTextInput.vue.js +0 -7
- package/dist/legacy/components/CardFormTextInput.vue2.js +0 -53
- package/dist/legacy/components/SecurityScheme.vue.d.ts +0 -8
- package/dist/legacy/components/SecurityScheme.vue.d.ts.map +0 -1
- package/dist/legacy/components/SecurityScheme.vue.js +0 -7
- package/dist/legacy/components/SecurityScheme.vue2.js +0 -393
- package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts +0 -13
- package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts.map +0 -1
- package/dist/legacy/components/SecuritySchemeScopes.vue.js +0 -7
- package/dist/legacy/components/SecuritySchemeScopes.vue2.js +0 -91
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts +0 -11
- package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +0 -1
- package/dist/legacy/components/SecuritySchemeSelector.vue.js +0 -7
- package/dist/legacy/components/SecuritySchemeSelector.vue2.js +0 -96
- package/dist/legacy/helpers/createPlaceholderRequest.d.ts +0 -6
- package/dist/legacy/helpers/createPlaceholderRequest.d.ts.map +0 -1
- package/dist/legacy/helpers/encodeStringAsBase64.js +0 -6
- package/dist/legacy/helpers/getRequestFromAuthentication.d.ts +0 -10
- package/dist/legacy/helpers/getRequestFromAuthentication.d.ts.map +0 -1
- package/dist/legacy/helpers/getRequestFromAuthentication.js +0 -83
- package/dist/legacy/helpers/humanDiff.d.ts +0 -5
- package/dist/legacy/helpers/humanDiff.d.ts.map +0 -1
- package/dist/legacy/helpers/mapFromArray.d.ts +0 -5
- package/dist/legacy/helpers/mapFromArray.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeHeaderName.d.ts +0 -5
- package/dist/legacy/helpers/normalizeHeaderName.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeHeaderName.js +0 -6
- package/dist/legacy/helpers/normalizeHeaders.d.ts +0 -8
- package/dist/legacy/helpers/normalizeHeaders.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeHeaders.js +0 -22
- package/dist/legacy/helpers/normalizePath.d.ts +0 -5
- package/dist/legacy/helpers/normalizePath.d.ts.map +0 -1
- package/dist/legacy/helpers/normalizeUrl.d.ts +0 -5
- package/dist/legacy/helpers/normalizeUrl.d.ts.map +0 -1
- package/dist/legacy/helpers/prepareClientRequestConfig.d.ts +0 -24
- package/dist/legacy/helpers/prepareClientRequestConfig.d.ts.map +0 -1
- package/dist/legacy/stores/useAuthenticationStore.d.ts +0 -55
- package/dist/legacy/stores/useAuthenticationStore.d.ts.map +0 -1
- package/dist/legacy/stores/useAuthenticationStore.js +0 -36
- package/dist/legacy/stores/useOpenApiStore.d.ts +0 -125
- package/dist/legacy/stores/useOpenApiStore.d.ts.map +0 -1
- package/dist/legacy/stores/useOpenApiStore.js +0 -9
- package/dist/legacy/stores/useRequestStore.d.ts +0 -62
- package/dist/legacy/stores/useRequestStore.d.ts.map +0 -1
|
@@ -1,83 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeHeaderName.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeHeaderName.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,UAU/C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Header } from '@scalar/types/legacy';
|
|
2
|
-
/**
|
|
3
|
-
* Transforms all header keys to lowercase
|
|
4
|
-
*
|
|
5
|
-
* { 'Content-Type': 'application/json' } -> { 'content-type': 'application/json' }
|
|
6
|
-
*/
|
|
7
|
-
export declare const normalizeHeaders: (headers?: Record<string, any> | Header[]) => Record<string, any> | Header[];
|
|
8
|
-
//# sourceMappingURL=normalizeHeaders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeHeaders.d.ts","sourceRoot":"","sources":["../../../src/legacy/helpers/normalizeHeaders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAIlD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,aACjB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,KACvC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EA2B9B,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { normalizeHeaderName as n } from "./normalizeHeaderName.js";
|
|
2
|
-
const o = (a) => {
|
|
3
|
-
if (Array.isArray(a)) {
|
|
4
|
-
const r = /* @__PURE__ */ new Map();
|
|
5
|
-
return a.forEach((e) => {
|
|
6
|
-
r.set(n(e.name), e);
|
|
7
|
-
}), Array.from(r.values()).map((e) => ({
|
|
8
|
-
...e,
|
|
9
|
-
name: n(e.name)
|
|
10
|
-
}));
|
|
11
|
-
}
|
|
12
|
-
return Object.fromEntries(
|
|
13
|
-
Object.entries(a ?? {}).reverse().filter(
|
|
14
|
-
([r], e, m) => m.findIndex(
|
|
15
|
-
([t]) => n(t) === n(r)
|
|
16
|
-
) === e
|
|
17
|
-
).reverse().map(([r, e]) => [n(r), e])
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
o as normalizeHeaders
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,24 +0,0 @@
|
|
|
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;
|
|
13
|
-
name?: string;
|
|
14
|
-
url: string;
|
|
15
|
-
type: string;
|
|
16
|
-
path: string;
|
|
17
|
-
variables?: import("@scalar/types").BaseParameter[];
|
|
18
|
-
query?: import("..").Query[];
|
|
19
|
-
cookies?: import("..").Cookie[];
|
|
20
|
-
headers?: import("..").Header[];
|
|
21
|
-
body?: string;
|
|
22
|
-
formData?: import("..").FormDataItem[];
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=prepareClientRequestConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { AuthenticationState } from '@scalar/types/legacy';
|
|
2
|
-
export declare const createEmptyAuthenticationState: () => AuthenticationState;
|
|
3
|
-
export declare const useAuthenticationStore: () => {
|
|
4
|
-
authentication: {
|
|
5
|
-
customSecurity: boolean;
|
|
6
|
-
preferredSecurityScheme: string | null;
|
|
7
|
-
securitySchemes?: import("@scalar/openapi-types").OpenAPIV2.SecurityDefinitionsObject | import("@scalar/openapi-types").OpenAPIV3.ComponentsObject["securitySchemes"] | import("@scalar/openapi-types").OpenAPIV3_1.ComponentsObject["securitySchemes"];
|
|
8
|
-
http: {
|
|
9
|
-
basic: {
|
|
10
|
-
username: string;
|
|
11
|
-
password: string;
|
|
12
|
-
};
|
|
13
|
-
bearer: {
|
|
14
|
-
token: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
apiKey: {
|
|
18
|
-
token: string;
|
|
19
|
-
};
|
|
20
|
-
oAuth2: {
|
|
21
|
-
clientId: string;
|
|
22
|
-
scopes: string[];
|
|
23
|
-
accessToken: string;
|
|
24
|
-
state: string;
|
|
25
|
-
username: string;
|
|
26
|
-
password: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
setAuthentication: (newState: Partial<AuthenticationState>) => {
|
|
30
|
-
customSecurity: boolean;
|
|
31
|
-
preferredSecurityScheme: string | null;
|
|
32
|
-
securitySchemes?: import("@scalar/openapi-types").OpenAPIV2.SecurityDefinitionsObject | import("@scalar/openapi-types").OpenAPIV3.ComponentsObject["securitySchemes"] | import("@scalar/openapi-types").OpenAPIV3_1.ComponentsObject["securitySchemes"];
|
|
33
|
-
http: {
|
|
34
|
-
basic: {
|
|
35
|
-
username: string;
|
|
36
|
-
password: string;
|
|
37
|
-
};
|
|
38
|
-
bearer: {
|
|
39
|
-
token: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
apiKey: {
|
|
43
|
-
token: string;
|
|
44
|
-
};
|
|
45
|
-
oAuth2: {
|
|
46
|
-
clientId: string;
|
|
47
|
-
scopes: string[];
|
|
48
|
-
accessToken: string;
|
|
49
|
-
state: string;
|
|
50
|
-
username: string;
|
|
51
|
-
password: string;
|
|
52
|
-
};
|
|
53
|
-
} & Partial<AuthenticationState>;
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=useAuthenticationStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAuthenticationStore.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/useAuthenticationStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG/D,eAAO,MAAM,8BAA8B,QAAO,mBAwBhD,CAAA;AASF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;kCAHE,OAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAM/D,CAAA"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ssrState as o } from "@scalar/oas-utils/helpers";
|
|
2
|
-
import { reactive as s } from "vue";
|
|
3
|
-
const a = () => ({
|
|
4
|
-
preferredSecurityScheme: null,
|
|
5
|
-
// In case the spec has no security and the user would like to add some
|
|
6
|
-
customSecurity: !1,
|
|
7
|
-
http: {
|
|
8
|
-
basic: {
|
|
9
|
-
username: "",
|
|
10
|
-
password: ""
|
|
11
|
-
},
|
|
12
|
-
bearer: {
|
|
13
|
-
token: ""
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
apiKey: {
|
|
17
|
-
token: ""
|
|
18
|
-
},
|
|
19
|
-
oAuth2: {
|
|
20
|
-
username: "",
|
|
21
|
-
password: "",
|
|
22
|
-
clientId: "",
|
|
23
|
-
scopes: [],
|
|
24
|
-
accessToken: "",
|
|
25
|
-
state: ""
|
|
26
|
-
}
|
|
27
|
-
}), t = s(
|
|
28
|
-
o["useGlobalStore-authentication"] ?? a()
|
|
29
|
-
), n = (e) => Object.assign(t, e), i = () => ({
|
|
30
|
-
authentication: t,
|
|
31
|
-
setAuthentication: n
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
a as createEmptyAuthenticationState,
|
|
35
|
-
i as useAuthenticationStore
|
|
36
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { TransformedOperation } from '@scalar/types/legacy';
|
|
3
|
-
export type OpenApiState = {
|
|
4
|
-
operation: Partial<TransformedOperation>;
|
|
5
|
-
globalSecurity: OpenAPIV3.SecurityRequirementObject[] | OpenAPIV3_1.SecurityRequirementObject[];
|
|
6
|
-
};
|
|
7
|
-
export declare const createEmptyOpenApiState: () => OpenApiState;
|
|
8
|
-
export declare const useOpenApiStore: () => {
|
|
9
|
-
openApi: {
|
|
10
|
-
operation: {
|
|
11
|
-
httpVerb?: "GET" | "POST" | "PUT" | "HEAD" | "DELETE" | "PATCH" | "OPTIONS" | "CONNECT" | "TRACE" | undefined;
|
|
12
|
-
path?: string | undefined;
|
|
13
|
-
operationId?: string | undefined;
|
|
14
|
-
name?: string | undefined;
|
|
15
|
-
description?: string | undefined;
|
|
16
|
-
information?: {
|
|
17
|
-
description?: string | undefined;
|
|
18
|
-
operationId?: (string | number) | undefined;
|
|
19
|
-
parameters?: {
|
|
20
|
-
name: string;
|
|
21
|
-
in?: string | undefined;
|
|
22
|
-
description?: string | undefined;
|
|
23
|
-
required?: boolean | undefined;
|
|
24
|
-
deprecated?: boolean | undefined;
|
|
25
|
-
allowEmptyValue?: boolean | undefined;
|
|
26
|
-
style?: ("form" | "simple") | undefined;
|
|
27
|
-
explode?: boolean | undefined;
|
|
28
|
-
allowReserved?: boolean | undefined;
|
|
29
|
-
schema?: {
|
|
30
|
-
type: string;
|
|
31
|
-
name?: string | undefined;
|
|
32
|
-
example?: any;
|
|
33
|
-
default?: any;
|
|
34
|
-
format?: string | undefined;
|
|
35
|
-
description?: string | undefined;
|
|
36
|
-
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
example?: any;
|
|
39
|
-
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
40
|
-
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
41
|
-
headers?: {
|
|
42
|
-
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
43
|
-
} | undefined;
|
|
44
|
-
}[] | undefined;
|
|
45
|
-
responses?: Record<string, import("@scalar/openapi-types").OpenAPI.ResponseObject> | undefined;
|
|
46
|
-
security?: OpenAPIV3.SecurityRequirementObject[] | undefined;
|
|
47
|
-
requestBody?: {
|
|
48
|
-
description?: string | undefined;
|
|
49
|
-
required?: boolean | undefined;
|
|
50
|
-
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
51
|
-
} | undefined;
|
|
52
|
-
summary?: string | undefined;
|
|
53
|
-
tags?: string[] | undefined;
|
|
54
|
-
deprecated?: boolean | undefined;
|
|
55
|
-
servers?: ({
|
|
56
|
-
url?: string | undefined;
|
|
57
|
-
description?: string | undefined;
|
|
58
|
-
variables?: {
|
|
59
|
-
[variable: string]: OpenAPIV3.ServerVariableObject;
|
|
60
|
-
} | undefined;
|
|
61
|
-
} | {
|
|
62
|
-
url?: string | undefined;
|
|
63
|
-
description?: string | undefined;
|
|
64
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
65
|
-
})[] | undefined;
|
|
66
|
-
'x-custom-examples'?: {
|
|
67
|
-
lang: string;
|
|
68
|
-
label: string;
|
|
69
|
-
source: string;
|
|
70
|
-
}[] | undefined;
|
|
71
|
-
'x-codeSamples'?: {
|
|
72
|
-
lang: string;
|
|
73
|
-
label: string;
|
|
74
|
-
source: string;
|
|
75
|
-
}[] | undefined;
|
|
76
|
-
'x-code-samples'?: {
|
|
77
|
-
lang: string;
|
|
78
|
-
label: string;
|
|
79
|
-
source: string;
|
|
80
|
-
}[] | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
servers?: ({
|
|
83
|
-
url?: string | undefined;
|
|
84
|
-
description?: string | undefined;
|
|
85
|
-
variables?: {
|
|
86
|
-
[variable: string]: OpenAPIV3.ServerVariableObject;
|
|
87
|
-
} | undefined;
|
|
88
|
-
} | {
|
|
89
|
-
url?: string | undefined;
|
|
90
|
-
description?: string | undefined;
|
|
91
|
-
variables?: Record<string, OpenAPIV3_1.ServerVariableObject> | undefined;
|
|
92
|
-
})[] | undefined;
|
|
93
|
-
pathParameters?: {
|
|
94
|
-
name: string;
|
|
95
|
-
in?: string | undefined;
|
|
96
|
-
description?: string | undefined;
|
|
97
|
-
required?: boolean | undefined;
|
|
98
|
-
deprecated?: boolean | undefined;
|
|
99
|
-
allowEmptyValue?: boolean | undefined;
|
|
100
|
-
style?: ("form" | "simple") | undefined;
|
|
101
|
-
explode?: boolean | undefined;
|
|
102
|
-
allowReserved?: boolean | undefined;
|
|
103
|
-
schema?: {
|
|
104
|
-
type: string;
|
|
105
|
-
name?: string | undefined;
|
|
106
|
-
example?: any;
|
|
107
|
-
default?: any;
|
|
108
|
-
format?: string | undefined;
|
|
109
|
-
description?: string | undefined;
|
|
110
|
-
properties?: Record<string, import("@scalar/types").Schema> | undefined;
|
|
111
|
-
} | undefined;
|
|
112
|
-
example?: any;
|
|
113
|
-
examples?: (Map<string, any> & Omit<Map<string, any>, keyof Map<any, any>>) | undefined;
|
|
114
|
-
content?: import("@scalar/types").RequestBodyMimeTypes | undefined;
|
|
115
|
-
headers?: {
|
|
116
|
-
[key: string]: import("@scalar/openapi-types").OpenAPI.HeaderObject;
|
|
117
|
-
} | undefined;
|
|
118
|
-
}[] | undefined;
|
|
119
|
-
};
|
|
120
|
-
globalSecurity: OpenAPIV3.SecurityRequirementObject[] | OpenAPIV3_1.SecurityRequirementObject[];
|
|
121
|
-
};
|
|
122
|
-
setOperation: (newOperation: TransformedOperation | undefined) => void;
|
|
123
|
-
setGlobalSecurity: (newGlobalSecurity: OpenAPIV3_1.SecurityRequirementObject[] | undefined) => void;
|
|
124
|
-
};
|
|
125
|
-
//# sourceMappingURL=useOpenApiStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenApiStore.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/useOpenApiStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAGhE,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAA;IACxC,cAAc,EACV,SAAS,CAAC,yBAAyB,EAAE,GACrC,WAAW,CAAC,yBAAyB,EAAE,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,uBAAuB,QAAO,YAGzC,CAAA;AAoBF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAKonM,UAAW,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAhC9qM,SAAS,CAAC,yBAAyB,EAAE,GACrC,WAAW,CAAC,yBAAyB,EAAE;;iCAUT,oBAAoB,GAAG,SAAS;2CAQ/C,WAAW,CAAC,yBAAyB,EAAE,GAAG,SAAS;CAYtE,CAAA"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { ClientRequestConfig, RequestResult } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Request state
|
|
4
|
-
*/
|
|
5
|
-
type RequestHistoryOrder = string[];
|
|
6
|
-
type RequestHistoryEntry = RequestResult;
|
|
7
|
-
export declare const useRequestStore: () => {
|
|
8
|
-
readOnly: import("vue").Ref<boolean, boolean>;
|
|
9
|
-
activeRequest: {
|
|
10
|
-
id?: string | undefined;
|
|
11
|
-
name?: string | undefined;
|
|
12
|
-
url: string;
|
|
13
|
-
type: string;
|
|
14
|
-
path: string;
|
|
15
|
-
variables?: {
|
|
16
|
-
name: string;
|
|
17
|
-
description?: (string | null) | undefined;
|
|
18
|
-
value: string | number | Record<string, any>;
|
|
19
|
-
required?: boolean | undefined;
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
}[] | undefined;
|
|
22
|
-
query?: {
|
|
23
|
-
name: string;
|
|
24
|
-
description?: (string | null) | undefined;
|
|
25
|
-
value: string | number | Record<string, any>;
|
|
26
|
-
required?: boolean | undefined;
|
|
27
|
-
enabled: boolean;
|
|
28
|
-
}[] | undefined;
|
|
29
|
-
cookies?: {
|
|
30
|
-
name: string;
|
|
31
|
-
description?: (string | null) | undefined;
|
|
32
|
-
value: string | number | Record<string, any>;
|
|
33
|
-
required?: boolean | undefined;
|
|
34
|
-
enabled: boolean;
|
|
35
|
-
}[] | undefined;
|
|
36
|
-
headers?: {
|
|
37
|
-
name: string;
|
|
38
|
-
description?: (string | null) | undefined;
|
|
39
|
-
value: string | number | Record<string, any>;
|
|
40
|
-
required?: boolean | undefined;
|
|
41
|
-
enabled: boolean;
|
|
42
|
-
}[] | undefined;
|
|
43
|
-
body?: string | undefined;
|
|
44
|
-
formData?: {
|
|
45
|
-
name: string;
|
|
46
|
-
description?: (string | null) | undefined;
|
|
47
|
-
value: string | number | Record<string, any>;
|
|
48
|
-
required?: boolean | undefined;
|
|
49
|
-
enabled: boolean;
|
|
50
|
-
}[] | undefined;
|
|
51
|
-
};
|
|
52
|
-
activeResponse: import("vue").ComputedRef<import("..").ClientResponse | null>;
|
|
53
|
-
requestHistory: Record<string, RequestResult>;
|
|
54
|
-
requestHistoryOrder: import("vue").Ref<string[], string[] | RequestHistoryOrder>;
|
|
55
|
-
activeRequestId: import("vue").Ref<string, string>;
|
|
56
|
-
setActiveResponse: (historyID: string) => void;
|
|
57
|
-
resetActiveResponse: () => void;
|
|
58
|
-
addRequestToHistory: (value: RequestHistoryEntry) => void;
|
|
59
|
-
setActiveRequest: (request: ClientRequestConfig) => void;
|
|
60
|
-
};
|
|
61
|
-
export {};
|
|
62
|
-
//# sourceMappingURL=useRequestStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRequestStore.d.ts","sourceRoot":"","sources":["../../../src/legacy/stores/useRequestStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAElE;;GAEG;AACH,KAAK,mBAAmB,GAAG,MAAM,EAAE,CAAA;AACnC,KAAK,mBAAmB,GAAG,aAAa,CAAA;AA8DxC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCApCU,MAAM;;iCAPR,mBAAmB;gCA2BpB,mBAAmB;CA2BpD,CAAA"}
|