@scalar/api-client 2.7.0 → 2.8.0
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 +35 -0
- package/README.md +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
- package/dist/hooks/useClientConfig.d.ts +30 -36
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/layouts/App/create-api-client-app.d.ts +16 -16
- package/dist/layouts/Modal/create-api-client-modal.d.ts +32 -32
- package/dist/layouts/Web/create-api-client-web.d.ts +16 -16
- package/dist/libs/create-client.d.ts +16 -16
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +19 -19
- package/dist/plugins/plugin-manager.d.ts +2 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +1 -1
- package/dist/store/store.d.ts +16 -16
- package/dist/store/workspace.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +70 -71
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +31 -32
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
- package/package.json +17 -17
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as k, onMounted as v, onBeforeUnmount as b, createElementBlock as s, openBlock as a, createElementVNode as o, createCommentVNode as r, normalizeClass as y, createVNode as l, createTextVNode as i, toDisplayString as x, unref as m } from "vue";
|
|
2
|
+
import { ScalarHotkey as d } from "@scalar/components";
|
|
3
|
+
import R from "../../../../assets/computer.ascii.js";
|
|
4
|
+
import g from "../../../../components/EmptyState.vue.js";
|
|
5
|
+
import q from "../../../../components/ScalarAsciiArt.vue.js";
|
|
6
|
+
const C = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, w = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "scalar-version-number"
|
|
9
|
+
}, S = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, E = /* @__PURE__ */ k({
|
|
10
|
+
__name: "ResponseEmpty",
|
|
11
|
+
props: {
|
|
12
|
+
layout: {},
|
|
13
|
+
totalPerformedRequests: {},
|
|
14
|
+
appVersion: {},
|
|
15
|
+
events: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["addRequest", "sendRequest", "openCommandPalette"],
|
|
18
|
+
setup(u, { emit: c }) {
|
|
19
|
+
const n = c, p = (t) => {
|
|
20
|
+
t?.createNew && n("addRequest");
|
|
21
|
+
};
|
|
22
|
+
return v(() => u.events.hotKeys.on(p)), b(() => u.events.hotKeys.off(p)), (t, e) => (a(), s("div", C, [
|
|
23
|
+
o("div", {
|
|
24
|
+
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
25
|
+
"hidden opacity-0": t.totalPerformedRequests <= 1 && t.layout !== "modal"
|
|
26
|
+
}])
|
|
27
|
+
}, [
|
|
28
|
+
t.layout !== "modal" ? (a(), s("div", w, [
|
|
29
|
+
i(" Scalar App V" + x(t.appVersion) + " Beta ", 1),
|
|
30
|
+
e[3] || (e[3] = o("div", { class: "mt-2" }, [
|
|
31
|
+
o("a", {
|
|
32
|
+
href: "https://github.com/scalar/scalar/issues/2669",
|
|
33
|
+
target: "_blank"
|
|
34
|
+
}, " Roadmap ")
|
|
35
|
+
], -1))
|
|
36
|
+
])) : r("", !0),
|
|
37
|
+
e[4] || (e[4] = o("a", {
|
|
38
|
+
class: "gitbook-show scalar-version-number",
|
|
39
|
+
href: "https://www.scalar.com",
|
|
40
|
+
target: "_blank"
|
|
41
|
+
}, " Powered By Scalar.com ", -1)),
|
|
42
|
+
l(q, {
|
|
43
|
+
art: m(R),
|
|
44
|
+
class: "text-c-3"
|
|
45
|
+
}, null, 8, ["art"])
|
|
46
|
+
], 2),
|
|
47
|
+
t.layout !== "modal" ? (a(), s("div", {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: y(["hidden h-[calc(100%_-_50px)] items-center justify-center pb-5", {
|
|
50
|
+
"!flex opacity-100": t.totalPerformedRequests == 1
|
|
51
|
+
}])
|
|
52
|
+
}, [
|
|
53
|
+
l(g)
|
|
54
|
+
], 2)) : r("", !0),
|
|
55
|
+
o("div", S, [
|
|
56
|
+
t.layout !== "modal" ? (a(), s("button", {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: "flex items-center gap-1.5",
|
|
59
|
+
type: "button",
|
|
60
|
+
onClick: e[0] || (e[0] = (f) => n("openCommandPalette"))
|
|
61
|
+
}, [
|
|
62
|
+
e[5] || (e[5] = i(" Get Started ")),
|
|
63
|
+
l(m(d), { hotkey: "k" })
|
|
64
|
+
])) : r("", !0),
|
|
65
|
+
t.layout === "desktop" ? (a(), s("button", {
|
|
66
|
+
key: 1,
|
|
67
|
+
class: "flex items-center gap-1.5",
|
|
68
|
+
type: "button",
|
|
69
|
+
onClick: e[1] || (e[1] = (f) => n("addRequest"))
|
|
70
|
+
}, [
|
|
71
|
+
e[6] || (e[6] = i(" New Request ")),
|
|
72
|
+
l(m(d), { hotkey: "N" })
|
|
73
|
+
])) : r("", !0),
|
|
74
|
+
o("button", {
|
|
75
|
+
class: "flex items-center gap-1.5",
|
|
76
|
+
type: "button",
|
|
77
|
+
onClick: e[2] || (e[2] = (f) => n("sendRequest"))
|
|
78
|
+
}, [
|
|
79
|
+
e[7] || (e[7] = i(" Send Request ")),
|
|
80
|
+
l(m(d), { hotkey: "↵" })
|
|
81
|
+
])
|
|
82
|
+
])
|
|
83
|
+
]));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
E as default
|
|
88
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { createStoreEvents } from '../../../../store/events.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Event bus */
|
|
4
|
+
events: ReturnType<typeof createStoreEvents>;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ResponseLoadingOverlay.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue"],"names":[],"mappings":"AAgEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,KAAK,WAAW,GAAG;IACjB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAC7C,CAAC;;AA8GF,wBAMG"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as u, ref as c, createBlock as d, openBlock as s, Transition as m, withCtx as l, createElementBlock as f, createCommentVNode as g, unref as o, createVNode as i, createTextVNode as v } from "vue";
|
|
2
|
+
import { useLoadingState as p, ScalarLoading as x, ScalarButton as _ } from "@scalar/components";
|
|
3
|
+
const L = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
|
|
6
|
+
}, y = /* @__PURE__ */ u({
|
|
7
|
+
__name: "ResponseLoadingOverlay",
|
|
8
|
+
props: {
|
|
9
|
+
events: {}
|
|
10
|
+
},
|
|
11
|
+
setup(r) {
|
|
12
|
+
const e = p(), a = c();
|
|
13
|
+
return r.events.requestStatus.on((n) => {
|
|
14
|
+
n === "start" ? a.value = setTimeout(() => e.startLoading(), 1e3) : (clearTimeout(a.value), a.value = void 0, e.stopLoading());
|
|
15
|
+
}), (n, t) => (s(), d(m, null, {
|
|
16
|
+
default: l(() => [
|
|
17
|
+
o(e).isLoading ? (s(), f("div", L, [
|
|
18
|
+
i(o(x), {
|
|
19
|
+
class: "text-c-3",
|
|
20
|
+
loadingState: o(e),
|
|
21
|
+
size: "3xl"
|
|
22
|
+
}, null, 8, ["loadingState"]),
|
|
23
|
+
i(o(_), {
|
|
24
|
+
variant: "ghost",
|
|
25
|
+
onClick: t[0] || (t[0] = (S) => n.events.cancelRequest.emit())
|
|
26
|
+
}, {
|
|
27
|
+
default: l(() => t[1] || (t[1] = [
|
|
28
|
+
v(" Cancel ")
|
|
29
|
+
])),
|
|
30
|
+
_: 1,
|
|
31
|
+
__: [1]
|
|
32
|
+
})
|
|
33
|
+
])) : g("", !0)
|
|
34
|
+
]),
|
|
35
|
+
_: 1
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
y as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { createStoreEvents } from '../../../../store/events.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
response: ResponseInstance;
|
|
5
|
+
/** Event bus */
|
|
6
|
+
events: ReturnType<typeof createStoreEvents>;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=ResponseMetaInformation.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue"],"names":[],"mappings":"AA6EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAMvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGvD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAC7C,CAAC;;AA0IF,wBAMG"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent as C, ref as d, computed as g, createElementBlock as r, openBlock as t, toDisplayString as o, unref as p, Fragment as c, createElementVNode as a, createCommentVNode as v, createTextVNode as i, createBlock as h, withCtx as S, normalizeStyle as f } from "vue";
|
|
2
|
+
import { httpStatusCodes as I } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import y from "pretty-ms";
|
|
4
|
+
import b from "../../../../components/HelpfulLink.vue.js";
|
|
5
|
+
import { getContentLength as k } from "../helpers/get-content-length.js";
|
|
6
|
+
const w = { class: "text-c-1 flex gap-1.5" }, _ = { key: 0 }, B = { key: 0 }, N = { key: 1 }, M = /* @__PURE__ */ C({
|
|
7
|
+
__name: "ResponseMetaInformation",
|
|
8
|
+
props: {
|
|
9
|
+
response: {},
|
|
10
|
+
events: {}
|
|
11
|
+
},
|
|
12
|
+
setup(m) {
|
|
13
|
+
const l = d(), u = d(0);
|
|
14
|
+
m.events.requestStatus.on((e) => {
|
|
15
|
+
e === "start" ? l.value = setInterval(() => u.value += 1e3, 1e3) : (clearInterval(l.value), l.value = void 0, u.value = 0);
|
|
16
|
+
});
|
|
17
|
+
const s = g(() => {
|
|
18
|
+
const e = m.response.status;
|
|
19
|
+
if (e)
|
|
20
|
+
return I[e] ?? void 0;
|
|
21
|
+
});
|
|
22
|
+
return (e, n) => (t(), r("div", w, [
|
|
23
|
+
l.value && u.value ? (t(), r("span", _, o(p(y)(u.value)), 1)) : (t(), r(c, { key: 1 }, [
|
|
24
|
+
a("span", null, [
|
|
25
|
+
n[0] || (n[0] = a("span", { class: "sr-only" }, "Response Information, Duration:", -1)),
|
|
26
|
+
i(" " + o(p(y)(e.response.duration)), 1)
|
|
27
|
+
]),
|
|
28
|
+
p(k)(e.response) ? (t(), r("span", B, [
|
|
29
|
+
n[1] || (n[1] = a("span", { class: "sr-only" }, ", Size:", -1)),
|
|
30
|
+
i(" " + o(p(k)(e.response)), 1)
|
|
31
|
+
])) : v("", !0),
|
|
32
|
+
s.value ? (t(), r(c, { key: 1 }, [
|
|
33
|
+
n[2] || (n[2] = a("span", { class: "sr-only" }, ", Status:", -1)),
|
|
34
|
+
s.value.url ? (t(), h(b, {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "flex items-center gap-1.5",
|
|
37
|
+
href: s.value.url
|
|
38
|
+
}, {
|
|
39
|
+
default: S(() => [
|
|
40
|
+
i(o(e.response.status) + " " + o(s.value.name) + " ", 1),
|
|
41
|
+
a("span", {
|
|
42
|
+
class: "block h-1.5 w-1.5 rounded-full",
|
|
43
|
+
style: f({ backgroundColor: s.value.color })
|
|
44
|
+
}, null, 4)
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["href"])) : (t(), r("span", N, [
|
|
48
|
+
i(o(e.response.status) + " " + o(s.value.name) + " ", 1),
|
|
49
|
+
a("span", {
|
|
50
|
+
class: "block h-1.5 w-1.5 rounded-full",
|
|
51
|
+
style: f({ backgroundColor: s.value.color })
|
|
52
|
+
}, null, 4)
|
|
53
|
+
]))
|
|
54
|
+
], 64)) : v("", !0)
|
|
55
|
+
], 64))
|
|
56
|
+
]));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
M as default
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-filename.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/extract-filename.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,EAAE,MAAM,UAezD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const m = (e) => {
|
|
2
|
+
try {
|
|
3
|
+
return decodeURIComponent(e);
|
|
4
|
+
} catch {
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
function c(e) {
|
|
9
|
+
let a = "";
|
|
10
|
+
if (e) {
|
|
11
|
+
const t = e.match(/filename\*=UTF-8''([^;]+)/)?.[1] ?? e.match(/filename\s*=\s*"?([^";]+)"?/)?.[1];
|
|
12
|
+
t && (a = m(t.trim()));
|
|
13
|
+
}
|
|
14
|
+
return a;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
c as extractFilename
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-filename.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/extract-filename.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-content-length.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/get-content-length.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAGvE,0CAA0C;AAC1C,eAAO,MAAM,gBAAgB,GAAI,UAAU,gBAAgB,uBAW1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-content-length.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/get-content-length.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CodeMirrorLanguage } from '@scalar/use-codemirror';
|
|
2
|
+
export type MediaPreview = 'object' | 'image' | 'video' | 'audio';
|
|
3
|
+
export type MediaConfig = {
|
|
4
|
+
preview?: MediaPreview;
|
|
5
|
+
alpha?: boolean;
|
|
6
|
+
raw?: boolean;
|
|
7
|
+
language?: CodeMirrorLanguage;
|
|
8
|
+
extension: string;
|
|
9
|
+
};
|
|
10
|
+
/** Media Type (MIME Type) Definitions */
|
|
11
|
+
export declare const mediaTypes: {
|
|
12
|
+
[type: string]: MediaConfig | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** Media Types (MIME Types) that can be displayed as raw text */
|
|
15
|
+
export declare const textMediaTypes: string[];
|
|
16
|
+
/** Get the config for a media type */
|
|
17
|
+
export declare function getMediaTypeConfig(type: string): MediaConfig | undefined;
|
|
18
|
+
/** Check if a media type that can be displayed as raw text */
|
|
19
|
+
export declare function isTextMediaType(type: string): boolean;
|
|
20
|
+
//# sourceMappingURL=media-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-types.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/media-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CA8GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA;AAExB,sCAAsC;AACtC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAgBxE;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
"application/epub+zip": { extension: ".epub" },
|
|
3
|
+
"application/gzip": { extension: ".gz" },
|
|
4
|
+
"application/java-archive": { extension: ".jar" },
|
|
5
|
+
"application/javascript": { extension: ".js", raw: !0 },
|
|
6
|
+
"application/json": { extension: ".json", raw: !0, language: "json" },
|
|
7
|
+
"application/ld+json": { extension: ".jsonld", raw: !0, language: "json" },
|
|
8
|
+
"application/problem+json": {
|
|
9
|
+
extension: ".json",
|
|
10
|
+
raw: !0,
|
|
11
|
+
language: "json"
|
|
12
|
+
},
|
|
13
|
+
"application/vnd.api+json": { extension: ".json", raw: !0, language: "json" },
|
|
14
|
+
"application/dns-json": { extension: ".json", raw: !0, language: "json" },
|
|
15
|
+
"application/msword": { extension: ".doc" },
|
|
16
|
+
"application/octet-stream": { extension: ".bin" },
|
|
17
|
+
"application/ogg": { extension: ".ogx" },
|
|
18
|
+
"application/pdf": { extension: ".pdf", preview: "object" },
|
|
19
|
+
"application/rtf": { extension: ".rtf", raw: !0 },
|
|
20
|
+
"application/vnd.amazon.ebook": { extension: ".azw" },
|
|
21
|
+
"application/vnd.apple.installer+xml": {
|
|
22
|
+
extension: ".mpkg",
|
|
23
|
+
raw: !0,
|
|
24
|
+
language: "xml"
|
|
25
|
+
},
|
|
26
|
+
"application/vnd.mozilla.xul+xml": {
|
|
27
|
+
extension: ".xul",
|
|
28
|
+
raw: !0,
|
|
29
|
+
language: "xml"
|
|
30
|
+
},
|
|
31
|
+
"application/vnd.ms-excel": { extension: ".xls" },
|
|
32
|
+
"application/vnd.ms-fontobject": { extension: ".eot" },
|
|
33
|
+
"application/vnd.ms-powerpoint": { extension: ".ppt" },
|
|
34
|
+
"application/vnd.oasis.opendocument.presentation": { extension: ".odp" },
|
|
35
|
+
"application/vnd.oasis.opendocument.spreadsheet": { extension: ".ods" },
|
|
36
|
+
"application/vnd.oasis.opendocument.text": { extension: ".odt" },
|
|
37
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": {
|
|
38
|
+
extension: ".pptx"
|
|
39
|
+
},
|
|
40
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
|
|
41
|
+
extension: ".xlsx"
|
|
42
|
+
},
|
|
43
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
|
|
44
|
+
extension: ".docx"
|
|
45
|
+
},
|
|
46
|
+
"application/vnd.rar": { extension: ".rar" },
|
|
47
|
+
"application/vnd.visio": { extension: ".vsd" },
|
|
48
|
+
"application/x-7z-compressed": { extension: ".7z" },
|
|
49
|
+
"application/x-abiword": { extension: ".abw" },
|
|
50
|
+
"application/x-bzip": { extension: ".bz" },
|
|
51
|
+
"application/x-bzip2": { extension: ".bz2" },
|
|
52
|
+
"application/x-cdf": { extension: ".cda" },
|
|
53
|
+
"application/x-csh": { extension: ".csh" },
|
|
54
|
+
"application/x-freearc": { extension: ".arc" },
|
|
55
|
+
"application/x-httpd-php": { extension: ".php", raw: !0 },
|
|
56
|
+
"application/x-sh": { extension: ".sh", raw: !0 },
|
|
57
|
+
"application/x-tar": { extension: ".tar" },
|
|
58
|
+
"application/xhtml+xml": { extension: ".xhtml", raw: !0, language: "html" },
|
|
59
|
+
"application/xml": { extension: ".xml", raw: !0, language: "xml" },
|
|
60
|
+
"application/yaml": { extension: ".yaml", raw: !0, language: "yaml" },
|
|
61
|
+
"application/zip": { extension: ".zip" },
|
|
62
|
+
"audio/aac": { extension: ".aac" },
|
|
63
|
+
"audio/midi": { extension: ".midi" },
|
|
64
|
+
"audio/mpeg": { extension: ".mp3", preview: "audio" },
|
|
65
|
+
"audio/ogg": { extension: ".oga" },
|
|
66
|
+
"audio/wav": { extension: ".wav" },
|
|
67
|
+
"audio/webm": { extension: ".weba" },
|
|
68
|
+
"font/otf": { extension: ".otf" },
|
|
69
|
+
"font/ttf": { extension: ".ttf" },
|
|
70
|
+
"font/woff": { extension: ".woff" },
|
|
71
|
+
"font/woff2": { extension: ".woff2" },
|
|
72
|
+
"image/apng": { extension: ".apng", preview: "image", alpha: !0 },
|
|
73
|
+
"image/avif": { extension: ".avif", preview: "image" },
|
|
74
|
+
"image/bmp": { extension: ".bmp", preview: "image" },
|
|
75
|
+
"image/gif": { extension: ".gif", preview: "image", alpha: !0 },
|
|
76
|
+
"image/jpeg": { extension: ".jpg", preview: "image" },
|
|
77
|
+
"image/png": { extension: ".png", preview: "image", alpha: !0 },
|
|
78
|
+
"image/svg+xml": {
|
|
79
|
+
extension: ".svg",
|
|
80
|
+
raw: !0,
|
|
81
|
+
language: "xml",
|
|
82
|
+
preview: "image",
|
|
83
|
+
alpha: !0
|
|
84
|
+
},
|
|
85
|
+
"image/tiff": { extension: ".tiff" },
|
|
86
|
+
"image/vnd.microsoft.icon": { extension: ".ico", preview: "image" },
|
|
87
|
+
"image/webp": { extension: ".webp", preview: "image", alpha: !0 },
|
|
88
|
+
"text/calendar": { extension: ".ics", raw: !0 },
|
|
89
|
+
"text/css": { extension: ".css", raw: !0, language: "css" },
|
|
90
|
+
"text/csv": { extension: ".csv", raw: !0 },
|
|
91
|
+
"text/html": {
|
|
92
|
+
extension: ".html",
|
|
93
|
+
raw: !0,
|
|
94
|
+
language: "html",
|
|
95
|
+
preview: "object"
|
|
96
|
+
},
|
|
97
|
+
"text/javascript": { extension: ".js", raw: !0 },
|
|
98
|
+
"text/plain": { extension: ".txt", raw: !0 },
|
|
99
|
+
"text/xml": { extension: ".xml", raw: !0, language: "xml" },
|
|
100
|
+
"text/yaml": { extension: ".yaml", raw: !0, language: "yaml" },
|
|
101
|
+
"video/3gpp": { extension: ".3gp" },
|
|
102
|
+
"audio/3gpp": { extension: ".3gp" },
|
|
103
|
+
"video/3gpp2": { extension: ".3g2" },
|
|
104
|
+
"audio/3gpp2": { extension: ".3g2" },
|
|
105
|
+
"video/mp2t": { extension: ".ts" },
|
|
106
|
+
"video/mp4": { extension: ".mp4", preview: "video" },
|
|
107
|
+
"video/mpeg": { extension: ".mpeg" },
|
|
108
|
+
"video/ogg": { extension: ".ogv" },
|
|
109
|
+
"video/webm": { extension: ".webm", preview: "video" },
|
|
110
|
+
"video/x-msvideo": { extension: ".avi" }
|
|
111
|
+
}, t = Object.entries(i).filter(([, e]) => e?.raw).map(([e]) => e);
|
|
112
|
+
function a(e) {
|
|
113
|
+
const n = i[e];
|
|
114
|
+
if (n)
|
|
115
|
+
return n;
|
|
116
|
+
if (e.endsWith("+json"))
|
|
117
|
+
return {
|
|
118
|
+
extension: ".json",
|
|
119
|
+
raw: !0,
|
|
120
|
+
language: "json"
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export {
|
|
124
|
+
a as getMediaTypeConfig,
|
|
125
|
+
i as mediaTypes,
|
|
126
|
+
t as textMediaTypes
|
|
127
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-types.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/media-types.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import MimeType from 'whatwg-mimetype';
|
|
2
|
+
/**
|
|
3
|
+
* Processes the response body of an HTTP request.
|
|
4
|
+
* Extracts MIME type, attachment filename, and generates a data URL.
|
|
5
|
+
*/
|
|
6
|
+
export declare function processResponseBody({ data, headers }: {
|
|
7
|
+
data: unknown;
|
|
8
|
+
headers: {
|
|
9
|
+
name: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
}): {
|
|
13
|
+
mimeType: MimeType | undefined;
|
|
14
|
+
attachmentFilename: string;
|
|
15
|
+
dataUrl: string;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=process-response-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-response-body.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/process-response-body.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AAMtC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE;;;;EAyBnH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import s from "whatwg-mimetype";
|
|
2
|
+
import { extractFilename as p } from "./extract-filename.js";
|
|
3
|
+
const f = (e) => e instanceof Blob;
|
|
4
|
+
function y({ data: e, headers: o }) {
|
|
5
|
+
const i = o.find((n) => n.name.toLowerCase() === "content-type"), t = i?.value ? new s(i.value) : void 0, r = p(
|
|
6
|
+
o.find((n) => n.name.toLowerCase() === "content-disposition")?.value ?? ""
|
|
7
|
+
), c = f(e) ? URL.createObjectURL(e) : typeof e == "string" ? URL.createObjectURL(new Blob([e], { type: t ? t.toString() : void 0 })) : e instanceof Object && Object.keys(e).length ? URL.createObjectURL(
|
|
8
|
+
new Blob([JSON.stringify(e)], {
|
|
9
|
+
type: t ? t.toString() : void 0
|
|
10
|
+
})
|
|
11
|
+
) : "";
|
|
12
|
+
return { mimeType: t, attachmentFilename: r, dataUrl: c };
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
y as processResponseBody
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-response-body.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/helpers/process-response-body.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/scalar-response-block/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAkaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAKrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAa1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAuBF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;CAChC,CAAC;AA+gBF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA5TuB,CAAC;;;;;;;;;yCAQF,CAAC;wCAG7B,CAAC;6BACgC,CAAC;;oBAC3B,CAAC;;;;;;;;;;;yCASwC,CAAC;wCAG5C,CAAA;6BAA+D,CAAC;+CAAiE,CAAC;;6BACvI,CAAC;;;;;;;;;yCAMwB,CAAC;wCAGzB,CAAC;6BAIV,CAAC;+CAEN,CAAC;;6BAEI,CAAC;;;;;;;;;;;;yCASgC,CAAC;wCAC+B,CAAC;6BAA+D,CAAC;+CACpF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAtDV,CAAC;;;;;;;;;yCAQF,CAAC;wCAG7B,CAAC;6BACgC,CAAC;;oBAC3B,CAAC;;;;;;;;;;;yCASwC,CAAC;wCAG5C,CAAA;6BAA+D,CAAC;+CAAiE,CAAC;;6BACvI,CAAC;;;;;;;;;yCAMwB,CAAC;wCAGzB,CAAC;6BAIV,CAAC;+CAEN,CAAC;;6BAEI,CAAC;;;;;;;;;;;;yCASgC,CAAC;wCAC+B,CAAC;6BAA+D,CAAC;+CACpF,CAAC;;;;;;;;kFA6QpD,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuth.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3f1067a4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|