@scalar/api-client 2.3.10 → 2.3.11
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 +27 -0
- package/dist/layouts/App/create-api-client-app.d.ts +18 -160
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +36 -320
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +18 -160
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +18 -160
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +2 -154
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +16 -6
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +18 -160
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +2 -0
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +35 -33
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +1 -1
- package/dist/views/Request/RequestRoot.vue2.js +63 -62
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +11 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +81 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +4 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +2 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +73 -60
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +1 -0
- package/package.json +13 -13
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { SelectedSecuritySchemeUids } from '@scalar/oas-utils/entities/shared';
|
|
2
|
+
import type { SendRequestResult } from '../../libs/send-request/create-request-operation';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
invalidParams: Set<string>;
|
|
4
5
|
selectedSecuritySchemeUids: SelectedSecuritySchemeUids;
|
|
6
|
+
requestResult?: SendRequestResult | null;
|
|
5
7
|
};
|
|
6
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
9
|
newTab: (item: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":"AAmIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AASnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AASrF,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CACzC,CAAC;;;cAG4C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAsNjE,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Request.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10fa3cd5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as E, computed as U, unref as e, openBlock as r, createElementBlock as f, normalizeClass as k, createElementVNode as P, createVNode as
|
|
1
|
+
import { defineComponent as E, computed as U, unref as e, openBlock as r, createElementBlock as f, normalizeClass as k, createElementVNode as P, createVNode as i, isRef as W, withCtx as y, createBlock as u, createCommentVNode as H } from "vue";
|
|
2
2
|
import S from "../../components/EmptyState.vue.js";
|
|
3
3
|
import L from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
4
4
|
import N from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
@@ -17,79 +17,81 @@ const O = { class: "flex h-full" }, T = {
|
|
|
17
17
|
__name: "Request",
|
|
18
18
|
props: {
|
|
19
19
|
invalidParams: {},
|
|
20
|
-
selectedSecuritySchemeUids: {}
|
|
20
|
+
selectedSecuritySchemeUids: {},
|
|
21
|
+
requestResult: {}
|
|
21
22
|
},
|
|
22
23
|
emits: ["newTab"],
|
|
23
24
|
setup($) {
|
|
24
|
-
const { events:
|
|
25
|
-
activeCollection:
|
|
25
|
+
const { events: R } = b(), { isSidebarOpen: s } = g(), q = b(), { layout: h } = M(), {
|
|
26
|
+
activeCollection: a,
|
|
26
27
|
activeExample: n,
|
|
27
28
|
activeRequest: m,
|
|
28
29
|
activeWorkspace: c,
|
|
29
30
|
activeServer: d,
|
|
30
31
|
activeEnvVariables: p,
|
|
31
32
|
activeEnvironment: v,
|
|
32
|
-
activeWorkspaceRequests:
|
|
33
|
-
} = I(), { modalState:
|
|
34
|
-
() =>
|
|
35
|
-
var
|
|
36
|
-
return
|
|
33
|
+
activeWorkspaceRequests: x
|
|
34
|
+
} = I(), { modalState: C, requestHistory: V } = q, w = U(
|
|
35
|
+
() => V.findLast((o) => {
|
|
36
|
+
var t;
|
|
37
|
+
return o.request.uid === ((t = n.value) == null ? void 0 : t.uid);
|
|
37
38
|
})
|
|
38
39
|
);
|
|
39
|
-
function
|
|
40
|
-
var
|
|
41
|
-
|
|
40
|
+
function _(o) {
|
|
41
|
+
var t;
|
|
42
|
+
R.commandPalette.emit({
|
|
42
43
|
commandName: "Import from cURL",
|
|
43
44
|
metaData: {
|
|
44
|
-
parsedCurl: B(
|
|
45
|
-
collectionUid: (
|
|
45
|
+
parsedCurl: B(o),
|
|
46
|
+
collectionUid: (t = a.value) == null ? void 0 : t.uid
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
|
-
return (
|
|
50
|
+
return (o, t) => e(a) && e(c) ? (r(), f("div", {
|
|
50
51
|
key: 0,
|
|
51
52
|
class: k(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
|
|
52
|
-
"!mb-0 !mr-0 !border-0": e(
|
|
53
|
+
"!mb-0 !mr-0 !border-0": e(h) === "modal"
|
|
53
54
|
}])
|
|
54
55
|
}, [
|
|
55
56
|
P("div", O, [
|
|
56
57
|
e(m) ? (r(), f("div", T, [
|
|
57
|
-
|
|
58
|
-
modelValue: e(
|
|
59
|
-
"onUpdate:modelValue":
|
|
60
|
-
collection: e(
|
|
58
|
+
i(A, {
|
|
59
|
+
modelValue: e(s),
|
|
60
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => W(s) ? s.value = l : null),
|
|
61
|
+
collection: e(a),
|
|
61
62
|
envVariables: e(p),
|
|
62
63
|
environment: e(v),
|
|
63
64
|
operation: e(m),
|
|
64
65
|
server: e(d),
|
|
65
66
|
workspace: e(c),
|
|
66
|
-
onHideModal:
|
|
67
|
-
onImportCurl:
|
|
67
|
+
onHideModal: t[1] || (t[1] = () => e(C).hide()),
|
|
68
|
+
onImportCurl: _
|
|
68
69
|
}, null, 8, ["modelValue", "collection", "envVariables", "environment", "operation", "server", "workspace"]),
|
|
69
|
-
|
|
70
|
+
i(L, null, {
|
|
70
71
|
default: y(() => [
|
|
71
72
|
e(n) ? (r(), u(N, {
|
|
72
73
|
key: 0,
|
|
73
|
-
class: k(["flex-1", [e(
|
|
74
|
+
class: k(["flex-1", [e(s) ? "sidebar-active-hide-layout" : ""]])
|
|
74
75
|
}, {
|
|
75
76
|
default: y(() => {
|
|
76
|
-
var
|
|
77
|
+
var l;
|
|
77
78
|
return [
|
|
78
|
-
|
|
79
|
-
collection: e(
|
|
79
|
+
i(z, {
|
|
80
|
+
collection: e(a),
|
|
80
81
|
envVariables: e(p),
|
|
81
82
|
environment: e(v),
|
|
82
83
|
example: e(n),
|
|
83
|
-
invalidParams:
|
|
84
|
+
invalidParams: o.invalidParams,
|
|
84
85
|
operation: e(m),
|
|
85
|
-
selectedSecuritySchemeUids:
|
|
86
|
+
selectedSecuritySchemeUids: o.selectedSecuritySchemeUids,
|
|
86
87
|
server: e(d),
|
|
87
88
|
workspace: e(c)
|
|
88
89
|
}, null, 8, ["collection", "envVariables", "environment", "example", "invalidParams", "operation", "selectedSecuritySchemeUids", "server", "workspace"]),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
i(D, {
|
|
91
|
+
requestResult: o.requestResult,
|
|
92
|
+
numWorkspaceRequests: e(x).length,
|
|
93
|
+
response: (l = w.value) == null ? void 0 : l.response
|
|
94
|
+
}, null, 8, ["requestResult", "numWorkspaceRequests", "response"])
|
|
93
95
|
];
|
|
94
96
|
}),
|
|
95
97
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cAiO8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAoRjE,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestRoot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3ea4639b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,106 +1,107 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isDefined as
|
|
3
|
-
import { safeJSON as
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { RouterView as
|
|
6
|
-
import
|
|
7
|
-
import { useSidebar as
|
|
8
|
-
import { validateParameters as
|
|
9
|
-
import { useActiveEntities as
|
|
10
|
-
import { useOpenApiWatcher as
|
|
1
|
+
import { defineComponent as L, ref as n, computed as M, onMounted as $, onBeforeUnmount as H, watch as Q, openBlock as m, createElementBlock as F, normalizeClass as O, unref as r, createBlock as V, isRef as G, createCommentVNode as C, createElementVNode as T, createVNode as K } from "vue";
|
|
2
|
+
import { isDefined as X } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { safeJSON as Y } from "@scalar/object-utils/parse";
|
|
4
|
+
import { useToasts as Z } from "@scalar/use-toasts";
|
|
5
|
+
import { RouterView as ee } from "vue-router";
|
|
6
|
+
import te from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
7
|
+
import { useSidebar as oe } from "../../hooks/useSidebar.js";
|
|
8
|
+
import { validateParameters as re } from "../../libs/validate-parameters.js";
|
|
9
|
+
import { useActiveEntities as se } from "../../store/active-entities.js";
|
|
10
|
+
import { useOpenApiWatcher as le } from "./hooks/useOpenApiWatcher.js";
|
|
11
11
|
import ae from "./RequestSidebar.vue.js";
|
|
12
|
-
import { createRequestOperation as
|
|
13
|
-
import { ERRORS as
|
|
14
|
-
import { useWorkspace as
|
|
15
|
-
import { useLayout as
|
|
16
|
-
const
|
|
12
|
+
import { createRequestOperation as ue } from "../../libs/send-request/create-request-operation.js";
|
|
13
|
+
import { ERRORS as ne } from "../../libs/errors.js";
|
|
14
|
+
import { useWorkspace as ie } from "../../store/store.js";
|
|
15
|
+
import { useLayout as ce } from "../../hooks/useLayout.js";
|
|
16
|
+
const me = { class: "flex h-full" }, fe = { class: "flex h-full flex-1 flex-col" }, Oe = /* @__PURE__ */ L({
|
|
17
17
|
__name: "RequestRoot",
|
|
18
18
|
emits: ["newTab"],
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
activeCollection:
|
|
22
|
-
activeExample:
|
|
19
|
+
setup(de) {
|
|
20
|
+
const g = ie(), { toast: f } = Z(), { layout: d } = ce(), {
|
|
21
|
+
activeCollection: l,
|
|
22
|
+
activeExample: a,
|
|
23
23
|
activeEnvironment: v,
|
|
24
|
-
activeRequest:
|
|
24
|
+
activeRequest: i,
|
|
25
25
|
activeWorkspace: p,
|
|
26
|
-
activeServer:
|
|
27
|
-
} =
|
|
26
|
+
activeServer: A
|
|
27
|
+
} = se(), { cookies: B, requestHistory: D, showSidebar: S, securitySchemes: P, events: u } = g, { isSidebarOpen: s } = oe(), z = n(), R = n(), c = n(/* @__PURE__ */ new Set()), y = n(null), q = M(
|
|
28
28
|
() => {
|
|
29
29
|
var e, t, o;
|
|
30
|
-
return ((e =
|
|
30
|
+
return ((e = l.value) != null && e.useCollectionSecurity ? (t = l.value) == null ? void 0 : t.selectedSecuritySchemeUids : (o = i.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
|
|
31
31
|
}
|
|
32
32
|
), x = async () => {
|
|
33
|
-
var
|
|
34
|
-
if (!
|
|
33
|
+
var N, U, _, w;
|
|
34
|
+
if (!i.value || !a.value || !l.value)
|
|
35
35
|
return;
|
|
36
|
-
|
|
37
|
-
const e = typeof v.value == "object" ? v.value.value : "{}", t =
|
|
36
|
+
c.value = re(a.value);
|
|
37
|
+
const e = typeof v.value == "object" ? v.value.value : "{}", t = Y.parse(e);
|
|
38
38
|
t.error && console.error("INVALID ENVIRONMENT!");
|
|
39
|
-
const o = t.error || typeof t.data != "object" ? {} : t.data ?? {},
|
|
40
|
-
request:
|
|
41
|
-
example:
|
|
42
|
-
selectedSecuritySchemeUids:
|
|
43
|
-
proxyUrl: ((
|
|
39
|
+
const o = t.error || typeof t.data != "object" ? {} : t.data ?? {}, J = ((N = p.value) == null ? void 0 : N.cookies.map((j) => B[j]).filter(X)) ?? [], W = ((_ = (U = l.value) == null ? void 0 : U.info) == null ? void 0 : _.title) === "Drafts" ? void 0 : A.value, [b, h] = ue({
|
|
40
|
+
request: i.value,
|
|
41
|
+
example: a.value,
|
|
42
|
+
selectedSecuritySchemeUids: q.value,
|
|
43
|
+
proxyUrl: ((w = p.value) == null ? void 0 : w.proxyUrl) ?? "",
|
|
44
44
|
environment: o,
|
|
45
|
-
globalCookies:
|
|
46
|
-
status:
|
|
47
|
-
securitySchemes:
|
|
48
|
-
server:
|
|
45
|
+
globalCookies: J,
|
|
46
|
+
status: u.requestStatus,
|
|
47
|
+
securitySchemes: P,
|
|
48
|
+
server: W
|
|
49
49
|
});
|
|
50
50
|
if (b) {
|
|
51
51
|
f(b.message, "error");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
const [
|
|
56
|
-
|
|
57
|
-
},
|
|
54
|
+
R.value = h.controller;
|
|
55
|
+
const [k, E] = await h.sendRequest();
|
|
56
|
+
y.value = E, k ? f(k.message, "error") : D.push(JSON.parse(JSON.stringify(E)));
|
|
57
|
+
}, I = async () => {
|
|
58
58
|
var e;
|
|
59
|
-
return (e =
|
|
59
|
+
return (e = R.value) == null ? void 0 : e.abort(ne.REQUEST_ABORTED);
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
}),
|
|
61
|
+
return $(() => {
|
|
62
|
+
u.executeRequest.on(x), u.cancelRequest.on(I);
|
|
63
|
+
}), le(), H(() => u.executeRequest.off(x)), Q(
|
|
64
64
|
() => {
|
|
65
65
|
var e;
|
|
66
|
-
return (e =
|
|
66
|
+
return (e = a.value) == null ? void 0 : e.parameters;
|
|
67
67
|
},
|
|
68
68
|
() => {
|
|
69
|
-
|
|
69
|
+
c.value.clear();
|
|
70
70
|
},
|
|
71
71
|
{ deep: !0 }
|
|
72
|
-
), (e, t) => (m(),
|
|
72
|
+
), (e, t) => (m(), F("div", {
|
|
73
73
|
ref_key: "element",
|
|
74
|
-
ref:
|
|
75
|
-
class:
|
|
74
|
+
ref: z,
|
|
75
|
+
class: O(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
|
|
76
76
|
"!mb-0 !mr-0 !border-0": r(d) === "modal"
|
|
77
77
|
}])
|
|
78
78
|
}, [
|
|
79
|
-
r(S) ? (m(),
|
|
79
|
+
r(S) ? (m(), V(te, {
|
|
80
80
|
key: 0,
|
|
81
81
|
modelValue: r(s),
|
|
82
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) =>
|
|
83
|
-
class:
|
|
82
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => G(s) ? s.value = o : null),
|
|
83
|
+
class: O(["absolute left-3 top-2 z-50", [
|
|
84
84
|
{ hidden: r(s) },
|
|
85
85
|
{ "xl:!flex": !r(s) },
|
|
86
86
|
{ "!flex": r(d) === "modal" }
|
|
87
87
|
]])
|
|
88
|
-
}, null, 8, ["modelValue", "class"])) :
|
|
89
|
-
|
|
90
|
-
r(S) ? (m(),
|
|
88
|
+
}, null, 8, ["modelValue", "class"])) : C("", !0),
|
|
89
|
+
T("div", me, [
|
|
90
|
+
r(S) ? (m(), V(ae, {
|
|
91
91
|
key: 0,
|
|
92
92
|
onNewTab: t[1] || (t[1] = (o) => e.$emit("newTab", o))
|
|
93
|
-
})) :
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
invalidParams:
|
|
97
|
-
selectedSecuritySchemeUids:
|
|
98
|
-
|
|
93
|
+
})) : C("", !0),
|
|
94
|
+
T("div", fe, [
|
|
95
|
+
K(r(ee), {
|
|
96
|
+
invalidParams: c.value,
|
|
97
|
+
selectedSecuritySchemeUids: q.value,
|
|
98
|
+
requestResult: y.value
|
|
99
|
+
}, null, 8, ["invalidParams", "selectedSecuritySchemeUids", "requestResult"])
|
|
99
100
|
])
|
|
100
101
|
])
|
|
101
102
|
], 2));
|
|
102
103
|
}
|
|
103
104
|
});
|
|
104
105
|
export {
|
|
105
|
-
|
|
106
|
+
Oe as default
|
|
106
107
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Header = {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
required: boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
headers: Header[];
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=RequestHeaders.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/RequestHeaders.vue"],"names":[],"mappings":"AA0EA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAwJF,wBAOG"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { defineComponent as p, openBlock as e, createBlock as n, withCtx as r, createTextVNode as l, createElementBlock as s, createVNode as m, Fragment as i, renderList as _, toDisplayString as c } from "vue";
|
|
2
|
+
import h from "../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import x from "../../../components/DataTable/DataTableRow.vue.js";
|
|
4
|
+
import u from "../../../components/DataTable/DataTableText.vue.js";
|
|
5
|
+
import g from "../../../components/HelpfulLink.vue.js";
|
|
6
|
+
import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
+
import { httpHeaders as y } from "../../../data/httpHeaders.js";
|
|
8
|
+
const b = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "max-h-[calc(100%-32px)] overflow-y-auto border-t"
|
|
11
|
+
}, k = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "text-c-3 bg-b-1 flex min-h-12 items-center justify-center rounded border px-4 text-sm"
|
|
14
|
+
}, q = /* @__PURE__ */ p({
|
|
15
|
+
__name: "RequestHeaders",
|
|
16
|
+
props: {
|
|
17
|
+
headers: {}
|
|
18
|
+
},
|
|
19
|
+
setup(C) {
|
|
20
|
+
const f = (o) => y.find(
|
|
21
|
+
(a) => a.name.toLowerCase() === o.toLowerCase()
|
|
22
|
+
);
|
|
23
|
+
return (o, a) => (e(), n(w, {
|
|
24
|
+
class: "overflow-auto",
|
|
25
|
+
defaultOpen: !1,
|
|
26
|
+
itemCount: o.headers.length
|
|
27
|
+
}, {
|
|
28
|
+
title: r(() => a[0] || (a[0] = [
|
|
29
|
+
l("Request Headers")
|
|
30
|
+
])),
|
|
31
|
+
default: r(() => [
|
|
32
|
+
o.headers.length ? (e(), s("div", b, [
|
|
33
|
+
m(h, {
|
|
34
|
+
columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
|
|
35
|
+
scroll: ""
|
|
36
|
+
}, {
|
|
37
|
+
default: r(() => [
|
|
38
|
+
(e(!0), s(i, null, _(o.headers, (t) => (e(), n(x, {
|
|
39
|
+
key: t.name,
|
|
40
|
+
class: "group/row text-c-1"
|
|
41
|
+
}, {
|
|
42
|
+
default: r(() => [
|
|
43
|
+
m(u, { class: "z-1 bg-b-1 sticky left-0 max-w-48 group-first/row:border-t-0" }, {
|
|
44
|
+
default: r(() => {
|
|
45
|
+
var d;
|
|
46
|
+
return [
|
|
47
|
+
typeof ((d = f(t.name)) == null ? void 0 : d.url) == "string" ? (e(), n(g, {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "decoration-c-3",
|
|
50
|
+
href: f(t.name).url
|
|
51
|
+
}, {
|
|
52
|
+
default: r(() => [
|
|
53
|
+
l(c(t.name), 1)
|
|
54
|
+
]),
|
|
55
|
+
_: 2
|
|
56
|
+
}, 1032, ["href"])) : (e(), s(i, { key: 1 }, [
|
|
57
|
+
l(c(t.name), 1)
|
|
58
|
+
], 64))
|
|
59
|
+
];
|
|
60
|
+
}),
|
|
61
|
+
_: 2
|
|
62
|
+
}, 1024),
|
|
63
|
+
m(u, {
|
|
64
|
+
class: "z-0 group-first/row:border-t-0",
|
|
65
|
+
text: t.value
|
|
66
|
+
}, null, 8, ["text"])
|
|
67
|
+
]),
|
|
68
|
+
_: 2
|
|
69
|
+
}, 1024))), 128))
|
|
70
|
+
]),
|
|
71
|
+
_: 1
|
|
72
|
+
})
|
|
73
|
+
])) : (e(), s("div", k, " No Headers "))
|
|
74
|
+
]),
|
|
75
|
+
_: 1
|
|
76
|
+
}, 8, ["itemCount"]));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export {
|
|
80
|
+
q as default
|
|
81
|
+
};
|
|
@@ -37,7 +37,7 @@ const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
|
|
|
37
37
|
}));
|
|
38
38
|
}, y = (s) => {
|
|
39
39
|
s != null && s.createNew && w.name === "request" && k();
|
|
40
|
-
}, N = "2.3.
|
|
40
|
+
}, N = "2.3.11";
|
|
41
41
|
return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
|
|
42
42
|
o("div", {
|
|
43
43
|
class: q(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -11,7 +11,7 @@ const b = {
|
|
|
11
11
|
}, k = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "text-c-3 bg-b-1 flex min-h-12 items-center justify-center rounded border px-4 text-sm"
|
|
14
|
-
},
|
|
14
|
+
}, z = /* @__PURE__ */ p({
|
|
15
15
|
__name: "ResponseHeaders",
|
|
16
16
|
props: {
|
|
17
17
|
headers: {}
|
|
@@ -26,7 +26,7 @@ const b = {
|
|
|
26
26
|
itemCount: o.headers.length
|
|
27
27
|
}, {
|
|
28
28
|
title: r(() => a[0] || (a[0] = [
|
|
29
|
-
l("Headers")
|
|
29
|
+
l("Response Headers")
|
|
30
30
|
])),
|
|
31
31
|
default: r(() => [
|
|
32
32
|
o.headers.length ? (e(), s("div", b, [
|
|
@@ -77,5 +77,5 @@ const b = {
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
z as default
|
|
81
81
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { SendRequestResult } from '../../../libs/send-request/create-request-operation';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
numWorkspaceRequests: number;
|
|
4
5
|
response: ResponseInstance | undefined;
|
|
6
|
+
requestResult: SendRequestResult | null | undefined;
|
|
5
7
|
};
|
|
6
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, {}, HTMLElement>;
|
|
7
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAmPA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAKvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAarF,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACtC,aAAa,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAA;CACpD,CAAC;;AA0SF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-fc4ef6e9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|