@scalar/api-client 2.3.9 → 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 (54) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/layouts/App/create-api-client-app.d.ts +38 -167
  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 +76 -334
  5. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  6. package/dist/layouts/Modal/create-api-client-modal.js +4 -4
  7. package/dist/layouts/Web/create-api-client-web.d.ts +38 -167
  8. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  9. package/dist/libs/create-client.d.ts +38 -167
  10. package/dist/libs/create-client.d.ts.map +1 -1
  11. package/dist/libs/create-client.js +18 -20
  12. package/dist/libs/send-request/create-request-operation.d.ts +1 -0
  13. package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
  14. package/dist/store/active-entities.d.ts +2 -0
  15. package/dist/store/active-entities.d.ts.map +1 -1
  16. package/dist/store/collections.d.ts +14 -4
  17. package/dist/store/collections.d.ts.map +1 -1
  18. package/dist/store/import-spec.d.ts +2 -154
  19. package/dist/store/import-spec.d.ts.map +1 -1
  20. package/dist/store/security-schemes.d.ts +16 -6
  21. package/dist/store/security-schemes.d.ts.map +1 -1
  22. package/dist/store/store.d.ts +38 -167
  23. package/dist/store/store.d.ts.map +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/views/Collection/CollectionAuthentication.vue.d.ts +1 -1
  26. package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
  27. package/dist/views/Collection/CollectionAuthentication.vue.js +5 -2
  28. package/dist/views/Collection/CollectionAuthentication.vue2.js +52 -11
  29. package/dist/views/Collection/CollectionNavigation.vue.js +34 -34
  30. package/dist/views/Collection/CollectionSettings.vue.d.ts.map +1 -1
  31. package/dist/views/Collection/CollectionSettings.vue.js +2 -2
  32. package/dist/views/Collection/CollectionSettings.vue2.js +1 -1
  33. package/dist/views/Request/Request.vue.d.ts +4 -0
  34. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  35. package/dist/views/Request/Request.vue.js +2 -2
  36. package/dist/views/Request/Request.vue2.js +71 -73
  37. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  38. package/dist/views/Request/RequestRoot.vue.js +1 -1
  39. package/dist/views/Request/RequestRoot.vue2.js +65 -61
  40. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  41. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +24 -24
  42. package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +11 -0
  43. package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +1 -0
  44. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +81 -0
  45. package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +4 -0
  46. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  47. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +3 -3
  48. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +2 -0
  49. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  50. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
  51. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +73 -60
  52. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  53. package/dist/views/Request/consts/mediaTypes.js +1 -0
  54. package/package.json +13 -13
