@scalar/api-client 2.3.2 → 2.3.3
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 +19 -0
- package/dist/layouts/App/create-api-client-app.d.ts +3 -3
- package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -6
- package/dist/layouts/Web/create-api-client-web.d.ts +3 -3
- package/dist/libs/create-client.d.ts +3 -3
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +50 -50
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/store.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +60 -62
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +142 -141
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +11 -11
|
@@ -218,7 +218,7 @@ const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "bor
|
|
|
218
218
|
default: o(() => [
|
|
219
219
|
$("div", A, [
|
|
220
220
|
a(r(b), {
|
|
221
|
-
class: "mr-
|
|
221
|
+
class: "mr-0.75 p-0 px-2 py-0.5",
|
|
222
222
|
loading: r(y),
|
|
223
223
|
size: "sm",
|
|
224
224
|
variant: "outlined",
|
|
@@ -49,7 +49,7 @@ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
|
|
|
49
49
|
return [
|
|
50
50
|
n(t(B), {
|
|
51
51
|
class: b([
|
|
52
|
-
"group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pl-3
|
|
52
|
+
"group/scopes-accordion hover:text-c-1 pr-2.25 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pl-3 text-left",
|
|
53
53
|
(((h = (s = e.flow) == null ? void 0 : s.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
|
|
54
54
|
])
|
|
55
55
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"AA6PA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AAKxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQ1D,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,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA0aF,wBAMG"}
|
|
@@ -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-fc488741"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as F, computed as N, ref as P, openBlock as a, createElementBlock as n, Fragment as p, renderList as U, createBlock as x, unref as d, normalizeClass as C, withCtx as l, createVNode as u, createTextVNode as y, toDisplayString as m, createCommentVNode as v, mergeProps as V, createElementVNode as T, capitalize as _ } from "vue";
|
|
2
|
+
import { useWorkspace as j } from "../../../../store/store.js";
|
|
3
|
+
import q from "./OAuth2.vue.js";
|
|
4
4
|
import w from "./RequestAuthDataTableInput.vue.js";
|
|
5
5
|
import s from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
6
6
|
import S from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
7
|
-
const
|
|
7
|
+
const R = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "flex min-h-8 border-t text-sm"
|
|
10
|
-
},
|
|
10
|
+
}, z = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, L = ["onClick"], M = { class: "relative z-10" }, Q = {
|
|
11
11
|
key: 5,
|
|
12
12
|
class: "text-c-3 bg-b-1 flex min-h-16 items-center justify-center border-t px-4 text-sm"
|
|
13
|
-
},
|
|
13
|
+
}, J = /* @__PURE__ */ F({
|
|
14
14
|
__name: "RequestAuthTab",
|
|
15
15
|
props: {
|
|
16
16
|
collection: {},
|
|
@@ -21,28 +21,29 @@ const z = {
|
|
|
21
21
|
server: {},
|
|
22
22
|
workspace: {}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const { securitySchemes: B, securitySchemeMutators: I } =
|
|
26
|
-
() =>
|
|
24
|
+
setup(c) {
|
|
25
|
+
const { securitySchemes: B, securitySchemeMutators: I } = j(), g = N(
|
|
26
|
+
() => c.securitySchemeUids.map((t) => ({
|
|
27
27
|
scheme: B[t]
|
|
28
28
|
}))
|
|
29
|
-
), i =
|
|
29
|
+
), i = P(""), K = (t) => {
|
|
30
|
+
const r = t.description ? `: ${t.description}` : "", e = `${_(t.nameKey)}${r || `: ${t.type}`}`;
|
|
30
31
|
if (t.type === "apiKey")
|
|
31
|
-
return `${
|
|
32
|
+
return `${_(t.nameKey)}${r || `: ${t.in}`}`;
|
|
32
33
|
if (t.type === "oauth2") {
|
|
33
|
-
const
|
|
34
|
-
return `${
|
|
34
|
+
const o = Object.values(t.flows ?? {})[0];
|
|
35
|
+
return `${_(t.nameKey)}: ${i.value ? i.value : (o == null ? void 0 : o.type) ?? ""}${r}`;
|
|
35
36
|
}
|
|
36
|
-
return t.type === "http" ? `${
|
|
37
|
-
}, k = (t, r, e) => I.edit(t, r, e),
|
|
38
|
-
environment:
|
|
39
|
-
envVariables:
|
|
40
|
-
workspace:
|
|
37
|
+
return t.type === "http" ? `${_(t.nameKey)}: ${t.scheme}${r}` : `${e}${r}`;
|
|
38
|
+
}, k = (t, r, e) => I.edit(t, r, e), b = {
|
|
39
|
+
environment: c.environment,
|
|
40
|
+
envVariables: c.envVariables,
|
|
41
|
+
workspace: c.workspace
|
|
41
42
|
};
|
|
42
|
-
return (t, r) => (
|
|
43
|
+
return (t, r) => (a(!0), n(p, null, U(g.value, ({ scheme: e }) => (a(), n(p, {
|
|
43
44
|
key: e == null ? void 0 : e.uid
|
|
44
45
|
}, [
|
|
45
|
-
|
|
46
|
+
g.value.length > 1 ? (a(), x(d(s), {
|
|
46
47
|
key: 0,
|
|
47
48
|
class: C({
|
|
48
49
|
"request-example-references-header": t.layout === "reference"
|
|
@@ -50,39 +51,36 @@ const z = {
|
|
|
50
51
|
}, {
|
|
51
52
|
default: l(() => [
|
|
52
53
|
u(d(S), {
|
|
53
|
-
class: C([
|
|
54
|
-
"text-c-3 flex items-center pl-3 font-medium",
|
|
55
|
-
t.layout === "reference" && `border-t ${F !== 0 ? "mt-2" : ""}`
|
|
56
|
-
])
|
|
54
|
+
class: C(["auth-bg-description text-c-2 flex items-center pl-3", t.layout === "reference" && "border-b"])
|
|
57
55
|
}, {
|
|
58
56
|
default: l(() => [
|
|
59
|
-
y(
|
|
57
|
+
y(m(K(e)), 1)
|
|
60
58
|
]),
|
|
61
59
|
_: 2
|
|
62
60
|
}, 1032, ["class"])
|
|
63
61
|
]),
|
|
64
62
|
_: 2
|
|
65
|
-
}, 1032, ["class"])) :
|
|
66
|
-
e != null && e.description ? (
|
|
63
|
+
}, 1032, ["class"])) : v("", !0),
|
|
64
|
+
e != null && e.description && g.value.length <= 1 ? (a(), x(d(s), { key: 1 }, {
|
|
67
65
|
default: l(() => [
|
|
68
|
-
u(d(S), { class: "text-c-
|
|
66
|
+
u(d(S), { class: "auth-bg-description text-c-2 flex items-center overflow-auto whitespace-nowrap pl-3" }, {
|
|
69
67
|
default: l(() => [
|
|
70
|
-
y(
|
|
68
|
+
y(m(e.description), 1)
|
|
71
69
|
]),
|
|
72
70
|
_: 2
|
|
73
71
|
}, 1024)
|
|
74
72
|
]),
|
|
75
73
|
_: 2
|
|
76
|
-
}, 1024)) :
|
|
77
|
-
(e == null ? void 0 : e.type) === "http" ? (
|
|
78
|
-
e.scheme === "bearer" ? (
|
|
74
|
+
}, 1024)) : v("", !0),
|
|
75
|
+
(e == null ? void 0 : e.type) === "http" ? (a(), n(p, { key: 2 }, [
|
|
76
|
+
e.scheme === "bearer" ? (a(), x(d(s), { key: 0 }, {
|
|
79
77
|
default: l(() => [
|
|
80
|
-
u(w, V({ ref_for: !0 },
|
|
78
|
+
u(w, V({ ref_for: !0 }, b, {
|
|
81
79
|
containerClass: t.layout === "reference" && "border-t",
|
|
82
80
|
modelValue: e.token,
|
|
83
81
|
placeholder: "Token",
|
|
84
82
|
type: "password",
|
|
85
|
-
"onUpdate:modelValue": (
|
|
83
|
+
"onUpdate:modelValue": (o) => k(e.uid, "token", o)
|
|
86
84
|
}), {
|
|
87
85
|
default: l(() => r[0] || (r[0] = [
|
|
88
86
|
y(" Bearer Token ")
|
|
@@ -91,16 +89,16 @@ const z = {
|
|
|
91
89
|
}, 1040, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
92
90
|
]),
|
|
93
91
|
_: 2
|
|
94
|
-
}, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (
|
|
92
|
+
}, 1024)) : (e == null ? void 0 : e.scheme) === "basic" ? (a(), n(p, { key: 1 }, [
|
|
95
93
|
u(d(s), null, {
|
|
96
94
|
default: l(() => [
|
|
97
|
-
u(w, V({ ref_for: !0 },
|
|
95
|
+
u(w, V({ ref_for: !0 }, b, {
|
|
98
96
|
class: "text-c-2",
|
|
99
97
|
containerClass: t.layout === "reference" && "auth-blend-required border-t",
|
|
100
98
|
modelValue: e.username,
|
|
101
99
|
placeholder: "janedoe",
|
|
102
100
|
required: "",
|
|
103
|
-
"onUpdate:modelValue": (
|
|
101
|
+
"onUpdate:modelValue": (o) => k(e.uid, "username", o)
|
|
104
102
|
}), {
|
|
105
103
|
default: l(() => r[1] || (r[1] = [
|
|
106
104
|
y(" Username ")
|
|
@@ -112,11 +110,11 @@ const z = {
|
|
|
112
110
|
}, 1024),
|
|
113
111
|
u(d(s), null, {
|
|
114
112
|
default: l(() => [
|
|
115
|
-
u(w, V({ ref_for: !0 },
|
|
113
|
+
u(w, V({ ref_for: !0 }, b, {
|
|
116
114
|
modelValue: e.password,
|
|
117
115
|
placeholder: "********",
|
|
118
116
|
type: "password",
|
|
119
|
-
"onUpdate:modelValue": (
|
|
117
|
+
"onUpdate:modelValue": (o) => k(e.uid, "password", o)
|
|
120
118
|
}), {
|
|
121
119
|
default: l(() => r[2] || (r[2] = [
|
|
122
120
|
y(" Password ")
|
|
@@ -126,15 +124,15 @@ const z = {
|
|
|
126
124
|
]),
|
|
127
125
|
_: 2
|
|
128
126
|
}, 1024)
|
|
129
|
-
], 64)) :
|
|
130
|
-
], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (
|
|
127
|
+
], 64)) : v("", !0)
|
|
128
|
+
], 64)) : (e == null ? void 0 : e.type) === "apiKey" ? (a(), n(p, { key: 3 }, [
|
|
131
129
|
u(d(s), null, {
|
|
132
130
|
default: l(() => [
|
|
133
|
-
u(w, V({ ref_for: !0 },
|
|
131
|
+
u(w, V({ ref_for: !0 }, b, {
|
|
134
132
|
containerClass: t.layout === "reference" && "border-t",
|
|
135
133
|
modelValue: e.name,
|
|
136
134
|
placeholder: "api-key",
|
|
137
|
-
"onUpdate:modelValue": (
|
|
135
|
+
"onUpdate:modelValue": (o) => k(e.uid, "name", o)
|
|
138
136
|
}), {
|
|
139
137
|
default: l(() => r[3] || (r[3] = [
|
|
140
138
|
y(" Name ")
|
|
@@ -146,10 +144,10 @@ const z = {
|
|
|
146
144
|
}, 1024),
|
|
147
145
|
u(d(s), null, {
|
|
148
146
|
default: l(() => [
|
|
149
|
-
u(w, V({ ref_for: !0 },
|
|
147
|
+
u(w, V({ ref_for: !0 }, b, {
|
|
150
148
|
modelValue: e.value,
|
|
151
149
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
152
|
-
"onUpdate:modelValue": (
|
|
150
|
+
"onUpdate:modelValue": (o) => k(e.uid, "value", o)
|
|
153
151
|
}), {
|
|
154
152
|
default: l(() => r[4] || (r[4] = [
|
|
155
153
|
y(" Value ")
|
|
@@ -159,43 +157,43 @@ const z = {
|
|
|
159
157
|
]),
|
|
160
158
|
_: 2
|
|
161
159
|
}, 1024)
|
|
162
|
-
], 64)) : (e == null ? void 0 : e.type) === "oauth2" ? (
|
|
160
|
+
], 64)) : (e == null ? void 0 : e.type) === "oauth2" ? (a(), n(p, { key: 4 }, [
|
|
163
161
|
u(d(s), null, {
|
|
164
162
|
default: l(() => [
|
|
165
|
-
Object.keys(e.flows).length > 1 ? (
|
|
166
|
-
T("div",
|
|
167
|
-
(
|
|
163
|
+
Object.keys(e.flows).length > 1 ? (a(), n("div", R, [
|
|
164
|
+
T("div", z, [
|
|
165
|
+
(a(!0), n(p, null, U(e == null ? void 0 : e.flows, (o, f, $) => (a(), n("button", {
|
|
168
166
|
key: f,
|
|
169
167
|
class: C(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium", {
|
|
170
|
-
"!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (i.value === f ||
|
|
171
|
-
"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (i.value === f ||
|
|
168
|
+
"!text-c-1 !rounded-none border-b-[1px] !border-current": t.layout !== "reference" && (i.value === f || $ === 0 && !i.value),
|
|
169
|
+
"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100": t.layout === "reference" && (i.value === f || $ === 0 && !i.value)
|
|
172
170
|
}]),
|
|
173
171
|
type: "button",
|
|
174
|
-
onClick: (
|
|
172
|
+
onClick: (D) => i.value = f
|
|
175
173
|
}, [
|
|
176
|
-
T("span",
|
|
177
|
-
], 10,
|
|
174
|
+
T("span", M, m(f), 1)
|
|
175
|
+
], 10, L))), 128))
|
|
178
176
|
])
|
|
179
|
-
])) :
|
|
177
|
+
])) : v("", !0)
|
|
180
178
|
]),
|
|
181
179
|
_: 2
|
|
182
180
|
}, 1024),
|
|
183
|
-
(
|
|
184
|
-
i.value === f ||
|
|
181
|
+
(a(!0), n(p, null, U(e == null ? void 0 : e.flows, (o, f, $) => (a(), n(p, { key: f }, [
|
|
182
|
+
i.value === f || $ === 0 && !i.value ? (a(), x(q, V({
|
|
185
183
|
key: 0,
|
|
186
184
|
ref_for: !0
|
|
187
|
-
},
|
|
185
|
+
}, b, {
|
|
188
186
|
collection: t.collection,
|
|
189
|
-
flow:
|
|
187
|
+
flow: o,
|
|
190
188
|
scheme: e,
|
|
191
189
|
server: t.server,
|
|
192
190
|
workspace: t.workspace
|
|
193
|
-
}), null, 16, ["collection", "flow", "scheme", "server", "workspace"])) :
|
|
191
|
+
}), null, 16, ["collection", "flow", "scheme", "server", "workspace"])) : v("", !0)
|
|
194
192
|
], 64))), 128))
|
|
195
|
-
], 64)) : (e == null ? void 0 : e.type) === "openIdConnect" ? (
|
|
193
|
+
], 64)) : (e == null ? void 0 : e.type) === "openIdConnect" ? (a(), n("div", Q, " Coming soon ")) : v("", !0)
|
|
196
194
|
], 64))), 128));
|
|
197
195
|
}
|
|
198
196
|
});
|
|
199
197
|
export {
|
|
200
|
-
|
|
198
|
+
J as default
|
|
201
199
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";;;cA4iBuC,MAAM;aAAO,MAAM;;;;;cAAnB,MAAM;aAAO,MAAM;;;AAoxB1D,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4c3a7c58"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|