@scalar/api-reference 1.24.20 → 1.24.23

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.
Files changed (225) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/browser/standalone.js +22673 -23143
  3. package/dist/browser/webpack-stats.json +1 -1
  4. package/dist/components/ApiClientModal.vue.d.ts.map +1 -1
  5. package/dist/components/ApiClientModal.vue.js +19 -18
  6. package/dist/components/ApiClientModal.vue3.js +5 -0
  7. package/dist/components/ApiReference.vue.js +14 -14
  8. package/dist/components/ApiReferenceLayout.vue.d.ts +2 -2
  9. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  10. package/dist/components/ApiReferenceLayout.vue.js +2 -2
  11. package/dist/components/ApiReferenceLayout.vue2.js +123 -155
  12. package/dist/components/Content/Authentication/Authentication.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Authentication/Authentication.vue.js +2 -2
  14. package/dist/components/Content/Authentication/Authentication.vue2.js +20 -18
  15. package/dist/components/Content/Content.vue.d.ts +3 -3
  16. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Content.vue.js +2 -2
  18. package/dist/components/Content/Content.vue2.js +72 -93
  19. package/dist/components/Content/Lazy/Loading.vue.js +1 -1
  20. package/dist/components/Content/Operation/CustomRequestExamples.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Operation/CustomRequestExamples.vue.js +1 -1
  22. package/dist/components/Content/Operation/CustomRequestExamples.vue2.js +19 -19
  23. package/dist/components/Content/Operation/ExampleRequest.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Operation/ExampleRequest.vue.js +2 -2
  25. package/dist/components/Content/Operation/ExampleRequest.vue2.js +63 -59
  26. package/dist/components/Content/Operation/OperationAccordion.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Operation/OperationAccordion.vue.js +1 -1
  28. package/dist/components/Content/Operation/OperationAccordion.vue2.js +26 -26
  29. package/dist/components/Content/Operation/TestRequestButton.vue.d.ts.map +1 -1
  30. package/dist/components/Content/Operation/TestRequestButton.vue.js +2 -2
  31. package/dist/components/Content/Operation/TestRequestButton.vue2.js +18 -36
  32. package/dist/components/Content/Schema/Schema.vue.d.ts +2 -2
  33. package/dist/components/Content/Schema/SchemaHeading.vue.d.ts +2 -2
  34. package/dist/components/Content/Tag/Endpoints.vue.d.ts.map +1 -1
  35. package/dist/components/Content/Tag/Endpoints.vue.js +2 -2
  36. package/dist/components/Content/Tag/Endpoints.vue2.js +23 -23
  37. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +42 -0
  38. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -0
  39. package/dist/components/HttpMethod/HttpMethod.vue.js +28 -0
  40. package/dist/components/HttpMethod/HttpMethod.vue2.js +4 -0
  41. package/dist/components/HttpMethod/constants.d.ts +9 -0
  42. package/dist/components/HttpMethod/constants.d.ts.map +1 -0
  43. package/dist/components/HttpMethod/constants.js +36 -0
  44. package/dist/components/HttpMethod/index.d.ts +2 -0
  45. package/dist/components/HttpMethod/index.d.ts.map +1 -0
  46. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts +4 -0
  47. package/dist/components/HttpMethod/utils/isRequestMethod.d.ts.map +1 -0
  48. package/dist/components/HttpMethod/utils/isRequestMethod.js +7 -0
  49. package/dist/components/Sidebar/SidebarHttpBadge.vue.js +1 -1
  50. package/dist/components/Sidebar/SidebarHttpBadge.vue2.js +6 -6
  51. package/dist/components/api-client-bus.d.ts +1 -1
  52. package/dist/components/api-client-bus.d.ts.map +1 -1
  53. package/dist/features/BaseUrl/BaseUrl.vue.d.ts +40 -0
  54. package/dist/features/BaseUrl/BaseUrl.vue.d.ts.map +1 -0
  55. package/dist/features/BaseUrl/BaseUrl.vue.js +97 -0
  56. package/dist/features/BaseUrl/BaseUrl.vue2.js +4 -0
  57. package/dist/features/BaseUrl/ServerForm.vue.d.ts +41 -0
  58. package/dist/features/BaseUrl/ServerForm.vue.d.ts.map +1 -0
  59. package/dist/features/BaseUrl/ServerForm.vue.js +7 -0
  60. package/dist/features/BaseUrl/ServerForm.vue2.js +66 -0
  61. package/dist/{components/Content/BaseUrl/ServerItem.vue.d.ts → features/BaseUrl/ServerUrl.vue.d.ts} +6 -6
  62. package/dist/features/BaseUrl/ServerUrl.vue.d.ts.map +1 -0
  63. package/dist/features/BaseUrl/ServerUrl.vue.js +8 -0
  64. package/dist/features/BaseUrl/ServerUrl.vue2.js +29 -0
  65. package/dist/{components/ApiClientModalOld.vue.d.ts → features/BaseUrl/ServerUrlSelect.vue.d.ts} +9 -15
  66. package/dist/features/BaseUrl/ServerUrlSelect.vue.d.ts.map +1 -0
  67. package/dist/features/BaseUrl/ServerUrlSelect.vue.js +7 -0
  68. package/dist/features/BaseUrl/ServerUrlSelect.vue2.js +56 -0
  69. package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts +23 -0
  70. package/dist/features/BaseUrl/ServerVariablesForm.vue.d.ts.map +1 -0
  71. package/dist/features/BaseUrl/ServerVariablesForm.vue.js +7 -0
  72. package/dist/features/BaseUrl/ServerVariablesForm.vue2.js +53 -0
  73. package/dist/{components/Content/BaseUrl/ServerVariableSelect.vue.d.ts → features/BaseUrl/ServerVariablesSelect.vue.d.ts} +1 -1
  74. package/dist/features/BaseUrl/ServerVariablesSelect.vue.d.ts.map +1 -0
  75. package/dist/features/BaseUrl/ServerVariablesSelect.vue.js +7 -0
  76. package/dist/{components/Content/BaseUrl/ServerVariableSelect.vue2.js → features/BaseUrl/ServerVariablesSelect.vue2.js} +1 -1
  77. package/dist/{components/Content/BaseUrl/ServerVariableTextbox.vue.d.ts → features/BaseUrl/ServerVariablesTextbox.vue.d.ts} +1 -1
  78. package/dist/features/BaseUrl/ServerVariablesTextbox.vue.d.ts.map +1 -0
  79. package/dist/features/BaseUrl/ServerVariablesTextbox.vue.js +7 -0
  80. package/dist/{components/Content/BaseUrl/ServerVariableTextbox.vue2.js → features/BaseUrl/ServerVariablesTextbox.vue2.js} +6 -6
  81. package/dist/features/BaseUrl/index.d.ts +3 -0
  82. package/dist/features/BaseUrl/index.d.ts.map +1 -0
  83. package/dist/features/BaseUrl/types.d.ts +10 -0
  84. package/dist/features/BaseUrl/types.d.ts.map +1 -0
  85. package/dist/features/BaseUrl/utils/getServers.d.ts +15 -0
  86. package/dist/features/BaseUrl/utils/getServers.d.ts.map +1 -0
  87. package/dist/features/BaseUrl/utils/getServers.js +29 -0
  88. package/dist/features/BaseUrl/utils/index.d.ts +2 -0
  89. package/dist/features/BaseUrl/utils/index.d.ts.map +1 -0
  90. package/dist/helpers/createEmptySpecification.d.ts +1 -1
  91. package/dist/helpers/createEmptySpecification.d.ts.map +1 -1
  92. package/dist/helpers/createEmptySpecification.js +5 -4
  93. package/dist/helpers/getApiClientRequest.d.ts +1 -1
  94. package/dist/helpers/getApiClientRequest.d.ts.map +1 -1
  95. package/dist/helpers/getApiClientRequest.js +12 -11
  96. package/dist/helpers/getModels.d.ts +1 -1
  97. package/dist/helpers/index.d.ts +1 -1
  98. package/dist/helpers/index.d.ts.map +1 -1
  99. package/dist/helpers/openClientFor.js +10 -7
  100. package/dist/helpers/parse.d.ts.map +1 -1
  101. package/dist/helpers/parse.js +33 -31
  102. package/dist/hooks/useReactiveSpec.d.ts +9 -9
  103. package/dist/hooks/useSidebar.js +18 -17
  104. package/dist/index.d.ts +0 -2
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +101 -102
  107. package/dist/legacy/components/CardForm.vue.d.ts +10 -0
  108. package/dist/legacy/components/CardForm.vue.d.ts.map +1 -0
  109. package/dist/legacy/components/CardForm.vue.js +13 -0
  110. package/dist/legacy/components/CardFormButton.vue.d.ts +12 -0
  111. package/dist/legacy/components/CardFormButton.vue.d.ts.map +1 -0
  112. package/dist/legacy/components/CardFormButton.vue.js +7 -0
  113. package/dist/legacy/components/CardFormButton.vue2.js +18 -0
  114. package/dist/legacy/components/CardFormGroup.vue.d.ts +10 -0
  115. package/dist/legacy/components/CardFormGroup.vue.d.ts.map +1 -0
  116. package/dist/legacy/components/CardFormGroup.vue.js +13 -0
  117. package/dist/legacy/components/CardFormRows.vue.d.ts +10 -0
  118. package/dist/legacy/components/CardFormRows.vue.d.ts.map +1 -0
  119. package/dist/legacy/components/CardFormRows.vue.js +13 -0
  120. package/dist/legacy/components/CardFormTextInput.vue.d.ts +25 -0
  121. package/dist/legacy/components/CardFormTextInput.vue.d.ts.map +1 -0
  122. package/dist/legacy/components/CardFormTextInput.vue.js +7 -0
  123. package/dist/legacy/components/CardFormTextInput.vue2.js +37 -0
  124. package/dist/{components/Content/BaseUrl/ServerVariables.vue.d.ts → legacy/components/SecurityScheme.vue.d.ts} +6 -4
  125. package/dist/legacy/components/SecurityScheme.vue.d.ts.map +1 -0
  126. package/dist/legacy/components/SecurityScheme.vue.js +7 -0
  127. package/dist/legacy/components/SecurityScheme.vue2.js +364 -0
  128. package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts +26 -0
  129. package/dist/legacy/components/SecuritySchemeScopes.vue.d.ts.map +1 -0
  130. package/dist/legacy/components/SecuritySchemeScopes.vue.js +7 -0
  131. package/dist/legacy/components/SecuritySchemeScopes.vue2.js +91 -0
  132. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts +25 -0
  133. package/dist/legacy/components/SecuritySchemeSelector.vue.d.ts.map +1 -0
  134. package/dist/legacy/components/SecuritySchemeSelector.vue.js +7 -0
  135. package/dist/legacy/components/SecuritySchemeSelector.vue2.js +64 -0
  136. package/dist/legacy/fixtures/httpHeaders.d.ts +6 -0
  137. package/dist/legacy/fixtures/httpHeaders.d.ts.map +1 -0
  138. package/dist/legacy/fixtures/httpRequestMethods.d.ts +10 -0
  139. package/dist/legacy/fixtures/httpRequestMethods.d.ts.map +1 -0
  140. package/dist/legacy/fixtures/httpRequestMethods.js +18 -0
  141. package/dist/legacy/fixtures/index.d.ts +3 -0
  142. package/dist/legacy/fixtures/index.d.ts.map +1 -0
  143. package/dist/legacy/helpers/createPlaceholderRequest.d.ts +6 -0
  144. package/dist/legacy/helpers/createPlaceholderRequest.d.ts.map +1 -0
  145. package/dist/legacy/helpers/createPlaceholderRequest.js +14 -0
  146. package/dist/legacy/helpers/encodeStringAsBase64.d.ts +5 -0
  147. package/dist/legacy/helpers/encodeStringAsBase64.d.ts.map +1 -0
  148. package/dist/legacy/helpers/encodeStringAsBase64.js +6 -0
  149. package/dist/legacy/helpers/getRequestFromAuthentication.d.ts +10 -0
  150. package/dist/legacy/helpers/getRequestFromAuthentication.d.ts.map +1 -0
  151. package/dist/legacy/helpers/getRequestFromAuthentication.js +83 -0
  152. package/dist/legacy/helpers/getUrlFromServerState.d.ts +6 -0
  153. package/dist/legacy/helpers/getUrlFromServerState.d.ts.map +1 -0
  154. package/dist/legacy/helpers/getUrlFromServerState.js +9 -0
  155. package/dist/legacy/helpers/humanDiff.d.ts +5 -0
  156. package/dist/legacy/helpers/humanDiff.d.ts.map +1 -0
  157. package/dist/legacy/helpers/index.d.ts +12 -0
  158. package/dist/legacy/helpers/index.d.ts.map +1 -0
  159. package/dist/legacy/helpers/mapFromArray.d.ts +5 -0
  160. package/dist/legacy/helpers/mapFromArray.d.ts.map +1 -0
  161. package/dist/legacy/helpers/normalizeHeaders.d.ts +9 -0
  162. package/dist/legacy/helpers/normalizeHeaders.d.ts.map +1 -0
  163. package/dist/legacy/helpers/normalizePath.d.ts +5 -0
  164. package/dist/legacy/helpers/normalizePath.d.ts.map +1 -0
  165. package/dist/legacy/helpers/normalizeRequestMethod.d.ts +6 -0
  166. package/dist/legacy/helpers/normalizeRequestMethod.d.ts.map +1 -0
  167. package/dist/legacy/helpers/normalizeRequestMethod.js +14 -0
  168. package/dist/legacy/helpers/normalizeUrl.d.ts +5 -0
  169. package/dist/legacy/helpers/normalizeUrl.d.ts.map +1 -0
  170. package/dist/legacy/helpers/prepareClientRequestConfig.d.ts +24 -0
  171. package/dist/legacy/helpers/prepareClientRequestConfig.d.ts.map +1 -0
  172. package/dist/legacy/index.d.ts +5 -0
  173. package/dist/legacy/index.d.ts.map +1 -0
  174. package/dist/legacy/stores/index.d.ts +6 -0
  175. package/dist/legacy/stores/index.d.ts.map +1 -0
  176. package/dist/legacy/stores/useApiClientStore.d.ts +18 -0
  177. package/dist/legacy/stores/useApiClientStore.d.ts.map +1 -0
  178. package/dist/legacy/stores/useApiClientStore.js +32 -0
  179. package/dist/legacy/stores/useAuthenticationStore.d.ts +59 -0
  180. package/dist/legacy/stores/useAuthenticationStore.d.ts.map +1 -0
  181. package/dist/legacy/stores/useAuthenticationStore.js +36 -0
  182. package/dist/legacy/stores/useOpenApiStore.d.ts +95 -0
  183. package/dist/legacy/stores/useOpenApiStore.d.ts.map +1 -0
  184. package/dist/legacy/stores/useOpenApiStore.js +23 -0
  185. package/dist/legacy/stores/useRequestStore.d.ts +58 -0
  186. package/dist/legacy/stores/useRequestStore.d.ts.map +1 -0
  187. package/dist/legacy/stores/useRequestStore.js +33 -0
  188. package/dist/legacy/stores/useServerStore.d.ts +18 -0
  189. package/dist/legacy/stores/useServerStore.d.ts.map +1 -0
  190. package/dist/legacy/stores/useServerStore.js +18 -0
  191. package/dist/legacy/types.d.ts +117 -0
  192. package/dist/legacy/types.d.ts.map +1 -0
  193. package/dist/stores/index.d.ts +1 -0
  194. package/dist/stores/index.d.ts.map +1 -1
  195. package/dist/style.css +1 -1
  196. package/dist/types.d.ts +8 -11
  197. package/dist/types.d.ts.map +1 -1
  198. package/package.json +16 -15
  199. package/dist/components/ApiClientModal.vue2.js +0 -4
  200. package/dist/components/ApiClientModalOld.vue.d.ts.map +0 -1
  201. package/dist/components/ApiClientModalOld.vue.js +0 -7
  202. package/dist/components/ApiClientModalOld.vue2.js +0 -88
  203. package/dist/components/Content/BaseUrl/BaseUrl.vue.d.ts +0 -3
  204. package/dist/components/Content/BaseUrl/BaseUrl.vue.d.ts.map +0 -1
  205. package/dist/components/Content/BaseUrl/BaseUrl.vue.js +0 -7
  206. package/dist/components/Content/BaseUrl/BaseUrl.vue2.js +0 -90
  207. package/dist/components/Content/BaseUrl/ServerItem.vue.d.ts.map +0 -1
  208. package/dist/components/Content/BaseUrl/ServerItem.vue.js +0 -8
  209. package/dist/components/Content/BaseUrl/ServerItem.vue2.js +0 -35
  210. package/dist/components/Content/BaseUrl/ServerVariableSelect.vue.d.ts.map +0 -1
  211. package/dist/components/Content/BaseUrl/ServerVariableSelect.vue.js +0 -7
  212. package/dist/components/Content/BaseUrl/ServerVariableTextbox.vue.d.ts.map +0 -1
  213. package/dist/components/Content/BaseUrl/ServerVariableTextbox.vue.js +0 -7
  214. package/dist/components/Content/BaseUrl/ServerVariables.vue.d.ts.map +0 -1
  215. package/dist/components/Content/BaseUrl/ServerVariables.vue.js +0 -7
  216. package/dist/components/Content/BaseUrl/ServerVariables.vue2.js +0 -47
  217. package/dist/components/Content/BaseUrl/index.d.ts +0 -2
  218. package/dist/components/Content/BaseUrl/index.d.ts.map +0 -1
  219. package/dist/components/Content/Schema/SchemaProperty.spec.d.ts +0 -2
  220. package/dist/components/Content/Schema/SchemaProperty.spec.d.ts.map +0 -1
  221. package/dist/features.d.ts +0 -8
  222. package/dist/features.d.ts.map +0 -1
  223. package/dist/features.js +0 -5
  224. package/dist/standalone.spec.d.ts +0 -2
  225. 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,7 @@
1
+ import o from "./SecuritySchemeSelector.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d4d9bca1"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -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,6 @@
1
+ export type HttpHeader = {
2
+ name: string;
3
+ url: string;
4
+ };
5
+ export declare const httpHeaders: HttpHeader[];
6
+ //# sourceMappingURL=httpHeaders.d.ts.map
@@ -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,18 @@
1
+ const t = [
2
+ "GET",
3
+ "POST",
4
+ "PUT",
5
+ "HEAD",
6
+ "DELETE",
7
+ "PATCH",
8
+ "OPTIONS",
9
+ "CONNECT",
10
+ "TRACE"
11
+ ];
12
+ function T(e) {
13
+ return t.includes(e);
14
+ }
15
+ export {
16
+ T as isRequestMethod,
17
+ t as validRequestMethods
18
+ };
@@ -0,0 +1,3 @@
1
+ export * from './httpHeaders';
2
+ export * from './httpRequestMethods.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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,6 @@
1
+ import type { ClientRequestConfig } from '../types';
2
+ /**
3
+ * Generate a new placeholder request
4
+ */
5
+ export declare const createPlaceholderRequest: () => ClientRequestConfig;
6
+ //# sourceMappingURL=createPlaceholderRequest.d.ts.map
@@ -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,14 @@
1
+ const e = () => ({
2
+ name: "",
3
+ url: "",
4
+ type: "GET",
5
+ path: "",
6
+ variables: [],
7
+ headers: [],
8
+ query: [],
9
+ body: "",
10
+ formData: []
11
+ });
12
+ export {
13
+ e as createPlaceholderRequest
14
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Encodes a given string as Base64. In Node.js (Buffer) and Browser environments (btoa).
3
+ */
4
+ export declare function encodeStringAsBase64(value: string): string;
5
+ //# sourceMappingURL=encodeStringAsBase64.d.ts.map
@@ -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,6 @@
1
+ function n(e) {
2
+ return typeof window > "u" ? Buffer.from(e).toString("base64") : btoa(e);
3
+ }
4
+ export {
5
+ n as encodeStringAsBase64
6
+ };
@@ -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,6 @@
1
+ import type { ServerState } from '../types';
2
+ /**
3
+ * Get the URL from the server state.
4
+ */
5
+ export declare function getUrlFromServerState(state: ServerState): string | undefined;
6
+ //# sourceMappingURL=getUrlFromServerState.d.ts.map
@@ -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,5 @@
1
+ /**
2
+ * Get a human-readable string representing the time elapsed since the given Unix timestamp.
3
+ */
4
+ export declare function humanDiff(unixTimestamp: number): string;
5
+ //# sourceMappingURL=humanDiff.d.ts.map
@@ -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,5 @@
1
+ /**
2
+ * Normalizes a path by removing leading slashes.
3
+ */
4
+ export declare const normalizePath: (path?: string) => string;
5
+ //# sourceMappingURL=normalizePath.d.ts.map
@@ -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,5 @@
1
+ /**
2
+ * Normalizes a URL by trimming it and adding http:// as the default prefix.
3
+ */
4
+ export declare const normalizeUrl: (url?: string) => string;
5
+ //# sourceMappingURL=normalizeUrl.d.ts.map
@@ -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,5 @@
1
+ export * from './fixtures';
2
+ export * from './helpers';
3
+ export * from './stores';
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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,6 @@
1
+ export * from './useApiClientStore.js';
2
+ export * from './useAuthenticationStore.js';
3
+ export * from './useOpenApiStore.js';
4
+ export * from './useRequestStore.js';
5
+ export * from './useServerStore.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -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
+ };