@scalar/api-client 2.1.34 → 2.1.36

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 (114) hide show
  1. package/CHANGELOG.md +30 -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/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  5. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +105 -119
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  8. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +14 -14
  9. package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +15 -0
  10. package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -0
  11. package/dist/components/CommandPalette/WatchModeToggle.vue.js +39 -0
  12. package/dist/components/CommandPalette/WatchModeToggle.vue2.js +4 -0
  13. package/dist/components/ContextBar.vue.d.ts.map +1 -1
  14. package/dist/components/ContextBar.vue.js +1 -1
  15. package/dist/components/ContextBar.vue2.js +6 -6
  16. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  17. package/dist/components/DataTable/DataTableInput.vue.js +3 -3
  18. package/dist/components/DataTable/DataTableInput.vue2.js +53 -40
  19. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +1 -1
  20. package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
  21. package/dist/components/ImportCollection/DropEventListener.vue.js +39 -33
  22. package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
  23. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -20
  24. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +2 -0
  25. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  26. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +159 -100
  27. package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +5 -0
  28. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +2 -0
  29. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  30. package/dist/components/ImportCollection/ImportNowButton.vue.js +35 -31
  31. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +7 -0
  32. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -0
  33. package/dist/components/ImportCollection/IntegrationLogo.vue.js +46 -0
  34. package/dist/components/ImportCollection/IntegrationLogo.vue2.js +4 -0
  35. package/dist/components/ImportCollection/PrefetchError.vue.d.ts +8 -0
  36. package/dist/components/ImportCollection/PrefetchError.vue.d.ts.map +1 -0
  37. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
  38. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
  39. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +7 -7
  40. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  41. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +2 -2
  42. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +29 -12
  43. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
  44. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +34 -42
  45. package/dist/components/OpenApiClientButton.vue.d.ts +13 -0
  46. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -0
  47. package/dist/components/OpenApiClientButton.vue.js +7 -0
  48. package/dist/components/OpenApiClientButton.vue2.js +36 -0
  49. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  50. package/dist/components/SideNav/SideNav.vue.js +2 -2
  51. package/dist/components/SideNav/SideNav.vue2.js +8 -8
  52. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  53. package/dist/components/TopNav/TopNav.vue.js +2 -2
  54. package/dist/components/TopNav/TopNav.vue2.js +14 -14
  55. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
  56. package/dist/components/index.d.ts +1 -0
  57. package/dist/components/index.d.ts.map +1 -1
  58. package/dist/components/index.js +4 -2
  59. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  60. package/dist/layouts/App/MainLayout.vue.js +4 -4
  61. package/dist/layouts/App/create-api-client-app.d.ts +58 -41
  62. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  63. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  64. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  65. package/dist/layouts/Modal/create-api-client-modal.d.ts +116 -82
  66. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  67. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  68. package/dist/layouts/Web/ApiClientWeb.vue.js +42 -38
  69. package/dist/layouts/Web/create-api-client-web.d.ts +58 -41
  70. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  71. package/dist/libs/create-client.d.ts +58 -41
  72. package/dist/libs/create-client.d.ts.map +1 -1
  73. package/dist/store/collections.d.ts +34 -24
  74. package/dist/store/collections.d.ts.map +1 -1
  75. package/dist/store/import-spec.d.ts +6 -4
  76. package/dist/store/import-spec.d.ts.map +1 -1
  77. package/dist/store/store.d.ts +116 -82
  78. package/dist/store/store.d.ts.map +1 -1
  79. package/dist/style.css +1 -1
  80. package/dist/views/Request/Request.vue2.js +30 -31
  81. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +21 -21
  82. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  83. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +79 -71
  84. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  85. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  86. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +24 -24
  87. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  88. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +8 -8
  89. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  90. package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -124
  91. package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
  92. package/dist/views/Request/RequestSidebar.vue.js +3 -3
  93. package/dist/views/Request/RequestSidebar.vue2.js +29 -29
  94. package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
  95. package/dist/views/Request/RequestSidebarItem.vue2.js +76 -76
  96. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -2
  97. package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
  98. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +47 -47
  99. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  100. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  101. package/dist/views/Request/RequestSubpageHeader.vue2.js +67 -42
  102. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  103. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
  104. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
  105. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  106. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -99
  107. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +104 -2
  108. package/dist/views/Request/components/WorkspaceDropdown.vue.js +1 -1
  109. package/dist/views/Request/hooks/useOpenApiWatcher.js +24 -24
  110. package/dist/views/Request/types/sidebar-item.d.ts +1 -1
  111. package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
  112. package/package.json +8 -8
  113. package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
  114. package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
