@scalar/api-client 2.3.9 → 2.3.10

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 (37) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/layouts/App/create-api-client-app.d.ts +20 -7
  3. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  4. package/dist/layouts/Modal/create-api-client-modal.d.ts +40 -14
  5. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  6. package/dist/layouts/Modal/create-api-client-modal.js +4 -4
  7. package/dist/layouts/Web/create-api-client-web.d.ts +20 -7
  8. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  9. package/dist/libs/create-client.d.ts +20 -7
  10. package/dist/libs/create-client.d.ts.map +1 -1
  11. package/dist/libs/create-client.js +18 -20
  12. package/dist/store/active-entities.d.ts +2 -0
  13. package/dist/store/active-entities.d.ts.map +1 -1
  14. package/dist/store/collections.d.ts +14 -4
  15. package/dist/store/collections.d.ts.map +1 -1
  16. package/dist/store/store.d.ts +20 -7
  17. package/dist/store/store.d.ts.map +1 -1
  18. package/dist/style.css +1 -1
  19. package/dist/views/Collection/CollectionAuthentication.vue.d.ts +1 -1
  20. package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
  21. package/dist/views/Collection/CollectionAuthentication.vue.js +5 -2
  22. package/dist/views/Collection/CollectionAuthentication.vue2.js +52 -11
  23. package/dist/views/Collection/CollectionNavigation.vue.js +34 -34
  24. package/dist/views/Collection/CollectionSettings.vue.d.ts.map +1 -1
  25. package/dist/views/Collection/CollectionSettings.vue.js +2 -2
  26. package/dist/views/Collection/CollectionSettings.vue2.js +1 -1
  27. package/dist/views/Request/Request.vue.d.ts +2 -0
  28. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  29. package/dist/views/Request/Request.vue.js +2 -2
  30. package/dist/views/Request/Request.vue2.js +71 -75
  31. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  32. package/dist/views/Request/RequestRoot.vue.js +1 -1
  33. package/dist/views/Request/RequestRoot.vue2.js +49 -46
  34. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  35. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +24 -24
  36. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  37. package/package.json +10 -10
@@ -1,3 +1,3 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLElement>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
2
2
  export default _default;
3
3
  //# sourceMappingURL=CollectionAuthentication.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionAuthentication.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionAuthentication.vue"],"names":[],"mappings":";AA4EA,wBAMG"}
1
+ {"version":3,"file":"CollectionAuthentication.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionAuthentication.vue"],"names":[],"mappings":";AAsOA,wBAMG"}
@@ -1,4 +1,7 @@
1
- import f from "./CollectionAuthentication.vue2.js";
1
+ import o from "./CollectionAuthentication.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-49cb1b32"]]);
2
5
  export {
3
- f as default
6
+ a as default
4
7
  };
