@scalar/api-client 2.23.2 → 2.23.3

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":"build-request-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,qEAAqE,CAAA;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAoBlH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;AACjC,qBAAqB;AACrB,aAAY,aAAa,CAAC,eAAe,CAAC,EAAO;AACjD,8DAA8D;AAC9D,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AAChC,qCAAqC;AACrC,aAAY,MAAkB,KAC7B;IACD,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,SAAS,EAAE,eAAe,CAAA;CAiF3B,CAAA"}
1
+ {"version":3,"file":"build-request-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,qEAAqE,CAAA;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAoBlH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;AACjC,qBAAqB;AACrB,aAAY,aAAa,CAAC,eAAe,CAAC,EAAO;AACjD,8DAA8D;AAC9D,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AAChC,qCAAqC;AACrC,aAAY,MAAkB,KAC7B;IACD,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,SAAS,EAAE,eAAe,CAAA;CAiF3B,CAAA"}
@@ -1,106 +1,107 @@
1
- import { isDefined as k } from "@scalar/helpers/array/is-defined";
1
+ import { isDefined as g } from "@scalar/helpers/array/is-defined";
2
+ import { isObject as h } from "@scalar/helpers/object/is-object";
2
3
  import { replaceEnvVariables as u } from "@scalar/helpers/regex/replace-variables";
