@scalar/api-client 2.0.41 → 2.0.43

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 (28) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +43 -46
  4. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  6. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +3 -2
  7. package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
  8. package/dist/components/SubpageHeader.vue.js +2 -2
  9. package/dist/components/SubpageHeader.vue2.js +10 -9
  10. package/dist/layouts/App/create-api-client-app.d.ts +2 -2
  11. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
  12. package/dist/libs/create-client.d.ts +2 -2
  13. package/dist/libs/normalizeHeaders.d.ts +12 -0
  14. package/dist/libs/normalizeHeaders.d.ts.map +1 -0
  15. package/dist/libs/normalizeHeaders.js +25 -0
  16. package/dist/libs/sendRequest.d.ts.map +1 -1
  17. package/dist/libs/sendRequest.js +22 -20
  18. package/dist/store/workspace.d.ts +4 -4
  19. package/dist/style.css +1 -1
  20. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  21. package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
  22. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +161 -130
  23. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts +7 -10
  24. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  25. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +23 -24
  26. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  27. package/dist/views/Request/consts/mediaTypes.js +5 -0
  28. package/package.json +6 -6
@@ -1,148 +1,179 @@
1
- import { defineComponent as O, ref as Q, computed as $, openBlock as i, createBlock as x, withCtx as l, createElementVNode as b, toDisplayString as h, createVNode as u, unref as n, createElementBlock as _, Fragment as v, renderList as j, createTextVNode as p, withModifiers as H, createCommentVNode as w, capitalize as B, pushScopeId as z, popScopeId as E } from "vue";
2
- import L from "../../../components/DataTable/DataTableCell.vue.js";
3
- import K from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
- import { useWorkspace as G } from "../../../store/workspace.js";
5
- import y from "./RequestAuthDataTableInput.vue.js";
6
- import { ScalarComboboxMultiselect as J, ScalarButton as N, ScalarIcon as X } from "@scalar/components";
7
- import { camelToTitleWords as Y } from "@scalar/oas-utils/helpers";
8
- import { ADD_AUTH_OPTIONS as Z, ADD_AUTH_DICT as ee } from "../consts/new-auth-options.js";
9
- import te from "../../../components/DataTable/DataTable.vue.js";
10
- import c from "../../../components/DataTable/DataTableRow.vue.js";
11
- import le from "../../../components/DataTable/DataTableHeader.vue.js";
12
- import ae from "../components/OAuth2.vue.js";
13
- const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex gap-1" }, ne = /* @__PURE__ */ oe(() => /* @__PURE__ */ b("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), de = { class: "pl-2" }, re = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons pr-2" }, ke = /* @__PURE__ */ O({
1
+ import { defineComponent as H, ref as E, computed as I, openBlock as i, createBlock as b, withCtx as a, createElementVNode as _, toDisplayString as k, createVNode as u, unref as n, createElementBlock as p, Fragment as v, renderList as A, createTextVNode as f, withModifiers as B, createCommentVNode as $, capitalize as F, pushScopeId as K, popScopeId as L } from "vue";
2
+ import G from "../../../components/DataTable/DataTableCell.vue.js";
3
+ import J from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
+ import { useWorkspace as X } from "../../../store/workspace.js";
5
+ import x from "./RequestAuthDataTableInput.vue.js";
6
+ import { ScalarComboboxMultiselect as Y, ScalarButton as W, ScalarIcon as P } from "@scalar/components";
7
+ import { camelToTitleWords as Z } from "@scalar/oas-utils/helpers";
8
+ import { ADD_AUTH_OPTIONS as ee, ADD_AUTH_DICT as te } from "../consts/new-auth-options.js";
9
+ import le from "../../../components/DataTable/DataTable.vue.js";
10
+ import m from "../../../components/DataTable/DataTableRow.vue.js";
11
+ import ae from "../../../components/DataTable/DataTableHeader.vue.js";
12
+ import oe from "../components/OAuth2.vue.js";
13
+ const w = (h) => (K("data-v-411d2b35"), h = h(), L(), h), ue = { class: "flex gap-1" }, ne = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), ie = {
14
+ key: 0,
15
+ class: "flex relative scroll-timeline-x w-full"
16
+ }, de = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "fade-left" }, null, -1)), re = { class: "flex flex-1 gap-0.75 mr-1.5" }, se = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "fade-right" }, null, -1)), ce = {
17
+ key: 1,
18
+ class: "pl-2"
19
+ }, pe = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons pr-2" }, Ue = /* @__PURE__ */ H({
14
20
  __name: "RequestAuth",
