@scalar/api-client 2.1.51 → 2.2.0

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 (201) hide show
  1. package/CHANGELOG.md +47 -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 +35 -42
  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 +16 -15
  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/IconSelector.vue.js +2 -2
  38. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  39. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
  40. package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
  41. package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
  42. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
  43. package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
  44. package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
  45. package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
  46. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
  47. package/dist/components/Search/useSearch.d.ts.map +1 -1
  48. package/dist/components/Search/useSearch.js +20 -19
  49. package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
  50. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  51. package/dist/components/Sidebar/Sidebar.vue.js +2 -2
  52. package/dist/components/Sidebar/Sidebar.vue2.js +37 -39
  53. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  54. package/dist/components/TopNav/TopNav.vue.js +1 -1
  55. package/dist/components/TopNav/TopNav.vue2.js +20 -19
  56. package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
  57. package/dist/hooks/index.js +3 -2
  58. package/dist/hooks/useLayout.d.ts +2 -0
  59. package/dist/hooks/useLayout.d.ts.map +1 -1
  60. package/dist/hooks/useLayout.js +4 -3
  61. package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
  62. package/dist/layouts/App/ApiClientApp.vue.js +38 -37
  63. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  64. package/dist/layouts/App/MainLayout.vue.js +3 -3
  65. package/dist/layouts/App/create-api-client-app.d.ts +670 -1232
  66. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  67. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  68. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  69. package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
  70. package/dist/layouts/Modal/create-api-client-modal.d.ts +1384 -2508
  71. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  72. package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
  73. package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
  74. package/dist/layouts/Web/create-api-client-web.d.ts +670 -1232
  75. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  76. package/dist/libs/create-client.d.ts +675 -1236
  77. package/dist/libs/create-client.d.ts.map +1 -1
  78. package/dist/libs/create-client.js +100 -95
  79. package/dist/libs/hot-keys.d.ts +1 -1
  80. package/dist/libs/send-request.d.ts +3 -7
  81. package/dist/libs/send-request.d.ts.map +1 -1
  82. package/dist/libs/send-request.js +126 -119
  83. package/dist/libs/string-template.d.ts.map +1 -1
  84. package/dist/libs/string-template.js +23 -22
  85. package/dist/store/active-entities.d.ts +333 -0
  86. package/dist/store/active-entities.d.ts.map +1 -0
  87. package/dist/store/active-entities.js +97 -0
  88. package/dist/store/collections.d.ts +4 -274
  89. package/dist/store/collections.d.ts.map +1 -1
  90. package/dist/store/cookies.d.ts +4 -4
  91. package/dist/store/environment.d.ts +4 -4
  92. package/dist/store/import-spec.d.ts +0 -54
  93. package/dist/store/import-spec.d.ts.map +1 -1
  94. package/dist/store/index.js +4 -3
  95. package/dist/store/request-example.d.ts +4 -4
  96. package/dist/store/requests.d.ts +15 -15
  97. package/dist/store/security-schemes.d.ts +527 -317
  98. package/dist/store/security-schemes.d.ts.map +1 -1
  99. package/dist/store/security-schemes.js +33 -41
  100. package/dist/store/servers.d.ts +4 -4
  101. package/dist/store/store-context.d.ts +0 -3
  102. package/dist/store/store-context.d.ts.map +1 -1
  103. package/dist/store/store.d.ts +640 -5297
  104. package/dist/store/store.d.ts.map +1 -1
  105. package/dist/store/store.js +111 -189
  106. package/dist/store/tags.d.ts +4 -4
  107. package/dist/store/workspace.d.ts +14 -24
  108. package/dist/store/workspace.d.ts.map +1 -1
  109. package/dist/style.css +1 -1
  110. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  111. package/dist/views/Cookies/CookieForm.vue.js +14 -13
  112. package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
  113. package/dist/views/Cookies/CookieRaw.vue.js +14 -13
  114. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
  115. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  116. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  117. package/dist/views/Request/Request.vue.js +2 -2
  118. package/dist/views/Request/Request.vue2.js +94 -94
  119. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
  120. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  121. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
  122. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
  123. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  124. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
  125. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  126. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  127. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
  128. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
  129. package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
  130. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
  131. package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  132. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  133. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  134. package/dist/views/Request/RequestSection/RequestBody.vue2.js +29 -28
  135. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  136. package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
  137. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
  138. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
  139. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  140. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  141. package/dist/views/Request/RequestSection/RequestSection.vue2.js +19 -18
  142. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  143. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  144. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +27 -27
  145. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  146. package/dist/views/Request/RequestSidebar.vue.js +1 -1
  147. package/dist/views/Request/RequestSidebar.vue2.js +74 -75
  148. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  149. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  150. package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
  151. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  152. package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
  153. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
  154. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  155. package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
  156. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
  157. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
  158. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +35 -15
  159. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  160. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
  161. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +23 -22
  162. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  163. package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
  164. package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
  165. package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
  166. package/dist/views/Request/consts/new-auth-options.js +16 -8
  167. package/dist/views/Request/handle-drag.d.ts +2 -1
  168. package/dist/views/Request/handle-drag.d.ts.map +1 -1
  169. package/dist/views/Request/handle-drag.js +23 -25
  170. package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
  171. package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
  172. package/dist/views/Request/libs/auth.d.ts +1 -29
  173. package/dist/views/Request/libs/auth.d.ts.map +1 -1
  174. package/dist/views/Request/libs/auth.js +2 -9
  175. package/dist/views/Request/libs/index.js +6 -8
  176. package/dist/views/Request/libs/live-sync.d.ts +6 -5
  177. package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
  178. package/dist/views/Request/libs/live-sync.js +164 -185
  179. package/dist/views/Request/libs/oauth2.d.ts +6 -10
  180. package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
  181. package/dist/views/Request/libs/oauth2.js +54 -69
  182. package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
  183. package/dist/views/Servers/ServerForm.vue.js +14 -13
  184. package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
  185. package/dist/views/Servers/Servers.vue2.js +18 -17
  186. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  187. package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
  188. package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
  189. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
  190. package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
  191. package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
  192. package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
  193. package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
  194. package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
  195. package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
  196. package/package.json +12 -12
  197. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
  198. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
  199. package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
  200. package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
  201. package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