@@ -1,11 +1,10 @@
1
- import { defineComponent as K, ref as R, computed as N, watch as P, onMounted as X, onBeforeUnmount as Y, openBlock as w, createElementBlock as Z, 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";
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
2
  import oe from "../../components/ImportCurl/ImportCurlModal.vue.js";
3
3
  import re from "../../components/ViewLayout/ViewLayout.vue.js";
4
4
  import se from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
5
  import { importCurlCommand as ae } from "../../libs/importers/curl.js";
6
6
  import { createRequestOperation as ue } from "../../libs/send-request.js";
7
7
  import le from "./RequestSection/RequestSection.vue.js";
8
- /* empty css */
9
8
  import ne from "./RequestSubpageHeader.vue.js";
10
9
  import ie from "./ResponseSection/ResponseSection.vue.js";
11
10
  import { useOpenApiWatcher as me } from "./hooks/useOpenApiWatcher.js";
@@ -16,7 +15,7 @@ import { useRouter as pe } from "vue-router";
16
15
  import fe from "./RequestSidebar.vue.js";
17
16
  import { ERRORS as ye } from "../../libs/errors.js";
18
17
  import { useWorkspace as Re } from "../../store/store.js";
19
- const Ae = /* @__PURE__ */ K({
18
+ const Ae = /* @__PURE__ */ P({
20
19
  __name: "Request",
21
20
  emits: ["newTab"],
22
21
  setup(Se) {
@@ -27,27 +26,27 @@ const Ae = /* @__PURE__ */ K({
27
26
  activeEnvironment: T,
28
27
  activeRequest: q,
29
28
  activeWorkspace: s,
30
- activeServer: $,
31
- cookies: A,
32
- isReadOnly: H,
29
+ activeServer: A,
30
+ cookies: H,
31
+ isReadOnly: L,
33
32
  modalState: l,
34
33
  requestHistory: x,
35
- securitySchemes: L,
36
- requestMutators: _,
37
- serverMutators: W,
38
- servers: j,
34
+ securitySchemes: $,
35
+ requestMutators: W,
36
+ serverMutators: j,
37
+ servers: D,
39
38
  events: v
40
- } = M, u = R(!((E = s.value) != null && E.isReadOnly)), O = R(), e = R(), h = R(""), D = pe(), F = N(
39
+ } = M, u = R(!((E = s.value) != null && E.isReadOnly)), O = R(), e = R(), h = R(""), F = pe(), Q = N(
41
40
  () => x.findLast((o) => {
42
41
  var t;
43
42
  return o.request.uid === ((t = d.value) == null ? void 0 : t.uid);
44
43
  })
45
- ), Q = ve("(max-width: 800px)");
46
- P(Q, (o) => u.value = !o);
44
+ ), z = ve("(max-width: 800px)");
45
+ X(z, (o) => u.value = !o);
47
46
  const U = N(
48
47
  () => {
49
48
  var o, t;
50
- return (H.value ? (o = S.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = q.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
49
+ return (L.value ? (o = S.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = q.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
51
50
  }
52
51
  ), k = async () => {
53
52
  var f;
@@ -55,7 +54,7 @@ const Ae = /* @__PURE__ */ K({
55
54
  return;
56
55
  const o = ce.parse(((f = T.value) == null ? void 0 : f.value) || "{}");
57
56
  o.error && console.error("INVALID ENVIRONMENT!");
58
- const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = s.value.cookies.map((y) => A[y]), [n, i] = ue({
57
+ const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = s.value.cookies.map((y) => H[y]), [n, i] = ue({
59
58
  auth: S.value.auth,
60
59
  request: q.value,
61
60
  example: d.value,
@@ -64,8 +63,8 @@ const Ae = /* @__PURE__ */ K({
64
63
  environment: t,
65
64
  globalCookies: r,
66
65
  status: v.requestStatus,
67
- securitySchemes: L,
68
- server: $.value
66
+ securitySchemes: $,
67
+ server: A.value
69
68
  });
70
69
  if (n) {
71
70
  b(n.message, "error");
@@ -74,29 +73,29 @@ const Ae = /* @__PURE__ */ K({
74
73
  O.value = i.controller;
75
74
  const [m, p] = await i.sendRequest();
76
75
  m ? b(m.message, "error") : x.push(p);
77
- }, z = async () => {
76
+ }, J = async () => {
78
77
  var o;
79
78
  return (o = O.value) == null ? void 0 : o.abort(ye.REQUEST_ABORTED);
80
79
  };
81
- X(() => {
82
- v.executeRequest.on(k), v.cancelRequest.on(z);
83
- }), me(), Y(() => v.executeRequest.off(k));
84
- function J({ 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 }) {
85
84
  var r, n, i, m;
86
85
  if (!e.value) return;
87
86
  if (e.value.servers) {
88
- const p = Object.values(j).find(
87
+ const p = Object.values(D).find(
89
88
  (f) => {
90
89
  var y, C;
91
90
  return f.url === ((C = (y = e == null ? void 0 : e.value) == null ? void 0 : y.servers) == null ? void 0 : C[0]);
92
91
  }
93
92
  );
94
- p ? h.value = p.uid : h.value = W.add(
93
+ p ? h.value = p.uid : h.value = j.add(
95
94
  { url: e.value.servers[0] },
96
95
  s.value.collections[0]
97
96
  ).uid;
98
97
  }
99
- const t = _.add(
98
+ const t = W.add(
100
99
  {
101
100
  summary: o,
102
101
  path: (r = e == null ? void 0 : e.value) == null ? void 0 : r.path,
@@ -107,14 +106,14 @@ const Ae = /* @__PURE__ */ K({
107
106
  },
108
107
  s.value.collections[0]
109
108
  );
110
- t && D.push(
109
+ t && F.push(
111
110
  `/workspace/${s.value.uid}/request/${t.uid}`
112
111
  ), l.hide();
113
112
  }
114
- function G(o) {
113
+ function K(o) {
115
114
  e.value = ae(o), l.show();
116
115
  }
117
- return (o, t) => (w(), Z(ee, null, [
116
+ return (o, t) => (w(), _(ee, null, [
118
117
  te("div", {
119
118
  class: V(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative overflow-hidden", {
120
119
  "!mr-0 !mb-0 !border-0": a(s).isReadOnly
@@ -125,7 +124,7 @@ const Ae = /* @__PURE__ */ K({
125
124
  "onUpdate:modelValue": t[0] || (t[0] = (r) => u.value = r),
126
125
  isReadonly: a(s).isReadOnly,
127
126
  onHideModal: t[1] || (t[1] = () => a(l).hide()),
128
- onImportCurl: G
127
+ onImportCurl: K
129
128
  }, null, 8, ["modelValue", "isReadonly"]),
130
129
  c(re, null, {
131
130
  default: B(() => [
@@ -144,7 +143,7 @@ const Ae = /* @__PURE__ */ K({
144
143
  return [
145
144
  c(le, { selectedSecuritySchemeUids: U.value }, null, 8, ["selectedSecuritySchemeUids"]),
146
145
  c(ie, {
147
- response: (r = F.value) == null ? void 0 : r.response
146
+ response: (r = Q.value) == null ? void 0 : r.response
148
147
  }, null, 8, ["response"])
149
148
  ];
150
149
  }),
@@ -159,7 +158,7 @@ const Ae = /* @__PURE__ */ K({
159
158
  parsedCurl: e.value,
160
159
  state: a(l),
161
160
  onClose: t[4] || (t[4] = (r) => a(l).hide()),
162
- onImportCurl: J
161
+ onImportCurl: G
163
162
  }, null, 8, ["parsedCurl", "state"])) : I("", !0)
164
163
  ], 64));
165
164
  }
@@ -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 +1 @@
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;;AAsdf,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 e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-7a05f8f1"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-d99a68c2"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as I, ref as w, computed as v, openBlock as u, createBlock as O, withCtx as c, createElementVNode as r, toDisplayString as A, createVNode as i, unref as s, createElementBlock as m, Fragment as W, renderList as z, createTextVNode as E, withModifiers as j } from "vue";
1
+ import { defineComponent as I, ref as w, computed as v, openBlock as u, createBlock as O, withCtx as c, createElementVNode as r, toDisplayString as A, createVNode as i, unref as o, createElementBlock as m, Fragment as W, renderList as z, createTextVNode as E, withModifiers as j } from "vue";
2
2
  import H from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
3
  import { useModal as L, ScalarComboboxMultiselect as P, ScalarButton as G, ScalarIcon as D } from "@scalar/components";
4
4
  import { nanoid as J } from "nanoid";
@@ -10,7 +10,7 @@ import Z from "../../../../components/DataTable/DataTable.vue.js";
10
10
  import ee from "../../../../components/DataTable/DataTableRow.vue.js";
11
11
  import te from "../../../../components/DataTable/DataTableHeader.vue.js";
12
12
  import { useWorkspace as le } from "../../../../store/store.js";
13
- const oe = { class: "flex gap-1" }, se = {
13
+ const se = { class: "flex gap-1" }, oe = {
14
14
  key: 0,
15
15
  class: "flex relative scroll-timeline-x w-full"
16
16
  }, ie = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, ae = {
@@ -63,21 +63,21 @@ const oe = { class: "flex gap-1" }, se = {
63
63
  )
64
64
  );
65
65
  function N(t) {
66
- var U, g;
67
- if (!((U = a.value) != null && U.uid) || !((g = d.value) != null && g.uid)) return;
68
- const e = t.find((o) => o.payload), l = t.filter((o) => !o.payload).map(({ id: o }) => o);
66
+ var C, U;
67
+ if (!((C = a.value) != null && C.uid) || !((U = d.value) != null && U.uid)) return;
68
+ const e = t.find((s) => s.payload), l = t.filter((s) => !s.payload).map(({ id: s }) => s);
69
69
  if (e != null && e.payload) {
70
- const o = V.add(
70
+ const s = V.add(
71
71
  e.payload,
72
72
  a.value.uid
73
73
  );
74
- l.push(o.uid);
74
+ l.push(s.uid);
75
75
  }
76
- const C = l.filter((o) => !a.value.auth[o]);
76
+ const g = l.filter((s) => !a.value.auth[s]);
77
77
  x.edit(
78
78
  a.value.uid,
79
79
  "auth",
80
- C.reduce((o, k) => (o[k] = X(p[k]), o), a.value.auth)
80
+ g.reduce((s, k) => (s[k] = X(p[k]), s), a.value.auth)
81
81
  ), b(l);
82
82
  }
83
83
  const q = (t) => b(
@@ -91,25 +91,25 @@ const oe = { class: "flex gap-1" }, se = {
91
91
  itemCount: n.value.length
92
92
  }, {
93
93
  title: c(() => [
94
- r("div", oe, A(t.title), 1)
94
+ r("div", se, A(t.title), 1)
95
95
  ]),
96
96
  default: c(() => [
97
97
  r("form", null, [
98
- i(s(Z), {
98
+ i(o(Z), {
99
99
  class: "flex-1",
100
100
  columns: [""]
101
101
  }, {
102
102
  default: c(() => [
103
- i(s(ee), null, {
103
+ i(o(ee), null, {
104
104
  default: c(() => [
105
- i(s(te), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
105
+ i(o(te), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
106
106
  default: c(() => [
107
- i(s(P), {
107
+ i(o(P), {
108
108
  ref_key: "comboboxRef",
109
109
  ref: R,
110
110
  class: "text-xs w-full",
111
111
  fullWidth: "",
112
- isDeletable: !s(f),
112
+ isDeletable: !o(f),
113
113
  modelValue: n.value,
114
114
  multiple: "",
115
115
  options: B.value,
@@ -119,32 +119,32 @@ const oe = { class: "flex gap-1" }, se = {
119
119
  "onUpdate:modelValue": N
120
120
  }, {
121
121
  default: c(() => [
122
- i(s(G), {
122
+ i(o(G), {
123
123
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
124
124
  fullWidth: "",
125
125
  variant: "ghost"
126
126
  }, {
127
127
  default: c(() => [
128
- e[3] || (e[3] = r("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)),
129
- n.value.length ? (u(), m("div", se, [
128
+ e[3] || (e[3] = r("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
129
+ n.value.length ? (u(), m("div", oe, [
130
130
  e[1] || (e[1] = r("div", { class: "fade-left" }, null, -1)),
131
131
  r("div", ie, [
132
132
  (u(!0), m(W, null, z(n.value, (l) => (u(), m("span", {
133
133
  key: l.id,
134
- class: "cm-pill flex items-center mx-0 h-fit pr-1"
134
+ class: "cm-pill flex items-center mx-0 h-fit pr-1 !bg-b-2 text-c-1"
135
135
  }, [
136
136
  E(A(l.label) + " ", 1),
137
- i(s(D), {
137
+ i(o(D), {
138
138
  class: "ml-1 cursor-pointer text-c-3 hover:text-c-1",
139
139
  icon: "Close",
140
140
  size: "xs",
141
- onClick: j((C) => q(l.id), ["stop"])
141
+ onClick: j((g) => q(l.id), ["stop"])
142
142
  }, null, 8, ["onClick"])
143
143
  ]))), 128))
144
144
  ]),
145
145
  e[2] || (e[2] = r("div", { class: "fade-right" }, null, -1))
146
146
  ])) : (u(), m("div", ae, " None ")),
147
- i(s(D), {
147
+ i(o(D), {
148
148
  class: "min-w-3 ml-auto mr-2.5",
149
149
  icon: "ChevronDown",
150
150
  size: "xs"
@@ -167,8 +167,8 @@ const oe = { class: "flex gap-1" }, se = {
167
167
  }),
168
168
  i(K, {
169
169
  scheme: y.value,
170
- state: s(h),
171
- onClose: e[0] || (e[0] = (l) => s(h).hide())
170
+ state: o(h),
171
+ onClose: e[0] || (e[0] = (l) => o(h).hide())
172
172
  }, null, 8, ["scheme", "state"]),
173
173
  r("div", { id: _ })
174
174
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":";gCA+J8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AAqVtC,wBAMG"}
1
+ {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":";gCA+J8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AAmVtC,wBAMG"}