@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.
Files changed (38) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/layouts/App/create-api-client-app.d.ts +18 -160
  3. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  4. package/dist/layouts/Modal/create-api-client-modal.d.ts +36 -320
  5. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  6. package/dist/layouts/Web/create-api-client-web.d.ts +18 -160
  7. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  8. package/dist/libs/create-client.d.ts +18 -160
  9. package/dist/libs/create-client.d.ts.map +1 -1
  10. package/dist/libs/send-request/create-request-operation.d.ts +1 -0
  11. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  12. package/dist/store/import-spec.d.ts +2 -154
  13. package/dist/store/import-spec.d.ts.map +1 -1
  14. package/dist/store/security-schemes.d.ts +16 -6
  15. package/dist/store/security-schemes.d.ts.map +1 -1
  16. package/dist/store/store.d.ts +18 -160
  17. package/dist/store/store.d.ts.map +1 -1
  18. package/dist/style.css +1 -1
  19. package/dist/views/Request/Request.vue.d.ts +2 -0
  20. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  21. package/dist/views/Request/Request.vue.js +2 -2
  22. package/dist/views/Request/Request.vue2.js +35 -33
  23. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  24. package/dist/views/Request/RequestRoot.vue.js +1 -1
  25. package/dist/views/Request/RequestRoot.vue2.js +63 -62
  26. package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +11 -0
  27. package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -0
  28. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +81 -0
  29. package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +4 -0
  30. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  31. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +3 -3
  32. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +2 -0
  33. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  34. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
  35. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +73 -60
  36. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  37. package/dist/views/Request/consts/mediaTypes.js +1 -0
  38. 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":"AAgIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAiBnF,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,0BAA0B,EAAE,0BAA0B,CAAA;CACvD,CAAC;;;cAG4C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAsNjE,wBAOG"}
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 e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-24f1f04a"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-10fa3cd5"]]);
5
5
  export {
6
- e as default
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 l, isRef as W, withCtx as y, createBlock as u, createCommentVNode as H } from "vue";
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: x } = b(), { isSidebarOpen: a } = g(), h = b(), { layout: C } = M(), {
25
- activeCollection: i,
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: V
33
- } = I(), { modalState: R, requestHistory: _ } = h, q = U(
34
- () => _.findLast((t) => {
35
- var o;
36
- return t.request.uid === ((o = n.value) == null ? void 0 : o.uid);
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 w(t) {
40
- var o;
41
- x.commandPalette.emit({
40
+ function _(o) {
41
+ var t;
42
+ R.commandPalette.emit({
42
43
  commandName: "Import from cURL",
43
44
  metaData: {
44
- parsedCurl: B(t),
45
- collectionUid: (o = i.value) == null ? void 0 : o.uid
45
+ parsedCurl: B(o),
46
+ collectionUid: (t = a.value) == null ? void 0 : t.uid
46
47
  }
47
48
  });
48
49
  }
49
- return (t, o) => e(i) && e(c) ? (r(), f("div", {
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(C) === "modal"
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
- l(A, {
58
- modelValue: e(a),
59
- "onUpdate:modelValue": o[0] || (o[0] = (s) => W(a) ? a.value = s : null),
60
- collection: e(i),
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: o[1] || (o[1] = () => e(R).hide()),
67
- onImportCurl: w
67
+ onHideModal: t[1] || (t[1] = () => e(C).hide()),
68
+ onImportCurl: _
68
69
  }, null, 8, ["modelValue", "collection", "envVariables", "environment", "operation", "server", "workspace"]),
69
- l(L, null, {
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(a) ? "sidebar-active-hide-layout" : ""]])
74
+ class: k(["flex-1", [e(s) ? "sidebar-active-hide-layout" : ""]])
74
75
  }, {
75
76
  default: y(() => {
76
- var s;
77
+ var l;
77
78
  return [
78
- l(z, {
79
- collection: e(i),
79
+ i(z, {
80
+ collection: e(a),
80
81
  envVariables: e(p),
81
82
  environment: e(v),
82
83
  example: e(n),
83
- invalidParams: t.invalidParams,
84
+ invalidParams: o.invalidParams,
84
85
  operation: e(m),
85
- selectedSecuritySchemeUids: t.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
- l(D, {
90
- numWorkspaceRequests: e(V).length,
91
- response: (s = q.value) == null ? void 0 : s.response
92
- }, null, 8, ["numWorkspaceRequests", "response"])
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":";;cA0N8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA+QjE,wBAMG"}
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-fc9d46fd"]]);
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 j, ref as c, computed as L, onMounted as M, onBeforeUnmount as $, watch as H, openBlock as m, createElementBlock as Q, normalizeClass as _, unref as r, createBlock as w, isRef as F, createCommentVNode as O, createElementVNode as V, createVNode as G } from "vue";
2
- import { isDefined as K } from "@scalar/oas-utils/helpers";
3
- import { safeJSON as X } from "@scalar/object-utils/parse";
4
- import { useToasts as Y } from "@scalar/use-toasts";
5
- import { RouterView as Z } from "vue-router";
6
- import ee from "../../components/Sidebar/SidebarToggle.vue.js";
7
- import { useSidebar as te } from "../../hooks/useSidebar.js";
8
- import { validateParameters as oe } from "../../libs/validate-parameters.js";
9
- import { useActiveEntities as re } from "../../store/active-entities.js";
10
- import { useOpenApiWatcher as se } from "./hooks/useOpenApiWatcher.js";
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 le } from "../../libs/send-request/create-request-operation.js";
13
- import { ERRORS as ie } from "../../libs/errors.js";
14
- import { useWorkspace as ne } from "../../store/store.js";
15
- import { useLayout as ue } from "../../hooks/useLayout.js";
16
- const ce = { class: "flex h-full" }, me = { class: "flex h-full flex-1 flex-col" }, we = /* @__PURE__ */ j({
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(fe) {
20
- const C = ne(), { toast: f } = Y(), { layout: d } = ue(), {
21
- activeCollection: a,
22
- activeExample: l,
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: n,
24
+ activeRequest: i,
25
25
  activeWorkspace: p,
26
- activeServer: T
27
- } = re(), { cookies: g, requestHistory: A, showSidebar: S, securitySchemes: B, events: i } = C, { isSidebarOpen: s } = te(), D = c(), y = c(), u = c(/* @__PURE__ */ new Set()), R = L(
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 = a.value) != null && e.useCollectionSecurity ? (t = a.value) == null ? void 0 : t.selectedSecuritySchemeUids : (o = n.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
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 k, E, N, U;
34
- if (!n.value || !l.value || !a.value)
33
+ var N, U, _, w;
34
+ if (!i.value || !a.value || !l.value)
35
35
  return;
36
- u.value = oe(l.value);
37
- const e = typeof v.value == "object" ? v.value.value : "{}", t = X.parse(e);
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 ?? {}, z = ((k = p.value) == null ? void 0 : k.cookies.map((W) => g[W]).filter(K)) ?? [], I = ((N = (E = a.value) == null ? void 0 : E.info) == null ? void 0 : N.title) === "Drafts" ? void 0 : T.value, [b, q] = le({
40
- request: n.value,
41
- example: l.value,
42
- selectedSecuritySchemeUids: R.value,
43
- proxyUrl: ((U = p.value) == null ? void 0 : U.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: z,
46
- status: i.requestStatus,
47
- securitySchemes: B,
48
- server: I
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
- y.value = q.controller;
55
- const [h, J] = await q.sendRequest();
56
- h ? f(h.message, "error") : A.push(JSON.parse(JSON.stringify(J)));
57
- }, P = async () => {
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 = y.value) == null ? void 0 : e.abort(ie.REQUEST_ABORTED);
59
+ return (e = R.value) == null ? void 0 : e.abort(ne.REQUEST_ABORTED);
60
60
  };
61
- return M(() => {
62
- i.executeRequest.on(x), i.cancelRequest.on(P);
63
- }), se(), $(() => i.executeRequest.off(x)), H(
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 = l.value) == null ? void 0 : e.parameters;
66
+ return (e = a.value) == null ? void 0 : e.parameters;
67
67
  },
68
68
  () => {
69
- u.value.clear();
69
+ c.value.clear();
70
70
  },
71
71
  { deep: !0 }
72
- ), (e, t) => (m(), Q("div", {
72
+ ), (e, t) => (m(), F("div", {
73
73
  ref_key: "element",
74
- ref: D,
75
- class: _(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
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(), w(ee, {
79
+ r(S) ? (m(), V(te, {
80
80
  key: 0,
81
81
  modelValue: r(s),
82
- "onUpdate:modelValue": t[0] || (t[0] = (o) => F(s) ? s.value = o : null),
83
- class: _(["absolute left-3 top-2 z-50", [
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"])) : O("", !0),
89
- V("div", ce, [
90
- r(S) ? (m(), w(ae, {
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
- })) : O("", !0),
94
- V("div", me, [
95
- G(r(Z), {
96
- invalidParams: u.value,
97
- selectedSecuritySchemeUids: R.value
98
- }, null, 8, ["invalidParams", "selectedSecuritySchemeUids"])
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
- we as default
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
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./RequestHeaders.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -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.10";
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
- }, D = /* @__PURE__ */ p({
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
- D as default
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":"AAuOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAgBvE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA4RF,wBAOG"}
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 t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-19922b4d"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-fc4ef6e9"]]);
5
5
  export {
6
- s as default
6
+ r as default
7
7
  };