@scalar/api-client 2.1.33 → 2.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  4. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  5. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  6. package/dist/components/ContextBar.vue.js +1 -1
  7. package/dist/components/ContextBar.vue2.js +6 -6
  8. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  9. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  10. package/dist/components/DataTable/DataTableInput.vue2.js +53 -40
  11. package/dist/components/ScalarHotkey.vue.d.ts +5 -6
  12. package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
  13. package/dist/components/ScalarHotkey.vue.js +9 -18
  14. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  15. package/dist/components/SideNav/SideNav.vue.js +2 -2
  16. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  17. package/dist/components/Sidebar/SidebarButton.vue.d.ts +4 -0
  18. package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
  19. package/dist/components/Sidebar/SidebarButton.vue.js +19 -17
  20. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  21. package/dist/components/TopNav/TopNav.vue.js +2 -2
  22. package/dist/components/TopNav/TopNav.vue2.js +14 -14
  23. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  24. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +8 -8
  28. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  29. package/dist/layouts/App/ApiClientApp.vue.js +35 -29
  30. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  31. package/dist/layouts/App/MainLayout.vue.js +4 -4
  32. package/dist/layouts/App/create-api-client-app.d.ts +257 -45
  33. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  34. package/dist/layouts/App/create-api-client-app.js +10 -10
  35. package/dist/layouts/App/hotkeys.js +1 -1
  36. package/dist/layouts/Modal/create-api-client-modal.d.ts +514 -90
  37. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  38. package/dist/layouts/Modal/create-api-client-modal.js +24 -22
  39. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  40. package/dist/layouts/Web/ApiClientWeb.vue.js +33 -27
  41. package/dist/layouts/Web/create-api-client-web.d.ts +258 -46
  42. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  43. package/dist/layouts/Web/create-api-client-web.js +9 -9
  44. package/dist/libs/create-client.d.ts +280 -50
  45. package/dist/libs/create-client.d.ts.map +1 -1
  46. package/dist/libs/create-client.js +25 -24
  47. package/dist/libs/hot-keys.d.ts +1 -1
  48. package/dist/libs/local-storage.d.ts +2 -2
  49. package/dist/libs/local-storage.d.ts.map +1 -1
  50. package/dist/libs/send-request.d.ts +2 -1
  51. package/dist/libs/send-request.d.ts.map +1 -1
  52. package/dist/libs/send-request.js +98 -97
  53. package/dist/router.d.ts +5 -5
  54. package/dist/router.d.ts.map +1 -1
  55. package/dist/router.js +32 -32
  56. package/dist/store/collections.d.ts +14 -4
  57. package/dist/store/collections.d.ts.map +1 -1
  58. package/dist/store/events.d.ts +1 -1
  59. package/dist/store/import-spec.d.ts +16 -31
  60. package/dist/store/import-spec.d.ts.map +1 -1
  61. package/dist/store/import-spec.js +43 -56
  62. package/dist/store/requests.d.ts +14 -14
  63. package/dist/store/store.d.ts +514 -90
  64. package/dist/store/store.d.ts.map +1 -1
  65. package/dist/store/store.js +43 -43
  66. package/dist/store/workspace.d.ts +10 -10
  67. package/dist/store/workspace.d.ts.map +1 -1
  68. package/dist/style.css +1 -1
  69. package/dist/views/Cookies/Cookies.vue.d.ts +5 -1
  70. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  71. package/dist/views/Cookies/Cookies.vue2.js +64 -55
  72. package/dist/views/Environment/Environment.vue.d.ts +5 -1
  73. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  74. package/dist/views/Environment/Environment.vue2.js +75 -66
  75. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  76. package/dist/views/Request/Request.vue.js +1 -1
  77. package/dist/views/Request/Request.vue2.js +96 -90
  78. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +21 -21
  79. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  80. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +79 -71
  81. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -0
  82. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  83. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  84. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +105 -112
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +5 -1
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +38 -35
  88. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +5 -1
  89. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  90. package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -118
  91. package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
  92. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  93. package/dist/views/Request/RequestSidebar.vue.js +4 -4
  94. package/dist/views/Request/RequestSidebar.vue2.js +43 -42
  95. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  96. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  97. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -26
  98. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  99. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
  100. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  101. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -99
  102. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +104 -2
  103. package/dist/views/Settings/SettingsGeneral.vue.js +3 -3
  104. package/dist/views/Settings/SettingsGeneralMode.vue.js +3 -3
  105. package/package.json +8 -8
  106. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