@@ -1,67 +1,61 @@
1
- import { defineComponent as F, openBlock as r, createElementBlock as w, Fragment as y, createVNode as d, unref as a, withCtx as o, createTextVNode as u, createElementVNode as U, createBlock as m, createCommentVNode as n } from "vue";
2
- import i from "../RequestAuthDataTableInput.vue.js";
3
- import { useLoadingState as x, ScalarButton as c } from "@scalar/components";
4
- import { pkceOptions as P } from "@scalar/oas-utils/entities/spec";
5
- import { useToasts as A } from "@scalar/use-toasts";
6
- import B from "./OAuthScopesInput.vue.js";
7
- import s from "../../../../components/DataTable/DataTableRow.vue.js";
1
+ import { defineComponent as C, openBlock as i, createElementBlock as k, Fragment as y, createVNode as d, unref as a, withCtx as o, createTextVNode as s, createElementVNode as V, createBlock as m, createCommentVNode as f } from "vue";
2
+ import { useActiveEntities as T } from "../../../../store/active-entities.js";
3
+ import n from "../RequestAuthDataTableInput.vue.js";
4
+ import { useLoadingState as P, ScalarButton as U } from "@scalar/components";
5
+ import { pkceOptions as A } from "@scalar/oas-utils/entities/spec";
6
+ import { useToasts as B } from "@scalar/use-toasts";
7
+ import F from "./OAuthScopesInput.vue.js";
8
+ import u from "../../../../components/DataTable/DataTableRow.vue.js";
8
9
  import { authorizeOauth2 as O } from "../../libs/oauth2.js";
9
- import { useWorkspace as I } from "../../../../store/store.js";
10
- const R = { class: "h-8 flex items-center justify-self-end" }, b = { class: "h-8 flex items-center justify-self-end" }, W = /* @__PURE__ */ F({
10
+ import { useWorkspace as E } from "../../../../store/store.js";
11
+ const I = { class: "h-8 flex items-center justify-self-end" }, R = { class: "h-8 flex items-center justify-self-end" }, X = /* @__PURE__ */ C({
11
12
  __name: "OAuth2",
12
13
  props: {
13
- example: {},
14
- scheme: {}
14
+ scheme: {},
15
+ flow: {}
15
16
  },
16
- setup(g) {
17
- const p = g, h = x(), { toast: $ } = A(), {
18
- activeCollection: V,
19
- activeServer: v,
20
- collectionMutators: S,
21
- isReadOnly: z,
22
- securitySchemeMutators: C
23
- } = I(), f = (l, e) => V.value && S.edit(V.value.uid, l, e), k = (l, e) => C.edit(p.scheme.uid, l, e), T = async () => {
17
+ setup(w) {
18
+ const p = P(), { toast: $ } = B(), { activeCollection: g, activeServer: S } = T(), { isReadOnly: v, securitySchemeMutators: z } = E(), r = (l, e) => z.edit(w.scheme.uid, l, e), h = async () => {
24
19
  var t;
25
- if (h.isLoading || !((t = V.value) != null && t.uid)) return;
26
- h.startLoading();
20
+ if (p.isLoading || !((t = g.value) != null && t.uid)) return;
21
+ p.startLoading();
27
22
  const [l, e] = await O(
28
- p.scheme,
29
- p.example,
30
- v.value
31
- ).finally(() => h.stopLoading());
32
- e ? f(`auth.${p.scheme.uid}.token`, e) : (console.error(l), $((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
23
+ w.flow,
24
+ S.value
25
+ ).finally(() => p.stopLoading());
26
+ e ? r(`flows.${w.flow.type}.token`, e) : (console.error(l), $((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
33
27
  };
34
- return (l, e) => l.example.token ? (r(), w(y, { key: 0 }, [
35
- d(a(s), null, {
28
+ return (l, e) => l.flow.token ? (i(), k(y, { key: 0 }, [
29
+ d(a(u), null, {
36
30
  default: o(() => [
37
- d(i, {
31
+ d(n, {
38
32
  id: "oauth2-access-token",
39
33
  class: "border-r-transparent",
40
- modelValue: l.example.token,
34
+ modelValue: l.flow.token,
41
35
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
42
36
  type: "password",
43
- "onUpdate:modelValue": e[0] || (e[0] = (t) => f(`auth.${p.scheme.uid}.token`, t))
37
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => r(`flows.${l.flow.type}.token`, t))
44
38
  }, {
45
39
  default: o(() => e[10] || (e[10] = [
46
- u(" Access Token ")
40
+ s(" Access Token ")
47
41
  ])),
48
42
  _: 1
49
43
  }, 8, ["modelValue"])
50
44
  ]),
51
45
  _: 1
52
46
  }),
53
- d(a(s), { class: "min-w-full" }, {
47
+ d(a(u), { class: "min-w-full" }, {
54
48
  default: o(() => [
55
- U("div", R, [
56
- d(a(c), {
49
+ V("div", I, [
50
+ d(a(U), {
57
51
  class: "p-0 py-0.5 px-2 mr-1",
58
- loading: a(h),
52
+ loading: a(p),
59
53
  size: "sm",
60
54
  variant: "outlined",
61
- onClick: e[1] || (e[1] = (t) => f(`auth.${p.scheme.uid}.token`, ""))
55
+ onClick: e[1] || (e[1] = (t) => r(`flows.${l.flow.type}.token`, ""))
62
56
  }, {
63
57
  default: o(() => e[11] || (e[11] = [
64
- u(" Clear ")
58
+ s(" Clear ")
65
59
  ])),
66
60
  _: 1
67
61
  }, 8, ["loading"])
@@ -69,159 +63,162 @@ const R = { class: "h-8 flex items-center justify-self-end" }, b = { class: "h-8
69
63
  ]),
70
64
  _: 1
71
65
  })
72
- ], 64)) : (r(), w(y, { key: 1 }, [
73
- a(z) ? n("", !0) : (r(), m(a(s), { key: 0 }, {
66
+ ], 64)) : (i(), k(y, { key: 1 }, [
67
+ a(v) ? f("", !0) : (i(), m(a(u), { key: 0 }, {
74
68
  default: o(() => [
75
- "authorizationUrl" in l.scheme.flow ? (r(), m(i, {
69
+ "authorizationUrl" in l.flow ? (i(), m(n, {
76
70
  key: 0,
77
71
  id: `oauth2-authorization-url-${l.scheme.uid}`,
78
- modelValue: l.scheme.flow.authorizationUrl,
72
+ modelValue: l.flow.authorizationUrl,
79
73
  placeholder: "https://galaxy.scalar.com/authorize",
80
- "onUpdate:modelValue": e[2] || (e[2] = (t) => k("flow.authorizationUrl", t))
74
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => r(`flows.${l.flow.type}.authorizationUrl`, t))
81
75
  }, {
82
76
  default: o(() => e[12] || (e[12] = [
83
- u(" Auth Url ")
77
+ s(" Auth Url ")
84
78
  ])),
85
79
  _: 1
86
- }, 8, ["id", "modelValue"])) : n("", !0),
87
- "tokenUrl" in l.scheme.flow ? (r(), m(i, {
80
+ }, 8, ["id", "modelValue"])) : f("", !0),
81
+ "tokenUrl" in l.flow ? (i(), m(n, {
88
82
  key: 1,
89
83
  id: `oauth2-token-url-${l.scheme.uid}`,
90
- modelValue: l.scheme.flow.tokenUrl,
84
+ modelValue: l.flow.tokenUrl,
91
85
  placeholder: "https://galaxy.scalar.com/token",
92
- "onUpdate:modelValue": e[3] || (e[3] = (t) => k("flow.tokenUrl", t))
86
+ "onUpdate:modelValue": e[3] || (e[3] = (t) => r(`flows.${l.flow.type}.tokenUrl`, t))
93
87
  }, {
94
88
  default: o(() => e[13] || (e[13] = [
95
- u(" Token Url ")
89
+ s(" Token Url ")
96
90
  ])),
97
91
  _: 1
98
- }, 8, ["id", "modelValue"])) : n("", !0)
92
+ }, 8, ["id", "modelValue"])) : f("", !0)
99
93
  ]),
100
94
  _: 1
101
95
  })),
102
- "x-scalar-redirect-uri" in l.scheme.flow ? (r(), m(a(s), { key: 1 }, {
96
+ "x-scalar-redirect-uri" in l.flow ? (i(), m(a(u), { key: 1 }, {
103
97
  default: o(() => [
104
- d(i, {
98
+ d(n, {
105
99
  id: `oauth2-redirect-uri-${l.scheme.uid}`,
106
- modelValue: l.scheme.flow["x-scalar-redirect-uri"],
100
+ modelValue: l.flow["x-scalar-redirect-uri"],
107
101
  placeholder: "https://galaxy.scalar.com/callback",
108
- "onUpdate:modelValue": e[4] || (e[4] = (t) => k("flow.x-scalar-redirect-uri", t))
102
+ "onUpdate:modelValue": e[4] || (e[4] = (t) => r(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
109
103
  }, {
110
104
  default: o(() => e[14] || (e[14] = [
111
- u(" Redirect Url ")
105
+ s(" Redirect Url ")
112
106
  ])),
113
107
  _: 1
114
108
  }, 8, ["id", "modelValue"])
115
109
  ]),
116
110
  _: 1
117
- })) : n("", !0),
118
- l.example.type === "oauth-password" ? (r(), w(y, { key: 2 }, [
119
- d(a(s), null, {
111
+ })) : f("", !0),
112
+ l.flow.type === "password" ? (i(), k(y, { key: 2 }, [
113
+ d(a(u), null, {
120
114
  default: o(() => [
121
- d(i, {
115
+ d(n, {
122
116
  id: `oauth2-password-username-${l.scheme.uid}`,
123
117
  class: "text-c-2",
124
- modelValue: l.example.username,
118
+ modelValue: l.flow.username,
125
119
  placeholder: "ScalarEnjoyer01",
126
- "onUpdate:modelValue": e[5] || (e[5] = (t) => f(`auth.${l.scheme.uid}.username`, t))
120
+ "onUpdate:modelValue": e[5] || (e[5] = (t) => r(`flows.${l.flow.type}.username`, t))
127
121
  }, {
128
122
  default: o(() => e[15] || (e[15] = [
129
- u(" Username ")
123
+ s(" Username ")
130
124
  ])),
131
125
  _: 1
132
126
  }, 8, ["id", "modelValue"])
133
127
  ]),
134
128
  _: 1
135
129
  }),
136
- d(a(s), null, {
130
+ d(a(u), null, {
137
131
  default: o(() => [
138
- d(i, {
132
+ d(n, {
139
133
  id: `oauth2-password-password-${l.scheme.uid}`,
140
- modelValue: l.example.password,
134
+ modelValue: l.flow.password,
141
135
  placeholder: "xxxxxx",
142
136
  type: "password",
143
- "onUpdate:modelValue": e[6] || (e[6] = (t) => f(`auth.${l.scheme.uid}.password`, t))
137
+ "onUpdate:modelValue": e[6] || (e[6] = (t) => r(`flows.${l.flow.type}.password`, t))
144
138
  }, {
145
139
  default: o(() => e[16] || (e[16] = [
146
- u(" Password ")
140
+ s(" Password ")
147
141
  ])),
148
142
  _: 1
149
143
  }, 8, ["id", "modelValue"])
150
144
  ]),
151
145
  _: 1
152
146
  })
153
- ], 64)) : n("", !0),
154
- d(a(s), null, {
147
+ ], 64)) : f("", !0),
148
+ d(a(u), null, {
155
149
  default: o(() => [
156
- d(i, {
150
+ d(n, {
157
151
  id: `oauth2-client-id-${l.scheme.uid}`,
158
- modelValue: l.scheme["x-scalar-client-id"],
152
+ modelValue: l.flow["x-scalar-client-id"],
159
153
  placeholder: "12345",
160
- "onUpdate:modelValue": e[7] || (e[7] = (t) => k("x-scalar-client-id", t))
154
+ "onUpdate:modelValue": e[7] || (e[7] = (t) => r(`flows.${l.flow.type}.x-scalar-client-id`, t))
161
155
  }, {
162
156
  default: o(() => e[17] || (e[17] = [
163
- u(" Client ID ")
157
+ s(" Client ID ")
164
158
  ])),
165
159
  _: 1
166
160
  }, 8, ["id", "modelValue"])
167
161
  ]),
168
162
  _: 1
169
163
  }),
170
- "clientSecret" in l.example ? (r(), m(a(s), { key: 3 }, {
164
+ "clientSecret" in l.flow ? (i(), m(a(u), { key: 3 }, {
171
165
  default: o(() => [
172
- d(i, {
166
+ d(n, {
173
167
  id: `oauth2-client-secret-${l.scheme.uid}`,
174
- modelValue: l.example.clientSecret,
168
+ modelValue: l.flow.clientSecret,
175
169
  placeholder: "XYZ123",
176
170
  type: "password",
177
- "onUpdate:modelValue": e[8] || (e[8] = (t) => f(`auth.${l.scheme.uid}.clientSecret`, t))
171
+ "onUpdate:modelValue": e[8] || (e[8] = (t) => r(`flows.${l.flow.type}.clientSecret`, t))
178
172
  }, {
179
173
  default: o(() => e[18] || (e[18] = [
180
- u(" Client Secret ")
174
+ s(" Client Secret ")
181
175
  ])),
182
176
  _: 1
183
177
  }, 8, ["id", "modelValue"])
184
178
  ]),
185
179
  _: 1
186
- })) : n("", !0),
187
- "x-usePkce" in l.scheme.flow ? (r(), m(a(s), { key: 4 }, {
180
+ })) : f("", !0),
181
+ "x-usePkce" in l.flow ? (i(), m(a(u), { key: 4 }, {
188
182
  default: o(() => [
189
- d(i, {
183
+ d(n, {
190
184
  id: `oauth2-use-pkce-${l.scheme.uid}`,
191
- enum: a(P),
192
- modelValue: l.scheme.flow["x-usePkce"],
185
+ enum: a(A),
186
+ modelValue: l.flow["x-usePkce"],
193
187
  readOnly: "",
194
- "onUpdate:modelValue": e[9] || (e[9] = (t) => k("flow.x-usePkce", t))
188
+ "onUpdate:modelValue": e[9] || (e[9] = (t) => r(
189
+ `flows.${l.flow.type}.x-usePkce`,
190
+ t
191
+ ))
195
192
  }, {
196
193
  default: o(() => e[19] || (e[19] = [
197
- u(" Use PKCE ")
194
+ s(" Use PKCE ")
198
195
  ])),
199
196
  _: 1
200
197
  }, 8, ["id", "enum", "modelValue"])
201
198
  ]),
202
199
  _: 1
203
- })) : n("", !0),
204
- Object.keys(l.scheme.flow.scopes ?? {}).length ? (r(), m(a(s), { key: 5 }, {
200
+ })) : f("", !0),
201
+ Object.keys(l.flow.scopes ?? {}).length ? (i(), m(a(u), { key: 5 }, {
205
202
  default: o(() => [
206
- d(B, {
207
- activeFlow: l.scheme.flow,
208
- updateScheme: k
209
- }, null, 8, ["activeFlow"])
203
+ d(F, {
204
+ flow: l.flow,
205
+ updateScheme: r
206
+ }, null, 8, ["flow"])
210
207
  ]),
211
208
  _: 1
212
- })) : n("", !0),
213
- d(a(s), { class: "min-w-full" }, {
209
+ })) : f("", !0),
210
+ d(a(u), { class: "min-w-full" }, {
214
211
  default: o(() => [
215
- U("div", b, [
216
- d(a(c), {
212
+ V("div", R, [
213
+ d(a(U), {
217
214
  class: "p-0 py-0.5 px-2 mr-1",
218
- loading: a(h),
215
+ loading: a(p),
219
216
  size: "sm",
220
217
  variant: "outlined",
221
- onClick: T
218
+ onClick: h
222
219
  }, {
223
220
  default: o(() => e[20] || (e[20] = [
224
- u(" Authorize ")
221
+ s(" Authorize ")
225
222
  ])),
226
223
  _: 1
227
224
  }, 8, ["loading"])
@@ -233,5 +230,5 @@ const R = { class: "h-8 flex items-center justify-self-end" }, b = { class: "h-8
233
230
  }
234
231
  });
235
232
  export {
236
- W as default
233
+ X as default
237
234
  };
@@ -1,7 +1,7 @@
1
1
  import type { UpdateScheme } from '../../../../store/index.js';
2
- import type { SecuritySchemeOauth2 } from '@scalar/oas-utils/entities/spec';
2
+ import type { Oauth2Flow } from '@scalar/oas-utils/entities/spec';
3
3
  type __VLS_Props = {
4
- activeFlow: SecuritySchemeOauth2['flow'];
4
+ flow: Oauth2Flow;
5
5
  updateScheme: UpdateScheme;
6
6
  };
7
7
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAK3E,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAA;IACxC,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAyPF,wBAOG"}
1
+ {"version":3,"file":"OAuthScopesInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAKjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;;AAyPF,wBAOG"}
@@ -1,90 +1,93 @@
1
- import { defineComponent as F, computed as v, openBlock as d, createBlock as _, unref as t, withCtx as a, createElementVNode as s, createVNode as n, normalizeClass as b, toDisplayString as m, createElementBlock as x, Fragment as k, renderList as y, createCommentVNode as D } from "vue";
2
- import { Disclosure as V, DisclosureButton as B, DisclosurePanel as N } from "@headlessui/vue";
3
- import { ScalarIcon as O } from "@scalar/components";
4
- import w from "../../../../components/DataTable/DataTableCell.vue.js";
5
- import $ from "../../../../components/DataTable/DataTableRow.vue.js";
1
+ import { defineComponent as C, computed as x, openBlock as p, createBlock as w, unref as t, withCtx as a, createElementVNode as o, createVNode as r, normalizeClass as y, toDisplayString as d, createElementBlock as v, Fragment as b, renderList as k, createCommentVNode as D } from "vue";
2
+ import { Disclosure as V, DisclosureButton as $, DisclosurePanel as B } from "@headlessui/vue";
3
+ import { ScalarIcon as N } from "@scalar/components";
4
+ import S from "../../../../components/DataTable/DataTableCell.vue.js";
5
+ import O from "../../../../components/DataTable/DataTableRow.vue.js";
6
6
  import j from "../../../../components/DataTable/DataTableCheckbox.vue.js";
7
- const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, I = {
7
+ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, F = {
8
8
  class: "grid auto-rows-auto border-t-1/2",
9
9
  style: { gridTemplateColumns: "1fr auto" }
10
- }, R = { class: "font-code text-xs" }, T = { key: 0 }, H = /* @__PURE__ */ F({
10
+ }, I = { class: "font-code text-xs" }, R = { key: 0 }, G = /* @__PURE__ */ C({
11
11
  __name: "OAuthScopesInput",
12
12
  props: {
13
- activeFlow: {},
13
+ flow: {},
14
14
  updateScheme: { type: Function }
15
15
  },
16
- setup(S) {
17
- const i = S, g = v(
16
+ setup(s) {
17
+ const g = x(
18
18
  () => {
19
19
  var e;
20
- return Object.entries(((e = i.activeFlow) == null ? void 0 : e.scopes) ?? {}).map(([o, l]) => ({
21
- id: o,
22
- label: o,
23
- description: l
20
+ return Object.entries(((e = s.flow) == null ? void 0 : e.scopes) ?? {}).map(([l, c]) => ({
21
+ id: l,
22
+ label: l,
23
+ description: c
24
24
  }));
25
25
  }
26
- ), p = v(() => {
26
+ ), i = x(() => {
27
27
  var e;
28
- return ((e = i.activeFlow) == null ? void 0 : e.selectedScopes) || [];
28
+ return ((e = s.flow) == null ? void 0 : e.selectedScopes) || [];
29
29
  });
30
- function C(e, o) {
31
- o ? i.updateScheme("flow.selectedScopes", [...p.value, e]) : i.updateScheme(
32
- "flow.selectedScopes",
33
- p.value.filter((l) => l !== e)
30
+ function _(e, l) {
31
+ l ? s.updateScheme(`flows.${s.flow.type}.selectedScopes`, [
32
+ ...i.value,
33
+ e
34
+ ]) : s.updateScheme(
35
+ `flows.${s.flow.type}.selectedScopes`,
36
+ i.value.filter((c) => c !== e)
34
37
  );
35
38
  }
36
- return (e, o) => (d(), _(t(w), { class: "items-center min-h-8 h-auto" }, {
39
+ return (e, l) => (p(), w(t(S), { class: "items-center min-h-8 h-auto" }, {
37
40
  default: a(() => [
38
- s("div", z, [
39
- o[0] || (o[0] = s("div", { class: "text-c-1 min-w-[94px] items-center pl-2 h-full" }, [
40
- s("span", { class: "h-8 flex items-center" }, " Scopes ")
41
+ o("div", z, [
42
+ l[0] || (l[0] = o("div", { class: "text-c-1 min-w-[94px] items-center pl-2 h-full" }, [
43
+ o("span", { class: "h-8 flex items-center" }, " Scopes ")
41
44
  ], -1)),
42
- n(t(V), {
45
+ r(t(V), {
43
46
  as: "div",
44
47
  class: "flex flex-col w-full bl"
45
48
  }, {
46
49
  default: a(() => {
47
- var l, h;
50
+ var c, h;
48
51
  return [
49
- n(t(B), {
50
- class: b([
52
+ r(t($), {
53
+ class: y([
51
54
  "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 = (l = e.activeFlow) == null ? void 0 : l.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
55
+ (((h = (c = e.flow) == null ? void 0 : c.selectedScopes) == null ? void 0 : h.length) || 0) > 0 ? "text-c-1" : "text-c-3"
53
56
  ])
54
57
  }, {
55
- default: a(({ open: c }) => {
56
- var u, r, f;
58
+ default: a(({ open: n }) => {
59
+ var f, u, m;
57
60
  return [
58
- s("div", E, " Selected " + m(((r = (u = e.activeFlow) == null ? void 0 : u.selectedScopes) == null ? void 0 : r.length) || 0) + " / " + m(Object.keys(((f = e.activeFlow) == null ? void 0 : f.scopes) ?? {}).length || 0), 1),
59
- n(t(O), {
61
+ o("div", E, " Selected " + d(((u = (f = e.flow) == null ? void 0 : f.selectedScopes) == null ? void 0 : u.length) || 0) + " / " + d(Object.keys(((m = e.flow) == null ? void 0 : m.scopes) ?? {}).length || 0), 1),
62
+ r(t(N), {
60
63
  class: "text-c-3 group-hover/scopes-accordion:text-c-2",
61
- icon: c ? "ChevronDown" : "ChevronRight",
64
+ icon: n ? "ChevronDown" : "ChevronRight",
62
65
  size: "xs"
63
66
  }, null, 8, ["icon"])
64
67
  ];
65
68
  }),
66
69
  _: 1
67
70
  }, 8, ["class"]),
68
- n(t(N), { as: "template" }, {
71
+ r(t(B), { as: "template" }, {
69
72
  default: a(() => [
70
- s("table", I, [
71
- (d(!0), x(k, null, y(g.value, ({ id: c, label: u, description: r }) => (d(), _(t($), {
72
- key: c,
73
+ o("table", F, [
74
+ (p(!0), v(b, null, k(g.value, ({ id: n, label: f, description: u }) => (p(), w(t(O), {
75
+ key: n,
73
76
  class: "text-c-2",
74
- onClick: (f) => C(c, !p.value.includes(c))
77
+ onClick: (m) => _(n, !i.value.includes(n))
75
78
  }, {
76
79
  default: a(() => [
77
- n(t(w), { class: "w-full px-2 py-1.5 hover:text-c-1 cursor-pointer" }, {
80
+ r(t(S), { class: "w-full px-2 py-1.5 hover:text-c-1 cursor-pointer" }, {
78
81
  default: a(() => [
79
- s("span", null, [
80
- s("span", R, m(u), 1),
81
- r ? (d(), x("span", T, "  – " + m(r), 1)) : D("", !0)
82
+ o("span", null, [
83
+ o("span", I, d(f), 1),
84
+ u ? (p(), v("span", R, "  – " + d(u), 1)) : D("", !0)
82
85
  ])
83
86
  ]),
84
87
  _: 2
85
88
  }, 1024),
86
- n(t(j), {
87
- modelValue: p.value.includes(c),
89
+ r(t(j), {
90
+ modelValue: i.value.includes(n),
88
91
  "onUpdate:modelValue": () => {
89
92
  }
90
93
  }, null, 8, ["modelValue"])
@@ -106,5 +109,5 @@ const z = { class: "flex h-fit w-full" }, E = { class: "flex-1" }, I = {
106
109
  }
107
110
  });
108
111
  export {
109
- H as default
112
+ G as default
110
113
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAiaA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAihBF,wBAOG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AA8YA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAkgBF,wBAOG"}
@@ -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 p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-627b97b0"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fb32077d"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };