@scalar/api-client 2.1.52 → 2.2.1

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 (205) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBar.vue.js +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue2.js +36 -43
  5. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  6. package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
  7. package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
  8. package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
  9. package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
  10. package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
  11. package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
  12. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  13. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  14. package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
  15. package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
  16. package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
  17. package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
  18. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
  19. package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
  20. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
  21. package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
  22. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
  23. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  24. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
  25. package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
  26. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
  27. package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
  28. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
  29. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  30. package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
  31. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
  32. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  33. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  34. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  35. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
  36. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  37. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  38. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
  39. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  40. package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
  41. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
  42. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  43. package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
  44. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  45. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
  46. package/dist/components/Search/useSearch.d.ts.map +1 -1
  47. package/dist/components/Search/useSearch.js +20 -19
  48. package/dist/components/SideNav/SideNav.vue.js +4 -4
  49. package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
  50. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  51. package/dist/components/TopNav/TopNav.vue.js +165 -5
  52. package/dist/components/TopNav/TopNav.vue2.js +2 -164
  53. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  54. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  55. package/dist/components/TopNav/TopNavItem.vue.js +2 -2
  56. package/dist/components/TopNav/TopNavItem.vue2.js +5 -5
  57. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  58. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
  59. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
  60. package/dist/hooks/index.js +3 -2
  61. package/dist/hooks/useLayout.d.ts +2 -0
  62. package/dist/hooks/useLayout.d.ts.map +1 -1
  63. package/dist/hooks/useLayout.js +4 -3
  64. package/dist/layouts/App/ApiClientApp.vue.d.ts +1 -1
  65. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  66. package/dist/layouts/App/ApiClientApp.vue.js +35 -31
  67. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  68. package/dist/layouts/App/MainLayout.vue.js +3 -3
  69. package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
  70. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  71. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  72. package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
  73. package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
  74. package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
  75. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  76. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  77. package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
  78. package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
  79. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  80. package/dist/libs/create-client.d.ts +673 -1236
  81. package/dist/libs/create-client.d.ts.map +1 -1
  82. package/dist/libs/create-client.js +91 -102
  83. package/dist/libs/hot-keys.d.ts +1 -1
  84. package/dist/libs/send-request.d.ts +2 -3
  85. package/dist/libs/send-request.d.ts.map +1 -1
  86. package/dist/libs/send-request.js +127 -123
  87. package/dist/store/active-entities.d.ts +333 -0
  88. package/dist/store/active-entities.d.ts.map +1 -0
  89. package/dist/store/active-entities.js +97 -0
  90. package/dist/store/collections.d.ts +4 -274
  91. package/dist/store/collections.d.ts.map +1 -1
  92. package/dist/store/cookies.d.ts +4 -4
  93. package/dist/store/environment.d.ts +4 -4
  94. package/dist/store/import-spec.d.ts +0 -54
  95. package/dist/store/import-spec.d.ts.map +1 -1
  96. package/dist/store/index.js +4 -3
  97. package/dist/store/request-example.d.ts +4 -4
  98. package/dist/store/requests.d.ts +15 -15
  99. package/dist/store/security-schemes.d.ts +527 -317
  100. package/dist/store/security-schemes.d.ts.map +1 -1
  101. package/dist/store/security-schemes.js +33 -41
  102. package/dist/store/servers.d.ts +4 -4
  103. package/dist/store/store-context.d.ts +0 -3
  104. package/dist/store/store-context.d.ts.map +1 -1
  105. package/dist/store/store.d.ts +640 -5297
  106. package/dist/store/store.d.ts.map +1 -1
  107. package/dist/store/store.js +111 -189
  108. package/dist/store/tags.d.ts +4 -4
  109. package/dist/store/workspace.d.ts +14 -24
  110. package/dist/store/workspace.d.ts.map +1 -1
  111. package/dist/style.css +1 -1
  112. package/dist/tailwind/desktop-variants.d.ts +18 -0
  113. package/dist/tailwind/desktop-variants.d.ts.map +1 -0
  114. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  115. package/dist/views/Cookies/CookieForm.vue.js +14 -13
  116. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  117. package/dist/views/Cookies/CookieRaw.vue.js +14 -13
  118. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
  119. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  120. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  121. package/dist/views/Request/Request.vue.js +1 -1
  122. package/dist/views/Request/Request.vue2.js +92 -92
  123. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
  124. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  125. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
  126. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
  127. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  128. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
  129. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  130. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  131. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
  132. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  133. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
  134. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  135. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  136. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  137. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  138. package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
  139. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  140. package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
  141. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  142. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
  143. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  145. package/dist/views/Request/RequestSection/RequestSection.vue2.js +17 -16
  146. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  147. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  148. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  149. package/dist/views/Request/RequestSidebar.vue2.js +72 -73
  150. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  151. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  152. package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
  153. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  154. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  155. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
  156. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  157. package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
  158. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  159. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +1 -1
  160. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +25 -21
  161. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  162. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  163. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -25
  164. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  165. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -7
  166. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  167. package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
  168. package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
  169. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  170. package/dist/views/Request/consts/new-auth-options.js +16 -8
  171. package/dist/views/Request/handle-drag.d.ts +2 -1
  172. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  173. package/dist/views/Request/handle-drag.js +23 -25
  174. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  175. package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
  176. package/dist/views/Request/libs/auth.d.ts +1 -29
  177. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  178. package/dist/views/Request/libs/auth.js +2 -9
  179. package/dist/views/Request/libs/index.js +6 -8
  180. package/dist/views/Request/libs/live-sync.d.ts +6 -5
  181. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  182. package/dist/views/Request/libs/live-sync.js +164 -185
  183. package/dist/views/Request/libs/oauth2.d.ts +6 -10
  184. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  185. package/dist/views/Request/libs/oauth2.js +54 -69
  186. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  187. package/dist/views/Servers/ServerForm.vue.js +14 -13
  188. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  189. package/dist/views/Servers/Servers.vue2.js +18 -17
  190. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  191. package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
  192. package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
  193. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
  194. package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
  195. package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
  196. package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
  197. package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
  198. package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
  199. package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
  200. package/package.json +9 -9
  201. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
  202. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
  203. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
  204. package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
  205. package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
