@scalar/api-client 2.27.1 → 2.29.2
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 +166 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/libs/local-storage.js +3 -3
- package/dist/style.css +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +21 -21
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +67 -75
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +42 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +5 -5
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +35 -35
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +70 -70
- package/dist/v2/features/app/app-events.d.ts +2 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +89 -64
- package/dist/v2/features/app/app-state.d.ts +4 -2
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +185 -156
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +48 -47
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
- package/dist/v2/features/app/helpers/routes.js +11 -11
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +38 -20
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +20 -16
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
- package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +18 -14
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +19 -15
- package/dist/v2/helpers/get-active-proxy-url.d.ts +18 -0
- package/dist/v2/helpers/get-active-proxy-url.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-proxy-url.js +5 -0
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +123 -113
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +18 -18
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBlock.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-2076f815"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as z, computed as n, ref as X, useId as s, watch as J, createBlock as q, openBlock as v, withCtx as C, createElementVNode as K, withDirectives as m, createElementBlock as
|
|
1
|
+
import { defineComponent as z, computed as n, ref as X, useId as s, watch as J, createBlock as q, openBlock as v, withCtx as C, createElementVNode as K, withDirectives as m, createElementBlock as x, createVNode as d, unref as y, vShow as c, mergeProps as f, toHandlers as b, Fragment as W, renderList as Y, createCommentVNode as E, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as ee } from "@scalar/components";
|
|
3
3
|
import { canMethodHaveBody as w } from "@scalar/helpers/http/can-method-have-body";
|
|
4
4
|
import { REGEX as te } from "@scalar/helpers/regex/regex-helpers";
|
|
5
|
-
import { getResolvedRef as
|
|
5
|
+
import { getResolvedRef as R } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
6
|
import { unpackProxyObject as ae } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
7
7
|
import le from "../../../components/SectionFilter.vue.js";
|
|
8
8
|
import ne from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
@@ -18,10 +18,10 @@ import { getParameterSchema as de } from "./helpers/get-parameter-schema.js";
|
|
|
18
18
|
import { groupBy as D } from "./helpers/group-by.js";
|
|
19
19
|
import { isParamDisabled as ce } from "./helpers/is-param-disabled.js";
|
|
20
20
|
import ve from "../scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
21
|
-
const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, he = ["for"], fe = ["id", "placeholder", "value"],
|
|
21
|
+
const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, he = ["for"], fe = ["id", "placeholder", "value"], Be = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "text-c-1 flex h-8 items-center"
|
|
24
|
-
},
|
|
24
|
+
}, xe = ["id", "role"], Te = /* @__PURE__ */ z({
|
|
25
25
|
__name: "RequestBlock",
|
|
26
26
|
props: {
|
|
27
27
|
authMeta: { default: () => ({ type: "document" }) },
|
|
@@ -50,7 +50,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
50
50
|
exampleKey: e.exampleKey
|
|
51
51
|
})), r = n(
|
|
52
52
|
() => D(
|
|
53
|
-
e.operation.parameters?.map((t) =>
|
|
53
|
+
e.operation.parameters?.map((t) => R(t)) ?? [],
|
|
54
54
|
"in",
|
|
55
55
|
(t) => {
|
|
56
56
|
const a = re(t, e.exampleKey, void 0);
|
|
@@ -75,7 +75,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
75
75
|
)
|
|
76
76
|
), N = n(
|
|
77
77
|
() => me({ method: e.method, operation: e.operation, exampleKey: e.exampleKey })
|
|
78
|
-
),
|
|
78
|
+
), p = n(() => {
|
|
79
79
|
const t = e.operation["x-scalar-disable-parameters"]?.["default-headers"]?.[e.exampleKey] ?? {};
|
|
80
80
|
return N.value.map((a) => {
|
|
81
81
|
const l = I.value[a.name.toLowerCase()]?.[0];
|
|
@@ -89,7 +89,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
91
|
}), A = n(() => [
|
|
92
|
-
...
|
|
92
|
+
...p.value,
|
|
93
93
|
...r.value.header ?? []
|
|
94
94
|
]), V = n(() => {
|
|
95
95
|
const t = ie({
|
|
@@ -153,7 +153,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
153
153
|
meta: o.value,
|
|
154
154
|
payload: { summary: a }
|
|
155
155
|
});
|
|
156
|
-
},
|
|
156
|
+
}, B = n(() => ({
|
|
157
157
|
path: g("path", e.eventBus, o.value, {
|
|
158
158
|
context: r.value.path ?? []
|
|
159
159
|
}),
|
|
@@ -163,7 +163,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
163
163
|
}),
|
|
164
164
|
header: g("header", e.eventBus, o.value, {
|
|
165
165
|
context: A.value,
|
|
166
|
-
defaultParameters:
|
|
166
|
+
defaultParameters: p.value.length
|
|
167
167
|
}),
|
|
168
168
|
query: g("query", e.eventBus, o.value, {
|
|
169
169
|
context: r.value.query ?? []
|
|
@@ -209,19 +209,19 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
209
209
|
}, {
|
|
210
210
|
title: C(() => [
|
|
211
211
|
K("div", ye, [
|
|
212
|
-
e.layout !== "modal" ? (v(),
|
|
212
|
+
e.layout !== "modal" ? (v(), x("label", {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
215
215
|
for: y(U)
|
|
216
216
|
}, null, 8, he)) : E("", !0),
|
|
217
|
-
e.layout !== "modal" ? (v(),
|
|
217
|
+
e.layout !== "modal" ? (v(), x("input", {
|
|
218
218
|
key: 1,
|
|
219
219
|
id: y(U),
|
|
220
220
|
class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
|
|
221
221
|
placeholder: L.value,
|
|
222
222
|
value: e.operation.summary,
|
|
223
|
-
|
|
224
|
-
}, null, 40, fe)) : (v(),
|
|
223
|
+
onBlur: F
|
|
224
|
+
}, null, 40, fe)) : (v(), x("span", Be, _(e.operation.summary), 1))
|
|
225
225
|
]),
|
|
226
226
|
d(le, {
|
|
227
227
|
modelValue: i.value,
|
|
@@ -259,7 +259,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
259
259
|
rows: r.value.path ?? [],
|
|
260
260
|
showAddRowPlaceholder: !1,
|
|
261
261
|
title: "Variables"
|
|
262
|
-
}, b(
|
|
262
|
+
}, b(B.value.path)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
263
263
|
[c, h("Variables") && r.value.path?.length]
|
|
264
264
|
]),
|
|
265
265
|
m(d(k, f({
|
|
@@ -270,7 +270,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
270
270
|
rows: P.value ?? [],
|
|
271
271
|
showAddRowPlaceholder: !0,
|
|
272
272
|
title: "Cookies"
|
|
273
|
-
}, b(
|
|
273
|
+
}, b(B.value.cookie)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
274
274
|
[c, h("Cookies")]
|
|
275
275
|
]),
|
|
276
276
|
m(d(k, f({
|
|
@@ -280,7 +280,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
280
280
|
exampleKey: e.exampleKey,
|
|
281
281
|
rows: A.value ?? [],
|
|
282
282
|
title: "Headers"
|
|
283
|
-
}, b(
|
|
283
|
+
}, b(B.value.header)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
284
284
|
[c, h("Headers")]
|
|
285
285
|
]),
|
|
286
286
|
m(d(k, f({
|
|
@@ -290,14 +290,14 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
290
290
|
exampleKey: e.exampleKey,
|
|
291
291
|
rows: r.value.query ?? [],
|
|
292
292
|
title: "Query Parameters"
|
|
293
|
-
}, b(
|
|
293
|
+
}, b(B.value.query)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
294
294
|
[c, h("Query")]
|
|
295
295
|
]),
|
|
296
296
|
m(d(ue, {
|
|
297
297
|
id: u.value.Body,
|
|
298
298
|
environment: e.environment,
|
|
299
299
|
exampleKey: e.exampleKey,
|
|
300
|
-
requestBody: y(
|
|
300
|
+
requestBody: y(R)(e.operation.requestBody),
|
|
301
301
|
title: "Request Body",
|
|
302
302
|
"onUpdate:contentType": G,
|
|
303
303
|
"onUpdate:formValue": M,
|
|
@@ -305,7 +305,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
305
305
|
}, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
|
|
306
306
|
[c, h("Body") && y(w)(e.method)]
|
|
307
307
|
]),
|
|
308
|
-
(v(!0),
|
|
308
|
+
(v(!0), x(W, null, Y(e.plugins, (l, S) => (v(), q(y(ee), { key: S }, {
|
|
309
309
|
default: C(() => [
|
|
310
310
|
l?.components?.request ? m((v(), q(Z(l.components.request.component), f({
|
|
311
311
|
key: 0,
|
|
@@ -327,12 +327,12 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
327
327
|
path: e.path,
|
|
328
328
|
securitySchemes: e.selectedSecuritySchemes,
|
|
329
329
|
selectedClient: e.selectedClient,
|
|
330
|
-
selectedContentType: y(
|
|
330
|
+
selectedContentType: y(R)(e.operation.requestBody)?.["x-scalar-selected-content-type"]?.[e.exampleKey],
|
|
331
331
|
selectedServer: e.server ?? void 0
|
|
332
332
|
}, null, 8, ["clientOptions", "eventBus", "globalCookies", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedContentType", "selectedServer"]), [
|
|
333
333
|
[c, i.value === "All"]
|
|
334
334
|
])
|
|
335
|
-
], 8,
|
|
335
|
+
], 8, xe)
|
|
336
336
|
]),
|
|
337
337
|
_: 1
|
|
338
338
|
}, 8, ["aria-label"]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AAwQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AA4eF,QAAA,MAAM,YAAY;;;;;;;;;;;eAve4B,MAAM;;;;;;;;;;;;;;;;;;eAAN,MAAM;;;;;;;kFA0elD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBody.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fd127758"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent as h, computed as d, createBlock as p, openBlock as u, unref as t, withCtx as a, createVNode as i, createElementVNode as f, toDisplayString as v, createElementBlock as y, Fragment as E, createTextVNode as T } from "vue";
|
|
2
|
+
import { ScalarListbox as F, ScalarButton as x, ScalarIcon as w } from "@scalar/components";
|
|
3
|
+
import { CONTENT_TYPES as k } from "@scalar/helpers/consts/content-types";
|
|
4
|
+
import { objectEntries as q } from "@scalar/helpers/object/object-entries";
|
|
5
|
+
import { unpackProxyObject as C } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
6
|
+
import { getSelectedBodyContentType as D } from "../../operation-block/helpers/get-selected-body-content-type.js";
|
|
5
7
|
import U from "./RequestBodyForm.vue.js";
|
|
6
8
|
import { getFileName as V } from "../helpers/files.js";
|
|
7
|
-
import { getExampleFromBody as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useFileDialog as
|
|
14
|
-
const
|
|
9
|
+
import { getExampleFromBody as $ } from "../helpers/get-request-body-example.js";
|
|
10
|
+
import z from "../../../components/layout/CollapsibleSection.vue.js";
|
|
11
|
+
import O from "../../../components/data-table/DataTable.vue.js";
|
|
12
|
+
import K from "../../../components/data-table/DataTableHeader.vue.js";
|
|
13
|
+
import I from "../../../components/data-table/DataTableRow.vue.js";
|
|
14
|
+
import L from "../../../components/code-input/CodeInput.vue.js";
|
|
15
|
+
import { useFileDialog as M } from "../../../../hooks/useFileDialog.js";
|
|
16
|
+
const P = {
|
|
15
17
|
key: 0,
|
|
16
18
|
class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
|
|
17
|
-
},
|
|
19
|
+
}, R = {
|
|
18
20
|
key: 1,
|
|
19
21
|
class: "flex items-center justify-center overflow-hidden border-t p-1.5"
|
|
20
|
-
}, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" },
|
|
22
|
+
}, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, re = /* @__PURE__ */ h({
|
|
21
23
|
__name: "RequestBody",
|
|
22
24
|
props: {
|
|
23
25
|
requestBody: {},
|
|
@@ -26,80 +28,70 @@ const R = {
|
|
|
26
28
|
environment: {}
|
|
27
29
|
},
|
|
28
30
|
emits: ["update:contentType", "update:value", "update:formValue"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
+
setup(r, { emit: B }) {
|
|
32
|
+
const m = B, N = {
|
|
31
33
|
"application/json": "json",
|
|
32
34
|
"application/xml": "xml",
|
|
33
35
|
"application/yaml": "yaml"
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"application/octet-stream": "Binary File",
|
|
38
|
-
"application/json": "JSON",
|
|
39
|
-
"application/xml": "XML",
|
|
40
|
-
"application/yaml": "YAML",
|
|
41
|
-
"application/edn": "EDN",
|
|
42
|
-
other: "Other",
|
|
43
|
-
none: "None"
|
|
44
|
-
}, o = s(
|
|
45
|
-
() => O(i.requestBody, i.exampleKey) ?? "none"
|
|
46
|
-
), f = Object.entries(b).map(([n, e]) => ({
|
|
36
|
+
}, o = d(
|
|
37
|
+
() => D(r.requestBody, r.exampleKey) ?? "none"
|
|
38
|
+
), c = q(k).map(([n, e]) => ({
|
|
47
39
|
id: n,
|
|
48
40
|
label: e
|
|
49
|
-
})),
|
|
50
|
-
get: () =>
|
|
41
|
+
})), b = d({
|
|
42
|
+
get: () => c.find(
|
|
51
43
|
(e) => e.id === o.value
|
|
52
|
-
) ??
|
|
44
|
+
) ?? c.at(-1),
|
|
53
45
|
set: (n) => {
|
|
54
|
-
|
|
46
|
+
m("update:contentType", { value: n.id });
|
|
55
47
|
}
|
|
56
48
|
});
|
|
57
|
-
function
|
|
58
|
-
const { open: e } =
|
|
49
|
+
function S(n) {
|
|
50
|
+
const { open: e } = M({
|
|
59
51
|
onChange: (l) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
52
|
+
const g = l?.[0];
|
|
53
|
+
g && n(g);
|
|
62
54
|
},
|
|
63
55
|
multiple: !1,
|
|
64
56
|
accept: "*/*"
|
|
65
57
|
});
|
|
66
58
|
e();
|
|
67
59
|
}
|
|
68
|
-
const
|
|
69
|
-
() =>
|
|
70
|
-
),
|
|
71
|
-
if (!
|
|
60
|
+
const s = d(
|
|
61
|
+
() => r.requestBody && $(r.requestBody, o.value, r.exampleKey)
|
|
62
|
+
), j = d(() => {
|
|
63
|
+
if (!s.value)
|
|
72
64
|
return "";
|
|
73
|
-
const n =
|
|
65
|
+
const n = s.value.value;
|
|
74
66
|
return typeof n == "string" ? n : JSON.stringify(n, null, 2);
|
|
75
67
|
});
|
|
76
|
-
return (n, e) => (u(),
|
|
68
|
+
return (n, e) => (u(), p(t(z), null, {
|
|
77
69
|
title: a(() => [
|
|
78
|
-
T(v(
|
|
70
|
+
T(v(r.title), 1)
|
|
79
71
|
]),
|
|
80
72
|
default: a(() => [
|
|
81
|
-
|
|
73
|
+
i(t(O), {
|
|
82
74
|
columns: [""],
|
|
83
75
|
presentational: ""
|
|
84
76
|
}, {
|
|
85
77
|
default: a(() => [
|
|
86
|
-
|
|
78
|
+
i(t(K), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
|
|
87
79
|
default: a(() => [
|
|
88
|
-
|
|
89
|
-
modelValue:
|
|
90
|
-
"onUpdate:modelValue": e[0] || (e[0] = (l) =>
|
|
91
|
-
options: t(
|
|
80
|
+
i(t(F), {
|
|
81
|
+
modelValue: b.value,
|
|
82
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => b.value = l),
|
|
83
|
+
options: t(c),
|
|
92
84
|
teleport: ""
|
|
93
85
|
}, {
|
|
94
86
|
default: a(() => [
|
|
95
|
-
|
|
87
|
+
i(t(x), {
|
|
96
88
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
|
|
97
89
|
fullWidth: "",
|
|
98
90
|
variant: "ghost"
|
|
99
91
|
}, {
|
|
100
92
|
default: a(() => [
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
f("span", null, v(t(k)[o.value] ?? o.value), 1),
|
|
94
|
+
i(t(w), {
|
|
103
95
|
icon: "ChevronDown",
|
|
104
96
|
size: "md"
|
|
105
97
|
})
|
|
@@ -112,18 +104,18 @@ const R = {
|
|
|
112
104
|
]),
|
|
113
105
|
_: 1
|
|
114
106
|
}),
|
|
115
|
-
|
|
107
|
+
i(t(I), null, {
|
|
116
108
|
default: a(() => [
|
|
117
|
-
o.value === "none" ? (u(), y("div",
|
|
118
|
-
|
|
119
|
-
])])) : o.value === "application/octet-stream" ? (u(), y("div",
|
|
120
|
-
t(V)(t(
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
o.value === "none" ? (u(), y("div", P, [...e[5] || (e[5] = [
|
|
110
|
+
f("span", null, "No Body", -1)
|
|
111
|
+
])])) : o.value === "application/octet-stream" ? (u(), y("div", R, [
|
|
112
|
+
t(V)(t(C)(s.value?.value)) !== void 0 ? (u(), y(E, { key: 0 }, [
|
|
113
|
+
f("span", J, v(t(V)(t(C)(s.value?.value))), 1),
|
|
114
|
+
i(t(x), {
|
|
123
115
|
class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
|
|
124
116
|
size: "sm",
|
|
125
117
|
variant: "outlined",
|
|
126
|
-
onClick: e[1] || (e[1] = (l) =>
|
|
118
|
+
onClick: e[1] || (e[1] = (l) => m("update:value", {
|
|
127
119
|
payload: void 0,
|
|
128
120
|
contentType: o.value
|
|
129
121
|
}))
|
|
@@ -133,21 +125,21 @@ const R = {
|
|
|
133
125
|
])]),
|
|
134
126
|
_: 1
|
|
135
127
|
})
|
|
136
|
-
], 64)) : (u(),
|
|
128
|
+
], 64)) : (u(), p(t(x), {
|
|
137
129
|
key: 1,
|
|
138
130
|
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
|
|
139
131
|
size: "sm",
|
|
140
132
|
variant: "outlined",
|
|
141
|
-
onClick: e[2] || (e[2] = () =>
|
|
142
|
-
(l) =>
|
|
133
|
+
onClick: e[2] || (e[2] = () => S(
|
|
134
|
+
(l) => m("update:value", {
|
|
143
135
|
payload: l,
|
|
144
136
|
contentType: o.value
|
|
145
137
|
})
|
|
146
138
|
))
|
|
147
139
|
}, {
|
|
148
140
|
default: a(() => [
|
|
149
|
-
e[7] || (e[7] =
|
|
150
|
-
|
|
141
|
+
e[7] || (e[7] = f("span", null, "Select File", -1)),
|
|
142
|
+
i(t(w), {
|
|
151
143
|
class: "ml-1",
|
|
152
144
|
icon: "Upload",
|
|
153
145
|
size: "xs",
|
|
@@ -156,25 +148,25 @@ const R = {
|
|
|
156
148
|
]),
|
|
157
149
|
_: 1
|
|
158
150
|
}))
|
|
159
|
-
])) : o.value === "multipart/form-data" || o.value === "application/x-www-form-urlencoded" ? (u(),
|
|
151
|
+
])) : o.value === "multipart/form-data" || o.value === "application/x-www-form-urlencoded" ? (u(), p(U, {
|
|
160
152
|
key: 2,
|
|
161
|
-
environment:
|
|
162
|
-
example:
|
|
153
|
+
environment: r.environment,
|
|
154
|
+
example: s.value,
|
|
163
155
|
selectedContentType: o.value,
|
|
164
|
-
"onUpdate:formValue": e[3] || (e[3] = (l) =>
|
|
156
|
+
"onUpdate:formValue": e[3] || (e[3] = (l) => m("update:formValue", {
|
|
165
157
|
payload: l,
|
|
166
158
|
contentType: o.value
|
|
167
159
|
}))
|
|
168
|
-
}, null, 8, ["environment", "example", "selectedContentType"])) : (u(),
|
|
160
|
+
}, null, 8, ["environment", "example", "selectedContentType"])) : (u(), p(t(L), {
|
|
169
161
|
key: 3,
|
|
170
162
|
class: "border-t px-3",
|
|
171
163
|
content: "",
|
|
172
|
-
environment:
|
|
164
|
+
environment: r.environment,
|
|
173
165
|
language: N[o.value] ?? "plaintext",
|
|
174
166
|
lineNumbers: "",
|
|
175
167
|
lint: "",
|
|
176
|
-
modelValue:
|
|
177
|
-
"onUpdate:modelValue": e[4] || (e[4] = (l) =>
|
|
168
|
+
modelValue: j.value,
|
|
169
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => m("update:value", {
|
|
178
170
|
payload: l,
|
|
179
171
|
contentType: o.value
|
|
180
172
|
}))
|
|
@@ -191,5 +183,5 @@ const R = {
|
|
|
191
183
|
}
|
|
192
184
|
});
|
|
193
185
|
export {
|
|
194
|
-
|
|
186
|
+
re as default
|
|
195
187
|
};
|
|
@@ -12,6 +12,7 @@ type __VLS_Props = {
|
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
14
|
navigate: (route: NonNullable<({
|
|
15
|
+
replace?: boolean;
|
|
15
16
|
namespace?: string;
|
|
16
17
|
workspaceSlug?: string;
|
|
17
18
|
callback?: (status: "success" | "error") => void;
|
|
@@ -39,6 +40,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
39
40
|
}) => any;
|
|
40
41
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
41
42
|
onNavigate?: ((route: NonNullable<({
|
|
43
|
+
replace?: boolean;
|
|
42
44
|
namespace?: string;
|
|
43
45
|
workspaceSlug?: string;
|
|
44
46
|
callback?: (status: "success" | "error") => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AA4OF,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AA4OF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;cA1NN,MAAM;eACL,MAAM,GAAG,IAAI,GAAG,SAAS;oBACpB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;cAFb,MAAM;eACL,MAAM,GAAG,IAAI,GAAG,SAAS;oBACpB,OAAO;;kFA2NvB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -36,6 +36,7 @@ type __VLS_Props = {
|
|
|
36
36
|
};
|
|
37
37
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
38
38
|
navigate: (route: NonNullable<({
|
|
39
|
+
replace?: boolean;
|
|
39
40
|
namespace?: string;
|
|
40
41
|
workspaceSlug?: string;
|
|
41
42
|
callback?: (status: "success" | "error") => void;
|
|
@@ -63,6 +64,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
63
64
|
}) => any;
|
|
64
65
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
65
66
|
onNavigate?: ((route: NonNullable<({
|
|
67
|
+
replace?: boolean;
|
|
66
68
|
namespace?: string;
|
|
67
69
|
workspaceSlug?: string;
|
|
68
70
|
callback?: (status: "success" | "error") => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAiTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAGxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAC/C,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAmlBF,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAiTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAGxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAC/C,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAmlBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;cAtkBG,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;cAAjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;kFAykBpE,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -18,7 +18,7 @@ type DefaultHeader = {
|
|
|
18
18
|
* This function intelligently adds standard HTTP headers based on the request context:
|
|
19
19
|
* - Content-Type: Added only if the HTTP method supports a request body (POST, PUT, PATCH, etc.).
|
|
20
20
|
* Uses the selected content type from the operation or defaults to "application/json".
|
|
21
|
-
* - Accept:
|
|
21
|
+
* - Accept: Derived from the 2xx response content types in the spec (joined as a comma-separated list), falling back to a wildcard.
|
|
22
22
|
* - User-Agent: Added in Electron environments (desktop app or proxy) to identify the client.
|
|
23
23
|
*
|
|
24
24
|
* The function respects OpenAPI operation parameters and marks headers as overridden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-default-headers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-default-headers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAanG;;;GAGG;AACH,KAAK,aAAa,GAAG;IACnB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAAI,yDAK/B;IACD,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,KAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"get-default-headers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-default-headers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAanG;;;GAGG;AACH,KAAK,aAAa,GAAG;IACnB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAAI,yDAK/B;IACD,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,KAAG,aAAa,EA0ChB,CAAA"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { canMethodHaveBody as
|
|
2
|
-
import { getResolvedRef as
|
|
3
|
-
import { isElectron as
|
|
4
|
-
const
|
|
5
|
-
name:
|
|
6
|
-
defaultValue:
|
|
7
|
-
isOverridden: o.has(
|
|
8
|
-
}),
|
|
9
|
-
method:
|
|
10
|
-
operation:
|
|
1
|
+
import { canMethodHaveBody as m } from "@scalar/helpers/http/can-method-have-body";
|
|
2
|
+
import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
|
+
import { isElectron as y } from "../../../../libs/electron.js";
|
|
4
|
+
const l = "2.29.2", T = "application/json", C = "*/*", a = (n, s, o) => ({
|
|
5
|
+
name: n,
|
|
6
|
+
defaultValue: s,
|
|
7
|
+
isOverridden: o.has(n.toLowerCase())
|
|
8
|
+
}), b = ({
|
|
9
|
+
method: n,
|
|
10
|
+
operation: s,
|
|
11
11
|
exampleKey: o,
|
|
12
|
-
hideDisabledHeaders:
|
|
12
|
+
hideDisabledHeaders: p = !1
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
),
|
|
17
|
-
if (
|
|
18
|
-
const e = d?.["x-scalar-selected-content-type"]?.[o] ?? Object.keys(d?.content ?? {})[0] ??
|
|
19
|
-
e !== "none" &&
|
|
14
|
+
const c = new Set(
|
|
15
|
+
s.parameters?.filter((e) => r(e).in === "header").map((e) => r(e).name.toLowerCase()) ?? []
|
|
16
|
+
), f = s["x-scalar-disable-parameters"]?.["default-headers"]?.[o] ?? {}, t = [], d = r(s.requestBody);
|
|
17
|
+
if (m(n)) {
|
|
18
|
+
const e = d?.["x-scalar-selected-content-type"]?.[o] ?? Object.keys(d?.content ?? {})[0] ?? T;
|
|
19
|
+
e !== "none" && t.push(a("Content-Type", e, c));
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
const i = Object.keys(s.responses ?? {}).find((e) => e.startsWith("2")), u = i ? r(s.responses[i]) : null, h = Object.keys(u?.content ?? {}).join(", ") || C;
|
|
22
|
+
return t.push(a("Accept", h, c)), y() && l && t.push(a("User-Agent", `Scalar/${l}`, c)), p ? t.filter((e) => f[e.name.toLowerCase()] !== !0) : t;
|
|
22
23
|
};
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
b as getDefaultHeaders
|
|
25
26
|
};
|
|
@@ -8,6 +8,8 @@ import { type SecuritySchemeOption } from '../../../../v2/blocks/scalar-auth-sel
|
|
|
8
8
|
type __VLS_Props = {
|
|
9
9
|
environment: XScalarEnvironment;
|
|
10
10
|
eventBus: WorkspaceEventBus;
|
|
11
|
+
/** Allows adding authentication which is not in the document */
|
|
12
|
+
createAnySecurityScheme?: boolean;
|
|
11
13
|
/** Creates a static disclosure that cannot be collapsed */
|
|
12
14
|
isStatic?: boolean;
|
|
13
15
|
meta: AuthMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAuTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAC1G,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gEAAgE;IAChE,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AA4eF,QAAA,MAAM,YAAY;;cA5cqB,IAAI;cAAQ,MAAM;;;;oPA+cvD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|