@scalar/api-client 2.2.60 → 2.2.62

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.
@@ -1 +1 @@
1
- {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAsUA,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;AAe1D,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,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAmXF,wBAOG"}
1
+ {"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAqVA,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;AAe1D,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,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkYF,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 m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-fdbdfe77"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-8ab24b0b"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as I, useId as L, ref as C, computed as y, openBlock as u, createBlock as N, withCtx as m, createElementVNode as i, unref as r, toDisplayString as g, createElementBlock as h, normalizeClass as j, createCommentVNode as z, createVNode as d, Fragment as k, createTextVNode as x } from "vue";
2
- import { useModal as E, ScalarComboboxMultiselect as K, ScalarButton as W, ScalarIcon as F } from "@scalar/components";
3
- import { isDefined as G } from "@scalar/oas-utils/helpers";
4
- import H from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
- import { useLayout as J } from "../../../../hooks/useLayout.js";
6
- import { useWorkspace as P } from "../../../../store/store.js";
7
- import Q from "./DeleteRequestAuthModal.vue.js";
8
- import X from "./RequestAuthDataTable.vue.js";
9
- import { getSecurityRequirements as Y, formatComplexScheme as Z, formatScheme as _, getSchemeOptions as ee } from "../../libs/auth.js";
10
- const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1" }, fe = /* @__PURE__ */ I({
1
+ import { defineComponent as I, useId as L, ref as D, computed as h, openBlock as m, createBlock as N, withCtx as d, createElementVNode as i, unref as r, toDisplayString as k, createElementBlock as p, normalizeClass as z, createCommentVNode as E, createVNode as f, Fragment as x, createTextVNode as q } from "vue";
2
+ import { useModal as K, ScalarComboboxMultiselect as W, ScalarButton as F, ScalarIcon as G } from "@scalar/components";
3
+ import { isDefined as H } from "@scalar/oas-utils/helpers";
4
+ import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
5
+ import { useLayout as P } from "../../../../hooks/useLayout.js";
6
+ import { useWorkspace as Q } from "../../../../store/store.js";
7
+ import X from "./DeleteRequestAuthModal.vue.js";
8
+ import Y from "./RequestAuthDataTable.vue.js";
9
+ import { getSecurityRequirements as Z, formatComplexScheme as _, formatScheme as ee, getSchemeOptions as te } from "../../libs/auth.js";
10
+ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1" }, he = /* @__PURE__ */ I({
11
11
  __name: "RequestAuth",
12
12
  props: {
13
13
  collection: {},
@@ -21,123 +21,128 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
21
21
  workspace: {}
22
22
  },
23
23
  setup(s) {
24
- const { layout: p } = J(), {
25
- securitySchemes: v,
26
- securitySchemeMutators: D,
24
+ const { layout: v } = P(), {
25
+ securitySchemes: S,
26
+ securitySchemeMutators: O,
27
27
  requestMutators: w,
28
- collectionMutators: O
29
- } = P(), q = L(), R = C(null), f = E(), S = C(
28
+ collectionMutators: M
29
+ } = Q(), R = L(), C = D(null), y = K(), b = D(
30
30
  null
31
- ), A = y(() => {
32
- const e = Y(s.operation, s.collection);
33
- return { filteredRequirements: e.filter((l) => Object.keys(l).length), requirements: e };
34
- }), b = y(() => {
31
+ ), A = h(() => {
32
+ const e = Z(s.operation, s.collection);
33
+ return { filteredRequirements: e.filter((o) => Object.keys(o).length), requirements: e };
34
+ }), g = h(() => {
35
35
  const { filteredRequirements: e, requirements: t } = A.value;
36
36
  if (!t.length) return null;
37
- const l = e.length < t.length, n = l ? "Unlock" : "Lock", o = l ? "Optional" : "Required", T = `${e.length === 1 ? Object.keys(e[0] || {})[0] : ""} ${o}`;
38
- return { icon: n, text: T };
39
- }), a = y(
37
+ const n = !t.some(
38
+ (u) => Object.keys(u).length > 1
39
+ ) && e.length < t.length, l = n ? "Unlock" : "Lock", c = n ? "Optional" : "Required", j = `${e.length === 1 ? (() => {
40
+ const u = Object.keys(e[0] || {});
41
+ return u.length > 1 ? u.join(" & ") : u[0] || "";
42
+ })() : ""} ${c}`;
43
+ return { icon: l, text: j };
44
+ }), a = h(
40
45
  () => s.selectedSecuritySchemeUids.map((e) => {
41
- if (Array.isArray(e)) return Z(e, v);
42
- const t = v[e ?? ""];
46
+ if (Array.isArray(e)) return _(e, S);
47
+ const t = S[e ?? ""];
43
48
  if (t)
44
- return _(t);
45
- }).filter(G)
49
+ return ee(t);
50
+ }).filter(H)
46
51
  );
47
- function M(e) {
52
+ function U(e) {
48
53
  var n;
49
- const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => {
50
- const c = o.split(",");
51
- return c.length > 1 ? c : o;
54
+ const t = e.find((l) => l.payload), o = e.filter((l) => !l.payload).map(({ id: l }) => {
55
+ const c = l.split(",");
56
+ return c.length > 1 ? c : l;
52
57
  });
53
58
  if (t != null && t.payload) {
54
- const o = D.add(
59
+ const l = O.add(
55
60
  t.payload,
56
61
  (n = s.collection) == null ? void 0 : n.uid
57
62
  );
58
- o && l.push(o.uid);
63
+ l && o.push(l.uid);
59
64
  }
60
- V(l);
65
+ V(o);
61
66
  }
62
67
  const V = (e) => {
63
68
  var t;
64
- p === "modal" || s.layout === "reference" ? O.edit(s.collection.uid, "selectedSecuritySchemeUids", e) : (t = s.operation) != null && t.uid && w.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
69
+ v === "modal" || s.layout === "reference" ? M.edit(s.collection.uid, "selectedSecuritySchemeUids", e) : (t = s.operation) != null && t.uid && w.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
65
70
  };
66
- function U({ id: e, label: t }) {
67
- S.value = { id: e, label: t }, f.show();
71
+ function $({ id: e, label: t }) {
72
+ b.value = { id: e, label: t }, y.show();
68
73
  }
69
- const $ = (e) => {
70
- var l;
74
+ const B = (e) => {
75
+ var o;
71
76
  if (!e) return;
72
77
  const t = s.selectedSecuritySchemeUids.filter((n) => {
73
- const o = e.split(",");
74
- return o.length > 1 && Array.isArray(n) && o.length === n.length ? n.every((c) => !o.includes(c)) : n !== e;
78
+ const l = e.split(",");
79
+ return l.length > 1 && Array.isArray(n) && l.length === n.length ? n.every((c) => !l.includes(c)) : n !== e;
75
80
  });
76
- V(t), (l = R.value) == null || l.$el.focus(), f.hide();
77
- }, B = y(
81
+ V(t), (o = C.value) == null || o.$el.focus(), y.hide();
82
+ }, T = h(
78
83
  () => {
79
84
  var e;
80
- return ee(
85
+ return te(
81
86
  A.value.filteredRequirements,
82
87
  ((e = s.collection) == null ? void 0 : e.securitySchemes) ?? [],
83
- v,
84
- p === "modal" || s.layout === "reference"
88
+ S,
89
+ v === "modal" || s.layout === "reference"
85
90
  );
86
91
  }
87
92
  );
88
- return (e, t) => (u(), N(H, {
93
+ return (e, t) => (m(), N(J, {
89
94
  class: "group/params",
90
95
  itemCount: a.value.length,
91
96
  layout: e.layout
92
97
  }, {
93
- title: m(() => [
98
+ title: d(() => [
94
99
  i("div", {
95
- id: r(q),
100
+ id: r(R),
96
101
  class: "inline-flex items-center gap-1"
97
102
  }, [
98
- i("span", null, g(e.title), 1),
99
- b.value ? (u(), h("span", {
103
+ i("span", null, k(e.title), 1),
104
+ g.value ? (m(), p("span", {
100
105
  key: 0,
101
- class: j(["text-c-3 text-xs leading-[normal]", { "text-c-1": b.value.text === "Required" }])
102
- }, g(b.value.text), 3)) : z("", !0)
103
- ], 8, te)
106
+ class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": g.value.text === "Required" }])
107
+ }, k(g.value.text), 3)) : E("", !0)
108
+ ], 8, le)
104
109
  ]),
105
- actions: m(() => [
106
- i("div", le, [
107
- d(r(K), {
110
+ actions: d(() => [
111
+ i("div", oe, [
112
+ f(r(W), {
108
113
  class: "w-72 text-xs",
109
- isDeletable: r(p) !== "modal" && e.layout !== "reference",
114
+ isDeletable: r(v) !== "modal" && e.layout !== "reference",
110
115
  modelValue: a.value,
111
116
  multiple: "",
112
- options: B.value,
113
- onDelete: U,
114
- "onUpdate:modelValue": M
117
+ options: T.value,
118
+ onDelete: $,
119
+ "onUpdate:modelValue": U
115
120
  }, {
116
- default: m(() => [
117
- d(r(W), {
121
+ default: d(() => [
122
+ f(r(F), {
118
123
  ref_key: "comboboxButtonRef",
119
- ref: R,
120
- "aria-describedby": r(q),
124
+ ref: C,
125
+ "aria-describedby": r(R),
121
126
  class: "py-0.75 hover:bg-b-3 text-c-1 hover:text-c-1 h-auto px-1.5 font-normal",
122
127
  fullWidth: "",
123
128
  variant: "ghost"
124
129
  }, {
125
- default: m(() => {
126
- var l;
130
+ default: d(() => {
131
+ var o;
127
132
  return [
128
- i("div", oe, [
129
- a.value.length === 0 ? (u(), h(k, { key: 0 }, [
133
+ i("div", ne, [
134
+ a.value.length === 0 ? (m(), p(x, { key: 0 }, [
130
135
  t[2] || (t[2] = i("span", { class: "sr-only" }, "Select", -1)),
131
- t[3] || (t[3] = x(" Auth Type "))
132
- ], 64)) : a.value.length === 1 ? (u(), h(k, { key: 1 }, [
136
+ t[3] || (t[3] = q(" Auth Type "))
137
+ ], 64)) : a.value.length === 1 ? (m(), p(x, { key: 1 }, [
133
138
  t[4] || (t[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
134
- x(" " + g((l = a.value[0]) == null ? void 0 : l.label), 1)
135
- ], 64)) : (u(), h(k, { key: 2 }, [
136
- t[5] || (t[5] = x(" Multiple ")),
139
+ q(" " + k((o = a.value[0]) == null ? void 0 : o.label), 1)
140
+ ], 64)) : (m(), p(x, { key: 2 }, [
141
+ t[5] || (t[5] = q(" Multiple ")),
137
142
  t[6] || (t[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
138
143
  ], 64))
139
144
  ]),
140
- d(r(F), {
145
+ f(r(G), {
141
146
  class: "ml-1 shrink-0",
142
147
  icon: "ChevronDown",
143
148
  size: "sm"
@@ -151,8 +156,8 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
151
156
  }, 8, ["isDeletable", "modelValue", "options"])
152
157
  ])
153
158
  ]),
154
- default: m(() => [
155
- d(X, {
159
+ default: d(() => [
160
+ f(Y, {
156
161
  collection: e.collection,
157
162
  envVariables: e.envVariables,
158
163
  environment: e.environment,
@@ -161,13 +166,13 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
161
166
  server: e.server,
162
167
  workspace: e.workspace
163
168
  }, null, 8, ["collection", "envVariables", "environment", "layout", "selectedSchemeOptions", "server", "workspace"]),
164
- d(Q, {
165
- scheme: S.value,
166
- state: r(f),
167
- onClose: t[0] || (t[0] = (l) => r(f).hide()),
168
- onDelete: t[1] || (t[1] = (l) => {
169
+ f(X, {
170
+ scheme: b.value,
171
+ state: r(y),
172
+ onClose: t[0] || (t[0] = (o) => r(y).hide()),
173
+ onDelete: t[1] || (t[1] = (o) => {
169
174
  var n;
170
- return $((n = S.value) == null ? void 0 : n.id);
175
+ return B((n = b.value) == null ? void 0 : n.id);
171
176
  })
172
177
  }, null, 8, ["scheme", "state"])
173
178
  ]),
@@ -176,5 +181,5 @@ const te = ["id"], le = { class: "-mx-1 flex flex-1" }, oe = { class: "text-c-1"
176
181
  }
177
182
  });
178
183
  export {
179
- fe as default
184
+ he as default
180
185
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestAuthTab.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2b678dcb"]]);
4
+ const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-00684fd6"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -51,7 +51,7 @@ const z = {
51
51
  default: l(() => [
52
52
  u(f(R), {
53
53
  class: C([
54
- "text-c-3 flex items-center pl-2 font-medium",
54
+ "text-c-3 flex items-center pl-3 font-medium",
55
55
  t.layout === "reference" && `border-t ${K !== 0 ? "mt-2" : ""}`
56
56
  ])
57
57
  }, {
@@ -36,7 +36,7 @@ const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
36
36
  }));
37
37
  }, y = (s) => {
38
38
  s != null && s.createNew && w.name === "request" && k();
39
- }, N = "2.2.60";
39
+ }, N = "2.2.62";
40
40
  return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
41
41
  o("div", {
42
42
  class: q(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.2.60",
21
+ "version": "2.2.62",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -188,21 +188,21 @@
188
188
  "whatwg-mimetype": "^4.0.0",
189
189
  "yaml": "^2.4.5",
190
190
  "zod": "^3.23.8",
191
- "@scalar/components": "0.13.32",
191
+ "@scalar/components": "0.13.33",
192
192
  "@scalar/draggable": "0.1.11",
193
193
  "@scalar/icons": "0.1.3",
194
+ "@scalar/import": "0.2.36",
194
195
  "@scalar/object-utils": "1.1.13",
195
- "@scalar/oas-utils": "0.2.114",
196
+ "@scalar/oas-utils": "0.2.116",
197
+ "@scalar/openapi-parser": "0.10.10",
196
198
  "@scalar/openapi-types": "0.1.9",
197
- "@scalar/import": "0.2.34",
198
- "@scalar/postman-to-openapi": "0.1.37",
199
- "@scalar/openapi-parser": "0.10.9",
200
- "@scalar/themes": "0.9.74",
199
+ "@scalar/postman-to-openapi": "0.1.39",
201
200
  "@scalar/snippetz": "0.2.16",
202
- "@scalar/types": "0.0.39",
203
- "@scalar/use-codemirror": "0.11.77",
201
+ "@scalar/themes": "0.9.75",
202
+ "@scalar/types": "0.0.40",
203
+ "@scalar/use-hooks": "0.1.29",
204
+ "@scalar/use-codemirror": "0.11.78",
204
205
  "@scalar/use-toasts": "0.7.9",
205
- "@scalar/use-hooks": "0.1.28",
206
206
  "@scalar/use-tooltip": "1.0.6"
207
207
  },
208
208
  "devDependencies": {
@@ -219,8 +219,8 @@
219
219
  "vite": "^5.4.10",
220
220
  "vite-svg-loader": "^5.1.0",
221
221
  "vitest": "^1.6.0",
222
- "@scalar/galaxy": "0.2.24",
223
- "@scalar/build-tooling": "0.1.17"
222
+ "@scalar/build-tooling": "0.1.17",
223
+ "@scalar/galaxy": "0.2.24"
224
224
  },
225
225
  "scripts": {
226
226
  "build": "scalar-build-vite",