@@ -1,162 +1,168 @@
1
- import { defineComponent as z, ref as y, computed as J, watch as G, onMounted as K, onBeforeUnmount as P, openBlock as w, createElementBlock as X, Fragment as Y, createElementVNode as Z, normalizeClass as N, unref as s, createVNode as v, withCtx as V, createBlock as B, createCommentVNode as g } from "vue";
2
- import ee from "../../components/ImportCurl/ImportCurlModal.vue.js";
3
- import te from "../../components/ViewLayout/ViewLayout.vue.js";
4
- import oe from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
- import { importCurlCommand as re } from "../../libs/importers/curl.js";
6
- import { createRequestOperation as ae } from "../../libs/send-request.js";
7
- import se from "./RequestSection/RequestSection.vue.js";
8
- /* empty css */
9
- import ue from "./RequestSubpageHeader.vue.js";
10
- import le from "./ResponseSection/ResponseSection.vue.js";
11
- import { useOpenApiWatcher as ne } from "./hooks/useOpenApiWatcher.js";
12
- import { safeJSON as ie } from "@scalar/object-utils/parse";
13
- import { useToasts as me } from "@scalar/use-toasts";
1
+ import { defineComponent as P, ref as R, computed as N, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as w, createElementBlock as _, Fragment as ee, createElementVNode as te, normalizeClass as V, unref as a, createVNode as c, withCtx as B, createBlock as g, createCommentVNode as I } from "vue";
2
+ import oe from "../../components/ImportCurl/ImportCurlModal.vue.js";
3
+ import re from "../../components/ViewLayout/ViewLayout.vue.js";
4
+ import se from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
+ import { importCurlCommand as ae } from "../../libs/importers/curl.js";
6
+ import { createRequestOperation as ue } from "../../libs/send-request.js";
7
+ import le from "./RequestSection/RequestSection.vue.js";
8
+ import ne from "./RequestSubpageHeader.vue.js";
9
+ import ie from "./ResponseSection/ResponseSection.vue.js";
10
+ import { useOpenApiWatcher as me } from "./hooks/useOpenApiWatcher.js";
11
+ import { safeJSON as ce } from "@scalar/object-utils/parse";
12
+ import { useToasts as de } from "@scalar/use-toasts";
14
13
  import { useMediaQuery as ve } from "@vueuse/core";