@@ -1,16 +1,57 @@
1
- import { defineComponent as e, openBlock as o, createBlock as n, withCtx as i, createTextVNode as r } from "vue";
2
- import c from "../../components/ViewLayout/ViewLayoutSection.vue.js";
3
- const p = /* @__PURE__ */ e({
1
+ import { defineComponent as h, openBlock as r, createElementBlock as v, createElementVNode as o, createVNode as x, unref as e, createBlock as S, createCommentVNode as y } from "vue";
2
+ import { ScalarToggle as _ } from "@scalar/components";
3
+ import { useActiveEntities as b } from "../../store/active-entities.js";
4
+ import { useWorkspace as C } from "../../store/store.js";
5
+ import V from "../Request/RequestSection/RequestAuth/RequestAuth.vue.js";
6
+ const g = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, k = { class: "flex flex-col gap-4" }, w = { class: "bg-b-1 flex items-center justify-between gap-4 text-sm" }, T = /* @__PURE__ */ h({
4
7
  __name: "CollectionAuthentication",
5
- setup(_) {
6
- return (a, t) => (o(), n(c, null, {
7
- title: i(() => t[0] || (t[0] = [
8
- r("Authentication")
9
- ])),
10
- _: 1
11
- }));
8
+ setup(A) {
9
+ const {
10
+ activeCollection: t,
11
+ activeEnvVariables: u,
12
+ activeEnvironment: m,
13
+ activeServer: d,
14
+ activeWorkspace: i
15
+ } = b(), { collectionMutators: f } = C(), p = () => {
16
+ var c;
17
+ (c = t.value) != null && c.uid && f.edit(
18
+ t.value.uid,
19
+ "useCollectionSecurity",
20
+ !t.value.useCollectionSecurity
21
+ );
22
+ };
23
+ return (c, l) => {
24
+ var n, s, a;
25
+ return r(), v("div", g, [
26
+ o("div", k, [
27
+ l[1] || (l[1] = o("div", { class: "flex h-8 items-center" }, [
28
+ o("h3", { class: "font-bold" }, "Authenticate with the API once")
29
+ ], -1)),
30
+ o("div", w, [
31
+ l[0] || (l[0] = o("p", { class: "text-c-2 flex flex-1 text-balance" }, " Don’t want to set up the authentication for each request? Enable this option to set the authentication once for the whole collection. ", -1)),
32
+ x(e(_), {
33
+ class: "w-4",
34
+ modelValue: ((n = e(t)) == null ? void 0 : n.useCollectionSecurity) ?? !1,
35
+ "onUpdate:modelValue": p
36
+ }, null, 8, ["modelValue"])
37
+ ]),
38
+ (s = e(t)) != null && s.useCollectionSecurity && e(i) ? (r(), S(e(V), {
39
+ key: 0,
40
+ class: "scalar-collection-auth",
41
+ collection: e(t),
42
+ envVariables: e(u),
43
+ environment: e(m),
44
+ layout: "reference",
45
+ selectedSecuritySchemeUids: ((a = e(t)) == null ? void 0 : a.selectedSecuritySchemeUids) ?? [],
46
+ server: e(d),
47
+ title: "Authentication",
48
+ workspace: e(i)
49
+ }, null, 8, ["collection", "envVariables", "environment", "selectedSecuritySchemeUids", "server", "workspace"])) : y("", !0)
50
+ ])
51
+ ]);
52
+ };
12
53
  }
13
54
  });
14
55
  export {
15
- p as default
56
+ T as default
16
57
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as b, computed as k, openBlock as r, createElementBlock as l, createVNode as f, createElementVNode as i, normalizeClass as c, unref as t, toDisplayString as x, createCommentVNode as _, Fragment as g, renderList as C, createBlock as N, withCtx as S } from "vue";
1
+ import { defineComponent as b, computed as k, openBlock as r, createElementBlock as a, createVNode as x, createElementVNode as n, normalizeClass as c, unref as t, toDisplayString as h, createCommentVNode as _, Fragment as g, renderList as C, createBlock as N, withCtx as S } from "vue";
2
2
  import { LibraryIcon as B } from "@scalar/icons";
3
3
  import { useRouter as z, RouterLink as E } from "vue-router";
4
- import { PathId as v } from "../../routes.js";
4
+ import { PathId as m } from "../../routes.js";
5
5
  import I from "./CollectionInfoForm.vue.js";
6
6
  import { useActiveEntities as L } from "../../store/active-entities.js";
7
7
  const R = { class: "bg-b-1 sticky -top-[104px] z-10 mx-auto w-full" }, V = {
8
8
  key: 0,
9
9
  class: "flex max-w-40 items-center"
10
- }, F = { class: "text-c-1 mr-[6.25px] hidden overflow-hidden text-ellipsis whitespace-nowrap px-2 font-medium md:block" }, G = /* @__PURE__ */ b({
10
+ }, A = { class: "text-c-1 mr-[6.25px] hidden overflow-hidden text-ellipsis whitespace-nowrap px-2 font-medium md:block" }, G = /* @__PURE__ */ b({
11
11
  __name: "CollectionNavigation",
12
12
  props: {
13
13
  isSticky: { type: Boolean }
14
14
  },
15
- setup(A) {
16
- const { currentRoute: a } = z(), { activeCollection: o } = L(), h = k(() => {
17
- var e, s;
15
+ setup(F) {
16
+ const { currentRoute: d } = z(), { activeCollection: o } = L(), v = k(() => {
17
+ var e, s, i;
18
18
  return [
19
19
  {
20
20
  displayName: "Overview",
@@ -22,27 +22,27 @@ const R = { class: "bg-b-1 sticky -top-[104px] z-10 mx-auto w-full" }, V = {
22
22
  to: {
23
23
  name: "collection.overview",
24
24
  params: {
25
- [v.Collection]: (e = o.value) == null ? void 0 : e.uid
25
+ [m.Collection]: (e = o.value) == null ? void 0 : e.uid
26
26
  }
27
27
  }
28
28
  },
29
- // {
30
- // displayName: 'Authentication',
31
- // // icon: 'Lock',
32
- // to: {
33
- // name: 'collection.authentication',
34
- // params: {
35
- // [PathId.Collection]: activeCollection.value?.uid,
36
- // },
37
- // },
38
- // },
39
29
  {
40
30
  displayName: "Servers",
41
31
  // icon: 'Server',
42
32
  to: {
43
33
  name: "collection.servers",
44
34
  params: {
45
- [v.Collection]: (s = o.value) == null ? void 0 : s.uid
35
+ [m.Collection]: (s = o.value) == null ? void 0 : s.uid
36
+ }
37
+ }
38
+ },
39
+ {
40
+ displayName: "Authentication",
41
+ // icon: 'Lock',
42
+ to: {
43
+ name: "collection.authentication",
44
+ params: {
45
+ [m.Collection]: (i = o.value) == null ? void 0 : i.uid
46
46
  }
47
47
  }
48
48
  },
@@ -93,40 +93,40 @@ const R = { class: "bg-b-1 sticky -top-[104px] z-10 mx-auto w-full" }, V = {
93
93
  ];
94
94
  });
95
95
  return (e, s) => {
96
- var m, d, p;
97
- return r(), l("div", R, [
98
- f(I),
99
- i("div", {
96
+ var i, p, u;
97
+ return r(), a("div", R, [
98
+ x(I),
99
+ n("div", {
100
100
  class: c([
101
101
  "items-center text-sm font-medium",
102
102
  e.isSticky ? "h-fit border-b md:grid md:grid-cols-[1fr_720px_1fr] md:px-4" : "flex md:mx-auto md:max-w-[720px]"
103
103
  ])
104
104
  }, [
105
- e.isSticky ? (r(), l("div", V, [
106
- f(t(B), {
105
+ e.isSticky ? (r(), a("div", V, [
106
+ x(t(B), {
107
107
  class: "text-c-2 hidden size-3.5 md:block",
108
- src: ((m = t(o)) == null ? void 0 : m["x-scalar-icon"]) || "interface-content-folder",
108
+ src: ((i = t(o)) == null ? void 0 : i["x-scalar-icon"]) || "interface-content-folder",
109
109
  "stroke-width": "2"
110
110
  }, null, 8, ["src"]),
111
- i("span", F, x((p = (d = t(o)) == null ? void 0 : d.info) == null ? void 0 : p.title), 1)
111
+ n("span", A, h((u = (p = t(o)) == null ? void 0 : p.info) == null ? void 0 : u.title), 1)
112
112
  ])) : _("", !0),
113
- i("div", {
113
+ n("div", {
114
114
  class: c(["flex w-full max-w-[720px] gap-2 pl-1.5 md:ml-1.5 md:pl-0", !e.isSticky && "border-b"])
115
115
  }, [
116
- (r(!0), l(g, null, C(h.value, ({ to: n, displayName: w }, y) => (r(), N(t(E), {
117
- key: y,
116
+ (r(!0), a(g, null, C(v.value, ({ to: l, displayName: y }, w) => (r(), N(t(E), {
117
+ key: w,
118
118
  class: "-ml-2 flex h-10 cursor-pointer items-center whitespace-nowrap px-2 text-center text-sm font-medium no-underline -outline-offset-1 has-[:focus-visible]:outline",
119
- to: n
119
+ to: l
120
120
  }, {
121
121
  default: S(() => {
122
- var u;
122
+ var f;
123
123
  return [
124
- i("span", {
124
+ n("span", {
125
125
  class: c([
126
126
  "flex-center h-full w-full border-b",
127
- typeof n.name == "string" && typeof t(a).name == "string" && ((u = t(a).name) != null && u.startsWith(n.name)) ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"
127
+ typeof l.name == "string" && typeof t(d).name == "string" && ((f = t(d).name) != null && f.startsWith(l.name)) ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"
128
128
  ])
129
- }, x(w), 3)
129
+ }, h(y), 3)
130
130
  ];
131
131
  }),
132
132
  _: 2
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionSettings.vue"],"names":[],"mappings":";AAyeA,wBAKG"}
1
+ {"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Collection/CollectionSettings.vue"],"names":[],"mappings":";AA0eA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./CollectionSettings.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d671fd2d"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-00fdb693"]]);
5
5
  export {
6
- f as default
6
+ i as default
7
7
  };
@@ -5,7 +5,7 @@ import B from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js"
5
5
  import { useActiveEntities as E } from "../../store/active-entities.js";
6
6
  import { PathId as k } from "../../routes.js";
7
7
  import { useWorkspace as I } from "../../store/store.js";
8
- const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { class: "flex flex-col gap-2" }, O = { class: "bg-b-2 rounded-lg border text-sm" }, P = { class: "bg-b-1 -m-1/2 flex items-center justify-between gap-4 rounded-t-lg border p-3" }, R = { class: "text-c-1 flex items-center overflow-x-auto whitespace-nowrap py-1.5" }, j = { class: "flex items-center" }, z = ["href"], F = { class: "flex flex-col gap-4" }, Z = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, te = /* @__PURE__ */ D({
8
+ const $ = { class: "flex h-full w-full flex-col gap-12 px-1.5 pt-8" }, L = { class: "flex flex-col gap-2" }, O = { class: "bg-b-2 rounded-lg border text-sm" }, P = { class: "bg-b-1 -m-1/2 flex items-center justify-between gap-4 rounded-t-lg border-l p-3" }, R = { class: "text-c-1 flex items-center overflow-x-auto whitespace-nowrap border-t py-1.5" }, j = { class: "flex items-center" }, z = ["href"], F = { class: "flex flex-col gap-4" }, Z = { class: "flex items-center justify-between rounded-lg border p-3 text-sm" }, te = /* @__PURE__ */ D({
9
9
  __name: "CollectionSettings",
10
10
  setup(q) {
11
11
  const { activeCollection: o, activeWorkspace: a, activeWorkspaceCollections: C } = E(), { collectionMutators: m } = I(), { replace: y } = A(), i = S();
@@ -1,5 +1,7 @@
1
+ import type { SelectedSecuritySchemeUids } from '@scalar/oas-utils/entities/shared';
1
2
  type __VLS_Props = {
2
3
  invalidParams: Set<string>;
4
+ selectedSecuritySchemeUids: SelectedSecuritySchemeUids;
3
5
  };
4
6
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
7
  newTab: (item: {
@@ -1 +1 @@
1
- {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":"AA6JA,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAC;;;cAG4C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAsOjE,wBAOG"}
1
+ {"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":"AAgIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAiBnF,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,0BAA0B,EAAE,0BAA0B,CAAA;CACvD,CAAC;;;cAG4C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAsNjE,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Request.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-08ce2525"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-24f1f04a"]]);
5
5
  export {
6
- p as default
6
+ e as default
7
7
  };
@@ -1,111 +1,107 @@
1
- import { defineComponent as P, computed as k, unref as e, openBlock as a, createElementBlock as y, normalizeClass as S, createElementVNode as W, createVNode as n, isRef as H, withCtx as b, createBlock as u, createCommentVNode as L } from "vue";
2
- import x from "../../components/EmptyState.vue.js";
3
- import N from "../../components/ViewLayout/ViewLayout.vue.js";
4
- import g from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
- import { useSidebar as B } from "../../hooks/useSidebar.js";
6
- import { importCurlCommand as I } from "../../libs/importers/curl.js";
7
- import { useActiveEntities as z } from "../../store/active-entities.js";
8
- import A from "./RequestSection/RequestSection.vue.js";
9
- import D from "./RequestSubpageHeader.vue.js";
10
- import M from "./ResponseSection/ResponseSection.vue.js";
11
- import { useWorkspace as h } from "../../store/store.js";
12
- import { useLayout as O } from "../../hooks/useLayout.js";
13
- const T = { class: "flex h-full" }, $ = {
1
+ import { defineComponent as E, computed as U, unref as e, openBlock as r, createElementBlock as f, normalizeClass as k, createElementVNode as P, createVNode as l, isRef as W, withCtx as y, createBlock as u, createCommentVNode as H } from "vue";
2
+ import S from "../../components/EmptyState.vue.js";
3
+ import L from "../../components/ViewLayout/ViewLayout.vue.js";
4
+ import N from "../../components/ViewLayout/ViewLayoutContent.vue.js";
5
+ import { useSidebar as g } from "../../hooks/useSidebar.js";
6
+ import { importCurlCommand as B } from "../../libs/importers/curl.js";
7
+ import { useActiveEntities as I } from "../../store/active-entities.js";
8
+ import z from "./RequestSection/RequestSection.vue.js";
9
+ import A from "./RequestSubpageHeader.vue.js";
10
+ import D from "./ResponseSection/ResponseSection.vue.js";
11
+ import { useWorkspace as b } from "../../store/store.js";
12
+ import { useLayout as M } from "../../hooks/useLayout.js";
13
+ const O = { class: "flex h-full" }, T = {
14
14
  key: 0,
15
15
  class: "flex h-full flex-1 flex-col"
16
- }, ae = /* @__PURE__ */ P({
16
+ }, re = /* @__PURE__ */ E({
17
17
  __name: "Request",
18
18
  props: {
19
- invalidParams: {}
19
+ invalidParams: {},
20
+ selectedSecuritySchemeUids: {}
20
21
  },
21
22
  emits: ["newTab"],
22
- setup(j) {
23
- const { events: C } = h(), { isSidebarOpen: l } = B(), V = h(), { layout: d } = O(), {
24
- activeCollection: r,
25
- activeExample: m,
26
- activeRequest: s,
23
+ setup($) {
24
+ const { events: x } = b(), { isSidebarOpen: a } = g(), h = b(), { layout: C } = M(), {
25
+ activeCollection: i,
26
+ activeExample: n,
27
+ activeRequest: m,
27
28
  activeWorkspace: c,
28
- activeServer: p,
29
- activeEnvVariables: v,
30
- activeEnvironment: f,
31
- activeWorkspaceRequests: _
32
- } = z(), { modalState: R, requestHistory: q } = V, w = k(
33
- () => q.findLast((o) => {
34
- var t;
35
- return o.request.uid === ((t = m.value) == null ? void 0 : t.uid);
29
+ activeServer: d,
30
+ activeEnvVariables: p,
31
+ activeEnvironment: v,
32
+ activeWorkspaceRequests: V
33
+ } = I(), { modalState: R, requestHistory: _ } = h, q = U(
34
+ () => _.findLast((t) => {
35
+ var o;
36
+ return t.request.uid === ((o = n.value) == null ? void 0 : o.uid);
36
37
  })
37
- ), E = k(
38
- () => {
39
- var o, t;
40
- return (d === "modal" ? (o = r.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = s.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
41
- }
42
38
  );
43
- function U(o) {
44
- var t;
45
- C.commandPalette.emit({
39
+ function w(t) {
40
+ var o;
41
+ x.commandPalette.emit({
46
42
  commandName: "Import from cURL",
47
43
  metaData: {
48
- parsedCurl: I(o),
49
- collectionUid: (t = r.value) == null ? void 0 : t.uid
44
+ parsedCurl: B(t),
45
+ collectionUid: (o = i.value) == null ? void 0 : o.uid
50
46
  }
51
47
  });
52
48
  }
53
- return (o, t) => e(r) && e(c) ? (a(), y("div", {
49
+ return (t, o) => e(i) && e(c) ? (r(), f("div", {
54
50
  key: 0,
55
- class: S(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
56
- "!mb-0 !mr-0 !border-0": e(d) === "modal"
51
+ class: k(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
52
+ "!mb-0 !mr-0 !border-0": e(C) === "modal"
57
53
  }])
58
54
  }, [
59
- W("div", T, [
60
- e(s) ? (a(), y("div", $, [
61
- n(D, {
62
- modelValue: e(l),
63
- "onUpdate:modelValue": t[0] || (t[0] = (i) => H(l) ? l.value = i : null),
64
- collection: e(r),
65
- envVariables: e(v),
66
- environment: e(f),
67
- operation: e(s),
68
- server: e(p),
55
+ P("div", O, [
56
+ e(m) ? (r(), f("div", T, [
57
+ l(A, {
58
+ modelValue: e(a),
59
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => W(a) ? a.value = s : null),
60
+ collection: e(i),
61
+ envVariables: e(p),
62
+ environment: e(v),
63
+ operation: e(m),
64
+ server: e(d),
69
65
  workspace: e(c),
70
- onHideModal: t[1] || (t[1] = () => e(R).hide()),
71
- onImportCurl: U
66
+ onHideModal: o[1] || (o[1] = () => e(R).hide()),
67
+ onImportCurl: w
72
68
  }, null, 8, ["modelValue", "collection", "envVariables", "environment", "operation", "server", "workspace"]),
73
- n(N, null, {
74
- default: b(() => [
75
- e(m) ? (a(), u(g, {
69
+ l(L, null, {
70
+ default: y(() => [
71
+ e(n) ? (r(), u(N, {
76
72
  key: 0,
77
- class: S(["flex-1", [e(l) ? "sidebar-active-hide-layout" : ""]])
73
+ class: k(["flex-1", [e(a) ? "sidebar-active-hide-layout" : ""]])
78
74
  }, {
79
- default: b(() => {
80
- var i;
75
+ default: y(() => {
76
+ var s;
81
77
  return [
82
- n(A, {
83
- collection: e(r),
84
- envVariables: e(v),
85
- environment: e(f),
86
- example: e(m),
87
- invalidParams: o.invalidParams,
88
- operation: e(s),
89
- selectedSecuritySchemeUids: E.value,
90
- server: e(p),
78
+ l(z, {
79
+ collection: e(i),
80
+ envVariables: e(p),
81
+ environment: e(v),
82
+ example: e(n),
83
+ invalidParams: t.invalidParams,
84
+ operation: e(m),
85
+ selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
86
+ server: e(d),
91
87
  workspace: e(c)
92
88
  }, null, 8, ["collection", "envVariables", "environment", "example", "invalidParams", "operation", "selectedSecuritySchemeUids", "server", "workspace"]),
93
- n(M, {
94
- numWorkspaceRequests: e(_).length,
95
- response: (i = w.value) == null ? void 0 : i.response
89
+ l(D, {
90
+ numWorkspaceRequests: e(V).length,
91
+ response: (s = q.value) == null ? void 0 : s.response
96
92
  }, null, 8, ["numWorkspaceRequests", "response"])
97
93
  ];
98
94
  }),
99
95
  _: 1
100
- }, 8, ["class"])) : L("", !0)
96
+ }, 8, ["class"])) : H("", !0)
101
97
  ]),
102
98
  _: 1
103
99
  })
104
- ])) : (a(), u(x, { key: 1 }))
100
+ ])) : (r(), u(S, { key: 1 }))
105
101
  ])
106
- ], 2)) : (a(), u(x, { key: 1 }));
102
+ ], 2)) : (r(), u(S, { key: 1 }));
107
103
  }
108
104
  });
109
105
  export {
110
- ae as default
106
+ re as default
111
107
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cAwN8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8QjE,wBAMG"}
1
+ {"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cA0N8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA+QjE,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestRoot.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-ce94398a"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fc9d46fd"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, ref as m, computed as L, onMounted as M, onBeforeUnmount as $, watch as H, openBlock as f, createElementBlock as Q, normalizeClass as _, unref as o, createBlock as w, isRef as F, createCommentVNode as O, createElementVNode as V, createVNode as G } from "vue";
1
+ import { defineComponent as j, ref as c, computed as L, onMounted as M, onBeforeUnmount as $, watch as H, openBlock as m, createElementBlock as Q, normalizeClass as _, unref as r, createBlock as w, isRef as F, createCommentVNode as O, createElementVNode as V, createVNode as G } from "vue";
2
2
  import { isDefined as K } from "@scalar/oas-utils/helpers";
3
3
  import { safeJSON as X } from "@scalar/object-utils/parse";
4
4
  import { useToasts as Y } from "@scalar/use-toasts";
@@ -10,94 +10,97 @@ import { useActiveEntities as re } from "../../store/active-entities.js";
10
10
  import { useOpenApiWatcher as se } from "./hooks/useOpenApiWatcher.js";
11
11
  import ae from "./RequestSidebar.vue.js";
12
12
  import { createRequestOperation as le } from "../../libs/send-request/create-request-operation.js";
13
- import { ERRORS as ne } from "../../libs/errors.js";
14
- import { useWorkspace as ie } from "../../store/store.js";
13
+ import { ERRORS as ie } from "../../libs/errors.js";
14
+ import { useWorkspace as ne } from "../../store/store.js";
15
15
  import { useLayout as ue } from "../../hooks/useLayout.js";
16
- const ce = { class: "flex h-full" }, me = { class: "flex h-full flex-1 flex-col" }, Oe = /* @__PURE__ */ j({
16
+ const ce = { class: "flex h-full" }, me = { class: "flex h-full flex-1 flex-col" }, we = /* @__PURE__ */ j({
17
17
  __name: "RequestRoot",
18
18
  emits: ["newTab"],
19
19
  setup(fe) {
20
- const U = ie(), { toast: d } = Y(), { layout: n } = ue(), {
21
- activeCollection: i,
22
- activeExample: a,
20
+ const C = ne(), { toast: f } = Y(), { layout: d } = ue(), {
21
+ activeCollection: a,
22
+ activeExample: l,
23
23
  activeEnvironment: v,
24
- activeRequest: u,
24
+ activeRequest: n,
25
25
  activeWorkspace: p,
26
- activeServer: C
27
- } = re(), { cookies: T, requestHistory: g, showSidebar: S, securitySchemes: A, events: l } = U, { isSidebarOpen: r } = te(), B = m(), R = m(), c = m(/* @__PURE__ */ new Set()), D = L(
26
+ activeServer: T
27
+ } = re(), { cookies: g, requestHistory: A, showSidebar: S, securitySchemes: B, events: i } = C, { isSidebarOpen: s } = te(), D = c(), y = c(), u = c(/* @__PURE__ */ new Set()), R = L(
28
28
  () => {
29
- var e, t;
30
- return (n === "modal" ? (e = i.value) == null ? void 0 : e.selectedSecuritySchemeUids : (t = u.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
29
+ var e, t, o;
30
+ return ((e = a.value) != null && e.useCollectionSecurity ? (t = a.value) == null ? void 0 : t.selectedSecuritySchemeUids : (o = n.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
31
31
  }
32
32
  ), x = async () => {
33
- var h, k, E, N;
34
- if (!u.value || !a.value || !i.value)
33
+ var k, E, N, U;
34
+ if (!n.value || !l.value || !a.value)
35
35
  return;
36
- c.value = oe(a.value);
36
+ u.value = oe(l.value);
37
37
  const e = typeof v.value == "object" ? v.value.value : "{}", t = X.parse(e);
38
38
  t.error && console.error("INVALID ENVIRONMENT!");
39
- const s = t.error || typeof t.data != "object" ? {} : t.data ?? {}, z = ((h = p.value) == null ? void 0 : h.cookies.map((W) => T[W]).filter(K)) ?? [], I = ((E = (k = i.value) == null ? void 0 : k.info) == null ? void 0 : E.title) === "Drafts" ? void 0 : C.value, [y, b] = le({
40
- request: u.value,
41
- example: a.value,
42
- selectedSecuritySchemeUids: D.value,
43
- proxyUrl: ((N = p.value) == null ? void 0 : N.proxyUrl) ?? "",
44
- environment: s,
39
+ const o = t.error || typeof t.data != "object" ? {} : t.data ?? {}, z = ((k = p.value) == null ? void 0 : k.cookies.map((W) => g[W]).filter(K)) ?? [], I = ((N = (E = a.value) == null ? void 0 : E.info) == null ? void 0 : N.title) === "Drafts" ? void 0 : T.value, [b, q] = le({
40
+ request: n.value,
41
+ example: l.value,
42
+ selectedSecuritySchemeUids: R.value,
43
+ proxyUrl: ((U = p.value) == null ? void 0 : U.proxyUrl) ?? "",
44
+ environment: o,
45
45
  globalCookies: z,
46
- status: l.requestStatus,
47
- securitySchemes: A,
46
+ status: i.requestStatus,
47
+ securitySchemes: B,
48
48
  server: I
49
49
  });
50
- if (y) {
51
- d(y.message, "error");
50
+ if (b) {
51
+ f(b.message, "error");
52
52
  return;
53
53
  }
54
- R.value = b.controller;
55
- const [q, J] = await b.sendRequest();
56
- q ? d(q.message, "error") : g.push(JSON.parse(JSON.stringify(J)));
54
+ y.value = q.controller;
55
+ const [h, J] = await q.sendRequest();
56
+ h ? f(h.message, "error") : A.push(JSON.parse(JSON.stringify(J)));
57
57
  }, P = async () => {
58
58
  var e;
59
- return (e = R.value) == null ? void 0 : e.abort(ne.REQUEST_ABORTED);
59
+ return (e = y.value) == null ? void 0 : e.abort(ie.REQUEST_ABORTED);
60
60
  };
61
61
  return M(() => {
62
- l.executeRequest.on(x), l.cancelRequest.on(P);
63
- }), se(), $(() => l.executeRequest.off(x)), H(
62
+ i.executeRequest.on(x), i.cancelRequest.on(P);
63
+ }), se(), $(() => i.executeRequest.off(x)), H(
64
64
  () => {
65
65
  var e;
66
- return (e = a.value) == null ? void 0 : e.parameters;
66
+ return (e = l.value) == null ? void 0 : e.parameters;
67
67
  },
68
68
  () => {
69
- c.value.clear();
69
+ u.value.clear();
70
70
  },
71
71
  { deep: !0 }
72
- ), (e, t) => (f(), Q("div", {
72
+ ), (e, t) => (m(), Q("div", {
73
73
  ref_key: "element",
74
- ref: B,
74
+ ref: D,
75
75
  class: _(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
76
- "!mb-0 !mr-0 !border-0": o(n) === "modal"
76
+ "!mb-0 !mr-0 !border-0": r(d) === "modal"
77
77
  }])
78
78
  }, [
79
- o(S) ? (f(), w(ee, {
79
+ r(S) ? (m(), w(ee, {
80
80
  key: 0,
81
- modelValue: o(r),
82
- "onUpdate:modelValue": t[0] || (t[0] = (s) => F(r) ? r.value = s : null),
81
+ modelValue: r(s),
82
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => F(s) ? s.value = o : null),
83
83
  class: _(["absolute left-3 top-2 z-50", [
84
- { hidden: o(r) },
85
- { "xl:!flex": !o(r) },
86
- { "!flex": o(n) === "modal" }
84
+ { hidden: r(s) },
85
+ { "xl:!flex": !r(s) },
86
+ { "!flex": r(d) === "modal" }
87
87
  ]])
88
88
  }, null, 8, ["modelValue", "class"])) : O("", !0),
89
89
  V("div", ce, [
90
- o(S) ? (f(), w(ae, {
90
+ r(S) ? (m(), w(ae, {
91
91
  key: 0,
92
- onNewTab: t[1] || (t[1] = (s) => e.$emit("newTab", s))
92
+ onNewTab: t[1] || (t[1] = (o) => e.$emit("newTab", o))
93
93
  })) : O("", !0),
94
94
  V("div", me, [
95
- G(o(Z), { invalidParams: c.value }, null, 8, ["invalidParams"])
95
+ G(r(Z), {
96
+ invalidParams: u.value,
97
+ selectedSecuritySchemeUids: R.value
98
+ }, null, 8, ["invalidParams", "selectedSecuritySchemeUids"])
96
99
  ])
97
100
  ])
98
101
  ], 2));
99
102
  }
100
103
  });
101
104
  export {
102
- Oe as default
105
+ we as default
103
106
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuth.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8dfa397c"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1f349e0c"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };