@scalar/api-client 2.2.12 → 2.2.16

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":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA8NA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AA+YF,wBAMG"}
1
+ {"version":3,"file":"RequestExampleAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue"],"names":[],"mappings":"AA+NA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAChC,CAAC;;AAkZF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import t from "./RequestExampleAuth.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-8225a482"]]);
4
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-59761a00"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as n, Fragment as s, renderList as k, createBlock as x, unref as p, normalizeClass as v, withCtx as a, createVNode as u, createTextVNode as f, toDisplayString as _, createCommentVNode as g, createElementVNode as C, capitalize as w } from "vue";
2
- import q from "./OAuth2.vue.js";
3
- import y from "./RequestAuthDataTableInput.vue.js";
1
+ import { defineComponent as K, computed as N, ref as R, openBlock as r, createElementBlock as u, Fragment as s, renderList as k, createBlock as x, unref as p, normalizeClass as v, withCtx as a, createVNode as n, createTextVNode as f, toDisplayString as $, createCommentVNode as c, createElementVNode as _, capitalize as w } from "vue";
2
+ import j from "./OAuth2.vue.js";
3
+ import V from "./RequestAuthDataTableInput.vue.js";
4
4
  import b from "../../../../components/DataTable/DataTableRow.vue.js";
5
- import I from "../../../../components/DataTable/DataTableCell.vue.js";
6
- import { useWorkspace as j } from "../../../../store/store.js";
7
- const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"], O = /* @__PURE__ */ K({
5
+ import q from "../../../../components/DataTable/DataTableCell.vue.js";
6
+ import { useWorkspace as I } from "../../../../store/store.js";
7
+ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClick"], H = /* @__PURE__ */ K({
8
8
  __name: "RequestExampleAuth",
9
9
  props: {
10
10
  selectedSecuritySchemeUids: {},
11
11
  layout: { default: "client" }
12
12
  },