@@ -1,16 +1,17 @@
1
- import { defineComponent as E, ref as g, computed as f, openBlock as d, createBlock as W, withCtx as u, createElementVNode as m, createTextVNode as k, toDisplayString as R, createElementBlock as p, createVNode as c, unref as i, createCommentVNode as L, Fragment as H, renderList as P, withModifiers as B, withKeys as G } from "vue";
1
+ import { defineComponent as z, ref as b, computed as f, openBlock as m, createBlock as W, withCtx as r, createElementVNode as a, createTextVNode as _, toDisplayString as g, createElementBlock as p, createVNode as c, unref as i, createCommentVNode as L, Fragment as H, renderList as P, withModifiers as O, withKeys as G } from "vue";
2
2
  import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useModal as Q, ScalarIcon as M, ScalarComboboxMultiselect as X, ScalarButton as Y, ScalarIconButton as Z } from "@scalar/components";
4
- import { nanoid as ee } from "nanoid";
5
- import te from "./DeleteRequestAuthModal.vue.js";
6
- import le from "./RequestExampleAuth.vue.js";
7
- import { displaySchemeFormatter as q, createSchemeValueSet as oe } from "../../libs/auth.js";
3
+ import { useActiveEntities as Q } from "../../../../store/active-entities.js";
4
+ import { useModal as X, ScalarIcon as B, ScalarComboboxMultiselect as Y, ScalarButton as Z, ScalarIconButton as ee } from "@scalar/components";
5
+ import { nanoid as te } from "nanoid";
6
+ import le from "./DeleteRequestAuthModal.vue.js";
7
+ import oe from "./RequestExampleAuth.vue.js";
8
+ import { displaySchemeFormatter as k } from "../../libs/auth.js";
8
9
  import { ADD_AUTH_OPTIONS as se } from "../../consts/new-auth-options.js";
9
10
  import ie from "../../../../components/DataTable/DataTable.vue.js";
10
11
  import ne from "../../../../components/DataTable/DataTableRow.vue.js";
11
12
  import ce from "../../../../components/DataTable/DataTableHeader.vue.js";
12
- import { useWorkspace as ae } from "../../../../store/store.js";
13
- const re = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
13
+ import { useWorkspace as re } from "../../../../store/store.js";
14
+ const ae = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
14
15
  key: 0,
15
16
  class: "flex items-center gap-1 text-c-3"