15
21
  props: {
16
22
  title: {}
17
23
  },
18
- setup(k) {
24
+ setup(h) {
19
25
  const {
20
26
  activeCollection: S,
21
27
  activeRequest: V,
22
- activeSecurityRequirements: F,
23
- activeSecuritySchemes: T,
24
- isReadOnly: U,
25
- requestMutators: A,
26
- securitySchemeMutators: g,
27
- securitySchemes: C
28
- } = G(), D = Q(null), R = (a) => {
29
- switch (a == null ? void 0 : a.type) {
28
+ activeSecurityRequirements: q,
29
+ activeSecuritySchemes: C,
30
+ isReadOnly: g,
31
+ requestMutators: O,
32
+ securitySchemeMutators: U,
33
+ securitySchemes: T
34
+ } = X(), D = E(null), R = (l) => {
35
+ switch (l == null ? void 0 : l.type) {
30
36
  case "apiKey":
31
- return `${B(a.in)}`;
37
+ return `${F(l.in)}`;
32
38
  case "http":
33
- return `${B(a.scheme)} Authentication`;
39
+ return `${F(l.scheme)} Authentication`;
34
40
  case "oauth2":
35
- return Y(a.flow.type);
41
+ return Z(l.flow.type);
36
42
  case "openIdConnect":
37
43
  return "Open ID Connect";
38
44
  default:
39
45
  return "None";
40
46
  }
41
- }, I = $(
47
+ }, M = I(
42
48
  () => {
43
49
  var e;
44
- const a = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = F.value.flatMap((d) => {
45
- const t = Object.keys(d);
46
- return t.length === 0 && U.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((r) => {
47
- if (!a) return [];
48
- const s = a[r], q = C[s], M = R(q);
50
+ const l = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = q.value.flatMap((r) => {
51
+ const t = Object.keys(r);
52
+ return t.length === 0 && g.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((s) => {
53
+ if (!l) return [];
54
+ const c = l[s], z = T[c], N = R(z);
49
55
  return {
50
- id: s,
51
- label: `${M} (${r})`,
52
- labelWithoutId: M
56
+ id: c,
57
+ label: `${N} (${s})`,
58
+ labelWithoutId: N
53
59
  };
54
60
  });
55
61
  });
56
- if (U.value)
62
+ if (g.value)
57
63
  return o;
58
64
  {
59
- const d = V.value.securitySchemeUids.map((t) => {
60
- const r = C[t], s = R(r);
65
+ const r = V.value.securitySchemeUids.map((t) => {
66
+ const s = T[t], c = R(s);
61
67
  return {
62
68
  id: t,
63
- label: "name" in r && r.name.length ? `${s} (${r.name})` : s,
64
- labelWithoutId: s
69
+ label: "name" in s && s.name.length ? `${c} (${s.name})` : c,
70
+ labelWithoutId: c
65
71
  };
66
72
  });
67
73
  return [
68
- { label: "Select auth", options: [...o, ...d] },
74
+ { label: "Select auth", options: [...o, ...r] },
69
75
  {
70
76
  label: "Add new auth",
71
- options: Z
77
+ options: ee
72
78
  }
73
79
  ];
74
80
  }
75
81
  }
76
- ), f = $({
82
+ ), d = I({
77
83
  // Grab the selected OR first security scheme
78
- get: () => I.value.flatMap(
84
+ get: () => M.value.flatMap(
79
85
  (o) => "options" in o ? o.options : o
80
86
  ).filter(
81
87
  ({ id: o }) => {
82
- var e, d;
83
- return (d = (e = V.value) == null ? void 0 : e.selectedSecuritySchemeUids) == null ? void 0 : d.find(
88
+ var e, r;
89
+ return (r = (e = V.value) == null ? void 0 : e.selectedSecuritySchemeUids) == null ? void 0 : r.find(
84
90
  (t) => t === o
85
91
  );
86
92
  }
87
93
  ),
88
94
  // Update the selected auth per this request
89
- set: (a) => {
90
- var e, d, t, r;
91
- const o = a.find(
92
- (s) => ee[s.id]
95
+ set: (l) => {
96
+ var e, r, t, s;
97
+ const o = l.find(
98
+ (c) => te[c.id]
93
99
  );
94
- o != null && o.payload && S.value ? ((r = (t = (d = (e = D.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : d.popoverButtonRef) == null ? void 0 : t.el) == null || r.click(), g.add(
100
+ o != null && o.payload && S.value ? ((s = (t = (r = (e = D.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : r.popoverButtonRef) == null ? void 0 : t.el) == null || s.click(), U.add(
95
101
  o.payload,
96
102
  S.value.uid,
97
103
  V.value,
98
104
  !0
99
- )) : A.edit(
105
+ )) : O.edit(
100
106
  V.value.uid,
101
107
  "selectedSecuritySchemeUids",
102
- a.map((s) => s.id)
108
+ l.map((c) => c.id)
103
109
  );
104
110
  }
105
- }), m = (a, o, e) => g.edit(a.uid ?? "", o, e), P = $(() => f.value.length > 1 ? f.value.map(({ labelWithoutId: a }) => a).join(", ") : f.value.length ? f.value[0].label : "None"), W = (a) => g.delete(a, V.value);
106
- return (a, o) => (i(), x(K, {
111
+ }), y = (l, o, e) => U.edit(l.uid ?? "", o, e);
112
+ I(() => d.value.length > 1 ? d.value.map(({ labelWithoutId: l }) => l).join(", ") : d.value.length ? d.value[0].label : "None");
113
+ const Q = (l) => U.delete(l, V.value), j = (l) => {
114
+ const o = d.value.filter(
115
+ (e) => e.id !== l
116
+ );
117
+ d.value = o;
118
+ };
119
+ return (l, o) => (i(), b(J, {
107
120
  class: "group/params",
108
- itemCount: I.value.length
121
+ itemCount: d.value.length
109
122
  }, {
110
- title: l(() => [
111
- b("div", ue, h(a.title), 1)
123
+ title: a(() => [
124
+ _("div", ue, k(l.title), 1)
112
125
  ]),
113
- default: l(() => [
114
- b("form", null, [
115
- u(n(te), {
126
+ default: a(() => [
127
+ _("form", null, [
128
+ u(n(le), {
116
129
  class: "flex-1",
117
130
  columns: [""]
118
131
  }, {
119
- default: l(() => [
120
- u(n(c), null, {
121
- default: l(() => [
122
- u(n(le), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
123
- default: l(() => [
124
- u(n(J), {
132
+ default: a(() => [
133
+ u(n(m), null, {
134
+ default: a(() => [
135
+ u(n(ae), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
136
+ default: a(() => [
137
+ u(n(Y), {
125
138
  ref_key: "comboboxRef",
126
139
  ref: D,
127
- modelValue: f.value,
128
- "onUpdate:modelValue": o[0] || (o[0] = (e) => f.value = e),
140
+ modelValue: d.value,
141
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => d.value = e),
129
142
  class: "text-xs w-full",
130
143
  fullWidth: "",
131
144
  multiple: "",
132
- options: I.value,
145
+ options: M.value,
133
146
  style: { "margin-left": "120px" },
134
147
  teleport: ""
135
148
  }, {
136
- default: l(() => [
137
- u(n(N), {
149
+ default: a(() => [
150
+ u(n(W), {
138
151
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
139
152
  fullWidth: "",
140
153
  variant: "ghost"
141
154
  }, {
142
- default: l(() => [
155
+ default: a(() => [
143
156
  ne,
144
- b("span", de, h(P.value), 1),
145
- u(n(X), {
157
+ d.value.length ? (i(), p("div", ie, [
158
+ de,
159
+ _("div", re, [
160
+ (i(!0), p(v, null, A(d.value, (e) => (i(), p("span", {
161
+ key: e.id,
162
+ class: "cm-pill flex items-center mx-0"
163
+ }, [
164
+ f(k(e.labelWithoutId) + " ", 1),
165
+ u(n(P), {
166
+ class: "ml-1 cursor-pointer hover:text-c-1",
167
+ icon: "Close",
168
+ size: "xs",
169
+ onClick: B((r) => j(e.id), ["stop"])
170
+ }, null, 8, ["onClick"])
171
+ ]))), 128))
172
+ ]),
173
+ se
174
+ ])) : (i(), p("div", ce, " None ")),
175
+ u(n(P), {
176
+ class: "min-w-3 ml-auto mr-2.5",
146
177
  icon: "ChevronDown",
147
178
  size: "xs"
148
179
  })
@@ -158,28 +189,28 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
158
189
  ]),
159
190
  _: 1
160
191
  }),
161
- (i(!0), _(v, null, j(n(T), (e, d) => (i(), _(v, {
192
+ (i(!0), p(v, null, A(n(C), (e, r) => (i(), p(v, {
162
193
  key: e.uid
163
194
  }, [
164
- n(T).length > 1 ? (i(), x(n(c), {
195
+ n(C).length > 1 ? (i(), b(n(m), {
165
196
  key: 0,
166
197
  class: "group/delete"
167
198
  }, {
168
- default: l(() => [
169
- u(L, { class: "text-c-2 pl-2 text-xs font-medium flex items-center justify-between bg-b-2" }, {
170
- default: l(() => {
199
+ default: a(() => [
200
+ u(G, { class: "text-c-2 pl-2 text-xs font-medium flex items-center justify-between bg-b-2" }, {
201
+ default: a(() => {
171
202
  var t;
172
203
  return [
173
- p(h((t = f.value[d]) == null ? void 0 : t.label) + " ", 1),
174
- b("div", re, [
175
- u(n(N), {
204
+ f(k((t = d.value[r]) == null ? void 0 : t.label) + " ", 1),
205
+ _("div", pe, [
206
+ u(n(W), {
176
207
  class: "px-1 transition-none",
177
208
  size: "sm",
178
209
  variant: "ghost",
179
- onClick: H((r) => W(e), ["stop"])
210
+ onClick: B((s) => Q(e), ["stop"])
180
211
  }, {
181
- default: l(() => [
182
- p(" Delete ")
212
+ default: a(() => [
213
+ f(" Delete ")
183
214
  ]),
184
215
  _: 2
185
216
  }, 1032, ["onClick"])
@@ -190,104 +221,104 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
190
221
  }, 1024)
191
222
  ]),
192
223
  _: 2
193
- }, 1024)) : w("", !0),
194
- e.type === "http" ? (i(), _(v, { key: 1 }, [
195
- e.scheme === "bearer" ? (i(), x(n(c), { key: 0 }, {
196
- default: l(() => [
197
- u(y, {
224
+ }, 1024)) : $("", !0),
225
+ e.type === "http" ? (i(), p(v, { key: 1 }, [
226
+ e.scheme === "bearer" ? (i(), b(n(m), { key: 0 }, {
227
+ default: a(() => [
228
+ u(x, {
198
229
  id: `http-bearer-token-${e.uid}`,
199
230
  modelValue: e.value,
200
231
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
201
232
  type: "password",
202
- "onUpdate:modelValue": (t) => m(e, "value", t)
233
+ "onUpdate:modelValue": (t) => y(e, "value", t)
203
234
  }, {
204
- default: l(() => [
205
- p(" Bearer Token ")
235
+ default: a(() => [
236
+ f(" Bearer Token ")
206
237
  ]),
207
238
  _: 2
208
239
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
209
240
  ]),
210
241
  _: 2
211
- }, 1024)) : e.scheme === "basic" ? (i(), _(v, { key: 1 }, [
212
- u(n(c), null, {
213
- default: l(() => [
214
- u(y, {
242
+ }, 1024)) : e.scheme === "basic" ? (i(), p(v, { key: 1 }, [
243
+ u(n(m), null, {
244
+ default: a(() => [
245
+ u(x, {
215
246
  id: `http-basic-username-${e.uid}`,
216
247
  class: "text-c-2",
217
248
  modelValue: e.value,
218
249
  placeholder: "ScalarEnjoyer01",
219
250
  required: "",
220
- "onUpdate:modelValue": (t) => m(e, "value", t)
251
+ "onUpdate:modelValue": (t) => y(e, "value", t)
221
252
  }, {
222
- default: l(() => [
223
- p(" Username ")
253
+ default: a(() => [
254
+ f(" Username ")
224
255
  ]),
225
256
  _: 2
226
257
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
227
258
  ]),
228
259
  _: 2
229
260
  }, 1024),
230
- u(n(c), null, {
231
- default: l(() => [
232
- u(y, {
261
+ u(n(m), null, {
262
+ default: a(() => [
263
+ u(x, {
233
264
  id: `http-basic-password-${e.uid}`,
234
265
  modelValue: e.secondValue,
235
266
  placeholder: "xxxxxx",
236
267
  type: "password",
237
- "onUpdate:modelValue": (t) => m(e, "secondValue", t)
268
+ "onUpdate:modelValue": (t) => y(e, "secondValue", t)
238
269
  }, {
239
- default: l(() => [
240
- p(" Password ")
270
+ default: a(() => [
271
+ f(" Password ")
241
272
  ]),
242
273
  _: 2
243
274
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
244
275
  ]),
245
276
  _: 2
246
277
  }, 1024)
247
- ], 64)) : w("", !0)
248
- ], 64)) : e.type === "apiKey" ? (i(), _(v, { key: 2 }, [
249
- n(U) ? (i(), x(n(c), { key: 1 }, {
250
- default: l(() => [
251
- u(y, {
278
+ ], 64)) : $("", !0)
279
+ ], 64)) : e.type === "apiKey" ? (i(), p(v, { key: 2 }, [
280
+ n(g) ? (i(), b(n(m), { key: 1 }, {
281
+ default: a(() => [
282
+ u(x, {
252
283
  id: `api-key-value-${e.uid}`,
253
284
  modelValue: e.value,
254
285
  placeholder: "Value",
255
- "onUpdate:modelValue": (t) => m(e, "value", t)
286
+ "onUpdate:modelValue": (t) => y(e, "value", t)
256
287
  }, {
257
- default: l(() => [
258
- p(h(e.name), 1)
288
+ default: a(() => [
289
+ f(k(e.name), 1)
259
290
  ]),
260
291
  _: 2
261
292
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
262
293
  ]),
263
294
  _: 2
264
- }, 1024)) : (i(), _(v, { key: 0 }, [
265
- u(n(c), null, {
266
- default: l(() => [
267
- u(y, {
295
+ }, 1024)) : (i(), p(v, { key: 0 }, [
296
+ u(n(m), null, {
297
+ default: a(() => [
298
+ u(x, {
268
299
  id: `api-key-name-${e.uid}`,
269
300
  modelValue: e.name,
270
301
  placeholder: "api-key",
271
- "onUpdate:modelValue": (t) => m(e, "name", t)
302
+ "onUpdate:modelValue": (t) => y(e, "name", t)
272
303
  }, {
273
- default: l(() => [
274
- p(" Name ")
304
+ default: a(() => [
305
+ f(" Name ")
275
306
  ]),
276
307
  _: 2
277
308
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
278
309
  ]),
279
310
  _: 2
280
311
  }, 1024),
281
- u(n(c), null, {
282
- default: l(() => [
283
- u(y, {
312
+ u(n(m), null, {
313
+ default: a(() => [
314
+ u(x, {
284
315
  id: `api-key-value-add-${e.uid}`,
285
316
  modelValue: e.value,
286
317
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
287
- "onUpdate:modelValue": (t) => m(e, "value", t)
318
+ "onUpdate:modelValue": (t) => y(e, "value", t)
288
319
  }, {
289
- default: l(() => [
290
- p(" Value ")
320
+ default: a(() => [
321
+ f(" Value ")
291
322
  ]),
292
323
  _: 2
293
324
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -295,10 +326,10 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
295
326
  _: 2
296
327
  }, 1024)
297
328
  ], 64))
298
- ], 64)) : e.type === "oauth2" ? (i(), x(n(ae), {
329
+ ], 64)) : e.type === "oauth2" ? (i(), b(n(oe), {
299
330
  key: 3,
300
331
  scheme: e
301
- }, null, 8, ["scheme"])) : w("", !0)
332
+ }, null, 8, ["scheme"])) : $("", !0)
302
333
  ], 64))), 128))
303
334
  ]),
304
335
  _: 1
@@ -310,5 +341,5 @@ const oe = (k) => (z("data-v-a3784b0e"), k = k(), E(), k), ue = { class: "flex g
310
341
  }
311
342
  });
312
343
  export {
313
- ke as default
344
+ Ue as default
314
345
  };
@@ -1,15 +1,12 @@
1
+ type Header = {
2
+ name: string;
3
+ value: string;
4
+ required: boolean;
5
+ };
1
6
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
- headers: {
3
- name: string;
4
- value: string;
5
- required: boolean;
6
- }[];
7
+ headers: Header[];
7
8
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
8
- headers: {
9
- name: string;
10
- value: string;
11
- required: boolean;
12
- }[];
9
+ headers: Header[];
13
10
  }>>>, {}, {}>;
14
11
  export default _default;
15
12
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":";aA2DW;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;aAApD;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;AA0H/D,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AAkDA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;;aAGrD,MAAM,EAAE;;aAAR,MAAM,EAAE;;AA+GnB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,51 +1,50 @@
1
- import { defineComponent as u, openBlock as t, createBlock as n, withCtx as r, createTextVNode as d, createElementBlock as o, Fragment as f, renderList as p, createVNode as m } from "vue";
2
- import _ from "../../../components/DataTable/DataTable.vue.js";
3
- import x from "../../../components/DataTable/DataTableRow.vue.js";
4
- import l from "../../../components/DataTable/DataTableText.vue.js";
5
- import h from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
6
- const k = {
1
+ import { defineComponent as c, openBlock as e, createBlock as a, withCtx as t, createTextVNode as i, createElementBlock as s, Fragment as d, renderList as f, createVNode as o } from "vue";
2
+ import u from "../../../components/DataTable/DataTable.vue.js";
3
+ import p from "../../../components/DataTable/DataTableRow.vue.js";
4
+ import m from "../../../components/DataTable/DataTableText.vue.js";
5
+ import _ from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
6
+ const x = {
7
7
  key: 1,
8
8
  class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
9
- }, B = /* @__PURE__ */ u({
9
+ }, B = /* @__PURE__ */ c({
10
10
  __name: "ResponseHeaders",
11
11
  props: {
12
12
  headers: {}
13
13
  },
14
- setup(b) {
15
- const c = (e) => e.split("-").map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("-");
16
- return (e, a) => (t(), n(h, {
14
+ setup(h) {
15
+ return (r, k) => (e(), a(_, {
17
16
  defaultOpen: !1,
18
- itemCount: e.headers.length
17
+ itemCount: r.headers.length
19
18
  }, {
20
- title: r(() => [
21
- d("Headers")
19
+ title: t(() => [
20
+ i("Headers")
22
21
  ]),
23
- default: r(() => [
24
- e.headers.length ? (t(), n(_, {
22
+ default: t(() => [
23
+ r.headers.length ? (e(), a(u, {
25
24
  key: 0,
26
25
  columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
27
26
  scroll: ""
28
27
  }, {
29
- default: r(() => [
30
- (t(!0), o(f, null, p(e.headers, (s, i) => (t(), n(x, {
31
- key: i,
28
+ default: t(() => [
29
+ (e(!0), s(d, null, f(r.headers, (n, l) => (e(), a(p, {
30
+ key: l,
32
31
  class: "text-c-1"
33
32
  }, {
34
- default: r(() => [
35
- m(l, {
33
+ default: t(() => [
34
+ o(m, {
36
35
  class: "sticky left-0 z-1 bg-b-1 max-w-48",
37
- text: c(s.name)
36
+ text: n.name
38
37
  }, null, 8, ["text"]),
39
- m(l, {
38
+ o(m, {
40
39
  class: "z-0",
41
- text: s.value
40
+ text: n.value
42
41
  }, null, 8, ["text"])
43
42
  ]),
44
43
  _: 2
45
44
  }, 1024))), 128))
46
45
  ]),
47
46
  _: 1
48
- })) : (t(), o("div", k, " No Headers "))
47
+ })) : (e(), s("div", x, " No Headers "))
49
48
  ]),
50
49
  _: 1
51
50
  }, 8, ["itemCount"]));
@@ -1 +1 @@
1
- {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.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;CAuGjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
1
+ {"version":3,"file":"mediaTypes.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/consts/mediaTypes.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;CA4GjE,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,MAAM,EAEX,CAAA"}
@@ -5,6 +5,11 @@ const n = {
5
5
  "application/javascript": { extension: ".js", raw: !0 },
6
6
  "application/json": { extension: ".json", raw: !0, language: "json" },
7
7
  "application/ld+json": { extension: ".jsonld", raw: !0, language: "json" },
8
+ "application/problem+json": {
9
+ extension: ".json",
10
+ raw: !0,
11
+ language: "json"
12
+ },
8
13
  "application/msword": { extension: ".doc" },
9
14
  "application/octet-stream": { extension: ".bin" },
10
15
  "application/ogg": { extension: ".ogx" },
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.41",
21
+ "version": "2.0.43",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -127,14 +127,14 @@
127
127
  "vue-router": "^4.3.0",
128
128
  "whatwg-mimetype": "^4.0.0",
129
129
  "zod": "^3.22.4",
130
- "@scalar/components": "0.12.27",
130
+ "@scalar/components": "0.12.28",
131
131
  "@scalar/draggable": "0.1.4",
132
+ "@scalar/oas-utils": "0.2.24",
132
133
  "@scalar/object-utils": "1.1.5",
133
- "@scalar/themes": "0.9.19",
134
- "@scalar/use-codemirror": "0.11.10",
134
+ "@scalar/themes": "0.9.20",
135
135
  "@scalar/use-toasts": "0.7.4",
136
- "@scalar/use-tooltip": "1.0.2",
137
- "@scalar/oas-utils": "0.2.22"
136
+ "@scalar/use-codemirror": "0.11.10",
137
+ "@scalar/use-tooltip": "1.0.2"
138
138
  },
139
139
  "devDependencies": {
140
140
  "@types/content-type": "^1.1.8",