13
- setup(U) {
14
- const { securitySchemes: S, securitySchemeMutators: F } = j(), $ = N(
15
- () => U.selectedSecuritySchemeUids.map((e) => ({
13
+ setup(C) {
14
+ const { securitySchemes: S, securitySchemeMutators: F } = I(), U = N(
15
+ () => C.selectedSecuritySchemeUids.map((e) => ({
16
16
  scheme: S[e]
17
17
  }))
18
18
  ), d = R(""), T = (e) => {
@@ -23,16 +23,16 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
23
23
  return `${w(e.nameKey)}: ${d.value ? d.value : l.type}`;
24
24
  }
25
25
  return e.type === "http" ? `${w(e.nameKey)}: ${e.scheme}` : `${w(e.nameKey)}: ${e.type}`;
26
- }, c = (e, l, t) => F.edit(e, l, t), m = (e = "") => U.layout === "reference" ? `bg-b-2 border-l-1/2 last:border-r-1/2 group-last:border-b-border ${e}` : "";
27
- return (e, l) => (r(!0), n(s, null, k($.value, ({ scheme: t }, B) => (r(), n(s, {
26
+ }, y = (e, l, t) => F.edit(e, l, t), m = (e = "") => C.layout === "reference" ? `bg-b-2 border-l-1/2 last:border-r-1/2 group-last:border-b-border ${e}` : "";
27
+ return (e, l) => (r(!0), u(s, null, k(U.value, ({ scheme: t }, B) => (r(), u(s, {
28
28
  key: t.uid
29
29
  }, [
30
- $.value.length > 1 ? (r(), x(p(b), {
30
+ U.value.length > 1 ? (r(), x(p(b), {
31
31
  key: 0,
32
32
  class: v({ "request-example-references-header": e.layout === "reference" })
33
33
  }, {
34
34
  default: a(() => [
35
- u(p(I), {
35
+ n(p(q), {
36
36
  class: v([
37
37
  "text-c-3 pl-2 font-medium flex items-center",
38
38
  m(
@@ -41,22 +41,22 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
41
41
  ])
42
42
  }, {
43
43
  default: a(() => [
44
- f(_(T(t)), 1)
44
+ f($(T(t)), 1)
45
45
  ]),
46
46
  _: 2
47
47
  }, 1032, ["class"])
48
48
  ]),
49
49
  _: 2
50
- }, 1032, ["class"])) : g("", !0),
51
- t.type === "http" ? (r(), n(s, { key: 1 }, [
50
+ }, 1032, ["class"])) : c("", !0),
51
+ t.type === "http" ? (r(), u(s, { key: 1 }, [
52
52
  t.scheme === "bearer" ? (r(), x(p(b), { key: 0 }, {
53
53
  default: a(() => [
54
- u(y, {
54
+ n(V, {
55
55
  containerClass: m("bg-b-2 rounded border-1/2"),
56
56
  modelValue: t.token,
57
57
  placeholder: "Token",
58
58
  type: "password",
59
- "onUpdate:modelValue": (o) => c(t.uid, "token", o)
59
+ "onUpdate:modelValue": (o) => y(t.uid, "token", o)
60
60
  }, {
61
61
  default: a(() => l[0] || (l[0] = [
62
62
  f(" Bearer Token ")
@@ -65,10 +65,10 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
65
65
  }, 1032, ["containerClass", "modelValue", "onUpdate:modelValue"])
66
66
  ]),
67
67
  _: 2
68
- }, 1024)) : t.scheme === "basic" ? (r(), n(s, { key: 1 }, [
69
- u(p(b), null, {
68
+ }, 1024)) : t.scheme === "basic" ? (r(), u(s, { key: 1 }, [
69
+ n(p(b), null, {
70
70
  default: a(() => [
71
- u(y, {
71
+ n(V, {
72
72
  class: "text-c-2",
73
73
  containerClass: m(
74
74
  "auth-blend-required bg-b-2 rounded-t border-t-1/2"
@@ -76,7 +76,7 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
76
76
  modelValue: t.username,
77
77
  placeholder: "janedoe",
78
78
  required: "",
79
- "onUpdate:modelValue": (o) => c(t.uid, "username", o)
79
+ "onUpdate:modelValue": (o) => y(t.uid, "username", o)
80
80
  }, {
81
81
  default: a(() => l[1] || (l[1] = [
82
82
  f(" Username ")
@@ -86,14 +86,14 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
86
86
  ]),
87
87
  _: 2
88
88
  }, 1024),
89
- u(p(b), null, {
89
+ n(p(b), null, {
90
90
  default: a(() => [
91
- u(y, {
91
+ n(V, {
92
92
  containerClass: m("bg-b-2 rounded-b border-b-1/2"),
93
93
  modelValue: t.password,
94
94
  placeholder: "********",
95
95
  type: "password",
96
- "onUpdate:modelValue": (o) => c(t.uid, "password", o)
96
+ "onUpdate:modelValue": (o) => y(t.uid, "password", o)
97
97
  }, {
98
98
  default: a(() => l[2] || (l[2] = [
99
99
  f(" Password ")
@@ -103,15 +103,15 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
103
103
  ]),
104
104
  _: 2
105
105
  }, 1024)
106
- ], 64)) : g("", !0)
107
- ], 64)) : t.type === "apiKey" ? (r(), n(s, { key: 2 }, [
108
- u(p(b), null, {
106
+ ], 64)) : c("", !0)
107
+ ], 64)) : t.type === "apiKey" ? (r(), u(s, { key: 2 }, [
108
+ n(p(b), null, {
109
109
  default: a(() => [
110
- u(y, {
110
+ n(V, {
111
111
  containerClass: m("bg-b-2 rounded-t border-t-1/2"),
112
112
  modelValue: t.name,
113
113
  placeholder: "api-key",
114
- "onUpdate:modelValue": (o) => c(t.uid, "name", o)
114
+ "onUpdate:modelValue": (o) => y(t.uid, "name", o)
115
115
  }, {
116
116
  default: a(() => l[3] || (l[3] = [
117
117
  f(" Name ")
@@ -121,13 +121,13 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
121
121
  ]),
122
122
  _: 2
123
123
  }, 1024),
124
- u(p(b), null, {
124
+ n(p(b), null, {
125
125
  default: a(() => [
126
- u(y, {
126
+ n(V, {
127
127
  containerClass: m("bg-b-2 rounded-b border-b-1/2"),
128
128
  modelValue: t.value,
129
129
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
130
- "onUpdate:modelValue": (o) => c(t.uid, "value", o)
130
+ "onUpdate:modelValue": (o) => y(t.uid, "value", o)
131
131
  }, {
132
132
  default: a(() => l[4] || (l[4] = [
133
133
  f(" Value ")
@@ -137,42 +137,43 @@ const E = { class: "flex flex-wrap px-2 items-center gap-1 py-1" }, M = ["onClic
137
137
  ]),
138
138
  _: 2
139
139
  }, 1024)
140
- ], 64)) : t.type === "oauth2" ? (r(), n(s, { key: 3 }, [
141
- u(p(b), null, {
140
+ ], 64)) : t.type === "oauth2" ? (r(), u(s, { key: 3 }, [
141
+ n(p(b), null, {
142
142
  default: a(() => [
143
- C("div", {
143
+ Object.keys(t.flows).length > 1 ? (r(), u("div", {
144
+ key: 0,
144
145
  class: v(["min-h-8 min-w-8 flex text-sm border-t-1/2 last:border-r-0 p-0 m-0 relative row", {
145
146
  "border-1/2 border-b-0 rounded-t bg-b-2": e.layout === "reference"
146
147
  }])
147
148
  }, [
148
- l[5] || (l[5] = C("div", { class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0" }, " Flow ", -1)),
149
- C("div", E, [
150
- (r(!0), n(s, null, k(t.flows, (o, i, V) => (r(), n("button", {
149
+ l[5] || (l[5] = _("div", { class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0" }, " Flow ", -1)),
150
+ _("div", E, [
151
+ (r(!0), u(s, null, k(t.flows, (o, i, g) => (r(), u("button", {
151
152
  key: i,
152
153
  class: v(["h-6 scalar-button scalar-row cursor-pointer items-center justify-center rounded font-medium text-xs scalar-button-outlined border border-solid border-border text-c-1 hover:bg-b-2 p-0 px-2", {
153
- "bg-b-3": e.layout === "client" && (d.value === i || V === 0 && !d.value),
154
- "bg-b-1": e.layout === "reference" && (d.value === i || V === 0 && !d.value)
154
+ "bg-b-3": e.layout === "client" && (d.value === i || g === 0 && !d.value),
155
+ "bg-b-1": e.layout === "reference" && (d.value === i || g === 0 && !d.value)
155
156
  }]),
156
157
  type: "button",
157
158
  onClick: (P) => d.value = i
158
- }, _(i), 11, M))), 128))
159
+ }, $(i), 11, M))), 128))
159
160
  ])
160
- ], 2)
161
+ ], 2)) : c("", !0)
161
162
  ]),
162
163
  _: 2
163
164
  }, 1024),
164
- (r(!0), n(s, null, k(t.flows, (o, i, V) => (r(), n(s, { key: i }, [
165
- d.value === i || V === 0 && !d.value ? (r(), x(q, {
165
+ (r(!0), u(s, null, k(t.flows, (o, i, g) => (r(), u(s, { key: i }, [
166
+ d.value === i || g === 0 && !d.value ? (r(), x(j, {
166
167
  key: 0,
167
168
  flow: o,
168
169
  layout: e.layout,
169
170
  scheme: t
170
- }, null, 8, ["flow", "layout", "scheme"])) : g("", !0)
171
+ }, null, 8, ["flow", "layout", "scheme"])) : c("", !0)
171
172
  ], 64))), 128))
172
- ], 64)) : g("", !0)
173
+ ], 64)) : c("", !0)
173
174
  ], 64))), 128));
174
175
  }
175
176
  });
176
177
  export {
177
- O as default
178
+ H as default
178
179
  };
@@ -11,9 +11,9 @@ const S = /* @__PURE__ */ P({
11
11
  paramKey: {}
12
12
  },
13
13
  setup(E) {
14
- const o = E, { activeRequest: s, activeExample: n, activeServer: d } = M(), { requestMutators: f, requestExampleMutators: v } = T(), p = _(() => {
14
+ const s = E, { activeRequest: o, activeExample: n, activeServer: d } = M(), { requestMutators: v, requestExampleMutators: f } = T(), l = _(() => {
15
15
  const e = n.value;
16
- return e ? e.parameters[o.paramKey].map((t) => {
16
+ return e ? e.parameters[s.paramKey].map((t) => {
17
17
  var r;
18
18
  return {
19
19
  ...t,
@@ -21,47 +21,47 @@ const S = /* @__PURE__ */ P({
21
21
  };
22
22
  }) : [];
23
23
  }), K = (e, t, r) => {
24
- var l, a;
25
- if (!s.value || !n.value) return;
26
- const i = n.value.parameters[o.paramKey], u = (l = i[e]) == null ? void 0 : l.key;
24
+ var p, a;
25
+ if (!o.value || !n.value) return;
26
+ const u = n.value.parameters[s.paramKey], i = (p = u[e]) == null ? void 0 : p.key;
27
27
  if (t === "key") {
28
- if ((a = i[e]) != null && a.required)
28
+ if ((a = u[e]) != null && a.required)
29
29
  return;
30
30
  if (r) {
31
- const c = encodeURIComponent(u), m = encodeURIComponent(r), x = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), C = s.value.path.replace(
31
+ const c = encodeURIComponent(i), m = encodeURIComponent(r), x = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), C = o.value.path.replace(
32
32
  x,
33
33
  `:${m}`
34
34
  );
35
- f.edit(s.value.uid, "path", C);
35
+ v.edit(o.value.uid, "path", C);
36
36
  } else {
37
- i.splice(e, 1);
38
- const c = new RegExp(`/:${encodeURIComponent(u)}(?=[/?#]|$)`, "g"), m = s.value.path.replace(c, "");
39
- f.edit(s.value.uid, "path", m);
37
+ u.splice(e, 1);
38
+ const c = new RegExp(`/:${encodeURIComponent(i)}(?=[/?#]|$)`, "g"), m = o.value.path.replace(c, "");
39
+ v.edit(o.value.uid, "path", m);
40
40
  }
41
41
  }
42
- v.edit(
42
+ f.edit(
43
43
  n.value.uid,
44
- `parameters.${o.paramKey}.${e}.${t}`,
44
+ `parameters.${s.paramKey}.${e}.${t}`,
45
45
  r
46
46
  );
47
47
  }, k = (e) => {
48
- var l;
48
+ var p;
49
49
  if (!n.value) return;
50
- const t = ((l = e.match(N.PATH)) == null ? void 0 : l.map((a) => a.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], i = new Map(r.map((a) => [a.key, a])), u = t.map(
51
- (a) => i.get(a) || { key: a, value: "", enabled: !0 }
50
+ const t = ((p = e.match(N.PATH)) == null ? void 0 : p.map((a) => a.slice(1, -1))) || [], r = n.value.parameters[s.paramKey], u = new Map(r.map((a) => [a.key, a])), i = t.map(
51
+ (a) => u.get(a) || { key: a, value: "", enabled: !0 }
52
52
  );
53
53
  r.forEach((a) => {
54
- !t.includes(a.key) && (a.value || a.required) && u.push(a);
55
- }), r.splice(0, r.length, ...u), t.length === 0 && r.splice(0, r.length), v.edit(
54
+ !t.includes(a.key) && (a.value || a.required) && i.push(a);
55
+ }), r.splice(0, r.length, ...i), f.edit(
56
56
  n.value.uid,
57
- `parameters.${o.paramKey}`,
57
+ `parameters.${s.paramKey}`,
58
58
  r
59
59
  );
60
60
  }, h = (e) => {
61
61
  e && k(e);
62
62
  };
63
63
  return y(
64
- () => s.value,
64
+ () => o.value,
65
65
  (e) => {
66
66
  var t;
67
67
  e && h((t = d.value) == null ? void 0 : t.url);
@@ -75,17 +75,17 @@ const S = /* @__PURE__ */ P({
75
75
  e !== t && h(e);
76
76
  }
77
77
  ), (e, t) => (g(), R(V, {
78
- itemCount: p.value.length
78
+ itemCount: l.value.length
79
79
  }, {
80
80
  title: $(() => [
81
81
  b(q(e.title), 1)
82
82
  ]),
83
83
  default: $(() => [
84
- p.value.length ? (g(), R(U, {
84
+ l.value.length ? (g(), R(U, {
85
85
  key: 0,
86
86
  class: "flex-1",
87
87
  isEnabledHidden: "",
88
- items: p.value,
88
+ items: l.value,
89
89
  onUpdateRow: K
90
90
  }, null, 8, ["items"])) : w("", !0)
91
91
  ]),
@@ -1,7 +1,7 @@
1
- import a from "./RequestSubpageHeader.vue2.js";
1
+ import e from "./RequestSubpageHeader.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ e(a, [["__scopeId", "data-v-cad1af01"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-48474404"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -9,7 +9,7 @@ import B from "./components/WorkspaceDropdown.vue.js";
9
9
  import h from "../../components/OpenApiClientButton.vue.js";
10
10
  import { useWorkspace as z } from "../../store/store.js";
11
11
  import { useLayout as A } from "../../hooks/useLayout.js";
12
- const E = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, N = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, J = /* @__PURE__ */ C({
12
+ const E = { class: "lg:min-h-client-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, M = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, N = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, J = /* @__PURE__ */ C({
13
13
  __name: "RequestSubpageHeader",
14
14
  props: {
15
15
  modelValue: { type: Boolean },
@@ -17,7 +17,7 @@ const K = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, A = {
17
17
  a.commandPalette.emit({ commandName: "Create Request" });
18
18
  }, y = (i) => {
19
19
  i != null && i.createNew && v.name === "request" && f();
20
- }, h = "2.2.12";
20
+ }, h = "2.2.16";
21
21
  return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (r(), l("div", K, [
22
22
  o("div", {
23
23
  class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "bugs": "https://github.com/scalar/scalar/issues/new/choose",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/scalar/scalar.git",
10
+ "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/api-client"
12
12
  },
13
13
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.2.12",
21
+ "version": "2.2.16",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -169,20 +169,20 @@
169
169
  "whatwg-mimetype": "^4.0.0",
170
170
  "yaml": "^2.4.5",
171
171
  "zod": "^3.23.8",
172
- "@scalar/draggable": "0.1.7",
172
+ "@scalar/components": "0.13.7",
173
173
  "@scalar/icons": "0.1.2",
174
- "@scalar/components": "0.13.5",
175
- "@scalar/import": "0.2.7",
176
174
  "@scalar/object-utils": "1.1.12",
177
- "@scalar/oas-utils": "0.2.88",
178
- "@scalar/openapi-parser": "0.10.0",
175
+ "@scalar/openapi-parser": "0.10.1",
176
+ "@scalar/draggable": "0.1.7",
179
177
  "@scalar/openapi-types": "0.1.5",
180
- "@scalar/postman-to-openapi": "0.1.11",
181
- "@scalar/types": "0.0.24",
182
- "@scalar/use-codemirror": "0.11.49",
183
- "@scalar/use-hooks": "0.1.8",
184
- "@scalar/themes": "0.9.55",
178
+ "@scalar/import": "0.2.9",
179
+ "@scalar/postman-to-openapi": "0.1.13",
180
+ "@scalar/use-codemirror": "0.11.51",
181
+ "@scalar/oas-utils": "0.2.90",
182
+ "@scalar/use-hooks": "0.1.10",
183
+ "@scalar/themes": "0.9.57",
185
184
  "@scalar/use-toasts": "0.7.7",
185
+ "@scalar/types": "0.0.25",
186
186
  "@scalar/use-tooltip": "1.0.4"
187
187
  },
188
188
  "devDependencies": {