15
- import { useRouter as de } from "vue-router";
16
- import ce from "./RequestSidebar.vue.js";
17
- import { ERRORS as pe } from "../../libs/errors.js";
18
- import { useWorkspace as fe } from "../../store/store.js";
19
- const Ue = /* @__PURE__ */ z({
14
+ import { useRouter as pe } from "vue-router";
15
+ import fe from "./RequestSidebar.vue.js";
16
+ import { ERRORS as ye } from "../../libs/errors.js";
17
+ import { useWorkspace as Re } from "../../store/store.js";
18
+ const Ae = /* @__PURE__ */ P({
20
19
  __name: "Request",
21
20
  emits: ["newTab"],
22
- setup(Re) {
23
- var O;
24
- const I = fe(), { toast: b } = me(), {
25
- activeCollection: x,
21
+ setup(Se) {
22
+ var E;
23
+ const M = Re(), { toast: b } = de(), {
24
+ activeCollection: S,
26
25
  activeExample: d,
27
- activeEnvironment: M,
28
- activeRequest: h,
29
- activeWorkspace: a,
30
- activeServer: T,
31
- cookies: U,
26
+ activeEnvironment: T,
27
+ activeRequest: q,
28
+ activeWorkspace: s,
29
+ activeServer: A,
30
+ cookies: H,
31
+ isReadOnly: L,
32
32
  modalState: l,
33
- requestHistory: S,
33
+ requestHistory: x,
34
34
  securitySchemes: $,
35
- requestMutators: A,
36
- serverMutators: H,
37
- servers: L,
38
- events: c
39
- } = I, u = y(!((O = a.value) != null && O.isReadOnly)), k = y(), e = y(), q = y(""), _ = de(), W = J(
40
- () => S.findLast((o) => {
35
+ requestMutators: W,
36
+ serverMutators: j,
37
+ servers: D,
38
+ events: v
39
+ } = M, u = R(!((E = s.value) != null && E.isReadOnly)), O = R(), e = R(), h = R(""), F = pe(), Q = N(
40
+ () => x.findLast((o) => {
41
41
  var t;
42
42
  return o.request.uid === ((t = d.value) == null ? void 0 : t.uid);
43
43
  })
44
- ), j = ve("(max-width: 800px)");
45
- G(j, (o) => u.value = !o);
46
- const E = async () => {
44
+ ), z = ve("(max-width: 800px)");
45
+ X(z, (o) => u.value = !o);
46
+ const U = N(
47
+ () => {
48
+ var o, t;
49
+ return (L.value ? (o = S.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = q.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
50
+ }
51
+ ), k = async () => {
47
52
  var f;
48
- if (!h.value || !d.value || !x.value)
53
+ if (!q.value || !d.value || !S.value)
49
54
  return;
50
- const o = ie.parse(((f = M.value) == null ? void 0 : f.value) || "{}");
55
+ const o = ce.parse(((f = T.value) == null ? void 0 : f.value) || "{}");
51
56
  o.error && console.error("INVALID ENVIRONMENT!");
52
- const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = a.value.cookies.map((R) => U[R]), [n, i] = ae({
53
- auth: x.value.auth,
54
- request: h.value,
57
+ const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = s.value.cookies.map((y) => H[y]), [n, i] = ue({
58
+ auth: S.value.auth,
59
+ request: q.value,
55
60
  example: d.value,
56
- proxy: a.value.proxyUrl ?? "",
61
+ selectedSecuritySchemeUids: U.value,
62
+ proxy: s.value.proxyUrl ?? "",
57
63
  environment: t,
58
64
  globalCookies: r,
59
- status: c.requestStatus,
65
+ status: v.requestStatus,
60
66
  securitySchemes: $,
61
- server: T.value
67
+ server: A.value
62
68
  });
63
69
  if (n) {
64
70
  b(n.message, "error");
65
71
  return;
66
72
  }
67
- k.value = i.controller;
73
+ O.value = i.controller;
68
74
  const [m, p] = await i.sendRequest();
69
- m ? b(m.message, "error") : S.push(p);
70
- }, D = async () => {
75
+ m ? b(m.message, "error") : x.push(p);
76
+ }, J = async () => {
71
77
  var o;
72
- return (o = k.value) == null ? void 0 : o.abort(pe.REQUEST_ABORTED);
78
+ return (o = O.value) == null ? void 0 : o.abort(ye.REQUEST_ABORTED);
73
79
  };
74
- K(() => {
75
- c.executeRequest.on(E), c.cancelRequest.on(D);
76
- }), ne(), P(() => c.executeRequest.off(E));
77
- function F({ requestName: o }) {
80
+ Y(() => {
81
+ v.executeRequest.on(k), v.cancelRequest.on(J);
82
+ }), me(), Z(() => v.executeRequest.off(k));
83
+ function G({ requestName: o }) {
78
84
  var r, n, i, m;
79
85
  if (!e.value) return;
80
86
  if (e.value.servers) {
81
- const p = Object.values(L).find(
87
+ const p = Object.values(D).find(
82
88
  (f) => {
83
- var R, C;
84
- return f.url === ((C = (R = e == null ? void 0 : e.value) == null ? void 0 : R.servers) == null ? void 0 : C[0]);
89
+ var y, C;
90
+ return f.url === ((C = (y = e == null ? void 0 : e.value) == null ? void 0 : y.servers) == null ? void 0 : C[0]);
85
91
  }
86
92
  );
87
- p ? q.value = p.uid : q.value = H.add(
93
+ p ? h.value = p.uid : h.value = j.add(
88
94
  { url: e.value.servers[0] },
89
- a.value.collections[0]
95
+ s.value.collections[0]
90
96
  ).uid;
91
97
  }
92
- const t = A.add(
98
+ const t = W.add(
93
99
  {
94
100
  summary: o,
95
101
  path: (r = e == null ? void 0 : e.value) == null ? void 0 : r.path,
96
102
  method: (n = e == null ? void 0 : e.value) == null ? void 0 : n.method,
97
103
  parameters: (i = e == null ? void 0 : e.value) == null ? void 0 : i.parameters,
98
- selectedServerUid: q.value,
104
+ selectedServerUid: h.value,
99
105
  requestBody: (m = e == null ? void 0 : e.value) == null ? void 0 : m.requestBody
100
106
  },
101
- a.value.collections[0]
107
+ s.value.collections[0]
102
108
  );
103
- t && _.push(
104
- `/workspace/${a.value.uid}/request/${t.uid}`
109
+ t && F.push(
110
+ `/workspace/${s.value.uid}/request/${t.uid}`
105
111
  ), l.hide();
106
112
  }
107
- function Q(o) {
108
- e.value = re(o), l.show();
113
+ function K(o) {
114
+ e.value = ae(o), l.show();
109
115
  }
110
- return (o, t) => (w(), X(Y, null, [
111
- Z("div", {
112
- class: N(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative overflow-hidden", {
113
- "!mr-0 !mb-0 !border-0": s(a).isReadOnly
116
+ return (o, t) => (w(), _(ee, null, [
117
+ te("div", {
118
+ class: V(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative overflow-hidden", {
119
+ "!mr-0 !mb-0 !border-0": a(s).isReadOnly
114
120
  }])
115
121
  }, [
116
- v(ue, {
122
+ c(ne, {
117
123
  modelValue: u.value,
118
124
  "onUpdate:modelValue": t[0] || (t[0] = (r) => u.value = r),
119
- isReadonly: s(a).isReadOnly,
120
- onHideModal: t[1] || (t[1] = () => s(l).hide()),
121
- onImportCurl: Q
125
+ isReadonly: a(s).isReadOnly,
126
+ onHideModal: t[1] || (t[1] = () => a(l).hide()),
127
+ onImportCurl: K
122
128
  }, null, 8, ["modelValue", "isReadonly"]),
123
- v(te, null, {
124
- default: V(() => [
125
- v(ce, {
126
- isReadonly: s(a).isReadOnly,
129
+ c(re, null, {
130
+ default: B(() => [
131
+ c(fe, {
132
+ isReadonly: a(s).isReadOnly,
127
133
  showSidebar: u.value,
128
134
  onNewTab: t[2] || (t[2] = (r) => o.$emit("newTab", r)),
129
135
  "onUpdate:showSidebar": t[3] || (t[3] = (r) => u.value = r)
130
136
  }, null, 8, ["isReadonly", "showSidebar"]),
131
- s(d) ? (w(), B(oe, {
137
+ a(d) ? (w(), g(se, {
132
138
  key: 0,
133
- class: N(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
139
+ class: V(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
134
140
  }, {
135
- default: V(() => {
141
+ default: B(() => {
136
142
  var r;
137
143
  return [
138
- v(se),
139
- v(le, {
140
- response: (r = W.value) == null ? void 0 : r.response
144
+ c(le, { selectedSecuritySchemeUids: U.value }, null, 8, ["selectedSecuritySchemeUids"]),
145
+ c(ie, {
146
+ response: (r = Q.value) == null ? void 0 : r.response
141
147
  }, null, 8, ["response"])
142
148
  ];
143
149
  }),
144
150
  _: 1
145
- }, 8, ["class"])) : g("", !0)
151
+ }, 8, ["class"])) : I("", !0)
146
152
  ]),
147
153
  _: 1
148
154
  })
149
155
  ], 2),
150
- e.value ? (w(), B(ee, {
156
+ e.value ? (w(), g(oe, {
151
157
  key: 0,
152
158
  parsedCurl: e.value,
153
- state: s(l),
154
- onClose: t[4] || (t[4] = (r) => s(l).hide()),
155
- onImportCurl: F
156
- }, null, 8, ["parsedCurl", "state"])) : g("", !0)
159
+ state: a(l),
160
+ onClose: t[4] || (t[4] = (r) => a(l).hide()),
161
+ onImportCurl: G
162
+ }, null, 8, ["parsedCurl", "state"])) : I("", !0)
157
163
  ], 64));
158
164
  }
159
165
  });
160
166
  export {
161
- Ue as default
167
+ Ae as default
162
168
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as C, openBlock as s, createElementBlock as w, Fragment as y, createVNode as t, unref as d, withCtx as o, createTextVNode as u, createElementVNode as U, createBlock as f, createCommentVNode as n } from "vue";
1
+ import { defineComponent as C, openBlock as r, createElementBlock as w, Fragment as y, createVNode as t, unref as d, withCtx as o, createTextVNode as u, createElementVNode as U, createBlock as f, createCommentVNode as n } from "vue";
2
2
  import i from "../RequestAuthDataTableInput.vue.js";
3
3
  import { useLoadingState as T, ScalarButton as c } from "@scalar/components";
4
4
  import x from "./OAuthScopesInput.vue.js";
5
- import r from "../../../../components/DataTable/DataTableRow.vue.js";
5
+ import s from "../../../../components/DataTable/DataTableRow.vue.js";
6
6
  import { authorizeOauth2 as F } from "../../libs/oauth2.js";
7
7
  import { useWorkspace as A } from "../../../../store/store.js";
8
8
  const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8 flex items-center justify-self-end" }, O = /* @__PURE__ */ C({
@@ -16,8 +16,8 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
16
16
  activeCollection: V,
17
17
  collectionMutators: g,
18
18
  isReadOnly: v,
19
- securitySchemeMutators: z
20
- } = A(), p = (l, e) => V.value && g.edit(V.value.uid, l, e), k = (l, e) => z.edit(m.scheme.uid, l, e), S = async () => {
19
+ securitySchemeMutators: S
20
+ } = A(), p = (l, e) => V.value && g.edit(V.value.uid, l, e), k = (l, e) => S.edit(m.scheme.uid, l, e), z = async () => {
21
21
  var e;
22
22
  if (h.isLoading || !((e = V.value) != null && e.uid)) return;
23
23
  h.startLoading();
@@ -27,8 +27,8 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
27
27
  ).finally(() => h.stopLoading());
28
28
  l && p(`auth.${m.scheme.uid}.token`, l);
29
29
  };
30
- return (l, e) => l.example.token ? (s(), w(y, { key: 0 }, [
31
- t(d(r), null, {
30
+ return (l, e) => l.example.token ? (r(), w(y, { key: 0 }, [
31
+ t(d(s), null, {
32
32
  default: o(() => [
33
33
  t(i, {
34
34
  id: "oauth2-access-token",
@@ -46,7 +46,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
46
46
  ]),
47
47
  _: 1
48
48
  }),
49
- t(d(r), { class: "min-w-full" }, {
49
+ t(d(s), { class: "min-w-full" }, {
50
50
  default: o(() => [
51
51
  U("div", B, [
52
52
  t(d(c), {
@@ -65,10 +65,10 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
65
65
  ]),
66
66
  _: 1
67
67
  })
68
- ], 64)) : (s(), w(y, { key: 1 }, [
69
- d(v) ? n("", !0) : (s(), f(d(r), { key: 0 }, {
68
+ ], 64)) : (r(), w(y, { key: 1 }, [
69
+ d(v) ? n("", !0) : (r(), f(d(s), { key: 0 }, {
70
70
  default: o(() => [
71
- "authorizationUrl" in l.scheme.flow ? (s(), f(i, {
71
+ "authorizationUrl" in l.scheme.flow ? (r(), f(i, {
72
72
  key: 0,
73
73
  id: `oauth2-authorization-url-${l.scheme.uid}`,
74
74
  modelValue: l.scheme.flow.authorizationUrl,
@@ -76,11 +76,11 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
76
76
  "onUpdate:modelValue": e[2] || (e[2] = (a) => k("flow.authorizationUrl", a))
77
77
  }, {
78
78
  default: o(() => e[11] || (e[11] = [
79
- u(" Authorization Url ")
79
+ u(" Auth Url ")
80
80
  ])),
81
81
  _: 1
82
82
  }, 8, ["id", "modelValue"])) : n("", !0),
83
- "tokenUrl" in l.scheme.flow ? (s(), f(i, {
83
+ "tokenUrl" in l.scheme.flow ? (r(), f(i, {
84
84
  key: 1,
85
85
  id: `oauth2-token-url-${l.scheme.uid}`,
86
86
  modelValue: l.scheme.flow.tokenUrl,
@@ -95,7 +95,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
95
95
  ]),
96
96
  _: 1
97
97
  })),
98
- "x-scalar-redirect-uri" in l.scheme.flow ? (s(), f(d(r), { key: 1 }, {
98
+ "x-scalar-redirect-uri" in l.scheme.flow ? (r(), f(d(s), { key: 1 }, {
99
99
  default: o(() => [
100
100
  t(i, {
101
101
  id: `oauth2-redirect-uri-${l.scheme.uid}`,
@@ -111,8 +111,8 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
111
111
  ]),
112
112
  _: 1
113
113
  })) : n("", !0),
114
- l.example.type === "oauth-password" ? (s(), w(y, { key: 2 }, [
115
- t(d(r), null, {
114
+ l.example.type === "oauth-password" ? (r(), w(y, { key: 2 }, [
115
+ t(d(s), null, {
116
116
  default: o(() => [
117
117
  t(i, {
118
118
  id: `oauth2-password-username-${l.scheme.uid}`,
@@ -129,7 +129,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
129
129
  ]),
130
130
  _: 1
131
131
  }),
132
- t(d(r), null, {
132
+ t(d(s), null, {
133
133
  default: o(() => [
134
134
  t(i, {
135
135
  id: `oauth2-password-password-${l.scheme.uid}`,
@@ -147,7 +147,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
147
147
  _: 1
148
148
  })
149
149
  ], 64)) : n("", !0),
150
- t(d(r), null, {
150
+ t(d(s), null, {
151
151
  default: o(() => [
152
152
  t(i, {
153
153
  id: `oauth2-client-id-${l.scheme.uid}`,
@@ -163,7 +163,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
163
163
  ]),
164
164
  _: 1
165
165
  }),
166
- "clientSecret" in l.example ? (s(), f(d(r), { key: 3 }, {
166
+ "clientSecret" in l.example ? (r(), f(d(s), { key: 3 }, {
167
167
  default: o(() => [
168
168
  t(i, {
169
169
  id: `oauth2-client-secret-${l.scheme.uid}`,
@@ -180,7 +180,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
180
180
  ]),
181
181
  _: 1
182
182
  })) : n("", !0),
183
- l.scheme.flow.scopes ? (s(), f(d(r), { key: 4 }, {
183
+ l.scheme.flow.scopes ? (r(), f(d(s), { key: 4 }, {
184
184
  default: o(() => [
185
185
  t(x, {
186
186
  activeFlow: l.scheme.flow,
@@ -189,7 +189,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
189
189
  ]),
190
190
  _: 1
191
191
  })) : n("", !0),
192
- t(d(r), { class: "min-w-full" }, {
192
+ t(d(s), { class: "min-w-full" }, {
193
193
  default: o(() => [
194
194
  U("div", I, [
195
195
  t(d(c), {
@@ -197,7 +197,7 @@ const B = { class: "h-8 flex items-center justify-self-end" }, I = { class: "h-8
197
197
  loading: d(h),
198
198
  size: "sm",
199
199
  variant: "outlined",
200
- onClick: S
200
+ onClick: z
201
201
  }, {
202
202
  default: o(() => e[18] || (e[18] = [
203
203
  u(" Authorize ")
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAgGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;;gBAM7D,oBAAoB,CAAC,MAAM,CAAC;kBAC1B,YAAY;;gBADd,oBAAoB,CAAC,MAAM,CAAC;kBAC1B,YAAY;;AAoR5B,wBAMG"}
1
+ {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;;gBAM7D,oBAAoB,CAAC,MAAM,CAAC;kBAC1B,YAAY;;gBADd,oBAAoB,CAAC,MAAM,CAAC;kBAC1B,YAAY;;AA6R5B,wBAMG"}
@@ -1,94 +1,102 @@
1
- import { defineComponent as S, computed as f, openBlock as m, createBlock as h, unref as o, withCtx as c, createElementVNode as l, createVNode as a, toDisplayString as p, createElementBlock as g, Fragment as b, renderList as C } from "vue";
2
- import { Disclosure as F, DisclosureButton as k, DisclosurePanel as D } from "@headlessui/vue";
3
- import { ScalarIcon as y } from "@scalar/components";
4
- import v from "../../../../components/DataTable/DataTableCell.vue.js";
5
- import V from "../../../../components/DataTable/DataTableRow.vue.js";
6
- import B from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
- const O = { class: "flex h-full w-full" }, $ = { class: "flex-1 text-c-3" }, j = {
1
+ import { defineComponent as C, computed as v, openBlock as f, createBlock as x, unref as t, withCtx as a, createElementVNode as l, createVNode as n, normalizeClass as F, toDisplayString as d, createElementBlock as b, Fragment as k, renderList as D } from "vue";
2
+ import { Disclosure as y, DisclosureButton as V, DisclosurePanel as B } from "@headlessui/vue";
3
+ import { ScalarIcon as O } from "@scalar/components";
4
+ import _ from "../../../../components/DataTable/DataTableCell.vue.js";
5
+ import $ from "../../../../components/DataTable/DataTableRow.vue.js";
6
+ import j from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
+ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, I = {
8
8
  class: "grid auto-rows-auto border-t-1/2",
9
9
  style: { gridTemplateColumns: "1fr auto" }
10
- }, E = { class: "font-code text-xs" }, L = /* @__PURE__ */ S({
10
+ }, N = { class: "font-code text-xs" }, q = /* @__PURE__ */ C({
11
11
  __name: "OAuthScopesInput",
12
12
  props: {
13
13
  activeFlow: {},
14
14
  updateScheme: { type: Function }
15
15
  },
16
- setup(_) {
17
- const n = _, x = f(
16
+ setup(w) {
17
+ const r = w, S = v(
18
18
  () => {
19
19
  var e;
20
- return Object.entries(((e = n.activeFlow) == null ? void 0 : e.scopes) ?? {}).map(([s, t]) => ({
21
- id: s,
22
- label: s,
23
- description: t
20
+ return Object.entries(((e = r.activeFlow) == null ? void 0 : e.scopes) ?? {}).map(([o, s]) => ({
21
+ id: o,
22
+ label: o,
23
+ description: s
24
24
  }));
25
25
  }
26
- ), r = f(() => {
26
+ ), i = v(() => {
27
27
  var e;
28
- return ((e = n.activeFlow) == null ? void 0 : e.selectedScopes) || [];
28
+ return ((e = r.activeFlow) == null ? void 0 : e.selectedScopes) || [];
29
29
  });
30
- function w(e, s) {
31
- s ? n.updateScheme("flow.selectedScopes", [...r.value, e]) : n.updateScheme(
30
+ function g(e, o) {
31
+ o ? r.updateScheme("flow.selectedScopes", [...i.value, e]) : r.updateScheme(
32
32
  "flow.selectedScopes",
33
- r.value.filter((t) => t !== e)
33
+ i.value.filter((s) => s !== e)
34
34
  );
35
35
  }
36
- return (e, s) => (m(), h(o(v), { class: "items-center min-h-8 h-auto" }, {
37
- default: c(() => [
38
- l("div", O, [
39
- s[0] || (s[0] = l("div", { class: "text-c-2 min-w-[120px] items-center pl-2 h-full border-r-1/2" }, [
36
+ return (e, o) => (f(), x(t(_), { class: "items-center min-h-8 h-auto" }, {
37
+ default: a(() => [
38
+ l("div", z, [
39
+ o[0] || (o[0] = l("div", { class: "text-c-1 min-w-[94px] items-center pl-2 h-full" }, [
40
40
  l("span", { class: "h-8 flex items-center" }, " Scopes ")
41
41
  ], -1)),
42
- a(o(F), {
42
+ n(t(y), {
43
43
  as: "div",
44
- class: "flex flex-col w-full"
44
+ class: "flex flex-col w-full bl"
45
45
  }, {
46
- default: c(() => [
47
- a(o(k), { class: "group/scopes-accordion flex items-center text-left min-h-8 gap-1.5 h-auto pl-2 hover:bg-b-2 pr-2.5 cursor-pointer" }, {
48
- default: c(({ open: t }) => {
49
- var i, u, d;
50
- return [
51
- l("div", $, " Selected " + p(((u = (i = e.activeFlow) == null ? void 0 : i.selectedScopes) == null ? void 0 : u.length) || 0) + " / " + p(Object.keys(((d = e.activeFlow) == null ? void 0 : d.scopes) ?? {}).length || 0), 1),
52
- a(o(y), {
53
- class: "text-c-3 group-hover/scopes-accordion:text-c-2",
54
- icon: t ? "ChevronDown" : "ChevronRight",
55
- size: "xs"
56
- }, null, 8, ["icon"])
57
- ];
58
- }),
59
- _: 1
60
- }),
61
- a(o(D), { as: "template" }, {
62
- default: c(() => [
63
- l("table", j, [
64
- (m(!0), g(b, null, C(x.value, ({ id: t, label: i, description: u }) => (m(), h(o(V), {
65
- key: t,
66
- class: "text-c-2",
67
- onClick: (d) => w(t, !r.value.includes(t))
68
- }, {
69
- default: c(() => [
70
- a(o(v), { class: "w-full px-2 py-1.5 hover:bg-b-2 cursor-pointer" }, {
71
- default: c(() => [
72
- l("span", null, [
73
- l("span", E, p(i), 1),
74
- l("span", null, " – " + p(u), 1)
75
- ])
76
- ]),
77
- _: 2
78
- }, 1024),
79
- a(o(B), {
80
- modelValue: r.value.includes(t),
81
- "onUpdate:modelValue": () => {
82
- }
83
- }, null, 8, ["modelValue"])
84
- ]),
85
- _: 2
86
- }, 1032, ["onClick"]))), 128))
46
+ default: a(() => {
47
+ var s, h;
48
+ return [
49
+ n(t(V), {
50
+ class: F([
51
+ "group/scopes-accordion flex items-center text-left min-h-8 gap-1.5 h-auto pl-2 hover:text-c-1 pr-2.5 cursor-pointer",
52
+ (((h = (s = e.activeFlow) == null ? void 0 : s.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
87
53
  ])
88
- ]),
89
- _: 1
90
- })
91
- ]),
54
+ }, {
55
+ default: a(({ open: c }) => {
56
+ var p, u, m;
57
+ return [
58
+ l("div", E, " Selected " + d(((u = (p = e.activeFlow) == null ? void 0 : p.selectedScopes) == null ? void 0 : u.length) || 0) + " / " + d(Object.keys(((m = e.activeFlow) == null ? void 0 : m.scopes) ?? {}).length || 0), 1),
59
+ n(t(O), {
60
+ class: "text-c-3 group-hover/scopes-accordion:text-c-2",
61
+ icon: c ? "ChevronDown" : "ChevronRight",
62
+ size: "xs"
63
+ }, null, 8, ["icon"])
64
+ ];
65
+ }),
66
+ _: 1
67
+ }, 8, ["class"]),
68
+ n(t(B), { as: "template" }, {
69
+ default: a(() => [
70
+ l("table", I, [
71
+ (f(!0), b(k, null, D(S.value, ({ id: c, label: p, description: u }) => (f(), x(t($), {
72
+ key: c,
73
+ class: "text-c-2",
74
+ onClick: (m) => g(c, !i.value.includes(c))
75
+ }, {
76
+ default: a(() => [
77
+ n(t(_), { class: "w-full px-2 py-1.5 hover:text-c-1 cursor-pointer" }, {
78
+ default: a(() => [
79
+ l("span", null, [
80
+ l("span", N, d(p), 1),
81
+ l("span", null, " – " + d(u), 1)
82
+ ])
83
+ ]),
84
+ _: 2
85
+ }, 1024),
86
+ n(t(j), {
87
+ modelValue: i.value.includes(c),
88
+ "onUpdate:modelValue": () => {
89
+ }
90
+ }, null, 8, ["modelValue"])
91
+ ]),
92
+ _: 2
93
+ }, 1032, ["onClick"]))), 128))
94
+ ])
95
+ ]),
96
+ _: 1
97
+ })
98
+ ];
99
+ }),
92
100
  _: 1
93
101
  })
94
102
  ])
@@ -98,5 +106,5 @@ const O = { class: "flex h-full w-full" }, $ = { class: "flex-1 text-c-3" }, j =
98
106
  }
99
107
  });
100
108
  export {
101
- L as default
109
+ q as default
102
110
  };
@@ -1,6 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
+ selectedSecuritySchemeUids: string[];
2
3
  title: string;
3
4
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
5
+ selectedSecuritySchemeUids: string[];
4
6
  title: string;
5
7
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";WAyUS,MAAM;;WAAN,MAAM;;AAqcf,wBAMG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":";gCAwV8B,MAAM,EAAE;WAC7B,MAAM;;gCADe,MAAM,EAAE;WAC7B,MAAM;;AAudf,wBAMG"}
@@ -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 f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4a75f9a1"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-d99a68c2"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };