@scalar/api-client 2.5.31 → 2.5.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +120 -128
- package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +57 -63
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +143 -150
- package/dist/components/CodeInput/codeVariableWidget.js +70 -75
- package/dist/components/CommandPalette/CommandActionInput.vue.js +17 -19
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +26 -27
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +53 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +129 -133
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +84 -98
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +64 -74
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +5 -11
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +164 -183
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue2.js +31 -31
- package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -2
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +75 -84
- package/dist/components/Form/LabelInput.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +11 -11
- package/dist/components/ImportCollection/DropEventListener.vue.js +42 -44
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -23
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +141 -149
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +22 -23
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +12 -13
- package/dist/components/ImportCollection/PasteEventListener.vue.js +11 -12
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +69 -76
- package/dist/components/ImportCollection/utils/get-openapi-version.js +8 -8
- package/dist/components/ImportCollection/utils/import-collection.js +14 -14
- package/dist/components/OpenApiClientButton.vue.js +1 -1
- package/dist/components/OpenApiClientButton.vue2.js +10 -10
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +19 -22
- package/dist/components/Search/useSearch.js +51 -61
- package/dist/components/SectionFilter.vue.js +1 -1
- package/dist/components/SectionFilter.vue2.js +26 -29
- package/dist/components/Server/ServerDropdown.vue.js +70 -96
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +57 -67
- package/dist/components/Server/ServerSelector.vue.js +44 -55
- package/dist/components/Server/ServerVariablesForm.vue.js +36 -42
- package/dist/components/Server/ServerVariablesSelect.vue.js +6 -6
- package/dist/components/SideNav/DownloadAppButton.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.js +68 -74
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue.js +107 -122
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/hooks/useFileDialog.js +12 -12
- package/dist/hooks/useResponseBody.js +14 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/layouts/App/ApiClientApp.vue.js +50 -56
- package/dist/layouts/App/ApiClientApp.vue3.js +1 -1
- package/dist/layouts/App/create-api-client-app.js +19 -20
- package/dist/layouts/App/index.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +18 -21
- package/dist/layouts/Web/ApiClientWeb.vue.js +45 -51
- package/dist/layouts/Web/ApiClientWeb.vue3.js +1 -1
- package/dist/layouts/Web/create-api-client-web.js +19 -20
- package/dist/layouts/Web/index.js +1 -1
- package/dist/libs/create-client.js +102 -109
- package/dist/libs/env-helpers.js +3 -3
- package/dist/libs/event-bus.js +15 -15
- package/dist/libs/extractAttachmentFilename.js +5 -6
- package/dist/libs/find-request.js +9 -10
- package/dist/libs/get-request-uid-by-path-method.js +12 -12
- package/dist/libs/getOpenApiDocumentDetails.js +7 -7
- package/dist/libs/importers/curl.js +3 -3
- package/dist/libs/normalize-headers.js +9 -10
- package/dist/libs/postman.js +15 -17
- package/dist/libs/send-request/build-request-security.js +9 -10
- package/dist/libs/send-request/create-fetch-body.js +11 -12
- package/dist/libs/send-request/create-fetch-query-params.js +13 -13
- package/dist/libs/send-request/create-request-operation.js +83 -84
- package/dist/libs/send-request/decode-buffer.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.js +12 -12
- package/dist/libs/string-template.js +21 -21
- package/dist/libs/validate-parameters.js +5 -8
- package/dist/plugins/plugin-manager.js +11 -17
- package/dist/store/active-entities.js +90 -117
- package/dist/store/collections.js +41 -42
- package/dist/store/import-spec.js +25 -26
- package/dist/store/request-example.js +20 -24
- package/dist/store/requests.js +63 -81
- package/dist/store/router-params.js +7 -7
- package/dist/store/security-schemes.js +35 -36
- package/dist/store/store.js +2 -2
- package/dist/store/tags.js +20 -21
- package/dist/style.css +1 -1
- package/dist/views/Collection/Collection.vue2.js +21 -22
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue2.js +43 -47
- package/dist/views/Collection/CollectionEnvironment.vue.js +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue2.js +196 -207
- package/dist/views/Collection/CollectionInfoForm.vue.js +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue2.js +34 -41
- package/dist/views/Collection/CollectionNavigation.vue.js +116 -125
- package/dist/views/Collection/CollectionOverview.vue2.js +22 -25
- package/dist/views/Collection/CollectionServerForm.vue.js +39 -45
- package/dist/views/Collection/CollectionServers.vue2.js +88 -98
- package/dist/views/Collection/CollectionSettings.vue.js +1 -1
- package/dist/views/Collection/CollectionSettings.vue2.js +101 -108
- package/dist/views/Collection/components/EnvironmentForm.vue.js +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +141 -145
- package/dist/views/Collection/components/MarkdownInput.vue.js +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue2.js +1 -2
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +15 -15
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +15 -16
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +61 -64
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +9 -10
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +90 -93
- package/dist/views/Environment/Environment.vue2.js +267 -295
- package/dist/views/Environment/EnvironmentModal.vue.js +63 -70
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +38 -42
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +60 -67
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +78 -89
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +37 -44
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -45
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -127
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +120 -139
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +97 -97
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +287 -310
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +86 -94
- package/dist/views/Request/RequestSection/RequestParams.vue.js +37 -38
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +36 -38
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +28 -31
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +49 -52
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +16 -16
- package/dist/views/Request/RequestSection/helpers/getting-started.js +7 -11
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +7 -8
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +199 -211
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +332 -349
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +210 -240
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +58 -64
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -2
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +20 -23
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +29 -30
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +38 -41
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +28 -29
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +128 -140
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +116 -124
- package/dist/views/Request/consts/mediaTypes.js +2 -3
- package/dist/views/Request/handle-drag.js +24 -28
- package/dist/views/Request/hooks/useOpenApiWatcher.js +26 -33
- package/dist/views/Request/libs/auth.js +37 -43
- package/dist/views/Request/libs/oauth2.js +30 -32
- package/dist/views/Request/libs/watch-mode.js +100 -103
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -236
- package/package.json +22 -22
- package/dist/components/AddressBar/AddressBar.vue3.js +0 -4
- package/dist/components/AddressBar/AddressBarHistory.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue3.js +0 -4
- package/dist/components/CodeInput/CodeInput.vue4.js +0 -4
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue3.js +0 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue3.js +0 -4
- package/dist/components/DataTable/DataTableInput.vue3.js +0 -4
- package/dist/components/EmptyState.vue3.js +0 -4
- package/dist/components/Form/LabelInput.vue3.js +0 -4
- package/dist/components/HttpMethod/HttpMethod.vue3.js +0 -4
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
- package/dist/components/OpenApiClientButton.vue3.js +0 -4
- package/dist/components/ScalarAsciiArt.vue3.js +0 -4
- package/dist/components/SectionFilter.vue3.js +0 -4
- package/dist/components/Server/ServerDropdownItem.vue3.js +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue3.js +0 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue3.js +0 -4
- package/dist/components/Sidebar/Sidebar.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue3.js +0 -4
- package/dist/components/Sidebar/SidebarListElement.vue4.js +0 -4
- package/dist/components/TopNav/TopNavItem.vue3.js +0 -4
- package/dist/layouts/App/ApiClientApp.vue2.js +0 -4
- package/dist/layouts/Modal/ApiClientModal.vue3.js +0 -4
- package/dist/layouts/Web/ApiClientWeb.vue2.js +0 -4
- package/dist/style.css.js +0 -4
- package/dist/views/Collection/CollectionAuthentication.vue3.js +0 -4
- package/dist/views/Collection/CollectionEnvironment.vue3.js +0 -4
- package/dist/views/Collection/CollectionInfoForm.vue3.js +0 -4
- package/dist/views/Collection/CollectionSettings.vue3.js +0 -4
- package/dist/views/Collection/components/EnvironmentForm.vue3.js +0 -4
- package/dist/views/Collection/components/MarkdownInput.vue3.js +0 -4
- package/dist/views/Cookies/CookieModal.vue3.js +0 -4
- package/dist/views/Request/Request.vue3.js +0 -4
- package/dist/views/Request/RequestRoot.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestBody.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestCodeExample.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTable.vue3.js +0 -4
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue3.js +0 -4
- package/dist/views/Request/RequestSidebar.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue3.js +0 -4
- package/dist/views/Request/RequestSidebarItem.vue4.js +0 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue3.js +0 -4
- package/dist/views/Request/RequestSubpageHeader.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBody.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue2.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue3.js +0 -4
- package/dist/views/Request/ResponseSection/ResponseSection.vue3.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as D, computed as v, useId as P, ref as M, watch as S, createBlock as d, openBlock as
|
|
1
|
+
import { defineComponent as D, computed as v, useId as P, ref as M, watch as S, createBlock as d, openBlock as n, withCtx as c, createElementVNode as h, withDirectives as s, createCommentVNode as k, createElementBlock as f, createVNode as i, unref as o, vShow as u, Fragment as K, renderList as L, resolveDynamicComponent as Q, toDisplayString as $ } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as C } from "@scalar/components";
|
|
3
3
|
import { canMethodHaveBody as b, isDefined as j, REGEX as R } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import F from "../../../components/SectionFilter.vue.js";
|
|
@@ -40,7 +40,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
40
40
|
], { requestMutators: w, cookies: B, securitySchemes: A } = Z(), { layout: m } = x(), q = v(() => {
|
|
41
41
|
const e = /* @__PURE__ */ new Set(["All", ...O]);
|
|
42
42
|
return l.example.parameters.path.length || e.delete("Variables"), b(l.operation.method ?? "get") || e.delete("Body"), y.value && e.delete("Auth"), [...e];
|
|
43
|
-
}),
|
|
43
|
+
}), r = v(
|
|
44
44
|
() => Object.fromEntries(
|
|
45
45
|
q.value.map((e) => [e, P()])
|
|
46
46
|
)
|
|
@@ -54,14 +54,11 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
56
|
const E = (e) => {
|
|
57
|
-
const
|
|
58
|
-
w.edit(l.operation.uid, "summary",
|
|
57
|
+
const t = e.target;
|
|
58
|
+
w.edit(l.operation.uid, "summary", t.value);
|
|
59
59
|
}, H = v(
|
|
60
60
|
() => (l.workspace.cookies ?? []).map((e) => B[e]).filter(j).filter((e) => e.name).filter(
|
|
61
|
-
(e) =>
|
|
62
|
-
var o;
|
|
63
|
-
return W(((o = l.server) == null ? void 0 : o.url) || l.operation.path, e.domain);
|
|
64
|
-
}
|
|
61
|
+
(e) => W(l.server?.url || l.operation.path, e.domain)
|
|
65
62
|
).map((e) => ({
|
|
66
63
|
key: e.name,
|
|
67
64
|
value: e.value,
|
|
@@ -73,52 +70,52 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
73
70
|
},
|
|
74
71
|
enabled: !0
|
|
75
72
|
}))
|
|
76
|
-
), N = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(R.PROTOCOL, "") ? l.operation.path.replace(R.PROTOCOL, "") : "Request Name", g = P(), I = Y().getViewComponents("request.section"), U = (e,
|
|
73
|
+
), N = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(R.PROTOCOL, "") ? l.operation.path.replace(R.PROTOCOL, "") : "Request Name", g = P(), I = Y().getViewComponents("request.section"), U = (e, t) => w.edit(l.operation.uid, e, t);
|
|
77
74
|
return S(
|
|
78
75
|
() => y.value,
|
|
79
76
|
(e) => {
|
|
80
77
|
e && a.value === "Auth" && (a.value = "All");
|
|
81
78
|
}
|
|
82
|
-
), (e,
|
|
79
|
+
), (e, t) => (n(), d(T, {
|
|
83
80
|
"aria-label": `Request: ${e.operation.summary}`
|
|
84
81
|
}, {
|
|
85
82
|
title: c(() => [
|
|
86
83
|
h("div", _, [
|
|
87
|
-
|
|
84
|
+
o(m) !== "modal" ? (n(), f("label", {
|
|
88
85
|
key: 0,
|
|
89
86
|
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
90
|
-
for:
|
|
87
|
+
for: o(g)
|
|
91
88
|
}, null, 8, ee)) : k("", !0),
|
|
92
|
-
|
|
89
|
+
o(m) !== "modal" ? (n(), f("input", {
|
|
93
90
|
key: 1,
|
|
94
|
-
id:
|
|
91
|
+
id: o(g),
|
|
95
92
|
class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
|
|
96
93
|
placeholder: N(),
|
|
97
94
|
value: e.operation.summary,
|
|
98
95
|
onInput: E
|
|
99
|
-
}, null, 40, ae)) : (
|
|
96
|
+
}, null, 40, ae)) : (n(), f("span", le, $(e.operation.summary), 1))
|
|
100
97
|
]),
|
|
101
98
|
i(F, {
|
|
102
99
|
modelValue: a.value,
|
|
103
|
-
"onUpdate:modelValue":
|
|
104
|
-
filterIds:
|
|
100
|
+
"onUpdate:modelValue": t[0] || (t[0] = (p) => a.value = p),
|
|
101
|
+
filterIds: r.value,
|
|
105
102
|
filters: q.value
|
|
106
103
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
107
104
|
]),
|
|
108
105
|
default: c(() => [
|
|
109
106
|
h("div", {
|
|
110
|
-
id:
|
|
107
|
+
id: r.value.All,
|
|
111
108
|
class: "request-section-content custom-scroll relative flex flex-1 flex-col",
|
|
112
109
|
role: a.value === "All" ? "tabpanel" : "none"
|
|
113
110
|
}, [
|
|
114
|
-
e.collection && e.workspace && (
|
|
111
|
+
e.collection && e.workspace && (o(m) !== "modal" || Object.keys(o(A) ?? {}).length) ? s((n(), d(X, {
|
|
115
112
|
key: 0,
|
|
116
|
-
id:
|
|
113
|
+
id: r.value.Auth,
|
|
117
114
|
class: "request-section-content-auth",
|
|
118
115
|
collection: e.collection,
|
|
119
116
|
envVariables: e.envVariables,
|
|
120
117
|
environment: e.environment,
|
|
121
|
-
isReadOnly:
|
|
118
|
+
isReadOnly: o(m) === "modal",
|
|
122
119
|
layout: "client",
|
|
123
120
|
operation: e.operation,
|
|
124
121
|
role: a.value === "All" ? "none" : "tabpanel",
|
|
@@ -133,7 +130,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
133
130
|
]
|
|
134
131
|
]) : k("", !0),
|
|
135
132
|
s(i(G, {
|
|
136
|
-
id:
|
|
133
|
+
id: r.value.Variables,
|
|
137
134
|
class: "request-section-content-path-params",
|
|
138
135
|
envVariables: e.envVariables,
|
|
139
136
|
environment: e.environment,
|
|
@@ -151,7 +148,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
151
148
|
]
|
|
152
149
|
]),
|
|
153
150
|
s(i(V, {
|
|
154
|
-
id:
|
|
151
|
+
id: r.value.Cookies,
|
|
155
152
|
class: "request-section-content-cookies",
|
|
156
153
|
envVariables: e.envVariables,
|
|
157
154
|
environment: e.environment,
|
|
@@ -168,7 +165,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
168
165
|
[u, a.value === "All" || a.value === "Cookies"]
|
|
169
166
|
]),
|
|
170
167
|
s(i(V, {
|
|
171
|
-
id:
|
|
168
|
+
id: r.value.Headers,
|
|
172
169
|
class: "request-section-content-headers",
|
|
173
170
|
envVariables: e.envVariables,
|
|
174
171
|
environment: e.environment,
|
|
@@ -184,7 +181,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
184
181
|
[u, a.value === "All" || a.value === "Headers"]
|
|
185
182
|
]),
|
|
186
183
|
s(i(V, {
|
|
187
|
-
id:
|
|
184
|
+
id: r.value.Query,
|
|
188
185
|
class: "request-section-content-query",
|
|
189
186
|
envVariables: e.envVariables,
|
|
190
187
|
environment: e.environment,
|
|
@@ -199,9 +196,9 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
199
196
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
200
197
|
[u, a.value === "All" || a.value === "Query"]
|
|
201
198
|
]),
|
|
202
|
-
e.operation.method && (a.value === "All" || a.value === "Body") &&
|
|
199
|
+
e.operation.method && (a.value === "All" || a.value === "Body") && o(b)(e.operation.method) ? (n(), d(z, {
|
|
203
200
|
key: 1,
|
|
204
|
-
id:
|
|
201
|
+
id: r.value.Body,
|
|
205
202
|
class: "request-section-content-body",
|
|
206
203
|
envVariables: e.envVariables,
|
|
207
204
|
environment: e.environment,
|
|
@@ -211,11 +208,11 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
211
208
|
title: "Body",
|
|
212
209
|
workspace: e.workspace
|
|
213
210
|
}, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : k("", !0),
|
|
214
|
-
(
|
|
211
|
+
(n(!0), f(K, null, L(o(I), (p) => (n(), d(o(C), {
|
|
215
212
|
key: p.component
|
|
216
213
|
}, {
|
|
217
214
|
default: c(() => [
|
|
218
|
-
s((
|
|
215
|
+
s((n(), d(Q(p.component), {
|
|
219
216
|
operation: e.operation,
|
|
220
217
|
"onUpdate:operation": U
|
|
221
218
|
}, null, 40, ["operation"])), [
|
|
@@ -224,8 +221,8 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
224
221
|
]),
|
|
225
222
|
_: 2
|
|
226
223
|
}, 1024))), 128)),
|
|
227
|
-
|
|
228
|
-
i(
|
|
224
|
+
t[1] || (t[1] = h("div", { class: "flex flex-grow" }, null, -1)),
|
|
225
|
+
i(o(C), null, {
|
|
229
226
|
default: c(() => [
|
|
230
227
|
i(J, {
|
|
231
228
|
class: "request-section-content-code-example -mt-1/2 border-t",
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarTooltip as
|
|
3
|
-
import { ScalarIconTrash as
|
|
4
|
-
import { RouterLink as
|
|
1
|
+
import { defineComponent as I, createBlock as i, openBlock as u, withCtx as n, createVNode as r, createElementBlock as b, createTextVNode as f, toDisplayString as c, Fragment as g, renderList as z, normalizeClass as v, unref as s, createCommentVNode as k, createElementVNode as p } from "vue";
|
|
2
|
+
import { ScalarTooltip as q, ScalarIcon as B, ScalarButton as R } from "@scalar/components";
|
|
3
|
+
import { ScalarIconTrash as D } from "@scalar/icons";
|
|
4
|
+
import { RouterLink as E } from "vue-router";
|
|
5
5
|
import C from "../../../components/CodeInput/CodeInput.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import G from "../../../components/DataTable/DataTable.vue.js";
|
|
7
7
|
import y from "../../../components/DataTable/DataTableCell.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import N from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
9
9
|
import V from "../../../components/DataTable/DataTableHeader.vue.js";
|
|
10
10
|
import $ from "../../../components/DataTable/DataTableRow.vue.js";
|
|
11
|
-
import { parameterIsInvalid as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
11
|
+
import { parameterIsInvalid as P, hasItemProperties as h } from "../libs/request.js";
|
|
12
|
+
import j from "./RequestTableTooltip.vue.js";
|
|
13
|
+
const K = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, O = ["onClick"], A = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "p-0.5"
|
|
16
|
-
},
|
|
16
|
+
}, oe = /* @__PURE__ */ I({
|
|
17
17
|
__name: "RequestTable",
|
|
18
18
|
props: {
|
|
19
19
|
items: {},
|
|
@@ -34,7 +34,7 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
|
|
|
34
34
|
}, U = (e) => {
|
|
35
35
|
t("uploadFile", e);
|
|
36
36
|
}, S = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default, T = (e) => !!(e.key || e.value);
|
|
37
|
-
return (e, o) => (u(), i(
|
|
37
|
+
return (e, o) => (u(), i(G, {
|
|
38
38
|
class: "group/table flex-1",
|
|
39
39
|
columns: _
|
|
40
40
|
}, {
|
|
@@ -62,23 +62,23 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
|
|
|
62
62
|
]),
|
|
63
63
|
_: 1
|
|
64
64
|
}),
|
|
65
|
-
(u(!0), b(g, null,
|
|
65
|
+
(u(!0), b(g, null, z(e.items, (l, d) => (u(), i($, {
|
|
66
66
|
id: l.key,
|
|
67
67
|
key: d,
|
|
68
68
|
class: v({
|
|
69
|
-
alert: s(
|
|
69
|
+
alert: s(P)(l).value,
|
|
70
70
|
error: e.invalidParams && e.invalidParams.has(l.key)
|
|
71
71
|
})
|
|
72
72
|
}, {
|
|
73
73
|
default: n(() => [
|
|
74
|
-
e.isGlobal ? (u(), i(s(
|
|
74
|
+
e.isGlobal ? (u(), i(s(E), {
|
|
75
75
|
key: 0,
|
|
76
76
|
class: "text-c-2 flex items-center justify-center border-t !border-r",
|
|
77
77
|
to: l.route ?? {}
|
|
78
78
|
}, {
|
|
79
79
|
default: n(() => [
|
|
80
80
|
o[4] || (o[4] = p("span", { class: "sr-only" }, "Global", -1)),
|
|
81
|
-
r(s(
|
|
81
|
+
r(s(q), {
|
|
82
82
|
content: "Global cookies are shared across the whole workspace.",
|
|
83
83
|
placement: "top"
|
|
84
84
|
}, {
|
|
@@ -95,7 +95,7 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
|
|
|
95
95
|
]),
|
|
96
96
|
_: 2,
|
|
97
97
|
__: [4]
|
|
98
|
-
}, 1032, ["to"])) : (u(), i(
|
|
98
|
+
}, 1032, ["to"])) : (u(), i(N, {
|
|
99
99
|
key: 1,
|
|
100
100
|
class: "!border-r",
|
|
101
101
|
disabled: m.hasCheckboxDisabled,
|
|
@@ -165,11 +165,11 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
|
|
|
165
165
|
onClick: (a) => t("deleteRow", d)
|
|
166
166
|
}, {
|
|
167
167
|
default: n(() => [
|
|
168
|
-
r(s(
|
|
168
|
+
r(s(D), { class: "size-3.5" })
|
|
169
169
|
]),
|
|
170
170
|
_: 2
|
|
171
171
|
}, 1032, ["class", "onClick"])) : k("", !0),
|
|
172
|
-
s(h)(l) ? (u(), i(
|
|
172
|
+
s(h)(l) ? (u(), i(j, {
|
|
173
173
|
key: 1,
|
|
174
174
|
item: { ...l, default: S(l) }
|
|
175
175
|
}, null, 8, ["item"])) : k("", !0)
|
|
@@ -183,40 +183,37 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
|
|
|
183
183
|
key: 2,
|
|
184
184
|
class: "group/upload flex items-center justify-center whitespace-nowrap"
|
|
185
185
|
}, {
|
|
186
|
-
default: n(() =>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
default: n(() => [
|
|
187
|
+
l.file ? (u(), b(g, { key: 0 }, [
|
|
188
|
+
p("div", K, [
|
|
189
|
+
p("span", null, c(l.file?.name), 1)
|
|
190
|
+
]),
|
|
191
|
+
p("button", {
|
|
192
|
+
class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
|
|
193
|
+
type: "button",
|
|
194
|
+
onClick: (a) => t("removeFile", d)
|
|
195
|
+
}, " Delete ", 8, O)
|
|
196
|
+
], 64)) : (u(), b("div", A, [
|
|
197
|
+
r(s(R), {
|
|
198
|
+
class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
|
|
199
|
+
size: "sm",
|
|
200
|
+
variant: "outlined",
|
|
201
|
+
onClick: (a) => U(d)
|
|
202
|
+
}, {
|
|
203
|
+
default: n(() => [
|
|
204
|
+
o[5] || (o[5] = p("span", null, "Upload File", -1)),
|
|
205
|
+
r(s(B), {
|
|
206
|
+
class: "ml-1",
|
|
207
|
+
icon: "Upload",
|
|
208
|
+
size: "xs",
|
|
209
|
+
thickness: "2.5"
|
|
210
|
+
})
|
|
192
211
|
]),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
], 64)) : (u(), b("div", L, [
|
|
199
|
-
r(s(R), {
|
|
200
|
-
class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
|
|
201
|
-
size: "sm",
|
|
202
|
-
variant: "outlined",
|
|
203
|
-
onClick: (I) => U(d)
|
|
204
|
-
}, {
|
|
205
|
-
default: n(() => [
|
|
206
|
-
o[5] || (o[5] = p("span", null, "Upload File", -1)),
|
|
207
|
-
r(s(B), {
|
|
208
|
-
class: "ml-1",
|
|
209
|
-
icon: "Upload",
|
|
210
|
-
size: "xs",
|
|
211
|
-
thickness: "2.5"
|
|
212
|
-
})
|
|
213
|
-
]),
|
|
214
|
-
_: 2,
|
|
215
|
-
__: [5]
|
|
216
|
-
}, 1032, ["onClick"])
|
|
217
|
-
]))
|
|
218
|
-
];
|
|
219
|
-
}),
|
|
212
|
+
_: 2,
|
|
213
|
+
__: [5]
|
|
214
|
+
}, 1032, ["onClick"])
|
|
215
|
+
]))
|
|
216
|
+
]),
|
|
220
217
|
_: 2
|
|
221
218
|
}, 1024)) : k("", !0)
|
|
222
219
|
]),
|
|
@@ -228,5 +225,5 @@ const O = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify
|
|
|
228
225
|
}
|
|
229
226
|
});
|
|
230
227
|
export {
|
|
231
|
-
|
|
228
|
+
oe as default
|
|
232
229
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
const
|
|
1
|
+
const l = (s, f = [], a = {}) => {
|
|
2
2
|
if (!s || s.length === 0)
|
|
3
3
|
return [];
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
4
|
+
const o = s.filter((e) => Object.keys(e).length > 0);
|
|
5
|
+
if (o.length === 0)
|
|
6
6
|
return [];
|
|
7
7
|
if (f.length === 0) {
|
|
8
|
-
const
|
|
9
|
-
return
|
|
8
|
+
const e = o[0], r = e ? Object.keys(e)[0] : void 0, n = Object.values(a).find((t) => t.nameKey === r);
|
|
9
|
+
return n ? [n] : [];
|
|
10
10
|
}
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const m = new Set(
|
|
12
|
+
o.map((e) => Object.keys(e).sort().join(","))
|
|
13
13
|
), h = [];
|
|
14
|
-
for (const
|
|
15
|
-
const
|
|
16
|
-
for (const
|
|
17
|
-
const
|
|
18
|
-
|
|
14
|
+
for (const e of f) {
|
|
15
|
+
const r = Array.isArray(e) ? e : [e], n = [], t = [];
|
|
16
|
+
for (const i of r) {
|
|
17
|
+
const c = a[i];
|
|
18
|
+
c?.nameKey && (n.push(c), t.push(c.nameKey));
|
|
19
19
|
}
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
if (t.length > 0) {
|
|
21
|
+
const i = t.sort().join(",");
|
|
22
|
+
m.has(i) && h.push(...n);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
return h;
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
l as filterSecurityRequirements
|
|
29
29
|
};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
const s = u.find((m) => {
|
|
4
|
-
var r;
|
|
5
|
-
return ((r = m.info) == null ? void 0 : r.title) === "Drafts";
|
|
6
|
-
}), f = t.length === 1;
|
|
1
|
+
const u = (n, t, r) => {
|
|
2
|
+
const e = n.find((l) => l.info?.title === "Drafts"), i = t.length === 1;
|
|
7
3
|
if (!t[0])
|
|
8
4
|
return !1;
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
5
|
+
const s = e?.requests.includes(t[0]);
|
|
6
|
+
if (!s)
|
|
11
7
|
return !1;
|
|
12
|
-
const
|
|
13
|
-
return
|
|
8
|
+
const f = r[e?.requests[0] ?? ""]?.summary !== "My First Request";
|
|
9
|
+
return i && s && !f;
|
|
14
10
|
};
|
|
15
11
|
export {
|
|
16
|
-
|
|
12
|
+
u as isGettingStarted
|
|
17
13
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { safeLocalStorage as s, CLIENT_LS_KEYS as m } from "@scalar/helpers/object/local-storage";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
if (a.edit(o, r, n), !!f)
|
|
2
|
+
const h = (t, o, r, { securitySchemeMutators: n, securitySchemes: a }, S = !1) => {
|
|
3
|
+
if (n.edit(t, o, r), !!S)
|
|
5
4
|
try {
|
|
6
|
-
const e = JSON.parse(s().getItem(m.AUTH) ?? "{}"),
|
|
7
|
-
if (e &&
|
|
8
|
-
const
|
|
9
|
-
|
|
5
|
+
const e = JSON.parse(s().getItem(m.AUTH) ?? "{}"), c = a[t];
|
|
6
|
+
if (e && c?.nameKey) {
|
|
7
|
+
const f = e[c.nameKey] ||= {};
|
|
8
|
+
f[o] = r, s().setItem(m.AUTH, JSON.stringify(e));
|
|
10
9
|
}
|
|
11
10
|
} catch (e) {
|
|
12
11
|
console.error(e);
|
|
13
12
|
}
|
|
14
13
|
};
|
|
15
14
|
export {
|
|
16
|
-
|
|
15
|
+
h as updateScheme
|
|
17
16
|
};
|