@@ -1,66 +1,66 @@
1
- import { defineComponent as j, ref as m, computed as L, onMounted as M, onBeforeUnmount as $, watch as H, openBlock as f, createElementBlock as Q, normalizeClass as _, unref as o, 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";
12
+ import { createRequestOperation as ue } from "../../libs/send-request/create-request-operation.js";
13
13
  import { ERRORS as ne } from "../../libs/errors.js";
14
14
  import { useWorkspace as ie } 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" }, Oe = /* @__PURE__ */ j({
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 U = ie(), { toast: d } = Y(), { layout: n } = ue(), {
21
- activeCollection: i,
19
+ setup(de) {
20
+ const g = ie(), { toast: f } = Z(), { layout: d } = ce(), {
21
+ activeCollection: l,
22
22
  activeExample: a,
23
23
  activeEnvironment: v,
24
- activeRequest: u,
24
+ activeRequest: i,
25
25
  activeWorkspace: p,
26
- activeServer: C
27
- } = re(), { cookies: T, requestHistory: g, showSidebar: S, securitySchemes: A, events: l } = U, { isSidebarOpen: r } = te(), B = m(), R = m(), c = m(/* @__PURE__ */ new Set()), D = 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
- var e, t;
30
- return (n === "modal" ? (e = i.value) == null ? void 0 : e.selectedSecuritySchemeUids : (t = u.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
29
+ var e, t, o;
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 h, k, E, N;
34
- if (!u.value || !a.value || !i.value)
33
+ var N, U, _, w;
34
+ if (!i.value || !a.value || !l.value)
35
35
  return;
36
- c.value = oe(a.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 s = t.error || typeof t.data != "object" ? {} : t.data ?? {}, z = ((h = p.value) == null ? void 0 : h.cookies.map((W) => T[W]).filter(K)) ?? [], I = ((E = (k = i.value) == null ? void 0 : k.info) == null ? void 0 : E.title) === "Drafts" ? void 0 : C.value, [y, b] = le({
40
- request: u.value,
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
41
  example: a.value,
42
- selectedSecuritySchemeUids: D.value,
43
- proxyUrl: ((N = p.value) == null ? void 0 : N.proxyUrl) ?? "",
44
- environment: s,
45
- globalCookies: z,
46
- status: l.requestStatus,
47
- securitySchemes: A,
48
- server: I
42
+ selectedSecuritySchemeUids: q.value,
43
+ proxyUrl: ((w = p.value) == null ? void 0 : w.proxyUrl) ?? "",
44
+ environment: o,
45
+ globalCookies: J,
46
+ status: u.requestStatus,
47
+ securitySchemes: P,
48
+ server: W
49
49
  });
50
- if (y) {
51
- d(y.message, "error");
50
+ if (b) {
51
+ f(b.message, "error");
52
52
  return;
53
53
  }
54
- R.value = b.controller;
55
- const [q, J] = await b.sendRequest();
56
- q ? d(q.message, "error") : g.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
59
  return (e = R.value) == null ? void 0 : e.abort(ne.REQUEST_ABORTED);
60
60
  };
61
- return M(() => {
62
- l.executeRequest.on(x), l.cancelRequest.on(P);
63
- }), se(), $(() => l.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
66
  return (e = a.value) == null ? void 0 : e.parameters;
@@ -69,30 +69,34 @@ const ce = { class: "flex h-full" }, me = { class: "flex h-full flex-1 flex-col"
69
69
  c.value.clear();
70
70
  },
71
71
  { deep: !0 }
72
- ), (e, t) => (f(), Q("div", {
72
+ ), (e, t) => (m(), F("div", {
73
73
  ref_key: "element",
74
- ref: B,
75
- class: _(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
76
- "!mb-0 !mr-0 !border-0": o(n) === "modal"
74
+ ref: z,
75
+ class: O(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
76
+ "!mb-0 !mr-0 !border-0": r(d) === "modal"
77
77
  }])
78
78
  }, [
79
- o(S) ? (f(), w(ee, {
79
+ r(S) ? (m(), V(te, {
80
80
  key: 0,
81
- modelValue: o(r),
82
- "onUpdate:modelValue": t[0] || (t[0] = (s) => F(r) ? r.value = s : null),
83
- class: _(["absolute left-3 top-2 z-50", [
84
- { hidden: o(r) },
85
- { "xl:!flex": !o(r) },
86
- { "!flex": o(n) === "modal" }
81
+ modelValue: r(s),
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
+ { hidden: r(s) },
85
+ { "xl:!flex": !r(s) },
86
+ { "!flex": r(d) === "modal" }
87
87
  ]])
88
- }, null, 8, ["modelValue", "class"])) : O("", !0),
89
- V("div", ce, [
90
- o(S) ? (f(), w(ae, {
88
+ }, null, 8, ["modelValue", "class"])) : C("", !0),
89
+ T("div", me, [
90
+ r(S) ? (m(), V(ae, {
91
91
  key: 0,
92
- onNewTab: t[1] || (t[1] = (s) => e.$emit("newTab", s))
93
- })) : O("", !0),
94
- V("div", me, [
95
- G(o(Z), { invalidParams: c.value }, null, 8, ["invalidParams"])
92
+ onNewTab: t[1] || (t[1] = (o) => e.$emit("newTab", o))
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"])
96
100
  ])
97
101
  ])
98
102
  ], 2));
@@ -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 f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8dfa397c"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1f349e0c"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as I, useId as L, ref as D, computed as h, openBlock as m, createBlock as N, withCtx as d, createElementVNode as i, unref as r, toDisplayString as k, createElementBlock as p, normalizeClass as z, createCommentVNode as E, createVNode as f, Fragment as x, createTextVNode as q } from "vue";
1
+ import { defineComponent as I, useId as L, ref as D, computed as h, openBlock as m, createBlock as N, withCtx as d, createElementVNode as i, unref as r, toDisplayString as g, createElementBlock as p, normalizeClass as z, createCommentVNode as E, createVNode as f, Fragment as k, createTextVNode as x } from "vue";
2
2
  import { useModal as K, ScalarComboboxMultiselect as W, ScalarButton as F, ScalarIcon as G } from "@scalar/components";
3
3
  import { isDefined as H } from "@scalar/oas-utils/helpers";
4
4
  import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
@@ -21,17 +21,17 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
21
21
  workspace: {}
22
22
  },
23
23
  setup(s) {
24
- const { layout: v } = P(), {
25
- securitySchemes: S,
24
+ const { layout: q } = P(), {
25
+ securitySchemes: v,
26
26
  securitySchemeMutators: O,
27
27
  requestMutators: w,
28
28
  collectionMutators: M
29
- } = Q(), R = L(), C = D(null), y = K(), b = D(
29
+ } = Q(), R = L(), C = D(null), y = K(), S = D(
30
30
  null
31
31
  ), A = h(() => {
32
32
  const e = Z(s.operation, s.collection);
33
33
  return { filteredRequirements: e.filter((o) => Object.keys(o).length), requirements: e };
34
- }), g = h(() => {
34
+ }), b = h(() => {
35
35
  const { filteredRequirements: e, requirements: t } = A.value;
36
36
  if (!t.length)
37
37
  return null;
@@ -45,8 +45,8 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
45
45
  }), a = h(
46
46
  () => s.selectedSecuritySchemeUids.map((e) => {
47
47
  if (Array.isArray(e))
48
- return _(e, S);
49
- const t = S[e ?? ""];
48
+ return _(e, v);
49
+ const t = v[e ?? ""];
50
50
  if (t)
51
51
  return ee(t);
52
52
  }).filter(H)
@@ -68,10 +68,10 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
68
68
  }
69
69
  const V = (e) => {
70
70
  var t;
71
- v === "modal" || s.layout === "reference" ? M.edit(s.collection.uid, "selectedSecuritySchemeUids", e) : (t = s.operation) != null && t.uid && w.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
71
+ s.collection.useCollectionSecurity ? M.edit(s.collection.uid, "selectedSecuritySchemeUids", e) : (t = s.operation) != null && t.uid && w.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
72
72
  };
73
73
  function $({ id: e, label: t }) {
74
- b.value = { id: e, label: t }, y.show();
74
+ S.value = { id: e, label: t }, y.show();
75
75
  }
76
76
  const B = (e) => {
77
77
  var o;
@@ -88,8 +88,8 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
88
88
  return te(
89
89
  A.value.filteredRequirements,
90
90
  ((e = s.collection) == null ? void 0 : e.securitySchemes) ?? [],
91
- S,
92
- v === "modal" || s.layout === "reference"
91
+ v,
92
+ q === "modal" || s.layout === "reference"
93
93
  );
94
94
  }
95
95
  );
@@ -103,18 +103,18 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
103
103
  id: r(R),
104
104
  class: "inline-flex items-center gap-1"
105
105
  }, [
106
- i("span", null, k(e.title), 1),
107
- g.value ? (m(), p("span", {
106
+ i("span", null, g(e.title), 1),
107
+ b.value ? (m(), p("span", {
108
108
  key: 0,
109
- class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": g.value.text === "Required" }])
110
- }, k(g.value.text), 3)) : E("", !0)
109
+ class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": b.value.text === "Required" }])
110
+ }, g(b.value.text), 3)) : E("", !0)
111
111
  ], 8, le)
112
112
  ]),
113
113
  actions: d(() => [
114
114
  i("div", oe, [
115
115
  f(r(W), {
116
116
  class: "w-72 text-xs",
117
- isDeletable: r(v) !== "modal" && e.layout !== "reference",
117
+ isDeletable: r(q) !== "modal" && e.layout !== "reference",
118
118
  modelValue: a.value,
119
119
  multiple: "",
120
120
  options: T.value,
@@ -134,14 +134,14 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
134
134
  var o;
135
135
  return [
136
136
  i("div", ne, [
137
- a.value.length === 0 ? (m(), p(x, { key: 0 }, [
137
+ a.value.length === 0 ? (m(), p(k, { key: 0 }, [
138
138
  t[2] || (t[2] = i("span", { class: "sr-only" }, "Select", -1)),
139
- t[3] || (t[3] = q(" Auth Type "))
140
- ], 64)) : a.value.length === 1 ? (m(), p(x, { key: 1 }, [
139
+ t[3] || (t[3] = x(" Auth Type "))
140
+ ], 64)) : a.value.length === 1 ? (m(), p(k, { key: 1 }, [
141
141
  t[4] || (t[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
142
- q(" " + k((o = a.value[0]) == null ? void 0 : o.label), 1)
143
- ], 64)) : (m(), p(x, { key: 2 }, [
144
- t[5] || (t[5] = q(" Multiple ")),
142
+ x(" " + g((o = a.value[0]) == null ? void 0 : o.label), 1)
143
+ ], 64)) : (m(), p(k, { key: 2 }, [
144
+ t[5] || (t[5] = x(" Multiple ")),
145
145
  t[6] || (t[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
146
146
  ], 64))
147
147
  ]),
@@ -170,12 +170,12 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
170
170
  workspace: e.workspace
171
171
  }, null, 8, ["collection", "envVariables", "environment", "layout", "selectedSchemeOptions", "server", "workspace"]),
172
172
  f(X, {
173
- scheme: b.value,
173
+ scheme: S.value,
174
174
  state: r(y),
175
175
  onClose: t[0] || (t[0] = (o) => r(y).hide()),
176
176
  onDelete: t[1] || (t[1] = (o) => {
177
177
  var n;
178
- return B((n = b.value) == null ? void 0 : n.id);
178
+ return B((n = S.value) == null ? void 0 : n.id);
179
179
  })
180
180
  }, null, 8, ["scheme", "state"])
181
181
  ]),
@@ -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.9";
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
  };