@scalar/api-client 2.5.29 → 2.5.31

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 (63) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/analytics.d.ts +1 -36
  3. package/dist/analytics.d.ts.map +1 -1
  4. package/dist/analytics.js +7 -23
  5. package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
  6. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  7. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  8. package/dist/hooks/useAnalytics.d.ts +35 -0
  9. package/dist/hooks/useAnalytics.d.ts.map +1 -0
  10. package/dist/hooks/useAnalytics.js +11 -0
  11. package/dist/index.js +8 -9
  12. package/dist/layouts/App/create-api-client-app.d.ts +45 -78
  13. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  14. package/dist/layouts/App/create-api-client-app.js +20 -20
  15. package/dist/layouts/App/index.js +3 -4
  16. package/dist/layouts/Modal/create-api-client-modal.d.ts +90 -90
  17. package/dist/layouts/Web/create-api-client-web.d.ts +45 -78
  18. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  19. package/dist/layouts/Web/create-api-client-web.js +20 -20
  20. package/dist/layouts/Web/index.js +3 -4
  21. package/dist/libs/create-client.d.ts +45 -45
  22. package/dist/libs/hot-keys.d.ts +1 -1
  23. package/dist/store/collections.d.ts +4 -4
  24. package/dist/store/cookies.d.ts +4 -4
  25. package/dist/store/environment.d.ts +4 -4
  26. package/dist/store/request-example.d.ts +4 -4
  27. package/dist/store/requests.d.ts +4 -4
  28. package/dist/store/security-schemes.d.ts +16 -16
  29. package/dist/store/store.d.ts +45 -45
  30. package/dist/store/tags.d.ts +4 -4
  31. package/dist/store/workspace.d.ts +4 -4
  32. package/dist/style.css +1 -1
  33. package/dist/views/Request/RequestRoot.vue.js +2 -2
  34. package/dist/views/Request/RequestRoot.vue2.js +4 -4
  35. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +14 -1
  36. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
  37. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +49 -47
  38. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +202 -1
  39. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  40. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  41. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +111 -103
  42. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +200 -1
  43. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
  44. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
  45. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +64 -44
  46. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +1 -1
  47. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
  48. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +14 -1
  49. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  50. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +104 -121
  51. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +9 -0
  52. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts.map +1 -0
  53. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +28 -0
  54. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts +2 -0
  55. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts.map +1 -0
  56. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +3 -1
  57. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
  58. package/dist/views/Request/RequestSection/RequestAuth/index.js +6 -4
  59. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  60. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  61. package/dist/views/Request/RequestSection/RequestSection.vue2.js +25 -24
  62. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  63. package/package.json +12 -12
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestRoot.vue2.js";
2
2
  import "./RequestRoot.vue3.js";
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e187bc5a"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c648cff4"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -3,8 +3,8 @@ import { isDefined as se } from "@scalar/oas-utils/helpers";
3
3
  import { safeJSON as ae } from "@scalar/object-utils/parse";
4
4
  import { useToasts as ne } from "@scalar/use-toasts";
5
5
  import { RouterView as le } from "vue-router";
6
- import { useAnalytics as ue } from "../../analytics.js";
7
- import ce from "../../components/Sidebar/SidebarToggle.vue.js";
6
+ import ue from "../../components/Sidebar/SidebarToggle.vue.js";
7
+ import { useAnalytics as ce } from "../../hooks/useAnalytics.js";
8
8
  import { useClientConfig as ie } from "../../hooks/useClientConfig.js";
9
9
  import { useSidebar as me } from "../../hooks/useSidebar.js";
10
10
  import { validateParameters as fe } from "../../libs/validate-parameters.js";
@@ -20,7 +20,7 @@ const be = { class: "flex h-full" }, he = { class: "flex h-full flex-1 flex-col"
20
20
  __name: "RequestRoot",
21
21
  emits: ["newTab"],
22
22
  setup(ge) {
23
- const M = ye(), { toast: v } = ne(), { layout: R } = xe(), z = ie(), { isSidebarOpen: a } = me(), f = ue(), {
23
+ const M = ye(), { toast: v } = ne(), { layout: R } = xe(), z = ie(), { isSidebarOpen: a } = me(), f = ce(), {
24
24
  activeCollection: l,
25
25
  activeExample: u,
26
26
  activeEnvironment: S,
@@ -95,7 +95,7 @@ const be = { class: "flex h-full" }, he = { class: "flex h-full flex-1 flex-col"
95
95
  "!mr-0 !mb-0 !border-0": r(R) === "modal"
96
96
  }])
97
97
  }, [
98
- r(y) ? (p(), T(ce, {
98
+ r(y) ? (p(), T(ue, {
99
99
  key: 0,
100
100
  modelValue: r(a),
101
101
  "onUpdate:modelValue": t[0] || (t[0] = (o) => oe(a) ? a.value = o : null),
@@ -12,6 +12,19 @@ type __VLS_Props = {
12
12
  server: Server | undefined;
13
13
  workspace: Workspace;
14
14
  };
15
- 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>;
15
+ type __VLS_Slots = {
16
+ 'oauth-actions'?: () => unknown;
17
+ };
18
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ authorized: () => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onAuthorized?: (() => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
16
24
  export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
17
30
  //# sourceMappingURL=OAuth2.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAwQA,OAAO,KAAK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A;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;AAiBF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,OAAO,CAAA;CAChC,CAAC;AAqgBF,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,14 +1,14 @@
1
- import { defineComponent as z, createElementBlock as V, openBlock as d, Fragment as U, createBlock as k, createCommentVNode as w, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as u, createElementVNode as $ } from "vue";
2
- import { useLoadingState as T, ScalarButton as b } from "@scalar/components";
3
- import { pkceOptions as P } from "@scalar/oas-utils/entities/spec";
4
- import { useToasts as A } from "@scalar/use-toasts";
5
- import { useWorkspace as B } from "../../../../store/store.js";
6
- import { updateScheme as L } from "../helpers/update-scheme.js";
7
- import R from "./OAuthScopesInput.vue.js";
1
+ import { defineComponent as P, createElementBlock as V, openBlock as d, Fragment as U, createBlock as k, createCommentVNode as w, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as u, createElementVNode as v, renderSlot as A } from "vue";
2
+ import { useLoadingState as B, ScalarButton as z } from "@scalar/components";
3
+ import { pkceOptions as L } from "@scalar/oas-utils/entities/spec";
4
+ import { useToasts as R } from "@scalar/use-toasts";
5
+ import { useWorkspace as F } from "../../../../store/store.js";
6
+ import { updateScheme as I } from "../helpers/update-scheme.js";
7
+ import N from "./OAuthScopesInput.vue.js";
8
8
  import p from "./RequestAuthDataTableInput.vue.js";
9
- import f from "../../../../components/DataTable/DataTableRow.vue.js";
10
- import { authorizeOauth2 as F } from "../../libs/oauth2.js";
11
- const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { class: "flex h-8 w-full items-center justify-end border-t" }, Y = /* @__PURE__ */ z({
9
+ import i from "../../../../components/DataTable/DataTableRow.vue.js";
10
+ import { authorizeOauth2 as O } from "../../libs/oauth2.js";
11
+ const j = { class: "flex h-8 items-center justify-end border-t" }, E = { class: "flex h-8 w-full items-center justify-end border-t" }, G = /* @__PURE__ */ P({
12
12
  __name: "OAuth2",
13
13
  props: {
14
14
  collection: {},
@@ -20,9 +20,10 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
20
20
  server: {},
21
21
  workspace: {}
22
22
  },
23
- setup(s) {
24
- const y = T(), { toast: g } = A(), C = B(), n = (l, e) => L(s.scheme.uid, l, e, C, s.persistAuth), S = async () => {
25
- var t, v;
23
+ emits: ["authorized"],
24
+ setup(s, { emit: S }) {
25
+ const b = S, y = B(), { toast: g } = R(), C = F(), n = (l, e) => I(s.scheme.uid, l, e, C, s.persistAuth), T = async () => {
26
+ var t, $;
26
27
  if (y.isLoading || !((t = s.collection) != null && t.uid))
27
28
  return;
28
29
  if (!s.server) {
@@ -30,22 +31,22 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
30
31
  return;
31
32
  }
32
33
  y.startLoading();
33
- const [l, e] = await F(
34
+ const [l, e] = await O(
34
35
  s.flow,
35
36
  s.server,
36
- (v = s.workspace) == null ? void 0 : v.proxyUrl
37
+ ($ = s.workspace) == null ? void 0 : $.proxyUrl
37
38
  ).finally(() => y.stopLoading());
38
- e ? n(`flows.${s.flow.type}.token`, e) : (console.error(l), g((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
39
- }, i = {
39
+ e ? (n(`flows.${s.flow.type}.token`, e), b("authorized")) : (console.error(l), g((l == null ? void 0 : l.message) ?? "Failed to authorize", "error"));
40
+ }, f = {
40
41
  environment: s.environment,
41
42
  envVariables: s.envVariables,
42
43
  workspace: s.workspace
43
44
  };
44
45
  return (l, e) => (d(), V(U, null, [
45
46
  l.flow.token ? (d(), V(U, { key: 0 }, [
46
- a(r(f), null, {
47
+ a(r(i), null, {
47
48
  default: o(() => [
48
- a(p, m(i, {
49
+ a(p, m(f, {
49
50
  class: "border-r-transparent",
50
51
  modelValue: l.flow.token,
51
52
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
@@ -61,10 +62,10 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
61
62
  ]),
62
63
  _: 1
63
64
  }),
64
- a(r(f), { class: "min-w-full" }, {
65
+ a(r(i), { class: "min-w-full" }, {
65
66
  default: o(() => [
66
- $("div", I, [
67
- a(r(b), {
67
+ v("div", j, [
68
+ a(r(z), {
68
69
  class: "mr-1 p-0 px-2 py-0.5",
69
70
  loading: r(y),
70
71
  size: "sm",
@@ -76,15 +77,16 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
76
77
  ])),
77
78
  _: 1,
78
79
  __: [11]
79
- }, 8, ["loading"])
80
+ }, 8, ["loading"]),
81
+ A(l.$slots, "oauth-actions")
80
82
  ])
81
83
  ]),
82
- _: 1
84
+ _: 3
83
85
  })
84
86
  ], 64)) : (d(), V(U, { key: 1 }, [
85
- a(r(f), null, {
87
+ a(r(i), null, {
86
88
  default: o(() => [
87
- "authorizationUrl" in l.flow ? (d(), k(p, m({ key: 0 }, i, {
89
+ "authorizationUrl" in l.flow ? (d(), k(p, m({ key: 0 }, f, {
88
90
  containerClass: "border-r-0",
89
91
  modelValue: l.flow.authorizationUrl,
90
92
  placeholder: "https://galaxy.scalar.com/authorize",
@@ -96,7 +98,7 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
96
98
  _: 1,
97
99
  __: [12]
98
100
  }, 16, ["modelValue"])) : w("", !0),
99
- "tokenUrl" in l.flow ? (d(), k(p, m({ key: 1 }, i, {
101
+ "tokenUrl" in l.flow ? (d(), k(p, m({ key: 1 }, f, {
100
102
  modelValue: l.flow.tokenUrl,
101
103
  placeholder: "https://galaxy.scalar.com/token",
102
104
  "onUpdate:modelValue": e[3] || (e[3] = (t) => n(`flows.${l.flow.type}.tokenUrl`, t))
@@ -110,9 +112,9 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
110
112
  ]),
111
113
  _: 1
112
114
  }),
113
- "x-scalar-redirect-uri" in l.flow ? (d(), k(r(f), { key: 0 }, {
115
+ "x-scalar-redirect-uri" in l.flow ? (d(), k(r(i), { key: 0 }, {
114
116
  default: o(() => [
115
- a(p, m(i, {
117
+ a(p, m(f, {
116
118
  modelValue: l.flow["x-scalar-redirect-uri"],
117
119
  placeholder: "https://galaxy.scalar.com/callback",
118
120
  "onUpdate:modelValue": e[4] || (e[4] = (t) => n(`flows.${l.flow.type}.x-scalar-redirect-uri`, t))
@@ -127,9 +129,9 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
127
129
  _: 1
128
130
  })) : w("", !0),
129
131
  l.flow.type === "password" ? (d(), V(U, { key: 1 }, [
130
- a(r(f), null, {
132
+ a(r(i), null, {
131
133
  default: o(() => [
132
- a(p, m(i, {
134
+ a(p, m(f, {
133
135
  class: "text-c-2",
134
136
  modelValue: l.flow.username,
135
137
  placeholder: "janedoe",
@@ -144,9 +146,9 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
144
146
  ]),
145
147
  _: 1
146
148
  }),
147
- a(r(f), null, {
149
+ a(r(i), null, {
148
150
  default: o(() => [
149
- a(p, m(i, {
151
+ a(p, m(f, {
150
152
  modelValue: l.flow.password,
151
153
  placeholder: "********",
152
154
  type: "password",
@@ -162,9 +164,9 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
162
164
  _: 1
163
165
  })
164
166
  ], 64)) : w("", !0),
165
- a(r(f), null, {
167
+ a(r(i), null, {
166
168
  default: o(() => [
167
- a(p, m(i, {
169
+ a(p, m(f, {
168
170
  modelValue: l.flow["x-scalar-client-id"],
169
171
  placeholder: "12345",
170
172
  "onUpdate:modelValue": e[7] || (e[7] = (t) => n(`flows.${l.flow.type}.x-scalar-client-id`, t))
@@ -178,9 +180,9 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
178
180
  ]),
179
181
  _: 1
180
182
  }),
181
- "clientSecret" in l.flow ? (d(), k(r(f), { key: 2 }, {
183
+ "clientSecret" in l.flow ? (d(), k(r(i), { key: 2 }, {
182
184
  default: o(() => [
183
- a(p, m(i, {
185
+ a(p, m(f, {
184
186
  modelValue: l.flow.clientSecret,
185
187
  placeholder: "XYZ123",
186
188
  type: "password",
@@ -195,10 +197,10 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
195
197
  ]),
196
198
  _: 1
197
199
  })) : w("", !0),
198
- "x-usePkce" in l.flow ? (d(), k(r(f), { key: 3 }, {
200
+ "x-usePkce" in l.flow ? (d(), k(r(i), { key: 3 }, {
199
201
  default: o(() => [
200
- a(p, m(i, {
201
- enum: r(P),
202
+ a(p, m(f, {
203
+ enum: r(L),
202
204
  modelValue: l.flow["x-usePkce"],
203
205
  readOnly: "",
204
206
  "onUpdate:modelValue": e[9] || (e[9] = (t) => n(
@@ -215,9 +217,9 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
215
217
  ]),
216
218
  _: 1
217
219
  })) : w("", !0),
218
- Object.keys(l.flow.scopes ?? {}).length ? (d(), k(r(f), { key: 4 }, {
220
+ Object.keys(l.flow.scopes ?? {}).length ? (d(), k(r(i), { key: 4 }, {
219
221
  default: o(() => [
220
- a(R, {
222
+ a(N, {
221
223
  flow: l.flow,
222
224
  updateScheme: n
223
225
  }, null, 8, ["flow"])
@@ -225,18 +227,18 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
225
227
  _: 1
226
228
  })) : w("", !0)
227
229
  ], 64)),
228
- l.flow.token ? w("", !0) : (d(), k(r(f), {
230
+ l.flow.token ? w("", !0) : (d(), k(r(i), {
229
231
  key: 2,
230
232
  class: "min-w-full"
231
233
  }, {
232
234
  default: o(() => [
233
- $("div", N, [
234
- a(r(b), {
235
+ v("div", E, [
236
+ a(r(z), {
235
237
  class: "mr-0.75 p-0 px-2 py-0.5",
236
238
  loading: r(y),
237
239
  size: "sm",
238
240
  variant: "outlined",
239
- onClick: S
241
+ onClick: T
240
242
  }, {
241
243
  default: o(() => e[20] || (e[20] = [
242
244
  u(" Authorize ")
@@ -252,5 +254,5 @@ const I = { class: "flex h-8 items-center justify-end gap-2 border-t" }, N = { c
252
254
  }
253
255
  });
254
256
  export {
255
- Y as default
257
+ G as default
256
258
  };
@@ -5,6 +5,8 @@ import type { Workspace } from '@scalar/oas-utils/entities/workspace';
5
5
  import type { EnvVariable } from '../../../../store/active-entities.js';
6
6
  type __VLS_Props = {
7
7
  collection: Collection;
8
+ /** Controls whether user can add new auth schemes */
9
+ isReadOnly?: boolean;
8
10
  environment: Environment;
9
11
  envVariables: EnvVariable[];
10
12
  layout: 'client' | 'reference';
@@ -15,6 +17,205 @@ type __VLS_Props = {
15
17
  title: string;
16
18
  workspace: Workspace;
17
19
  };
18
- 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>;
20
+ type __VLS_Slots = {
21
+ 'oauth-actions'?: () => unknown;
22
+ };
23
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ authorized: () => any;
25
+ activeSchemes: (schemes: ({
26
+ type: "apiKey";
27
+ value: string;
28
+ name: string;
29
+ uid: string & import("zod").BRAND<"securityScheme">;
30
+ nameKey: string;
31
+ in: "cookie" | "query" | "header";
32
+ description?: string | undefined;
33
+ } | {
34
+ type: "http";
35
+ uid: string & import("zod").BRAND<"securityScheme">;
36
+ nameKey: string;
37
+ scheme: "basic" | "bearer";
38
+ bearerFormat: string;
39
+ username: string;
40
+ password: string;
41
+ token: string;
42
+ description?: string | undefined;
43
+ } | {
44
+ type: "openIdConnect";
45
+ uid: string & import("zod").BRAND<"securityScheme">;
46
+ nameKey: string;
47
+ openIdConnectUrl: string;
48
+ description?: string | undefined;
49
+ } | {
50
+ type: "oauth2";
51
+ uid: string & import("zod").BRAND<"securityScheme">;
52
+ nameKey: string;
53
+ flows: {
54
+ password?: {
55
+ type: "password";
56
+ username: string;
57
+ password: string;
58
+ token: string;
59
+ refreshUrl: string;
60
+ scopes: Record<string, string>;
61
+ selectedScopes: string[];
62
+ "x-scalar-client-id": string;
63
+ tokenUrl: string;
64
+ clientSecret: string;
65
+ "x-scalar-security-query"?: Record<string, string> | undefined;
66
+ "x-scalar-security-body"?: Record<string, string> | undefined;
67
+ "x-tokenName"?: string | undefined;
68
+ "x-scalar-credentials-location"?: "header" | "body" | undefined;
69
+ } | undefined;
70
+ implicit?: {
71
+ type: "implicit";
72
+ token: string;
73
+ refreshUrl: string;
74
+ scopes: Record<string, string>;
75
+ selectedScopes: string[];
76
+ "x-scalar-client-id": string;
77
+ authorizationUrl: string;
78
+ "x-scalar-redirect-uri": string;
79
+ "x-scalar-security-query"?: Record<string, string> | undefined;
80
+ "x-scalar-security-body"?: Record<string, string> | undefined;
81
+ "x-tokenName"?: string | undefined;
82
+ } | undefined;
83
+ clientCredentials?: {
84
+ type: "clientCredentials";
85
+ token: string;
86
+ refreshUrl: string;
87
+ scopes: Record<string, string>;
88
+ selectedScopes: string[];
89
+ "x-scalar-client-id": string;
90
+ tokenUrl: string;
91
+ clientSecret: string;
92
+ "x-scalar-security-query"?: Record<string, string> | undefined;
93
+ "x-scalar-security-body"?: Record<string, string> | undefined;
94
+ "x-tokenName"?: string | undefined;
95
+ "x-scalar-credentials-location"?: "header" | "body" | undefined;
96
+ } | undefined;
97
+ authorizationCode?: {
98
+ type: "authorizationCode";
99
+ token: string;
100
+ refreshUrl: string;
101
+ scopes: Record<string, string>;
102
+ selectedScopes: string[];
103
+ "x-scalar-client-id": string;
104
+ authorizationUrl: string;
105
+ "x-scalar-redirect-uri": string;
106
+ tokenUrl: string;
107
+ clientSecret: string;
108
+ "x-usePkce": "SHA-256" | "plain" | "no";
109
+ "x-scalar-security-query"?: Record<string, string> | undefined;
110
+ "x-scalar-security-body"?: Record<string, string> | undefined;
111
+ "x-tokenName"?: string | undefined;
112
+ "x-scalar-credentials-location"?: "header" | "body" | undefined;
113
+ } | undefined;
114
+ };
115
+ description?: string | undefined;
116
+ 'x-default-scopes'?: string | string[] | undefined;
117
+ })[]) => any;
118
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
119
+ onAuthorized?: (() => any) | undefined;
120
+ onActiveSchemes?: ((schemes: ({
121
+ type: "apiKey";
122
+ value: string;
123
+ name: string;
124
+ uid: string & import("zod").BRAND<"securityScheme">;
125
+ nameKey: string;
126
+ in: "cookie" | "query" | "header";
127
+ description?: string | undefined;
128
+ } | {
129
+ type: "http";
130
+ uid: string & import("zod").BRAND<"securityScheme">;
131
+ nameKey: string;
132
+ scheme: "basic" | "bearer";
133
+ bearerFormat: string;
134
+ username: string;
135
+ password: string;
136
+ token: string;
137
+ description?: string | undefined;
138
+ } | {
139
+ type: "openIdConnect";
140
+ uid: string & import("zod").BRAND<"securityScheme">;
141
+ nameKey: string;
142
+ openIdConnectUrl: string;
143
+ description?: string | undefined;
144
+ } | {
145
+ type: "oauth2";
146
+ uid: string & import("zod").BRAND<"securityScheme">;
147
+ nameKey: string;
148
+ flows: {
149
+ password?: {
150
+ type: "password";
151
+ username: string;
152
+ password: string;
153
+ token: string;
154
+ refreshUrl: string;
155
+ scopes: Record<string, string>;
156
+ selectedScopes: string[];
157
+ "x-scalar-client-id": string;
158
+ tokenUrl: string;
159
+ clientSecret: string;
160
+ "x-scalar-security-query"?: Record<string, string> | undefined;
161
+ "x-scalar-security-body"?: Record<string, string> | undefined;
162
+ "x-tokenName"?: string | undefined;
163
+ "x-scalar-credentials-location"?: "header" | "body" | undefined;
164
+ } | undefined;
165
+ implicit?: {
166
+ type: "implicit";
167
+ token: string;
168
+ refreshUrl: string;
169
+ scopes: Record<string, string>;
170
+ selectedScopes: string[];
171
+ "x-scalar-client-id": string;
172
+ authorizationUrl: string;
173
+ "x-scalar-redirect-uri": string;
174
+ "x-scalar-security-query"?: Record<string, string> | undefined;
175
+ "x-scalar-security-body"?: Record<string, string> | undefined;
176
+ "x-tokenName"?: string | undefined;
177
+ } | undefined;
178
+ clientCredentials?: {
179
+ type: "clientCredentials";
180
+ token: string;
181
+ refreshUrl: string;
182
+ scopes: Record<string, string>;
183
+ selectedScopes: string[];
184
+ "x-scalar-client-id": string;
185
+ tokenUrl: string;
186
+ clientSecret: string;
187
+ "x-scalar-security-query"?: Record<string, string> | undefined;
188
+ "x-scalar-security-body"?: Record<string, string> | undefined;
189
+ "x-tokenName"?: string | undefined;
190
+ "x-scalar-credentials-location"?: "header" | "body" | undefined;
191
+ } | undefined;
192
+ authorizationCode?: {
193
+ type: "authorizationCode";
194
+ token: string;
195
+ refreshUrl: string;
196
+ scopes: Record<string, string>;
197
+ selectedScopes: string[];
198
+ "x-scalar-client-id": string;
199
+ authorizationUrl: string;
200
+ "x-scalar-redirect-uri": string;
201
+ tokenUrl: string;
202
+ clientSecret: string;
203
+ "x-usePkce": "SHA-256" | "plain" | "no";
204
+ "x-scalar-security-query"?: Record<string, string> | undefined;
205
+ "x-scalar-security-body"?: Record<string, string> | undefined;
206
+ "x-tokenName"?: string | undefined;
207
+ "x-scalar-credentials-location"?: "header" | "body" | undefined;
208
+ } | undefined;
209
+ };
210
+ description?: string | undefined;
211
+ 'x-default-scopes'?: string | string[] | undefined;
212
+ })[]) => any) | undefined;
213
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
214
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
19
215
  export default _default;
216
+ type __VLS_WithSlots<T, S> = T & {
217
+ new (): {
218
+ $slots: S;
219
+ };
220
+ };
20
221
  //# sourceMappingURL=RequestAuth.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAiZA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAa1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4gBF,wBAMG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAmaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,MAAM,EACP,MAAM,iCAAiC,C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;;6BAAsE,CAAC;;;;;;;;;yCAAuU,CAAC;wCAA0E,CAAC;6BAA+D,CAAC;+CAAiE,CAAC;;6BAAiF,CAAC;;;;;;;;;;;;yCAA+c,CAAC;wCAA0E,CAAC;6BAA+D,CAAC;+CAAiE,CAAC;;;;;;kFAfr1qD,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuth.vue2.js";
2
2
  import "./RequestAuth.vue3.js";
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2df672a9"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f622cd82"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };