@scalar/api-client 2.2.59 → 2.2.61
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 +34 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +88 -80
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/IconSelector.vue.js +1 -0
- package/dist/components/SectionFilter.vue.d.ts +23 -0
- package/dist/components/SectionFilter.vue.d.ts.map +1 -0
- package/dist/components/SectionFilter.vue.js +7 -0
- package/dist/components/SectionFilter.vue2.js +67 -0
- package/dist/components/SectionFilterButton.vue.d.ts +22 -0
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -0
- package/dist/components/SectionFilterButton.vue.js +23 -0
- package/dist/components/SectionFilterButton.vue2.js +4 -0
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +1 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +62 -44
- package/dist/layouts/App/create-api-client-app.d.ts +2 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +2 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +3 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/events.d.ts +4 -0
- package/dist/store/events.d.ts.map +1 -1
- package/dist/store/events.js +4 -0
- package/dist/store/store.d.ts +1 -0
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +10 -10
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -83
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +36 -36
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +103 -83
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +81 -81
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +9 -9
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -21
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +80 -65
- package/package.json +14 -14
- package/dist/components/ContextBar.vue.d.ts +0 -11
- package/dist/components/ContextBar.vue.d.ts.map +0 -1
- package/dist/components/ContextBar.vue.js +0 -7
- package/dist/components/ContextBar.vue2.js +0 -47
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AAOzE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,oDAMhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KACA,aAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AAOzE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,oDAMhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KACA,aAAa,CAAC,MAAM,CA+CtB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { snippetz as a } from "@scalar/snippetz";
|
|
2
2
|
import { getHarRequest as E } from "./get-har-request.js";
|
|
3
|
-
const s = "ws://replace.me",
|
|
4
|
-
operation:
|
|
3
|
+
const s = "ws://replace.me", S = (i, t, {
|
|
4
|
+
operation: l,
|
|
5
5
|
example: u,
|
|
6
6
|
server: c,
|
|
7
7
|
securitySchemes: g = []
|
|
@@ -9,7 +9,7 @@ const s = "ws://replace.me", w = (l, t, {
|
|
|
9
9
|
var n;
|
|
10
10
|
try {
|
|
11
11
|
const r = E({
|
|
12
|
-
operation:
|
|
12
|
+
operation: l,
|
|
13
13
|
example: u,
|
|
14
14
|
server: c,
|
|
15
15
|
securitySchemes: g
|
|
@@ -19,25 +19,25 @@ const s = "ws://replace.me", w = (l, t, {
|
|
|
19
19
|
const o = r.url.startsWith("/") ? "" : "/";
|
|
20
20
|
try {
|
|
21
21
|
new URL(r.url);
|
|
22
|
-
} catch {
|
|
23
|
-
r.url = `${s}${o}${r.url}`;
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.error("[getSnippet] Invalid URL", e), r.url = `${s}${o}${r.url}`;
|
|
24
24
|
}
|
|
25
25
|
if (((n = r.postData) == null ? void 0 : n.mimeType) === "application/json")
|
|
26
26
|
try {
|
|
27
27
|
JSON.parse(r.postData.text || "{}");
|
|
28
|
-
} catch {
|
|
29
|
-
return [new Error("Invalid JSON body"), null];
|
|
28
|
+
} catch (e) {
|
|
29
|
+
return console.error("[getSnippet] Invalid JSON body", e), [new Error("Invalid JSON body"), null];
|
|
30
30
|
}
|
|
31
|
-
const p =
|
|
31
|
+
const p = i.replace("javascript", "js");
|
|
32
32
|
if (a().hasPlugin(p, t)) {
|
|
33
33
|
const e = a().print(p, t, r);
|
|
34
34
|
return e ? [null, e.replace(`${s}${o}`, "")] : [new Error("Error generating snippet"), null];
|
|
35
35
|
}
|
|
36
36
|
} catch (r) {
|
|
37
|
-
return console.error("[getSnippet]", r), [new Error("Error generating snippet"), null];
|
|
37
|
+
return console.error("[getSnippet] Error generating snippet", r), [new Error("Error generating snippet"), null];
|
|
38
38
|
}
|
|
39
39
|
return [new Error("No snippet found"), null];
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
S as getSnippet
|
|
43
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAqVA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAe1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkYF,wBAOG"}
|
|
@@ -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 m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8ab24b0b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as I, useId as L, ref as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import
|
|
5
|
-
import { useLayout as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { getSecurityRequirements as
|
|
10
|
-
const
|
|
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";
|
|
2
|
+
import { useModal as K, ScalarComboboxMultiselect as W, ScalarButton as F, ScalarIcon as G } from "@scalar/components";
|
|
3
|
+
import { isDefined as H } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
5
|
+
import { useLayout as P } from "../../../../hooks/useLayout.js";
|
|
6
|
+
import { useWorkspace as Q } from "../../../../store/store.js";
|
|
7
|
+
import X from "./DeleteRequestAuthModal.vue.js";
|
|
8
|
+
import Y from "./RequestAuthDataTable.vue.js";
|
|
9
|
+
import { getSecurityRequirements as Z, formatComplexScheme as _, formatScheme as ee, getSchemeOptions as te } from "../../libs/auth.js";
|
|
10
|
+
const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1" }, he = /* @__PURE__ */ I({
|
|
11
11
|
__name: "RequestAuth",
|
|
12
12
|
props: {
|
|
13
13
|
collection: {},
|
|
@@ -21,123 +21,128 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
21
21
|
workspace: {}
|
|
22
22
|
},
|
|
23
23
|
setup(s) {
|
|
24
|
-
const { layout:
|
|
25
|
-
securitySchemes:
|
|
26
|
-
securitySchemeMutators:
|
|
24
|
+
const { layout: v } = P(), {
|
|
25
|
+
securitySchemes: S,
|
|
26
|
+
securitySchemeMutators: O,
|
|
27
27
|
requestMutators: w,
|
|
28
|
-
collectionMutators:
|
|
29
|
-
} =
|
|
28
|
+
collectionMutators: M
|
|
29
|
+
} = Q(), R = L(), C = D(null), y = K(), b = D(
|
|
30
30
|
null
|
|
31
|
-
), A =
|
|
32
|
-
const e =
|
|
33
|
-
return { filteredRequirements: e.filter((
|
|
34
|
-
}),
|
|
31
|
+
), A = h(() => {
|
|
32
|
+
const e = Z(s.operation, s.collection);
|
|
33
|
+
return { filteredRequirements: e.filter((o) => Object.keys(o).length), requirements: e };
|
|
34
|
+
}), g = h(() => {
|
|
35
35
|
const { filteredRequirements: e, requirements: t } = A.value;
|
|
36
36
|
if (!t.length) return null;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const n = !t.some(
|
|
38
|
+
(u) => Object.keys(u).length > 1
|
|
39
|
+
) && e.length < t.length, l = n ? "Unlock" : "Lock", c = n ? "Optional" : "Required", j = `${e.length === 1 ? (() => {
|
|
40
|
+
const u = Object.keys(e[0] || {});
|
|
41
|
+
return u.length > 1 ? u.join(" & ") : u[0] || "";
|
|
42
|
+
})() : ""} ${c}`;
|
|
43
|
+
return { icon: l, text: j };
|
|
44
|
+
}), a = h(
|
|
40
45
|
() => s.selectedSecuritySchemeUids.map((e) => {
|
|
41
|
-
if (Array.isArray(e)) return
|
|
42
|
-
const t =
|
|
46
|
+
if (Array.isArray(e)) return _(e, S);
|
|
47
|
+
const t = S[e ?? ""];
|
|
43
48
|
if (t)
|
|
44
|
-
return
|
|
45
|
-
}).filter(
|
|
49
|
+
return ee(t);
|
|
50
|
+
}).filter(H)
|
|
46
51
|
);
|
|
47
|
-
function
|
|
52
|
+
function U(e) {
|
|
48
53
|
var n;
|
|
49
|
-
const t = e.find((
|
|
50
|
-
const c =
|
|
51
|
-
return c.length > 1 ? c :
|
|
54
|
+
const t = e.find((l) => l.payload), o = e.filter((l) => !l.payload).map(({ id: l }) => {
|
|
55
|
+
const c = l.split(",");
|
|
56
|
+
return c.length > 1 ? c : l;
|
|
52
57
|
});
|
|
53
58
|
if (t != null && t.payload) {
|
|
54
|
-
const
|
|
59
|
+
const l = O.add(
|
|
55
60
|
t.payload,
|
|
56
61
|
(n = s.collection) == null ? void 0 : n.uid
|
|
57
62
|
);
|
|
58
|
-
|
|
63
|
+
l && o.push(l.uid);
|
|
59
64
|
}
|
|
60
|
-
V(
|
|
65
|
+
V(o);
|
|
61
66
|
}
|
|
62
67
|
const V = (e) => {
|
|
63
68
|
var t;
|
|
64
|
-
|
|
69
|
+
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);
|
|
65
70
|
};
|
|
66
|
-
function
|
|
67
|
-
|
|
71
|
+
function $({ id: e, label: t }) {
|
|
72
|
+
b.value = { id: e, label: t }, y.show();
|
|
68
73
|
}
|
|
69
|
-
const
|
|
70
|
-
var
|
|
74
|
+
const B = (e) => {
|
|
75
|
+
var o;
|
|
71
76
|
if (!e) return;
|
|
72
77
|
const t = s.selectedSecuritySchemeUids.filter((n) => {
|
|
73
|
-
const
|
|
74
|
-
return
|
|
78
|
+
const l = e.split(",");
|
|
79
|
+
return l.length > 1 && Array.isArray(n) && l.length === n.length ? n.every((c) => !l.includes(c)) : n !== e;
|
|
75
80
|
});
|
|
76
|
-
V(t), (
|
|
77
|
-
},
|
|
81
|
+
V(t), (o = C.value) == null || o.$el.focus(), y.hide();
|
|
82
|
+
}, T = h(
|
|
78
83
|
() => {
|
|
79
84
|
var e;
|
|
80
|
-
return
|
|
85
|
+
return te(
|
|
81
86
|
A.value.filteredRequirements,
|
|
82
87
|
((e = s.collection) == null ? void 0 : e.securitySchemes) ?? [],
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
S,
|
|
89
|
+
v === "modal" || s.layout === "reference"
|
|
85
90
|
);
|
|
86
91
|
}
|
|
87
92
|
);
|
|
88
|
-
return (e, t) => (
|
|
93
|
+
return (e, t) => (m(), N(J, {
|
|
89
94
|
class: "group/params",
|
|
90
95
|
itemCount: a.value.length,
|
|
91
96
|
layout: e.layout
|
|
92
97
|
}, {
|
|
93
|
-
title:
|
|
98
|
+
title: d(() => [
|
|
94
99
|
i("div", {
|
|
95
|
-
id: r(
|
|
100
|
+
id: r(R),
|
|
96
101
|
class: "inline-flex items-center gap-1"
|
|
97
102
|
}, [
|
|
98
|
-
i("span", null,
|
|
99
|
-
|
|
103
|
+
i("span", null, k(e.title), 1),
|
|
104
|
+
g.value ? (m(), p("span", {
|
|
100
105
|
key: 0,
|
|
101
|
-
class:
|
|
102
|
-
}, g
|
|
103
|
-
], 8,
|
|
106
|
+
class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": g.value.text === "Required" }])
|
|
107
|
+
}, k(g.value.text), 3)) : E("", !0)
|
|
108
|
+
], 8, le)
|
|
104
109
|
]),
|
|
105
|
-
actions:
|
|
106
|
-
i("div",
|
|
107
|
-
|
|
110
|
+
actions: d(() => [
|
|
111
|
+
i("div", oe, [
|
|
112
|
+
f(r(W), {
|
|
108
113
|
class: "w-72 text-xs",
|
|
109
|
-
isDeletable: r(
|
|
114
|
+
isDeletable: r(v) !== "modal" && e.layout !== "reference",
|
|
110
115
|
modelValue: a.value,
|
|
111
116
|
multiple: "",
|
|
112
|
-
options:
|
|
113
|
-
onDelete:
|
|
114
|
-
"onUpdate:modelValue":
|
|
117
|
+
options: T.value,
|
|
118
|
+
onDelete: $,
|
|
119
|
+
"onUpdate:modelValue": U
|
|
115
120
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
|
|
121
|
+
default: d(() => [
|
|
122
|
+
f(r(F), {
|
|
118
123
|
ref_key: "comboboxButtonRef",
|
|
119
|
-
ref:
|
|
120
|
-
"aria-describedby": r(
|
|
124
|
+
ref: C,
|
|
125
|
+
"aria-describedby": r(R),
|
|
121
126
|
class: "py-0.75 hover:bg-b-3 text-c-1 hover:text-c-1 h-auto px-1.5 font-normal",
|
|
122
127
|
fullWidth: "",
|
|
123
128
|
variant: "ghost"
|
|
124
129
|
}, {
|
|
125
|
-
default:
|
|
126
|
-
var
|
|
130
|
+
default: d(() => {
|
|
131
|
+
var o;
|
|
127
132
|
return [
|
|
128
|
-
i("div",
|
|
129
|
-
a.value.length === 0 ? (
|
|
133
|
+
i("div", ne, [
|
|
134
|
+
a.value.length === 0 ? (m(), p(x, { key: 0 }, [
|
|
130
135
|
t[2] || (t[2] = i("span", { class: "sr-only" }, "Select", -1)),
|
|
131
|
-
t[3] || (t[3] =
|
|
132
|
-
], 64)) : a.value.length === 1 ? (
|
|
136
|
+
t[3] || (t[3] = q(" Auth Type "))
|
|
137
|
+
], 64)) : a.value.length === 1 ? (m(), p(x, { key: 1 }, [
|
|
133
138
|
t[4] || (t[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
134
|
-
|
|
135
|
-
], 64)) : (
|
|
136
|
-
t[5] || (t[5] =
|
|
139
|
+
q(" " + k((o = a.value[0]) == null ? void 0 : o.label), 1)
|
|
140
|
+
], 64)) : (m(), p(x, { key: 2 }, [
|
|
141
|
+
t[5] || (t[5] = q(" Multiple ")),
|
|
137
142
|
t[6] || (t[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
138
143
|
], 64))
|
|
139
144
|
]),
|
|
140
|
-
|
|
145
|
+
f(r(G), {
|
|
141
146
|
class: "ml-1 shrink-0",
|
|
142
147
|
icon: "ChevronDown",
|
|
143
148
|
size: "sm"
|
|
@@ -151,8 +156,8 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
151
156
|
}, 8, ["isDeletable", "modelValue", "options"])
|
|
152
157
|
])
|
|
153
158
|
]),
|
|
154
|
-
default:
|
|
155
|
-
|
|
159
|
+
default: d(() => [
|
|
160
|
+
f(Y, {
|
|
156
161
|
collection: e.collection,
|
|
157
162
|
envVariables: e.envVariables,
|
|
158
163
|
environment: e.environment,
|
|
@@ -161,13 +166,13 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
161
166
|
server: e.server,
|
|
162
167
|
workspace: e.workspace
|
|
163
168
|
}, null, 8, ["collection", "envVariables", "environment", "layout", "selectedSchemeOptions", "server", "workspace"]),
|
|
164
|
-
|
|
165
|
-
scheme:
|
|
166
|
-
state: r(
|
|
167
|
-
onClose: t[0] || (t[0] = (
|
|
168
|
-
onDelete: t[1] || (t[1] = (
|
|
169
|
+
f(X, {
|
|
170
|
+
scheme: b.value,
|
|
171
|
+
state: r(y),
|
|
172
|
+
onClose: t[0] || (t[0] = (o) => r(y).hide()),
|
|
173
|
+
onDelete: t[1] || (t[1] = (o) => {
|
|
169
174
|
var n;
|
|
170
|
-
return
|
|
175
|
+
return B((n = b.value) == null ? void 0 : n.id);
|
|
171
176
|
})
|
|
172
177
|
}, null, 8, ["scheme", "state"])
|
|
173
178
|
]),
|
|
@@ -176,5 +181,5 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
|
|
|
176
181
|
}
|
|
177
182
|
});
|
|
178
183
|
export {
|
|
179
|
-
|
|
184
|
+
he as default
|
|
180
185
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuthTab.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-00684fd6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestCodeExample.test.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA2KA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAcxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4PF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestCodeExample.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-cf7ecb78"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as b, computed as
|
|
1
|
+
import { defineComponent as b, computed as i, openBlock as w, createElementBlock as x, createVNode as n, withCtx as c, createTextVNode as S, createElementVNode as m, unref as r, toDisplayString as C } from "vue";
|
|
2
2
|
import { ScalarCombobox as k, ScalarButton as $, ScalarIcon as g } from "@scalar/components";
|
|
3
3
|
import { snippetz as K } from "@scalar/snippetz";
|
|
4
4
|
import V from "../../../components/DataTable/DataTable.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { filterSecurityRequirements as
|
|
8
|
-
import
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
5
|
+
import H from "../../../components/DataTable/DataTableRow.vue.js";
|
|
6
|
+
import U from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
+
import { filterSecurityRequirements as _ } from "./helpers/filter-security-requirements.js";
|
|
8
|
+
import j from "../../Components/CodeSnippet/CodeSnippet.vue.js";
|
|
9
|
+
import { useWorkspace as B } from "../../../store/store.js";
|
|
10
|
+
const D = { class: "w-full" }, E = { class: "-mx-1 flex flex-1" }, N = { class: "bg-b-1 flex items-center justify-center overflow-hidden border-t" }, P = /* @__PURE__ */ b({
|
|
11
11
|
__name: "RequestCodeExample",
|
|
12
12
|
props: {
|
|
13
13
|
collection: {},
|
|
@@ -17,25 +17,25 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
|
|
|
17
17
|
workspace: {}
|
|
18
18
|
},
|
|
19
19
|
setup(o) {
|
|
20
|
-
const { securitySchemes:
|
|
21
|
-
() =>
|
|
20
|
+
const { securitySchemes: u, workspaceMutators: p } = B(), f = i(
|
|
21
|
+
() => _(
|
|
22
22
|
o.operation.security || o.collection.security || [],
|
|
23
|
-
o.collection.selectedSecuritySchemeUids,
|
|
24
|
-
|
|
23
|
+
o.operation.selectedSecuritySchemeUids || o.collection.selectedSecuritySchemeUids,
|
|
24
|
+
u
|
|
25
25
|
)
|
|
26
|
-
), a =
|
|
26
|
+
), a = i(() => {
|
|
27
27
|
const e = {};
|
|
28
28
|
return {
|
|
29
29
|
options: K().clients().map((t) => ({
|
|
30
30
|
label: t.title,
|
|
31
|
-
options: t.clients.map((
|
|
32
|
-
id: `${t.key},${
|
|
33
|
-
label:
|
|
31
|
+
options: t.clients.map((s) => (e[`${t.key},${s.client}`] = s.title, {
|
|
32
|
+
id: `${t.key},${s.client}`,
|
|
33
|
+
label: s.title
|
|
34
34
|
}))
|
|
35
35
|
})),
|
|
36
36
|
dict: e
|
|
37
37
|
};
|
|
38
|
-
}), d =
|
|
38
|
+
}), d = i(() => {
|
|
39
39
|
var t;
|
|
40
40
|
const e = o.workspace.selectedHttpClient;
|
|
41
41
|
if (!e)
|
|
@@ -48,49 +48,49 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
|
|
|
48
48
|
id: l,
|
|
49
49
|
label: a.value.dict[l] ?? "Unknown"
|
|
50
50
|
};
|
|
51
|
-
}),
|
|
51
|
+
}), y = i(
|
|
52
52
|
() => {
|
|
53
53
|
var e;
|
|
54
54
|
return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.targetKey) ?? "js";
|
|
55
55
|
}
|
|
56
|
-
),
|
|
56
|
+
), v = i(
|
|
57
57
|
() => {
|
|
58
58
|
var e;
|
|
59
59
|
return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.clientKey) ?? "fetch";
|
|
60
60
|
}
|
|
61
61
|
), h = ({ id: e }) => {
|
|
62
62
|
const [l, t] = e.split(",");
|
|
63
|
-
!l || !t ||
|
|
63
|
+
!l || !t || p.edit(o.workspace.uid, "selectedHttpClient", {
|
|
64
64
|
targetKey: l,
|
|
65
65
|
clientKey: t
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
return (e, l) => (w(), x("div",
|
|
69
|
-
n(
|
|
68
|
+
return (e, l) => (w(), x("div", D, [
|
|
69
|
+
n(U, {
|
|
70
70
|
class: "group/preview w-full border-b-0",
|
|
71
71
|
defaultOpen: !1
|
|
72
72
|
}, {
|
|
73
|
-
title:
|
|
74
|
-
|
|
73
|
+
title: c(() => l[0] || (l[0] = [
|
|
74
|
+
S("Code Snippet")
|
|
75
75
|
])),
|
|
76
|
-
actions:
|
|
77
|
-
m("div",
|
|
76
|
+
actions: c(() => [
|
|
77
|
+
m("div", E, [
|
|
78
78
|
n(r(k), {
|
|
79
79
|
modelValue: d.value,
|
|
80
80
|
options: a.value.options,
|
|
81
81
|
placement: "bottom-end",
|
|
82
82
|
"onUpdate:modelValue": h
|
|
83
83
|
}, {
|
|
84
|
-
default:
|
|
84
|
+
default: c(() => [
|
|
85
85
|
n(r($), {
|
|
86
86
|
class: "text-c-1 hover:bg-b-3 py-0.75 flex h-full w-fit gap-1.5 px-1.5 font-normal",
|
|
87
87
|
fullWidth: "",
|
|
88
88
|
variant: "ghost"
|
|
89
89
|
}, {
|
|
90
|
-
default:
|
|
90
|
+
default: c(() => {
|
|
91
91
|
var t;
|
|
92
92
|
return [
|
|
93
|
-
m("span", null,
|
|
93
|
+
m("span", null, C((t = d.value) == null ? void 0 : t.label), 1),
|
|
94
94
|
n(r(g), {
|
|
95
95
|
icon: "ChevronDown",
|
|
96
96
|
size: "md"
|
|
@@ -104,20 +104,20 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
|
|
|
104
104
|
}, 8, ["modelValue", "options"])
|
|
105
105
|
])
|
|
106
106
|
]),
|
|
107
|
-
default:
|
|
107
|
+
default: c(() => [
|
|
108
108
|
n(V, { columns: [""] }, {
|
|
109
|
-
default:
|
|
110
|
-
n(
|
|
111
|
-
default:
|
|
112
|
-
m("div",
|
|
113
|
-
n(r(
|
|
109
|
+
default: c(() => [
|
|
110
|
+
n(H, null, {
|
|
111
|
+
default: c(() => [
|
|
112
|
+
m("div", N, [
|
|
113
|
+
n(r(j), {
|
|
114
114
|
class: "px-3 py-1.5",
|
|
115
|
-
client:
|
|
115
|
+
client: v.value,
|
|
116
116
|
example: e.example,
|
|
117
117
|
operation: e.operation,
|
|
118
118
|
securitySchemes: f.value,
|
|
119
119
|
server: e.server,
|
|
120
|
-
target:
|
|
120
|
+
target: y.value
|
|
121
121
|
}, null, 8, ["client", "example", "operation", "securitySchemes", "server", "target"])
|
|
122
122
|
])
|
|
123
123
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA+SA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AASxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAU1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkUF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dd5754ad"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|