3
- import { getResolvedRef as z } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
- import { xScalarCookieSchema as S } from "@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies";
5
- import { coerceValue as m } from "@scalar/workspace-store/schemas/typebox-coerce";
6
- import { deSerializeParameter as g } from "./de-serialize-parameter.js";
7
- import { isParamDisabled as b } from "../../request-block/helpers/is-param-disabled.js";
8
- import { getExample as x } from "./get-example.js";
9
- import { serializeSimpleStyle as h, serializeFormStyleForCookies as v, serializeContentValue as C, serializeDeepObjectStyle as D, serializeSpaceDelimitedStyle as P, serializePipeDelimitedStyle as V, serializeFormStyle as $ } from "./serialize-parameter.js";
10
- const d = (t, r) => "explode" in t && t.explode !== void 0 ? t.explode : r, Q = (t = [], r = {}, l = "default") => {
11
- const e = {
4
+ import { getResolvedRef as k } from "@scalar/workspace-store/helpers/get-resolved-ref";
5
+ import { xScalarCookieSchema as m } from "@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies";
6
+ import { coerceValue as S } from "@scalar/workspace-store/schemas/typebox-coerce";
7
+ import { deSerializeParameter as z } from "./de-serialize-parameter.js";
8
+ import { isParamDisabled as x } from "../../request-block/helpers/is-param-disabled.js";
9
+ import { getExample as v } from "./get-example.js";
10
+ import { serializeSimpleStyle as b, serializeFormStyleForCookies as j, serializeContentValue as C, serializeDeepObjectStyle as D, serializeSpaceDelimitedStyle as O, serializePipeDelimitedStyle as P, serializeFormStyle as $ } from "./serialize-parameter.js";
11
+ const d = (e, o) => "explode" in e && e.explode !== void 0 ? e.explode : o, G = (e = [], o = {}, l = "default") => {
12
+ const t = {
12
13
  cookies: [],
13
14
  headers: {},
14
15
  pathVariables: {},
15
16
  urlParams: new URLSearchParams()
16
17
  };
17
- if (t.length === 0)
18
- return e;
19
- for (const c of t) {
20
- const o = z(c), n = x(o, l, void 0);
21
- if (!n || b(o, n))
18
+ if (e.length === 0)
19
+ return t;
20
+ for (const c of e) {
21
+ const r = k(c), n = v(r, l, void 0);
22
+ if (!n || x(r, n))
22
23
  continue;
23
- const s = typeof n.value == "string" ? u(n.value, r) : n.value, i = g(s, o), a = u(o.name, r);
24
- switch (o.in) {
24
+ const s = typeof n.value == "string" ? u(n.value, o) : n.value, i = z(s, r), a = u(r.name, o);
25
+ switch (r.in) {
25
26
  case "header": {
26
27
  if (a.toLowerCase() === "content-type" && i === "multipart/form-data")
27
28
  break;
28
- const p = h(i, d(o, !1));
29
- if (!k(p))
29
+ const p = b(i, d(r, !1));
30
+ if (!g(p))
30
31
  break;
31
32
  const y = String(p);
32
- e.headers[a] ? e.headers[a] = `${e.headers[a]},${y}` : e.headers[a] = y;
33
+ t.headers[a] ? t.headers[a] = `${t.headers[a]},${y}` : t.headers[a] = y;
33
34
  break;
34
35
  }
35
36
  case "path": {
36
- const f = h(i, d(o, !1));
37
- e.pathVariables[a] = encodeURIComponent(String(f));
37
+ const f = b(i, d(r, !1));
38
+ t.pathVariables[a] = encodeURIComponent(String(f));
38
39
  break;
39
40
  }
40
41
  case "query": {
41
- w(o, a, i, e.urlParams);
42
+ R(r, a, i, t.urlParams);
42
43
  break;
43
44
  }
44
45
  case "cookie": {
45
- R(a, i, d(o, !0), e.cookies);
46
+ V(a, i, d(r, !0), t.cookies);
46
47
  break;
47
48
  }
48
49
  }
49
50
  }
50
- return e;
51
- }, w = (t, r, l, e) => {
52
- const c = "explode" in t && t.explode !== void 0 ? t.explode : !0, o = "style" in t && t.style ? t.style : "form";
53
- if ("content" in t && t.content) {
54
- const s = Object.keys(t.content)[0] ?? "application/json", i = C(l, s);
55
- e.set(r, i);
51
+ return t;
52
+ }, w = (e, o) => !("style" in e) || !e.style ? "form" : e.style === "deepObject" ? h(o) ? "deepObject" : "form" : e.style, R = (e, o, l, t) => {
53
+ const c = "explode" in e && e.explode !== void 0 ? e.explode : !0, r = w(e, l);
54
+ if ("content" in e && e.content) {
55
+ const s = Object.keys(e.content)[0] ?? "application/json", i = C(l, s);
56
+ t.set(o, i);
56
57
  return;
57
58
  }
58
- if (o === "deepObject" && c) {
59
- const s = D(r, l);
59
+ if (r === "deepObject" && c) {
60
+ const s = D(o, l);
60
61
  for (const i of s)
61
- e.append(i.key, i.value);
62
+ t.append(i.key, i.value);
62
63
  return;
63
64
  }
64
- if (o === "spaceDelimited") {
65
- const s = P(l), i = e.get(r);
66
- e.set(r, i ? `${i} ${s}` : s);
65
+ if (r === "spaceDelimited") {
66
+ const s = O(l), i = t.get(o);
67
+ t.set(o, i ? `${i} ${s}` : s);
67
68
  return;
68
69
  }
69
- if (o === "pipeDelimited") {
70
- const s = V(l), i = e.get(r);
71
- e.set(r, i ? `${i}|${s}` : s);
70
+ if (r === "pipeDelimited") {
71
+ const s = P(l), i = t.get(o);
72
+ t.set(o, i ? `${i}|${s}` : s);
72
73
  return;
73
74
  }
74
75
  const n = $(l, c);
75
76
  if (Array.isArray(n))
76
77
  for (const s of n) {
77
- const i = s.key || r;
78
- e.append(i, String(s.value));
78
+ const i = s.key || o;
79
+ t.append(i, String(s.value));
79
80
  }
80
81
  else
81
- e.append(r, String(n));
82
- }, R = (t, r, l, e) => {
83
- const c = v(r, l);
82
+ t.append(o, String(n));
83
+ }, V = (e, o, l, t) => {
84
+ const c = j(o, l);
84
85
  if (Array.isArray(c))
85
- for (const o of c) {
86
- const n = o.key || t;
87
- e.push(
88
- m(S, {
86
+ for (const r of c) {
87
+ const n = r.key || e;
88
+ t.push(
89
+ S(m, {
89
90
  name: n,
90
- value: String(o.value),
91
+ value: String(r.value),
91
92
  path: "/"
92
93
  })
93
94
  );
94
95
  }
95
96
  else
96
- e.push(
97
- m(S, {
98
- name: t,
97
+ t.push(
98
+ S(m, {
99
+ name: e,
99
100
  value: String(c),
100
101
  path: "/"
101
102
  })
102
103
  );
103
104
  };
104
105
  export {
105
- Q as buildRequestParameters
106
+ G as buildRequestParameters
106
107
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAichG,KAAK,2BAA2B,GAAG;IACjC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,CAAA;AAYD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU,2BAA2B,EACrC,uCAKG,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CACtB,CAAM,KACN,OAuJF,CAAA"}
1
+ {"version":3,"file":"get-example-from-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/helpers/get-example-from-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAochG,KAAK,2BAA2B,GAAG;IACjC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,qDAAqD;IACrD,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,CAAA;AAYD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,YAAY,EACpB,UAAU,2BAA2B,EACrC,uCAKG,OAAO,CAAC;IACT,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,YAAY,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;CACtB,CAAM,KACN,OAuJF,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { isDefined as v } from "@scalar/helpers/array/is-defined";
2
2
  import { getRaw as E } from "@scalar/json-magic/magic-proxy";
3
- import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
4
3
  import { unpackOverridesProxy as N } from "@scalar/workspace-store/helpers/overrides-proxy";
5
- const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date()).toISOString(), q = j.split("T")[0], k = j.split("T")[1].split(".")[0], I = {
4
+ import { resolve as y } from "@scalar/workspace-store/resolve";
5
+ const M = 10, P = 10, R = "additionalProperty", j = (/* @__PURE__ */ new Date()).toISOString(), q = j.split("T")[0], k = j.split("T")[1].split(".")[0], I = {
6
6
  "date-time": j,
7
7
  date: q,
8
8
  email: "hello@example.com",
@@ -42,11 +42,11 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
42
42
  return S.set(t, l), l;
43
43
  }
44
44
  }
45
- }, a = (t, i, o) => {
45
+ }, d = (t, i, o) => {
46
46
  if (typeof i != "object" || i === null)
47
47
  return i;
48
- const l = E(N(t)), d = A.get(l) ?? /* @__PURE__ */ new Map();
49
- return d && d.set(o, i), A.set(l, d), i;
48
+ const l = E(N(t)), f = A.get(l) ?? /* @__PURE__ */ new Map();
49
+ return f && f.set(o, i), A.set(l, f), i;
50
50
  }, C = (t) => !!(t.allOf || t.oneOf || t.anyOf), F = (t, i, o, l) => {
51
51
  if (t.deprecated || l?.mode === "write" && t.readOnly || l?.mode === "read" && t.writeOnly)
52
52
  return !0;
@@ -54,28 +54,28 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
54
54
  return !1;
55
55
  const r = o ?? t.title ?? "", e = _(i);
56
56
  return !(e ? e.has(r) : !1);
57
- }, R = (t, i) => Array.isArray(t) && Array.isArray(i) ? [...t, ...i] : t && typeof t == "object" && i && typeof i == "object" ? { ...t, ...i } : i, L = (t, i, o, l, d) => {
57
+ }, T = (t, i) => Array.isArray(t) && Array.isArray(i) ? [...t, ...i] : t && typeof t == "object" && i && typeof i == "object" ? { ...t, ...i } : i, L = (t, i, o, l, f) => {
58
58
  const r = {};
59
59
  if ("properties" in t && t.properties) {
60
60
  const e = Object.keys(t.properties), n = o > 3 ? Math.min(P, e.length) : e.length;
61
- for (let p = 0; p < n; p++) {
62
- const x = e[p], u = m(t.properties[x]);
61
+ for (let a = 0; a < n; a++) {
62
+ const b = e[a], u = y.schema(t.properties[b]);
63
63
  if (!u)
64
64
  continue;
65
- const s = i?.xml && "xml" in u ? u.xml?.name : void 0, y = c(u, i, {
65
+ const c = i?.xml && "xml" in u ? u.xml?.name : void 0, m = s(u, i, {
66
66
  level: o + 1,
67
67
  parentSchema: t,
68
- name: x,
68
+ name: b,
69
69
  seen: l
70
70
  });
71
- typeof y < "u" && (r[s ?? x] = y);
71
+ typeof m < "u" && (r[c ?? b] = m);
72
72
  }
73
73
  o > 3 && e.length > P && (r["..."] = "[Additional Properties Truncated]");
74
74
  }
75
75
  if ("patternProperties" in t && t.patternProperties)
76
76
  for (const e of Object.keys(t.patternProperties)) {
77
- const n = m(t.patternProperties[e]);
78
- n && (r[e] = c(n, i, {
77
+ const n = y.schema(t.patternProperties[e]);
78
+ n && (r[e] = s(n, i, {
79
79
  level: o + 1,
80
80
  parentSchema: t,
81
81
  name: e,
@@ -83,8 +83,8 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
83
83
  }));
84
84
  }
85
85
  if ("additionalProperties" in t && t.additionalProperties) {
86
- const e = m(t.additionalProperties), n = t.additionalProperties === !0 || typeof t.additionalProperties == "object" && Object.keys(t.additionalProperties).length === 0, p = typeof e == "object" && "x-additionalPropertiesName" in e && typeof e["x-additionalPropertiesName"] == "string" && e["x-additionalPropertiesName"].trim().length > 0 ? e["x-additionalPropertiesName"].trim() : M;
87
- r[p] = n ? "anything" : typeof e == "object" ? c(e, i, {
86
+ const e = typeof t.additionalProperties == "boolean" ? t.additionalProperties : y.schema(t.additionalProperties), n = t.additionalProperties === !0 || typeof t.additionalProperties == "object" && Object.keys(t.additionalProperties).length === 0, a = typeof e == "object" && "x-additionalPropertiesName" in e && typeof e["x-additionalPropertiesName"] == "string" && e["x-additionalPropertiesName"].trim().length > 0 ? e["x-additionalPropertiesName"].trim() : R;
87
+ r[a] = n ? "anything" : typeof e == "object" ? s(e, i, {
88
88
  level: o + 1,
89
89
  seen: l
90
90
  }) : "anything";
@@ -92,7 +92,7 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
92
92
  if (t.oneOf?.[0])
93
93
  Object.assign(
94
94
  r,
95
- c(m(t.oneOf[0]), i, {
95
+ s(y.schema(t.oneOf[0]), i, {
96
96
  level: o + 1,
97
97
  seen: l
98
98
  })
@@ -100,7 +100,7 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
100
100
  else if (t.anyOf?.[0])
101
101
  Object.assign(
102
102
  r,
103
- c(m(t.anyOf[0]), i, {
103
+ s(y.schema(t.anyOf[0]), i, {
104
104
  level: o + 1,
105
105
  seen: l
106
106
  })
@@ -108,67 +108,67 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
108
108
  else if (Array.isArray(t.allOf) && t.allOf.length > 0) {
109
109
  let e = r;
110
110
  for (const n of t.allOf) {
111
- const p = c(m(n), i, {
111
+ const a = s(y.schema(n), i, {
112
112
  level: o + 1,
113
113
  parentSchema: t,
114
114
  seen: l
115
115
  });
116
- e = R(e, p);
116
+ e = T(e, a);
117
117
  }
118
118
  e && typeof e == "object" && Object.assign(r, e);
119
119
  }
120
120
  if (i?.xml && "xml" in t && t.xml?.name && o === 0) {
121
121
  const e = {};
122
- return e[t.xml.name] = r, a(t, e, d);
122
+ return e[t.xml.name] = r, d(t, e, f);
123
123
  }
124
- return a(t, r, d);
125
- }, X = (t, i, o, l, d) => {
126
- const r = "items" in t ? m(t.items) : void 0, e = r && typeof r == "object" && "xml" in r ? r.xml?.name : void 0, n = !!(i?.xml && "xml" in t && t.xml?.wrapped && e);
124
+ return d(t, r, f);
125
+ }, X = (t, i, o, l, f) => {
126
+ const r = "items" in t ? y.schema(t.items) : void 0, e = r && typeof r == "object" && "xml" in r ? r.xml?.name : void 0, n = !!(i?.xml && "xml" in t && t.xml?.wrapped && e);
127
127
  if (t.example !== void 0)
128
- return a(t, n ? { [e]: t.example } : t.example, d);
128
+ return d(t, n ? { [e]: t.example } : t.example, f);
129
129
  if (r && typeof r == "object") {
130
130
  if (Array.isArray(r.allOf) && r.allOf.length > 0) {
131
- const s = r.allOf.filter(v), y = m(s[0]);
132
- if (y && typeof y == "object" && "type" in y && y.type === "object") {
133
- const g = c({ type: "object", allOf: s }, i, {
131
+ const c = r.allOf.filter(v), m = y.schema(c[0]);
132
+ if (m && typeof m == "object" && "type" in m && m.type === "object") {
133
+ const g = s({ type: "object", allOf: c }, i, {
134
134
  level: o + 1,
135
135
  parentSchema: t,
136
136
  seen: l
137
137
  });
138
- return a(t, n ? [{ [e]: g }] : [g], d);
138
+ return d(t, n ? [{ [e]: g }] : [g], f);
139
139
  }
140
- const O = s.map(
141
- (f) => c(m(f), i, {
140
+ const O = c.map(
141
+ (p) => s(y.schema(p), i, {
142
142
  level: o + 1,
143
143
  parentSchema: t,
144
144
  seen: l
145
145
  })
146
146
  ).filter(v);
147
- return a(
147
+ return d(
148
148
  t,
149
- n ? O.map((f) => ({ [e]: f })) : O,
150
- d
149
+ n ? O.map((p) => ({ [e]: p })) : O,
150
+ f
151
151
  );
152
152
  }
153
153
  const u = r.anyOf || r.oneOf;
154
154
  if (u && u.length > 0) {
155
- const s = u[0], y = c(m(s), i, {
155
+ const c = u[0], m = s(y.schema(c), i, {
156
156
  level: o + 1,
157
157
  parentSchema: t,
158
158
  seen: l
159
159
  });
160
- return a(t, n ? [{ [e]: y }] : [y], d);
160
+ return d(t, n ? [{ [e]: m }] : [m], f);
161
161
  }
162
162
  }
163
- const p = r && typeof r == "object" && ("type" in r && r.type === "object" || "properties" in r), x = r && typeof r == "object" && ("type" in r && r.type === "array" || "items" in r);
164
- if (r && typeof r == "object" && ("type" in r && r.type || p || x)) {
165
- const u = c(r, i, {
163
+ const a = r && typeof r == "object" && ("type" in r && r.type === "object" || "properties" in r), b = r && typeof r == "object" && ("type" in r && r.type === "array" || "items" in r);
164
+ if (r && typeof r == "object" && ("type" in r && r.type || a || b)) {
165
+ const u = s(r, i, {
166
166
  level: o + 1,
167
167
  seen: l
168
168
  });
169
- return a(t, n ? [{ [e]: u }] : [u], d);
169
+ return d(t, n ? [{ [e]: u }] : [u], f);
170
170
  }
171
- return a(t, [], d);
171
+ return d(t, [], f);
172
172
  }, U = (t, i, o) => {
173
173
  if ("type" in t && t.type && !Array.isArray(t.type))
174
174
  switch (t.type) {
@@ -212,87 +212,87 @@ const D = 10, P = 10, M = "additionalProperty", j = (/* @__PURE__ */ new Date())
212
212
  mode: t?.mode,
213
213
  variables: t?.variables,
214
214
  omitEmptyAndOptionalProperties: t?.omitEmptyAndOptionalProperties
215
- }), c = (t, i, {
215
+ }), s = (t, i, {
216
216
  level: o = 0,
217
217
  parentSchema: l,
218
- name: d,
218
+ name: f,
219
219
  seen: r = /* @__PURE__ */ new WeakSet()
220
220
  } = {}) => {
221
- const e = m(t);
221
+ const e = y.schema(t);
222
222
  if (!v(e))
223
223
  return;
224
224
  const n = E(N(e));
225
225
  if (r.has(n))
226
226
  return;
227
227
  r.add(n);
228
- const p = z(i), x = A.get(n)?.get(p);
229
- if (typeof x < "u")
230
- return r.delete(n), x;
231
- if (o > D)
228
+ const a = z(i), b = A.get(n)?.get(a);
229
+ if (typeof b < "u")
230
+ return r.delete(n), b;
231
+ if (o > M)
232
232
  return r.delete(n), "[Max Depth Exceeded]";
233
233
  const u = !!i?.emptyString;
234
- if (F(e, l, d, i)) {
234
+ if (F(e, l, f, i)) {
235
235
  r.delete(n);
236
236
  return;
237
237
  }
238
238
  if ("x-variable" in e && e["x-variable"]) {
239
- const f = i?.variables?.[e["x-variable"]];
240
- if (f !== void 0)
241
- return "type" in e && (e.type === "number" || e.type === "integer") ? (r.delete(n), a(e, Number(f), p)) : (r.delete(n), a(e, f, p));
239
+ const p = i?.variables?.[e["x-variable"]];
240
+ if (p !== void 0)
241
+ return "type" in e && (e.type === "number" || e.type === "integer") ? (r.delete(n), d(e, Number(p), a)) : (r.delete(n), d(e, p, a));
242
242
  }
243
243
  if (Array.isArray(e.examples) && e.examples.length > 0)
244
- return r.delete(n), a(e, e.examples[0], p);
244
+ return r.delete(n), d(e, e.examples[0], a);
245
245
  if (e.example !== void 0)
246
- return r.delete(n), a(e, e.example, p);
246
+ return r.delete(n), d(e, e.example, a);
247
247
  if (e.default !== void 0)
248
- return r.delete(n), a(e, e.default, p);
248
+ return r.delete(n), d(e, e.default, a);
249
249
  if (e.const !== void 0)
250
- return r.delete(n), a(e, e.const, p);
250
+ return r.delete(n), d(e, e.const, a);
251
251
  if (Array.isArray(e.enum) && e.enum.length > 0)
252
- return r.delete(n), a(e, e.enum[0], p);
252
+ return r.delete(n), d(e, e.enum[0], a);
253
253
  if ("properties" in e || "type" in e && e.type === "object") {
254
- const f = L(e, i, o, r, p);
255
- return r.delete(n), f;
254
+ const p = L(e, i, o, r, a);
255
+ return r.delete(n), p;
256
256
  }
257
257
  if ("type" in e && e.type === "array" || "items" in e) {
258
- const f = X(e, i, o, r, p);
259
- return r.delete(n), f;
258
+ const p = X(e, i, o, r, a);
259
+ return r.delete(n), p;
260
260
  }
261
- const s = U(e, u, i?.emptyString);
262
- if (s !== void 0)
263
- return r.delete(n), a(e, s, p);
264
- const y = e.oneOf || e.anyOf;
265
- if (Array.isArray(y) && y.length > 0) {
266
- for (const f of y) {
267
- const g = m(f);
261
+ const c = U(e, u, i?.emptyString);
262
+ if (c !== void 0)
263
+ return r.delete(n), d(e, c, a);
264
+ const m = e.oneOf || e.anyOf;
265
+ if (Array.isArray(m) && m.length > 0) {
266
+ for (const p of m) {
267
+ const g = y.schema(p);
268
268
  if (g && (!("type" in g) || g.type !== "null"))
269
- return r.delete(n), a(
269
+ return r.delete(n), d(
270
270
  e,
271
- c(g, i, {
271
+ s(g, i, {
272
272
  level: o + 1,
273
273
  seen: r
274
274
  }),
275
- p
275
+ a
276
276
  );
277
277
  }
278
- return r.delete(n), a(e, null, p);
278
+ return r.delete(n), d(e, null, a);
279
279
  }
280
280
  if (Array.isArray(e.allOf) && e.allOf.length > 0) {
281
- let f;
281
+ let p;
282
282
  const g = e.allOf;
283
- for (const T of g) {
284
- const b = c(T, i, {
283
+ for (const D of g) {
284
+ const x = s(D, i, {
285
285
  level: o + 1,
286
286
  parentSchema: e,
287
287
  seen: r
288
288
  });
289
- f === void 0 ? f = b : f && typeof f == "object" && b && typeof b == "object" ? f = R(f, b) : b !== void 0 && (f = b);
289
+ p === void 0 ? p = x : p && typeof p == "object" && x && typeof x == "object" ? p = T(p, x) : x !== void 0 && (p = x);
290
290
  }
291
- return r.delete(n), a(e, f ?? null, p);
291
+ return r.delete(n), d(e, p ?? null, a);
292
292
  }
293
293
  const O = W(e, u, i?.emptyString);
294
- return O !== void 0 ? (r.delete(n), a(e, O, p)) : (r.delete(n), a(e, null, p));
294
+ return O !== void 0 ? (r.delete(n), d(e, O, a)) : (r.delete(n), d(e, null, a));
295
295
  };
296
296
  export {
297
- c as getExampleFromSchema
297
+ s as getExampleFromSchema
298
298
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAyRA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;cAYmB,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;cAAjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;AAghBtE,wBAOG"}
1
+ {"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AAiTA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,MAAM,MAAM,QAAQ,GAAG;IACrB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;cAYmB,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;;;;;;cAAjD,MAAM;eAAS,MAAM,GAAG,IAAI;oBAAc,OAAO;;;AAsiBtE,wBAOG"}