16
17
  }, me = {
@@ -19,170 +20,163 @@ const re = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
19
20
  }, de = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, fe = {
20
21
  key: 1,
21
22
  class: "pl-2"
22
- }, we = /* @__PURE__ */ E({
23
+ }, we = /* @__PURE__ */ z({
23
24
  __name: "RequestAuth",
24
25
  props: {
25
26
  selectedSecuritySchemeUids: {},
26
27
  title: {}
27
28
  },
28
- setup(w) {
29
- const {
30
- activeCollection: a,
31
- activeRequest: h,
32
- collectionMutators: $,
33
- isReadOnly: y,
34
- requestMutators: I,
35
- securitySchemes: S,
36
- securitySchemeMutators: K
37
- } = ae(), T = g(null), C = g(null), b = Q(), U = g(void 0), A = `combobox-${ee()}`, D = f(() => {
29
+ setup(R) {
30
+ const { activeCollection: u, activeRequest: h } = Q(), {
31
+ collectionMutators: M,
32
+ isReadOnly: x,
33
+ requestMutators: V,
34
+ securitySchemes: q,
35
+ securitySchemeMutators: I
36
+ } = re(), K = b(null), $ = b(null), y = X(), w = b(void 0), C = `combobox-${te()}`, U = f(() => {
38
37
  var l, s;
39
- const e = ((l = h.value) == null ? void 0 : l.security) ?? ((s = a.value) == null ? void 0 : s.security) ?? [];
38
+ const e = ((l = h.value) == null ? void 0 : l.security) ?? ((s = u.value) == null ? void 0 : s.security) ?? [];
40
39
  return { filteredRequirements: e.filter((n) => Object.keys(n).length), requirements: e };
41
- }), j = f(() => {
40
+ }), T = f(() => {
42
41
  var t;
43
- return (((t = a.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => S[l]).filter((l) => l);
44
- }), N = f(
42
+ return (((t = u.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => q[l]).filter((l) => l);
43
+ }), j = f(
45
44
  () => {
46
- const e = [...j.value], t = [];
47
- D.value.filteredRequirements.forEach((r) => {
48
- const o = e.findIndex(
49
- (x) => x.nameKey === Object.keys(r)[0]
45
+ const e = [...T.value], t = [];
46
+ U.value.filteredRequirements.forEach((o) => {
47
+ const d = e.findIndex(
48
+ (F) => F.nameKey === Object.keys(o)[0]
50
49
  );
51
- o > -1 && (t.push(e[o]), e.splice(o, 1));
50
+ d > -1 && (t.push(e[d]), e.splice(d, 1));
52
51
  });
53
52
  const l = e.map(
54
- (r) => q(r)
53
+ (o) => k(o)
55
54
  ), s = t.map(
56
- (r) => q(r)
55
+ (o) => k(o)
57
56
  ), n = [
58
57
  { label: "Required authentication", options: s },
59
58
  { label: "Available authentication", options: l }
60
59
  ];
61
- return y.value ? s.length ? n : l : (n.push({
60
+ return x ? s.length ? n : l : (n.push({
62
61
  label: "Add new authentication",
63
62
  options: se
64
63
  }), n);
65
64
  }
66
- ), _ = f(() => {
67
- const { filteredRequirements: e, requirements: t } = D.value;
65
+ ), S = f(() => {
66
+ const { filteredRequirements: e, requirements: t } = U.value;
68
67
  if (!t.length) return null;
69
- const l = e.length < t.length, s = l ? "Unlock" : "Lock", n = l ? "Optional" : "Required", o = `${e.length === 1 ? Object.keys(e[0])[0] : "Authentication"} ${n}`;
70
- return { icon: s, text: o };
71
- }), O = (e) => {
72
- !a.value || !h.value || (y.value ? $.edit(
73
- a.value.uid,
68
+ const l = e.length < t.length, s = l ? "Unlock" : "Lock", n = l ? "Optional" : "Required", d = `${e.length === 1 ? Object.keys(e[0])[0] : "Authentication"} ${n}`;
69
+ return { icon: s, text: d };
70
+ }), A = (e) => {
71
+ !u.value || !h.value || (x ? M.edit(
72
+ u.value.uid,
74
73
  "selectedSecuritySchemeUids",
75
74
  e
76
- ) : I.edit(
75
+ ) : V.edit(
77
76
  h.value.uid,
78
77
  "selectedSecuritySchemeUids",
79
78
  e
80
79
  ));
81
80
  }, v = f(
82
- () => w.selectedSecuritySchemeUids.map(
83
- (e) => q(S[e])
81
+ () => R.selectedSecuritySchemeUids.map(
82
+ (e) => k(q[e])
84
83
  )
85
84
  );
86
- function F(e) {
87
- var n, r;
88
- if (!((n = a.value) != null && n.uid) || !((r = h.value) != null && r.uid)) return;
85
+ function N(e) {
86
+ var s, n;
87
+ if (!((s = u.value) != null && s.uid) || !((n = h.value) != null && n.uid)) return;
89
88
  const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => o);
90
89
  if (t != null && t.payload) {
91
- const o = K.add(
90
+ const o = I.add(
92
91
  t.payload,
93
- a.value.uid
92
+ u.value.uid
94
93
  );
95
94
  o && l.push(o.uid);
96
95
  }
97
- const s = l.filter((o) => !a.value.auth[o]);
98
- $.edit(
99
- a.value.uid,
100
- "auth",
101
- s.reduce((o, x) => (o[x] = oe(S[x]), o), a.value.auth)
102
- ), O(l);
96
+ A(l);
103
97
  }
104
- const V = (e) => {
98
+ const D = (e) => {
105
99
  var t;
106
- O(
107
- w.selectedSecuritySchemeUids.filter((l) => l !== e)
108
- ), (t = C.value) == null || t.$el.focus();
100
+ A(
101
+ R.selectedSecuritySchemeUids.filter((l) => l !== e)
102
+ ), (t = $.value) == null || t.$el.focus();
109
103
  };
110
- function z(e) {
111
- U.value = e, b.show();
104
+ function E(e) {
105
+ w.value = e, y.show();
112
106
  }
113
- return (e, t) => (d(), W(J, {
107
+ return (e, t) => (m(), W(J, {
114
108
  class: "group/params",
115
109
  itemCount: v.value.length
116
110
  }, {
117
- title: u(() => [
118
- m("div", re, [
119
- k(R(e.title) + " ", 1),
120
- _.value ? (d(), p("div", ue, [
121
- k(R(_.value.text) + " ", 1),
122
- c(i(M), {
111
+ title: r(() => [
112
+ a("div", ae, [
113
+ _(g(e.title) + " ", 1),
114
+ S.value ? (m(), p("div", ue, [
115
+ _(g(S.value.text) + " ", 1),
116
+ c(i(B), {
123
117
  class: "text-c-3",
124
- icon: _.value.icon,
118
+ icon: S.value.icon,
125
119
  size: "xs"
126
120
  }, null, 8, ["icon"])
127
121
  ])) : L("", !0)
128
122
  ])
129
123
  ]),
130
- default: u(() => [
131
- m("form", null, [
124
+ default: r(() => [
125
+ a("form", null, [
132
126
  c(i(ie), {
133
127
  class: "flex-1",
134
128
  columns: [""]
135
129
  }, {
136
- default: u(() => [
130
+ default: r(() => [
137
131
  c(i(ne), null, {
138
- default: u(() => [
132
+ default: r(() => [
139
133
  c(i(ce), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
140
- default: u(() => [
141
- c(i(X), {
134
+ default: r(() => [
135
+ c(i(Y), {
142
136
  ref_key: "comboboxRef",
143
- ref: T,
137
+ ref: K,
144
138
  class: "text-xs w-full",
145
139
  fullWidth: "",
146
- isDeletable: !i(y),
140
+ isDeletable: !i(x),
147
141
  modelValue: v.value,
148
142
  multiple: "",
149
- options: N.value,
143
+ options: j.value,
150
144
  style: { "margin-left": "120px" },
151
- teleport: `#${A}`,
152
- onDelete: z,
153
- "onUpdate:modelValue": F
145
+ teleport: `#${C}`,
146
+ onDelete: E,
147
+ "onUpdate:modelValue": N
154
148
  }, {
155
- default: u(() => [
156
- c(i(Y), {
149
+ default: r(() => [
150
+ c(i(Z), {
157
151
  ref_key: "comboboxButtonRef",
158
- ref: C,
152
+ ref: $,
159
153
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start -outline-offset-2",
160
154
  fullWidth: "",
161
155
  variant: "ghost"
162
156
  }, {
163
- default: u(() => [
164
- t[3] || (t[3] = m("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
165
- v.value.length ? (d(), p("div", me, [
166
- t[1] || (t[1] = m("div", { class: "fade-left" }, null, -1)),
167
- m("div", de, [
168
- (d(!0), p(H, null, P(v.value, (l) => (d(), p("span", {
157
+ default: r(() => [
158
+ t[3] || (t[3] = a("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
159
+ v.value.length ? (m(), p("div", me, [
160
+ t[1] || (t[1] = a("div", { class: "fade-left" }, null, -1)),
161
+ a("div", de, [
162
+ (m(!0), p(H, null, P(v.value, (l) => (m(), p("span", {
169
163
  key: l.id,
170
164
  class: "cm-pill flex items-center mx-0 h-fit pr-0.5 !bg-b-2 text-c-1"
171
165
  }, [
172
- k(R(l.label) + " ", 1),
173
- c(i(Z), {
166
+ _(g(l.label) + " ", 1),
167
+ c(i(ee), {
174
168
  class: "cursor-pointer -ml-0.5 text-c-3 hover:text-c-1 rounded-full",
175
169
  icon: "Close",
176
170
  label: `Remove ${l.label}`,
177
171
  size: "xs",
178
- onClick: B((s) => V(l.id), ["stop"]),
179
- onKeydown: G(B((s) => V(l.id), ["stop"]), ["enter"])
172
+ onClick: O((s) => D(l.id), ["stop"]),
173
+ onKeydown: G(O((s) => D(l.id), ["stop"]), ["enter"])
180
174
  }, null, 8, ["label", "onClick", "onKeydown"])
181
175
  ]))), 128))
182
176
  ]),
183
- t[2] || (t[2] = m("div", { class: "fade-right" }, null, -1))
184
- ])) : (d(), p("div", fe, " None ")),
185
- c(i(M), {
177
+ t[2] || (t[2] = a("div", { class: "fade-right" }, null, -1))
178
+ ])) : (m(), p("div", fe, " None ")),
179
+ c(i(B), {
186
180
  class: "min-w-3 ml-auto mr-2.5",
187
181
  icon: "ChevronDown",
188
182
  size: "xs"
@@ -199,16 +193,16 @@ const re = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
199
193
  ]),
200
194
  _: 1
201
195
  }),
202
- c(le, { selectedSecuritySchemeUids: e.selectedSecuritySchemeUids }, null, 8, ["selectedSecuritySchemeUids"])
196
+ c(oe, { selectedSecuritySchemeUids: e.selectedSecuritySchemeUids }, null, 8, ["selectedSecuritySchemeUids"])
203
197
  ]),
204
198
  _: 1
205
199
  }),
206
- c(te, {
207
- scheme: U.value,
208
- state: i(b),
209
- onClose: t[0] || (t[0] = (l) => i(b).hide())
200
+ c(le, {
201
+ scheme: w.value,
202
+ state: i(y),
203
+ onClose: t[0] || (t[0] = (l) => i(y).hide())
210
204
  }, null, 8, ["scheme", "state"]),
211
- m("div", { id: A })
205
+ a("div", { id: C })
212
206
  ])
213
207
  ]),
214
208
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA8JA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAiSF,wBAMG"}
1
+ {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA6IA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAkRF,wBAMG"}
@@ -1,143 +1,136 @@
1
- import { defineComponent as b, computed as g, openBlock as r, createElementBlock as s, Fragment as f, renderList as x, createVNode as o, unref as i, withCtx as l, createBlock as k, createTextVNode as n, toDisplayString as T, createCommentVNode as c, capitalize as B } from "vue";
2
- import y from "../RequestAuthDataTableInput.vue.js";
3
- import E from "./OAuth2.vue.js";
4
- import p from "../../../../components/DataTable/DataTableRow.vue.js";
5
- import F from "../../../../components/DataTable/DataTableCell.vue.js";
6
- import { isOauth2Example as R } from "../../libs/oauth2.js";
7
- import { useWorkspace as C } from "../../../../store/store.js";
8
- const A = /* @__PURE__ */ b({
1
+ import { defineComponent as g, computed as T, openBlock as d, createElementBlock as n, Fragment as i, renderList as U, createVNode as u, unref as r, withCtx as l, createBlock as y, createTextVNode as p, toDisplayString as B, createCommentVNode as V, capitalize as x } from "vue";
2
+ import { useActiveEntities as F } from "../../../../store/active-entities.js";
3
+ import f from "../RequestAuthDataTableInput.vue.js";
4
+ import R from "./OAuth2.vue.js";
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
9
  __name: "RequestExampleAuth",
10
10
  props: {
11
11
  selectedSecuritySchemeUids: {}
12
12
  },
13
13
  setup(_) {
14
- const { activeCollection: V, activeRequest: $, collectionMutators: v, securitySchemes: w } = C(), U = g(() => !V.value || !$.value ? [] : _.selectedSecuritySchemeUids.map((d) => ({
15
- example: V.value.auth[d],
16
- scheme: w[d]
17
- })));
18
- function S(d) {
19
- return `${B(d.nameKey)}: ${d.type} ${d.type === "oauth2" ? d.flow.type : ""}`;
20
- }
21
- function m(d, u, e, t) {
22
- var a;
23
- (a = V.value) != null && a.uid && v.edit(
24
- V.value.uid,
25
- `auth.${d}.${e}`,
26
- t
27
- );
28
- }
29
- return (d, u) => (r(!0), s(f, null, x(U.value, ({ scheme: e, example: t }) => (r(), s(f, {
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, {
30
23
  key: e.uid
31
24
  }, [
32
- o(i(p), { class: "group/delete" }, {
25
+ u(r(m), { class: "group/delete" }, {
33
26
  default: l(() => [
34
- U.value.length > 1 ? (r(), k(i(F), {
27
+ k.value.length > 1 ? (d(), y(r(C), {
35
28
  key: 0,
36
29
  class: "text-c-3 pl-2 font-medium flex items-center"
37
30
  }, {
38
31
  default: l(() => [
39
- n(T(S(e)), 1)
32
+ p(B(S(e)), 1)
40
33
  ]),
41
34
  _: 2
42
- }, 1024)) : c("", !0)
35
+ }, 1024)) : V("", !0)
43
36
  ]),
44
37
  _: 2
45
38
  }, 1024),
46
- e.type === "http" && t.type === "http" ? (r(), s(f, { key: 0 }, [
47
- e.scheme === "bearer" ? (r(), k(i(p), { key: 0 }, {
39
+ e.type === "http" ? (d(), n(i, { key: 0 }, [
40
+ e.scheme === "bearer" ? (d(), y(r(m), { key: 0 }, {
48
41
  default: l(() => [
49
- o(y, {
42
+ u(f, {
50
43
  id: `http-bearer-token-${e.uid}`,
51
- modelValue: t.token,
44
+ modelValue: e.token,
52
45
  placeholder: "Token",
53
46
  type: "password",
54
- "onUpdate:modelValue": (a) => m(e.uid, t, "token", a)
47
+ "onUpdate:modelValue": (o) => s(e.uid, "token", o)
55
48
  }, {
56
- default: l(() => u[0] || (u[0] = [
57
- n(" Bearer Token ")
49
+ default: l(() => t[0] || (t[0] = [
50
+ p(" Bearer Token ")
58
51
  ])),
59
52
  _: 2
60
53
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
61
54
  ]),
62
55
  _: 2
63
- }, 1024)) : e.scheme === "basic" ? (r(), s(f, { key: 1 }, [
64
- o(i(p), null, {
56
+ }, 1024)) : e.scheme === "basic" ? (d(), n(i, { key: 1 }, [
57
+ u(r(m), null, {
65
58
  default: l(() => [
66
- o(y, {
59
+ u(f, {
67
60
  id: `http-basic-username-${e.uid}`,
68
61
  class: "text-c-2",
69
- modelValue: t.username,
62
+ modelValue: e.username,
70
63
  placeholder: "ScalarEnjoyer01",
71
64
  required: "",
72
- "onUpdate:modelValue": (a) => m(e.uid, t, "username", a)
65
+ "onUpdate:modelValue": (o) => s(e.uid, "username", o)
73
66
  }, {
74
- default: l(() => u[1] || (u[1] = [
75
- n(" Username ")
67
+ default: l(() => t[1] || (t[1] = [
68
+ p(" Username ")
76
69
  ])),
77
70
  _: 2
78
71
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
79
72
  ]),
80
73
  _: 2
81
74
  }, 1024),
82
- o(i(p), null, {
75
+ u(r(m), null, {
83
76
  default: l(() => [
84
- o(y, {
77
+ u(f, {
85
78
  id: `http-basic-password-${e.uid}`,
86
- modelValue: t.password,
79
+ modelValue: e.password,
87
80
  placeholder: "xxxxxx",
88
81
  type: "password",
89
- "onUpdate:modelValue": (a) => m(e.uid, t, "password", a)
82
+ "onUpdate:modelValue": (o) => s(e.uid, "password", o)
90
83
  }, {
91
- default: l(() => u[2] || (u[2] = [
92
- n(" Password ")
84
+ default: l(() => t[2] || (t[2] = [
85
+ p(" Password ")
93
86
  ])),
94
87
  _: 2
95
88
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
96
89
  ]),
97
90
  _: 2
98
91
  }, 1024)
99
- ], 64)) : c("", !0)
100
- ], 64)) : e.type === "apiKey" && t.type === "apiKey" ? (r(), s(f, { key: 1 }, [
101
- o(i(p), null, {
92
+ ], 64)) : V("", !0)
93
+ ], 64)) : e.type === "apiKey" ? (d(), n(i, { key: 1 }, [
94
+ u(r(m), null, {
102
95
  default: l(() => [
103
- o(y, {
96
+ u(f, {
104
97
  id: `api-key-name-${e.uid}`,
105
- modelValue: t.name,
98
+ modelValue: e.name,
106
99
  placeholder: "api-key",
107
- "onUpdate:modelValue": (a) => m(e.uid, t, "name", a)
100
+ "onUpdate:modelValue": (o) => s(e.uid, "name", o)
108
101
  }, {
109
- default: l(() => u[3] || (u[3] = [
110
- n(" Name ")
102
+ default: l(() => t[3] || (t[3] = [
103
+ p(" Name ")
111
104
  ])),
112
105
  _: 2
113
106
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
114
107
  ]),
115
108
  _: 2
116
109
  }, 1024),
117
- o(i(p), null, {
110
+ u(r(m), null, {
118
111
  default: l(() => [
119
- o(y, {
112
+ u(f, {
120
113
  id: `api-key-value-add-${e.uid}`,
121
- modelValue: t.value,
114
+ modelValue: e.value,
122
115
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
123
- "onUpdate:modelValue": (a) => m(e.uid, t, "value", a)
116
+ "onUpdate:modelValue": (o) => s(e.uid, "value", o)
124
117
  }, {
125
- default: l(() => u[4] || (u[4] = [
126
- n(" Value ")
118
+ default: l(() => t[4] || (t[4] = [
119
+ p(" Value ")
127
120
  ])),
128
121
  _: 2
129
122
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
130
123
  ]),
131
124
  _: 2
132
125
  }, 1024)
133
- ], 64)) : e.type === "oauth2" && i(R)(t) ? (r(), k(E, {
134
- key: 2,
135
- example: t,
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,
136
129
  scheme: e
137
- }, null, 8, ["example", "scheme"])) : c("", !0)
130
+ }, null, 8, ["flow", "scheme"]))), 128)) : V("", !0)
138
131
  ], 64))), 128));
139
132
  }
140
133
  });
141
134
  export {
142
- A as default
135
+ j as default
143
136
  };
@@ -27,8 +27,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
27
27
  onInputFocus?: (() => any) | undefined;
28
28
  onInputBlur?: (() => any) | undefined;
29
29
  }>, {
30
- readOnly: boolean;
31
30
  required: boolean;
31
+ readOnly: boolean;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
34
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAoDA,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAqBJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBATpB,GAAG;sBACN,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cApJN,OAAO;cAFP,OAAO;6EA+JpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestAuthDataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestAuthDataTableInput.vue"],"names":[],"mappings":"AAoDA,KAAK,WAAW,GAAG;IACf,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAqBJ,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;yBATpB,GAAG;sBACN,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;cAtJN,OAAO;cAEP,OAAO;6EA6JpB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAmhBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAw0BF,wBAOG"}
1
+ {"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAshBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAy0BF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestBody.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8da1a870"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-14721732"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };