@scalar/api-client 2.2.7 → 2.2.9
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 +27 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +65 -65
- package/dist/components/CodeInput/codeVariableWidget.d.ts +6 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +72 -68
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +108 -106
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +12 -12
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +20 -15
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +16 -11
- package/dist/components/DataTable/DataTableHeader.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableHeader.vue.js +11 -12
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +9 -9
- package/dist/components/DataTable/index.js +14 -14
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +87 -67
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +2 -2
- package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarList.vue.js +4 -4
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +8 -4
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue2.js +52 -32
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +3 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +43 -31
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +32 -31
- package/dist/layouts/App/create-api-client-app.d.ts +49 -42
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +103 -89
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +31 -19
- package/dist/layouts/Web/create-api-client-web.d.ts +49 -42
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +50 -44
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/env-helpers.d.ts +9 -0
- package/dist/libs/env-helpers.d.ts.map +1 -0
- package/dist/libs/env-helpers.js +4 -0
- package/dist/libs/environment-parser.d.ts +3 -4
- package/dist/libs/environment-parser.d.ts.map +1 -1
- package/dist/libs/environment-parser.js +5 -4
- package/dist/libs/index.d.ts +2 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +28 -22
- package/dist/libs/postman.d.ts +11 -0
- package/dist/libs/postman.d.ts.map +1 -0
- package/dist/libs/postman.js +39 -0
- package/dist/libs/send-request/send-request.d.ts +5 -2
- package/dist/libs/send-request/send-request.d.ts.map +1 -1
- package/dist/libs/send-request/send-request.js +106 -104
- package/dist/routes.d.ts +11 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +13 -7
- package/dist/store/active-entities.d.ts +18 -11
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +108 -69
- package/dist/store/collections.d.ts +17 -15
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +62 -41
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +7 -3
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/router-params.d.ts +1 -1
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/router-params.js +7 -7
- package/dist/store/store.d.ts +49 -42
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +76 -72
- package/dist/store/workspace.d.ts +12 -12
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/vue.d.ts +10 -0
- package/dist/types/vue.d.ts.map +1 -0
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +75 -70
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +308 -152
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.js +20 -18
- package/dist/views/Environment/EnvironmentColors.vue.d.ts +4 -1
- package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentColors.vue.js +83 -58
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +7 -0
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +119 -37
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +4 -5
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +73 -63
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +60 -61
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +185 -187
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -24
- 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 +35 -187
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +207 -0
- package/dist/views/Request/RequestSection/{RequestAuthDataTableInput.vue.d.ts → RequestAuth/RequestAuthDataTableInput.vue.d.ts} +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +43 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +5 -134
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +176 -2
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +139 -117
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +32 -38
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +3 -3
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +9 -8
- package/package.json +19 -8
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.js +0 -46
- /package/dist/views/Request/RequestSection/{RequestAuthDataTableInput.vue2.js → RequestAuth/RequestAuthDataTableInput.vue2.js} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as p, useId as m, openBlock as f, createBlock as V, mergeProps as y, unref as u, withCtx as r, createElementVNode as c, renderSlot as s } from "vue";
|
|
2
|
+
import C from "../../../../components/DataTable/DataTableInput.vue.js";
|
|
3
|
+
const B = ["for"], I = /* @__PURE__ */ p({
|
|
4
|
+
__name: "RequestAuthDataTableInput",
|
|
5
|
+
props: {
|
|
6
|
+
type: {},
|
|
7
|
+
containerClass: {},
|
|
8
|
+
required: { type: Boolean, default: !1 },
|
|
9
|
+
modelValue: {},
|
|
10
|
+
readOnly: { type: Boolean, default: !1 }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
|
|
13
|
+
setup(d, { emit: i }) {
|
|
14
|
+
const t = d, n = i, a = m();
|
|
15
|
+
return (o, e) => (f(), V(C, y({
|
|
16
|
+
id: u(a),
|
|
17
|
+
canAddCustomEnumValue: !t.readOnly,
|
|
18
|
+
containerClass: t.containerClass,
|
|
19
|
+
modelValue: t.modelValue,
|
|
20
|
+
readOnly: t.readOnly,
|
|
21
|
+
required: t.required,
|
|
22
|
+
type: t.type
|
|
23
|
+
}, o.$attrs, {
|
|
24
|
+
onInputBlur: e[0] || (e[0] = (l) => n("inputBlur")),
|
|
25
|
+
onInputFocus: e[1] || (e[1] = (l) => n("inputFocus")),
|
|
26
|
+
onSelectVariable: e[2] || (e[2] = (l) => n("selectVariable", l)),
|
|
27
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => n("update:modelValue", l))
|
|
28
|
+
}), {
|
|
29
|
+
default: r(() => [
|
|
30
|
+
c("label", { for: u(a) }, [
|
|
31
|
+
s(o.$slots, "default")
|
|
32
|
+
], 8, B)
|
|
33
|
+
]),
|
|
34
|
+
icon: r(() => [
|
|
35
|
+
s(o.$slots, "icon")
|
|
36
|
+
]),
|
|
37
|
+
_: 3
|
|
38
|
+
}, 16, ["id", "canAddCustomEnumValue", "containerClass", "modelValue", "readOnly", "required", "type"]));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
I as default
|
|
43
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
selectedSecuritySchemeUids: string[];
|
|
3
|
+
layout?: 'client' | 'reference';
|
|
3
4
|
};
|
|
4
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA8NA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AA+YF,wBAMG"}
|
|
@@ -1,136 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import m from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
6
|
-
import C from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
7
|
-
import { useWorkspace as E } from "../../../../store/store.js";
|
|
8
|
-
const j = /* @__PURE__ */ g({
|
|
9
|
-
__name: "RequestExampleAuth",
|
|
10
|
-
props: {
|
|
11
|
-
selectedSecuritySchemeUids: {}
|
|
12
|
-
},
|
|
13
|
-
setup(_) {
|
|
14
|
-
const { activeCollection: $, activeRequest: c } = F(), { securitySchemes: w, securitySchemeMutators: v } = E(), k = T(() => !$.value || !c.value ? [] : _.selectedSecuritySchemeUids.map((a) => ({
|
|
15
|
-
scheme: w[a]
|
|
16
|
-
}))), S = (a) => {
|
|
17
|
-
if (a.type !== "oauth2")
|
|
18
|
-
return `${x(a.nameKey)}: ${a.type}`;
|
|
19
|
-
const t = Object.values(a.flows ?? {})[0];
|
|
20
|
-
return `${x(a.nameKey)}: ${a.type} ${a.type === "oauth2" && t ? t.type : ""}`;
|
|
21
|
-
}, s = (a, t, e) => v.edit(a, t, e);
|
|
22
|
-
return (a, t) => (d(!0), n(i, null, U(k.value, ({ scheme: e }) => (d(), n(i, {
|
|
23
|
-
key: e.uid
|
|
24
|
-
}, [
|
|
25
|
-
u(r(m), { class: "group/delete" }, {
|
|
26
|
-
default: l(() => [
|
|
27
|
-
k.value.length > 1 ? (d(), y(r(C), {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "text-c-3 pl-2 font-medium flex items-center"
|
|
30
|
-
}, {
|
|
31
|
-
default: l(() => [
|
|
32
|
-
p(B(S(e)), 1)
|
|
33
|
-
]),
|
|
34
|
-
_: 2
|
|
35
|
-
}, 1024)) : V("", !0)
|
|
36
|
-
]),
|
|
37
|
-
_: 2
|
|
38
|
-
}, 1024),
|
|
39
|
-
e.type === "http" ? (d(), n(i, { key: 0 }, [
|
|
40
|
-
e.scheme === "bearer" ? (d(), y(r(m), { key: 0 }, {
|
|
41
|
-
default: l(() => [
|
|
42
|
-
u(f, {
|
|
43
|
-
id: `http-bearer-token-${e.uid}`,
|
|
44
|
-
modelValue: e.token,
|
|
45
|
-
placeholder: "Token",
|
|
46
|
-
type: "password",
|
|
47
|
-
"onUpdate:modelValue": (o) => s(e.uid, "token", o)
|
|
48
|
-
}, {
|
|
49
|
-
default: l(() => t[0] || (t[0] = [
|
|
50
|
-
p(" Bearer Token ")
|
|
51
|
-
])),
|
|
52
|
-
_: 2
|
|
53
|
-
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
54
|
-
]),
|
|
55
|
-
_: 2
|
|
56
|
-
}, 1024)) : e.scheme === "basic" ? (d(), n(i, { key: 1 }, [
|
|
57
|
-
u(r(m), null, {
|
|
58
|
-
default: l(() => [
|
|
59
|
-
u(f, {
|
|
60
|
-
id: `http-basic-username-${e.uid}`,
|
|
61
|
-
class: "text-c-2",
|
|
62
|
-
modelValue: e.username,
|
|
63
|
-
placeholder: "ScalarEnjoyer01",
|
|
64
|
-
required: "",
|
|
65
|
-
"onUpdate:modelValue": (o) => s(e.uid, "username", o)
|
|
66
|
-
}, {
|
|
67
|
-
default: l(() => t[1] || (t[1] = [
|
|
68
|
-
p(" Username ")
|
|
69
|
-
])),
|
|
70
|
-
_: 2
|
|
71
|
-
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
72
|
-
]),
|
|
73
|
-
_: 2
|
|
74
|
-
}, 1024),
|
|
75
|
-
u(r(m), null, {
|
|
76
|
-
default: l(() => [
|
|
77
|
-
u(f, {
|
|
78
|
-
id: `http-basic-password-${e.uid}`,
|
|
79
|
-
modelValue: e.password,
|
|
80
|
-
placeholder: "xxxxxx",
|
|
81
|
-
type: "password",
|
|
82
|
-
"onUpdate:modelValue": (o) => s(e.uid, "password", o)
|
|
83
|
-
}, {
|
|
84
|
-
default: l(() => t[2] || (t[2] = [
|
|
85
|
-
p(" Password ")
|
|
86
|
-
])),
|
|
87
|
-
_: 2
|
|
88
|
-
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
89
|
-
]),
|
|
90
|
-
_: 2
|
|
91
|
-
}, 1024)
|
|
92
|
-
], 64)) : V("", !0)
|
|
93
|
-
], 64)) : e.type === "apiKey" ? (d(), n(i, { key: 1 }, [
|
|
94
|
-
u(r(m), null, {
|
|
95
|
-
default: l(() => [
|
|
96
|
-
u(f, {
|
|
97
|
-
id: `api-key-name-${e.uid}`,
|
|
98
|
-
modelValue: e.name,
|
|
99
|
-
placeholder: "api-key",
|
|
100
|
-
"onUpdate:modelValue": (o) => s(e.uid, "name", o)
|
|
101
|
-
}, {
|
|
102
|
-
default: l(() => t[3] || (t[3] = [
|
|
103
|
-
p(" Name ")
|
|
104
|
-
])),
|
|
105
|
-
_: 2
|
|
106
|
-
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
107
|
-
]),
|
|
108
|
-
_: 2
|
|
109
|
-
}, 1024),
|
|
110
|
-
u(r(m), null, {
|
|
111
|
-
default: l(() => [
|
|
112
|
-
u(f, {
|
|
113
|
-
id: `api-key-value-add-${e.uid}`,
|
|
114
|
-
modelValue: e.value,
|
|
115
|
-
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
116
|
-
"onUpdate:modelValue": (o) => s(e.uid, "value", o)
|
|
117
|
-
}, {
|
|
118
|
-
default: l(() => t[4] || (t[4] = [
|
|
119
|
-
p(" Value ")
|
|
120
|
-
])),
|
|
121
|
-
_: 2
|
|
122
|
-
}, 1032, ["id", "modelValue", "onUpdate:modelValue"])
|
|
123
|
-
]),
|
|
124
|
-
_: 2
|
|
125
|
-
}, 1024)
|
|
126
|
-
], 64)) : e.type === "oauth2" ? (d(!0), n(i, { key: 2 }, U(e.flows, (o, b) => (d(), y(R, {
|
|
127
|
-
key: b,
|
|
128
|
-
flow: o,
|
|
129
|
-
scheme: e
|
|
130
|
-
}, null, 8, ["flow", "scheme"]))), 128)) : V("", !0)
|
|
131
|
-
], 64))), 128));
|
|
132
|
-
}
|
|
133
|
-
});
|
|
1
|
+
import t from "./RequestExampleAuth.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8225a482"]]);
|
|
134
5
|
export {
|
|
135
|
-
|
|
6
|
+
p as default
|
|
136
7
|
};
|
|
@@ -1,4 +1,178 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as n, Fragment as s, renderList as k, createBlock as x, unref as p, normalizeClass as v, withCtx as a, createVNode as u, createTextVNode as f, toDisplayString as _, createCommentVNode as g, createElementVNode as C, capitalize as w } from "vue";
|
|
2
|
+
import q from "./OAuth2.vue.js";
|
|
3
|
+
import y from "./RequestAuthDataTableInput.vue.js";
|
|
4
|
+
import b from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
5
|
+
import I from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
6
|
+
import { useWorkspace as j } from "../../../../store/store.js";
|
|
7
|
+
const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"], O = /* @__PURE__ */ K({
|
|
8
|
+
__name: "RequestExampleAuth",
|
|
9
|
+
props: {
|
|
10
|
+
selectedSecuritySchemeUids: {},
|
|
11
|
+
layout: { default: "client" }
|
|
12
|
+
},
|
|
13
|
+
setup(U) {
|
|
14
|
+
const { securitySchemes: S, securitySchemeMutators: F } = j(), $ = N(
|
|
15
|
+
() => U.selectedSecuritySchemeUids.map((e) => ({
|
|
16
|
+
scheme: S[e]
|
|
17
|
+
}))
|
|
18
|
+
), d = R(""), T = (e) => {
|
|
19
|
+
if (e.type === "apiKey")
|
|
20
|
+
return `${w(e.nameKey)}: ${e.in}`;
|
|
21
|
+
if (e.type === "oauth2") {
|
|
22
|
+
const l = Object.values(e.flows ?? {})[0];
|
|
23
|
+
return `${w(e.nameKey)}: ${d.value ? d.value : l.type}`;
|
|
24
|
+
}
|
|
25
|
+
return e.type === "http" ? `${w(e.nameKey)}: ${e.scheme}` : `${w(e.nameKey)}: ${e.type}`;
|
|
26
|
+
}, c = (e, l, t) => F.edit(e, l, t), m = (e = "") => U.layout === "reference" ? `bg-b-2 border-l-1/2 last:border-r-1/2 group-last:border-b-border ${e}` : "";
|
|
27
|
+
return (e, l) => (r(!0), n(s, null, k($.value, ({ scheme: t }, B) => (r(), n(s, {
|
|
28
|
+
key: t.uid
|
|
29
|
+
}, [
|
|
30
|
+
$.value.length > 1 ? (r(), x(p(b), {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: v({ "request-example-references-header": e.layout === "reference" })
|
|
33
|
+
}, {
|
|
34
|
+
default: a(() => [
|
|
35
|
+
u(p(I), {
|
|
36
|
+
class: v([
|
|
37
|
+
"text-c-3 pl-2 font-medium flex items-center",
|
|
38
|
+
m(
|
|
39
|
+
`bg-b-1 rounded-t border-t-1/2 ${B !== 0 ? "mt-2" : ""}`
|
|
40
|
+
)
|
|
41
|
+
])
|
|
42
|
+
}, {
|
|
43
|
+
default: a(() => [
|
|
44
|
+
f(_(T(t)), 1)
|
|
45
|
+
]),
|
|
46
|
+
_: 2
|
|
47
|
+
}, 1032, ["class"])
|
|
48
|
+
]),
|
|
49
|
+
_: 2
|
|
50
|
+
}, 1032, ["class"])) : g("", !0),
|
|
51
|
+
t.type === "http" ? (r(), n(s, { key: 1 }, [
|
|
52
|
+
t.scheme === "bearer" ? (r(), x(p(b), { key: 0 }, {
|
|
53
|
+
default: a(() => [
|
|
54
|
+
u(y, {
|
|
55
|
+
containerClass: m("bg-b-2 rounded border-1/2"),
|
|
56
|
+
modelValue: t.token,
|
|
57
|
+
placeholder: "Token",
|
|
58
|
+
type: "password",
|
|
59
|
+
"onUpdate:modelValue": (o) => c(t.uid, "token", o)
|
|
60
|
+
}, {
|
|
61
|
+
default: a(() => l[0] || (l[0] = [
|
|
62
|
+
f(" Bearer Token ")
|
|
63
|
+
])),
|
|
64
|
+
_: 2
|
|
65
|
+
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
66
|
+
]),
|
|
67
|
+
_: 2
|
|
68
|
+
}, 1024)) : t.scheme === "basic" ? (r(), n(s, { key: 1 }, [
|
|
69
|
+
u(p(b), null, {
|
|
70
|
+
default: a(() => [
|
|
71
|
+
u(y, {
|
|
72
|
+
class: "text-c-2",
|
|
73
|
+
containerClass: m(
|
|
74
|
+
"auth-blend-required bg-b-2 rounded-t border-t-1/2"
|
|
75
|
+
),
|
|
76
|
+
modelValue: t.username,
|
|
77
|
+
placeholder: "janedoe",
|
|
78
|
+
required: "",
|
|
79
|
+
"onUpdate:modelValue": (o) => c(t.uid, "username", o)
|
|
80
|
+
}, {
|
|
81
|
+
default: a(() => l[1] || (l[1] = [
|
|
82
|
+
f(" Username ")
|
|
83
|
+
])),
|
|
84
|
+
_: 2
|
|
85
|
+
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
86
|
+
]),
|
|
87
|
+
_: 2
|
|
88
|
+
}, 1024),
|
|
89
|
+
u(p(b), null, {
|
|
90
|
+
default: a(() => [
|
|
91
|
+
u(y, {
|
|
92
|
+
containerClass: m("bg-b-2 rounded-b border-b-1/2"),
|
|
93
|
+
modelValue: t.password,
|
|
94
|
+
placeholder: "********",
|
|
95
|
+
type: "password",
|
|
96
|
+
"onUpdate:modelValue": (o) => c(t.uid, "password", o)
|
|
97
|
+
}, {
|
|
98
|
+
default: a(() => l[2] || (l[2] = [
|
|
99
|
+
f(" Password ")
|
|
100
|
+
])),
|
|
101
|
+
_: 2
|
|
102
|
+
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
103
|
+
]),
|
|
104
|
+
_: 2
|
|
105
|
+
}, 1024)
|
|
106
|
+
], 64)) : g("", !0)
|
|
107
|
+
], 64)) : t.type === "apiKey" ? (r(), n(s, { key: 2 }, [
|
|
108
|
+
u(p(b), null, {
|
|
109
|
+
default: a(() => [
|
|
110
|
+
u(y, {
|
|
111
|
+
containerClass: m("bg-b-2 rounded-t border-t-1/2"),
|
|
112
|
+
modelValue: t.name,
|
|
113
|
+
placeholder: "api-key",
|
|
114
|
+
"onUpdate:modelValue": (o) => c(t.uid, "name", o)
|
|
115
|
+
}, {
|
|
116
|
+
default: a(() => l[3] || (l[3] = [
|
|
117
|
+
f(" Name ")
|
|
118
|
+
])),
|
|
119
|
+
_: 2
|
|
120
|
+
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, 1024),
|
|
124
|
+
u(p(b), null, {
|
|
125
|
+
default: a(() => [
|
|
126
|
+
u(y, {
|
|
127
|
+
containerClass: m("bg-b-2 rounded-b border-b-1/2"),
|
|
128
|
+
modelValue: t.value,
|
|
129
|
+
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
130
|
+
"onUpdate:modelValue": (o) => c(t.uid, "value", o)
|
|
131
|
+
}, {
|
|
132
|
+
default: a(() => l[4] || (l[4] = [
|
|
133
|
+
f(" Value ")
|
|
134
|
+
])),
|
|
135
|
+
_: 2
|
|
136
|
+
}, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
|
|
137
|
+
]),
|
|
138
|
+
_: 2
|
|
139
|
+
}, 1024)
|
|
140
|
+
], 64)) : t.type === "oauth2" ? (r(), n(s, { key: 3 }, [
|
|
141
|
+
u(p(b), null, {
|
|
142
|
+
default: a(() => [
|
|
143
|
+
C("div", {
|
|
144
|
+
class: v(["min-h-8 min-w-8 flex text-sm border-t-1/2 last:border-r-0 p-0 m-0 relative row", {
|
|
145
|
+
"border-1/2 border-b-0 rounded-t bg-b-2": e.layout === "reference"
|
|
146
|
+
}])
|
|
147
|
+
}, [
|
|
148
|
+
l[5] || (l[5] = C("div", { class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0" }, " Flow ", -1)),
|
|
149
|
+
C("div", E, [
|
|
150
|
+
(r(!0), n(s, null, k(t.flows, (o, i, V) => (r(), n("button", {
|
|
151
|
+
key: i,
|
|
152
|
+
class: v(["h-6 scalar-button scalar-row cursor-pointer items-center justify-center rounded font-medium text-xs scalar-button-outlined border border-solid border-border text-c-1 hover:bg-b-2 p-0 px-2", {
|
|
153
|
+
"bg-b-3": e.layout === "client" && (d.value === i || V === 0 && !d.value),
|
|
154
|
+
"bg-b-1": e.layout === "reference" && (d.value === i || V === 0 && !d.value)
|
|
155
|
+
}]),
|
|
156
|
+
type: "button",
|
|
157
|
+
onClick: (P) => d.value = i
|
|
158
|
+
}, _(i), 11, M))), 128))
|
|
159
|
+
])
|
|
160
|
+
], 2)
|
|
161
|
+
]),
|
|
162
|
+
_: 2
|
|
163
|
+
}, 1024),
|
|
164
|
+
(r(!0), n(s, null, k(t.flows, (o, i, V) => (r(), n(s, { key: i }, [
|
|
165
|
+
d.value === i || V === 0 && !d.value ? (r(), x(q, {
|
|
166
|
+
key: 0,
|
|
167
|
+
flow: o,
|
|
168
|
+
layout: e.layout,
|
|
169
|
+
scheme: t
|
|
170
|
+
}, null, 8, ["flow", "layout", "scheme"])) : g("", !0)
|
|
171
|
+
], 64))), 128))
|
|
172
|
+
], 64)) : g("", !0)
|
|
173
|
+
], 64))), 128));
|
|
174
|
+
}
|
|
175
|
+
});
|
|
2
176
|
export {
|
|
3
|
-
|
|
177
|
+
O as default
|
|
4
178
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA"}
|
|
@@ -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":"AAubA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAqpB1D,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */ o
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-36c16505"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|