oazapfts 6.1.1 → 6.1.2

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.
package/generate.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("lodash");require("typescript");const e=require("./tscodegen-CJPFhnOl.cjs");exports.addComment=e.addComment;exports.appendNodes=e.appendNodes;exports.block=e.block;exports.callOazapftsFunction=e.callOazapftsFunction;exports.callQsFunction=e.callQsFunction;exports.changePropertyValue=e.changePropertyValue;exports.createArrowFunction=e.createArrowFunction;exports.createCall=e.createCall;exports.createClassDeclaration=e.createClassDeclaration;exports.createConstructor=e.createConstructor;exports.createEnumTypeNode=e.createEnumTypeNode;exports.createFunctionDeclaration=e.createFunctionDeclaration;exports.createIndexSignature=e.createIndexSignature;exports.createInterfaceAliasDeclaration=e.createInterfaceAliasDeclaration;exports.createKeywordType=e.createKeywordType;exports.createLiteral=e.createLiteral;exports.createMethod=e.createMethod;exports.createMethodCall=e.createMethodCall;exports.createObjectBinding=e.createObjectBinding;exports.createObjectLiteral=e.createObjectLiteral;exports.createParameter=e.createParameter;exports.createPropertyAssignment=e.createPropertyAssignment;exports.createPropertySignature=e.createPropertySignature;exports.createQuestionToken=e.createQuestionToken;exports.createTemplateString=e.createTemplateString;exports.createTypeAliasDeclaration=e.createTypeAliasDeclaration;exports.createUrlExpression=e.createUrlExpression;exports.default=e.ApiGenerator;exports.defaultBaseUrl=e.defaultBaseUrl;exports.findFirstVariableDeclaration=e.findFirstVariableDeclaration;exports.findNode=e.findNode;exports.getBodyFormatter=e.getBodyFormatter;exports.getFirstDeclarationName=e.getFirstDeclarationName;exports.getFormatter=e.getFormatter;exports.getName=e.getName;exports.getOperationIdentifier=e.getOperationIdentifier;exports.getOperationName=e.getOperationName;exports.getReferenceName=e.getReferenceName;exports.isJsonMimeType=e.isJsonMimeType;exports.isMimeType=e.isMimeType;exports.isNullable=e.isNullable;exports.isReference=e.isReference;exports.isValidIdentifier=e.isValidIdentifier;exports.keywordType=e.keywordType;exports.modifier=e.modifier;exports.printFile=e.printFile;exports.printNode=e.printNode;exports.printNodes=e.printNodes;exports.questionToken=e.questionToken;exports.refPathToPropertyPath=e.refPathToPropertyPath;exports.supportDeepObjects=e.supportDeepObjects;exports.toExpression=e.toExpression;exports.toIdentifier=e.toIdentifier;exports.verbs=e.verbs;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("lodash");require("typescript");const e=require("./tscodegen-D-Pq-t1I.cjs");exports.addComment=e.addComment;exports.appendNodes=e.appendNodes;exports.block=e.block;exports.callOazapftsFunction=e.callOazapftsFunction;exports.callQsFunction=e.callQsFunction;exports.changePropertyValue=e.changePropertyValue;exports.createArrowFunction=e.createArrowFunction;exports.createCall=e.createCall;exports.createClassDeclaration=e.createClassDeclaration;exports.createConstructor=e.createConstructor;exports.createEnumTypeNode=e.createEnumTypeNode;exports.createFunctionDeclaration=e.createFunctionDeclaration;exports.createIndexSignature=e.createIndexSignature;exports.createInterfaceAliasDeclaration=e.createInterfaceAliasDeclaration;exports.createKeywordType=e.createKeywordType;exports.createLiteral=e.createLiteral;exports.createMethod=e.createMethod;exports.createMethodCall=e.createMethodCall;exports.createObjectBinding=e.createObjectBinding;exports.createObjectLiteral=e.createObjectLiteral;exports.createParameter=e.createParameter;exports.createPropertyAssignment=e.createPropertyAssignment;exports.createPropertySignature=e.createPropertySignature;exports.createQuestionToken=e.createQuestionToken;exports.createTemplateString=e.createTemplateString;exports.createTypeAliasDeclaration=e.createTypeAliasDeclaration;exports.createUrlExpression=e.createUrlExpression;exports.default=e.ApiGenerator;exports.defaultBaseUrl=e.defaultBaseUrl;exports.findFirstVariableDeclaration=e.findFirstVariableDeclaration;exports.findNode=e.findNode;exports.getBodyFormatter=e.getBodyFormatter;exports.getFirstDeclarationName=e.getFirstDeclarationName;exports.getFormatter=e.getFormatter;exports.getName=e.getName;exports.getOperationIdentifier=e.getOperationIdentifier;exports.getOperationName=e.getOperationName;exports.getReferenceName=e.getReferenceName;exports.isJsonMimeType=e.isJsonMimeType;exports.isMimeType=e.isMimeType;exports.isNullable=e.isNullable;exports.isReference=e.isReference;exports.isValidIdentifier=e.isValidIdentifier;exports.keywordType=e.keywordType;exports.modifier=e.modifier;exports.printFile=e.printFile;exports.printNode=e.printNode;exports.printNodes=e.printNodes;exports.questionToken=e.questionToken;exports.refPathToPropertyPath=e.refPathToPropertyPath;exports.supportDeepObjects=e.supportDeepObjects;exports.toExpression=e.toExpression;exports.toIdentifier=e.toIdentifier;exports.verbs=e.verbs;
2
2
  //# sourceMappingURL=generate.cjs.map
package/generate.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "lodash";
2
2
  import "typescript";
3
- import { Y as r, X as i, H as o, m as n, l as c, W as l, I as p, D as d, K as m, L as u, y as f, J as g, P as y, B as N, u as T, x as F, M as b, E as D, Q as P, F as O, N as h, G as C, O as I, n as k, R as x, z as A, k as M, A as j, a0 as w, V as B, S as E, g as S, U as V, b as L, T as Q, c as R, d as U, h as q, a as v, i as z, e as J, f as K, $ as G, o as H, w as W, p as X, Z as Y, _ as Z, q as _, r as $, s as ee, C as ae, j as te, v as se } from "./tscodegen-Br0HzOMn.js";
3
+ import { Y as r, X as i, H as o, m as n, l as c, W as l, I as p, D as d, K as m, L as u, y as f, J as g, P as y, B as N, u as T, x as F, M as b, E as D, Q as P, F as O, N as h, G as C, O as I, n as k, R as x, z as A, k as M, A as j, a0 as w, V as B, S as E, g as S, U as V, b as L, T as Q, c as R, d as U, h as q, a as v, i as z, e as J, f as K, $ as G, o as H, w as W, p as X, Z as Y, _ as Z, q as _, r as $, s as ee, C as ae, j as te, v as se } from "./tscodegen-Cd0Ct4AR.js";
4
4
  export {
5
5
  r as addComment,
6
6
  i as appendNodes,
package/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";var u=(e,t,r)=>new Promise((s,i)=>{var a=n=>{try{o(r.next(n))}catch(c){i(c)}},p=n=>{try{o(r.throw(n))}catch(c){i(c)}},o=n=>n.done?s(n.value):Promise.resolve(n.value).then(a,p);o((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./tscodegen-CJPFhnOl.cjs"),v=require("@apidevtools/swagger-parser"),A=require("swagger2openapi"),S=["positional","object"];function g(e,t,r){return new l.ApiGenerator(e,t,r).generateApi()}function d(e){return l.printFile(e)}function b(r){return u(this,arguments,function*(e,t={}){var{doc:s,isConverted:i}=yield f(e);const a=g(s,t,i),{title:p,version:o}=s.info,n=["$&",p,o].filter(Boolean).join(`
1
+ "use strict";var u=(e,t,r)=>new Promise((s,i)=>{var a=n=>{try{o(r.next(n))}catch(c){i(c)}},p=n=>{try{o(r.throw(n))}catch(c){i(c)}},o=n=>n.done?s(n.value):Promise.resolve(n.value).then(a,p);o((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./tscodegen-D-Pq-t1I.cjs"),v=require("@apidevtools/swagger-parser"),A=require("swagger2openapi"),S=["positional","object"];function g(e,t,r){return new l.ApiGenerator(e,t,r).generateApi()}function d(e){return l.printFile(e)}function b(r){return u(this,arguments,function*(e,t={}){var{doc:s,isConverted:i}=yield f(e);const a=g(s,t,i),{title:p,version:o}=s.info,n=["$&",p,o].filter(Boolean).join(`
2
2
  * `);return d(a).replace(/^\/\*\*/,n)})}function y(e){return"openapi"in e&&e.openapi.startsWith("3")}function f(e){return u(this,null,function*(){const t=yield v.bundle(e);return y(t)?{doc:t,isConverted:!1}:{doc:(yield A.convertObj(t,{})).openapi,isConverted:!0}})}exports.cg=l.tscodegen;exports.generateAst=g;exports.generateSource=b;exports.optsArgumentStyles=S;exports.parseSpec=f;exports.printAst=d;
3
3
  //# sourceMappingURL=index.cjs.map
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { A as c, p } from "./tscodegen-Br0HzOMn.js";
2
- import { t as x } from "./tscodegen-Br0HzOMn.js";
1
+ import { A as c, p } from "./tscodegen-Cd0Ct4AR.js";
2
+ import { t as x } from "./tscodegen-Cd0Ct4AR.js";
3
3
  import u from "@apidevtools/swagger-parser";
4
4
  import f from "swagger2openapi";
5
5
  const S = ["positional", "object"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oazapfts",
3
- "version": "6.1.1",
3
+ "version": "6.1.2",
4
4
  "description": "OpenApi TypeScript client generator",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -11,13 +11,13 @@ function je(t) {
11
11
  }))
12
12
  );
13
13
  }
14
- function Le(t, e) {
14
+ function Ke(t, e) {
15
15
  const n = [
16
16
  F(
17
- V(
17
+ _(
18
18
  Object.entries(e || {}).map(([i, r]) => ({
19
19
  name: i,
20
- initializer: Y(r.default)
20
+ initializer: C(r.default)
21
21
  }))
22
22
  ),
23
23
  {
@@ -36,10 +36,10 @@ function Le(t, e) {
36
36
  ];
37
37
  return he(n, je(t));
38
38
  }
39
- function Ke(t) {
40
- return t.variables ? Le(t.url, t.variables) : U.createStringLiteral(t.url);
41
- }
42
39
  function ke(t) {
40
+ return t.variables ? Ke(t.url, t.variables) : U.createStringLiteral(t.url);
41
+ }
42
+ function Le(t) {
43
43
  if (!t)
44
44
  return "/";
45
45
  const { url: e, variables: n } = t;
@@ -49,7 +49,7 @@ function ke(t) {
49
49
  ) : e;
50
50
  }
51
51
  function Pe(t) {
52
- return U.createStringLiteral(ke(t[0]));
52
+ return U.createStringLiteral(Le(t[0]));
53
53
  }
54
54
  function Re(t, e) {
55
55
  return t.description ? b.camelCase(t.description.replace(/\W+/, " ")) : `server${e + 1}`;
@@ -58,7 +58,7 @@ function $e(t) {
58
58
  return ee(
59
59
  t.map((e, n) => [
60
60
  Re(e, n),
61
- Ke(e)
61
+ ke(e)
62
62
  ])
63
63
  );
64
64
  }
@@ -80,7 +80,7 @@ const o = u.factory, Ie = [
80
80
  function Ue(t) {
81
81
  return typeof t == "string" && /^[^/]+\/[^/]+$/.test(t);
82
82
  }
83
- function G(t) {
83
+ function Y(t) {
84
84
  return le[t] === "json" || /\bjson\b/i.test(t);
85
85
  }
86
86
  function Ce(t) {
@@ -89,7 +89,7 @@ function Ce(t) {
89
89
  const n = le[e];
90
90
  if (n)
91
91
  return n;
92
- if (G(e))
92
+ if (Y(e))
93
93
  return "json";
94
94
  }
95
95
  }
@@ -104,7 +104,7 @@ function qe({
104
104
  throw new Error(
105
105
  "Parameters with content property must specify one media type"
106
106
  );
107
- if (!G(i[0]))
107
+ if (!Y(i[0]))
108
108
  throw new Error(
109
109
  "Parameters with content property must specify a JSON compatible media type"
110
110
  );
@@ -113,7 +113,7 @@ function qe({
113
113
  return e && t === "deepObject" ? "deep" : e ? "explode" : t === "spaceDelimited" ? "space" : t === "pipeDelimited" ? "pipe" : "form";
114
114
  }
115
115
  function De(t) {
116
- if (t && !t.match(/[^\w\s]/) && (t = b.camelCase(t), H(t)))
116
+ if (t && !t.match(/[^\w\s]/) && (t = b.camelCase(t), W(t)))
117
117
  return t;
118
118
  }
119
119
  function ze(t, e, n) {
@@ -153,7 +153,7 @@ function _e(t) {
153
153
  }
154
154
  function w(t, e = !1, n) {
155
155
  let i = b.camelCase(t) + _e(n);
156
- return e && (i = b.upperFirst(i)), H(i) ? i : "$" + i;
156
+ return e && (i = b.upperFirst(i)), W(i) ? i : "$" + i;
157
157
  }
158
158
  function He(t, e) {
159
159
  const n = [], i = t.replace(
@@ -161,7 +161,7 @@ function He(t, e) {
161
161
  (r, s, c, f) => {
162
162
  const p = w(c);
163
163
  return n.push({
164
- expression: C(
164
+ expression: q(
165
165
  o.createIdentifier("encodeURIComponent"),
166
166
  { args: [o.createIdentifier(p)] }
167
167
  ),
@@ -172,7 +172,7 @@ function He(t, e) {
172
172
  return e && n.push({ expression: e, literal: "" }), te(i, n);
173
173
  }
174
174
  function pe(t, e) {
175
- return C(
175
+ return q(
176
176
  o.createPropertyAccessExpression(
177
177
  o.createIdentifier("QS"),
178
178
  t
@@ -180,8 +180,8 @@ function pe(t, e) {
180
180
  { args: e }
181
181
  );
182
182
  }
183
- function z(t, e, n) {
184
- return C(
183
+ function B(t, e, n) {
184
+ return q(
185
185
  o.createPropertyAccessExpression(
186
186
  o.createIdentifier("oazapfts"),
187
187
  t
@@ -294,7 +294,7 @@ class st {
294
294
  };
295
295
  const d = this.getTypeFromSchema(s, void 0);
296
296
  this.aliases.push(
297
- B({
297
+ M({
298
298
  modifiers: [P.export],
299
299
  name: p,
300
300
  type: d
@@ -311,7 +311,7 @@ class st {
311
311
  );
312
312
  const N = this.getTypeFromSchema(s, c, "readOnly");
313
313
  this.aliases.push(
314
- B({
314
+ M({
315
315
  modifiers: [P.export],
316
316
  name: T,
317
317
  type: N
@@ -328,7 +328,7 @@ class st {
328
328
  );
329
329
  const N = this.getTypeFromSchema(s, c, "writeOnly");
330
330
  this.aliases.push(
331
- B({
331
+ M({
332
332
  modifiers: [P.export],
333
333
  name: T,
334
334
  type: N
@@ -544,12 +544,12 @@ class st {
544
544
  const N = p ? p[T] : String(g);
545
545
  return o.createEnumMember(
546
546
  o.createIdentifier(w(N, !0)),
547
- o.createNumericLiteral(g)
547
+ C(g)
548
548
  );
549
549
  }
550
550
  return o.createEnumMember(
551
551
  o.createIdentifier(w(g, !0)),
552
- o.createStringLiteral(g)
552
+ C(g)
553
553
  );
554
554
  });
555
555
  this.enumAliases.push(
@@ -672,7 +672,7 @@ class st {
672
672
  );
673
673
  return n.some(
674
674
  (r) => Object.keys(r.content ?? {}).length > 0
675
- ) ? n.some((r) => Object.keys(r.content ?? {}).some(G)) ? "json" : n.some(
675
+ ) ? n.some((r) => Object.keys(r.content ?? {}).some(Y)) ? "json" : n.some(
676
676
  (r) => Object.keys(r.content ?? []).some((s) => s.startsWith("text/"))
677
677
  ) ? "text" : "blob" : "text";
678
678
  }
@@ -693,7 +693,7 @@ class st {
693
693
  return this.getTypeFromSchema(O(e) ? e : e.schema);
694
694
  }
695
695
  wrapResult(e) {
696
- return this.opts?.optimistic ? z("ok", [e]) : e;
696
+ return this.opts?.optimistic ? B("ok", [e]) : e;
697
697
  }
698
698
  /**
699
699
  * Does three things:
@@ -747,11 +747,11 @@ export const servers = {};
747
747
  /*setParentNodes*/
748
748
  !1,
749
749
  u.ScriptKind.TS
750
- ), n = J(e.statements, "servers");
750
+ ), n = G(e.statements, "servers");
751
751
  Object.assign(n, {
752
752
  initializer: $e(this.spec.servers || [])
753
753
  });
754
- const { initializer: i } = J(
754
+ const { initializer: i } = G(
755
755
  e.statements,
756
756
  "defaults"
757
757
  );
@@ -781,34 +781,34 @@ export const servers = {};
781
781
  } = h;
782
782
  if (this.skip(Fe))
783
783
  return;
784
- let q = ze(p, c, g);
785
- const ie = s[q] = (s[q] || 0) + 1;
786
- ie > 1 && (q += ie);
787
- const D = this.resolveArray(f.parameters);
784
+ let D = ze(p, c, g);
785
+ const ie = s[D] = (s[D] || 0) + 1;
786
+ ie > 1 && (D += ie);
787
+ const z = this.resolveArray(f.parameters);
788
788
  for (const y of this.resolveArray(h.parameters))
789
- D.find(
790
- (L) => L.name === y.name && L.in === y.in
791
- ) || D.push(y);
792
- const K = this.isConverted ? We(D) : D, W = /* @__PURE__ */ new Map();
793
- b.sortBy(K, "name.length").forEach((y) => {
794
- const S = w(y.name), E = [...W.values()].includes(S) ? b.upperFirst(y.in) : "";
795
- W.set(y, S + E);
789
+ z.find(
790
+ (K) => K.name === y.name && K.in === y.in
791
+ ) || z.push(y);
792
+ const k = this.isConverted ? We(z) : z, Q = /* @__PURE__ */ new Map();
793
+ b.sortBy(k, "name.length").forEach((y) => {
794
+ const S = w(y.name), E = [...Q.values()].includes(S) ? b.upperFirst(y.in) : "";
795
+ Q.set(y, S + E);
796
796
  });
797
797
  const A = (y) => {
798
- const S = W.get(y);
798
+ const S = Q.get(y);
799
799
  if (!S)
800
800
  throw new Error(`Can't find parameter: ${y.name}`);
801
801
  return S;
802
- }, k = [];
802
+ }, L = [];
803
803
  let j, v;
804
804
  switch (this.opts.argumentStyle ?? "positional") {
805
805
  case "positional":
806
- const [y, S] = b.partition(K, "required"), L = y.map(
806
+ const [y, S] = b.partition(k, "required"), K = y.map(
807
807
  (m) => F(A(this.resolve(m)), {
808
808
  type: this.getTypeFromParameter(m)
809
809
  })
810
810
  );
811
- if (k.push(...L), T) {
811
+ if (L.push(...K), T) {
812
812
  j = this.resolve(T);
813
813
  const m = this.getSchemaFromContent(j.content), I = this.getTypeFromSchema(
814
814
  m,
@@ -817,16 +817,16 @@ export const servers = {};
817
817
  );
818
818
  v = w(
819
819
  I.name || ue(m) || "body"
820
- ), k.push(
820
+ ), L.push(
821
821
  F(v, {
822
822
  type: I,
823
823
  questionToken: !j.required
824
824
  })
825
825
  );
826
826
  }
827
- S.length && k.push(
827
+ S.length && L.push(
828
828
  F(
829
- V(
829
+ _(
830
830
  S.map((m) => this.resolve(m)).map((m) => ({ name: A(m) }))
831
831
  ),
832
832
  {
@@ -845,7 +845,7 @@ export const servers = {};
845
845
  );
846
846
  break;
847
847
  case "object":
848
- const E = K.map(
848
+ const E = k.map(
849
849
  (m) => x({
850
850
  name: A(this.resolve(m)),
851
851
  questionToken: !m.required,
@@ -871,10 +871,10 @@ export const servers = {};
871
871
  }
872
872
  if (E.length === 0)
873
873
  break;
874
- k.push(
874
+ L.push(
875
875
  F(
876
- V([
877
- ...K.map((m) => this.resolve(m)).map((m) => ({ name: A(m) })),
876
+ _([
877
+ ...k.map((m) => this.resolve(m)).map((m) => ({ name: A(m) })),
878
878
  ...v ? [{ name: v }] : []
879
879
  ]),
880
880
  {
@@ -884,7 +884,7 @@ export const servers = {};
884
884
  );
885
885
  break;
886
886
  }
887
- k.push(
887
+ L.push(
888
888
  F("opts", {
889
889
  type: o.createTypeReferenceNode(
890
890
  "Oazapfts.RequestOpts",
@@ -893,15 +893,15 @@ export const servers = {};
893
893
  questionToken: !0
894
894
  })
895
895
  );
896
- const Q = this.getResponseType(N), se = K.filter((y) => y.in === "query"), oe = K.filter((y) => y.in === "header");
896
+ const J = this.getResponseType(N), se = k.filter((y) => y.in === "query"), oe = k.filter((y) => y.in === "header");
897
897
  let ae;
898
898
  if (se.length) {
899
899
  const y = b.groupBy(se, qe);
900
900
  ae = pe(
901
901
  "query",
902
- Object.entries(y).map(([S, L]) => pe(S, [
902
+ Object.entries(y).map(([S, K]) => pe(S, [
903
903
  ee(
904
- L.map((E) => [E.name, A(E)])
904
+ K.map((E) => [E.name, A(E)])
905
905
  )
906
906
  ]))
907
907
  );
@@ -915,14 +915,14 @@ export const servers = {};
915
915
  o.createStringLiteral(d)
916
916
  )
917
917
  ), v && $.push(
918
- M(
918
+ V(
919
919
  "body",
920
920
  o.createIdentifier(v)
921
921
  )
922
922
  ), oe.length && $.push(
923
923
  o.createPropertyAssignment(
924
924
  "headers",
925
- z("mergeHeaders", [
925
+ B("mergeHeaders", [
926
926
  o.createPropertyAccessChain(
927
927
  o.createIdentifier("opts"),
928
928
  o.createToken(u.SyntaxKind.QuestionDotToken),
@@ -931,7 +931,7 @@ export const servers = {};
931
931
  o.createObjectLiteralExpression(
932
932
  [
933
933
  ...oe.map(
934
- (y) => M(
934
+ (y) => V(
935
935
  y.name,
936
936
  o.createIdentifier(A(y))
937
937
  )
@@ -946,28 +946,28 @@ export const servers = {};
946
946
  if ($.length) {
947
947
  const y = Ce(j), S = o.createObjectLiteralExpression($, !0);
948
948
  ce.push(
949
- y ? z(y, [S]) : S
949
+ y ? B(y, [S]) : S
950
950
  );
951
951
  }
952
952
  r.push(
953
953
  xe(
954
954
  ge(
955
- q,
955
+ D,
956
956
  {
957
957
  modifiers: [P.export]
958
958
  },
959
- k,
959
+ L,
960
960
  me(
961
961
  o.createReturnStatement(
962
962
  this.wrapResult(
963
- z(
963
+ B(
964
964
  {
965
965
  json: "fetchJson",
966
966
  text: "fetchText",
967
967
  blob: "fetchBlob"
968
- }[Q],
968
+ }[J],
969
969
  ce,
970
- Q === "json" || Q === "blob" ? [
970
+ J === "json" || J === "blob" ? [
971
971
  this.getTypeFromResponses(
972
972
  N,
973
973
  "readOnly"
@@ -993,7 +993,7 @@ export const servers = {};
993
993
  }
994
994
  }
995
995
  const a = u.factory, ye = a.createToken(u.SyntaxKind.QuestionToken);
996
- function _(t) {
996
+ function H(t) {
997
997
  if (t)
998
998
  return t === !0 ? ye : t;
999
999
  }
@@ -1015,7 +1015,7 @@ const P = {
1015
1015
  async: a.createModifier(u.SyntaxKind.AsyncKeyword),
1016
1016
  export: a.createModifier(u.SyntaxKind.ExportKeyword)
1017
1017
  };
1018
- function Y(t) {
1018
+ function C(t) {
1019
1019
  switch (typeof t) {
1020
1020
  case "string":
1021
1021
  return a.createStringLiteral(t);
@@ -1030,11 +1030,11 @@ function Y(t) {
1030
1030
  }
1031
1031
  function Z(t) {
1032
1032
  const e = t.map(
1033
- (n) => n === null ? l.null : a.createLiteralTypeNode(Y(n))
1033
+ (n) => n === null ? l.null : a.createLiteralTypeNode(C(n))
1034
1034
  );
1035
1035
  return e.length > 1 ? a.createUnionTypeNode(e) : e[0];
1036
1036
  }
1037
- function B({
1037
+ function M({
1038
1038
  modifiers: t,
1039
1039
  name: e,
1040
1040
  typeParameters: n,
@@ -1079,14 +1079,14 @@ function Je({
1079
1079
  function X(t) {
1080
1080
  return typeof t == "string" ? a.createIdentifier(t) : t;
1081
1081
  }
1082
- function C(t, {
1082
+ function q(t, {
1083
1083
  typeArgs: e,
1084
1084
  args: n
1085
1085
  } = {}) {
1086
1086
  return a.createCallExpression(X(t), e, n);
1087
1087
  }
1088
1088
  function Ge(t, e) {
1089
- return C(
1089
+ return q(
1090
1090
  a.createPropertyAccessExpression(a.createThis(), t),
1091
1091
  e
1092
1092
  );
@@ -1094,12 +1094,12 @@ function Ge(t, e) {
1094
1094
  function ee(t) {
1095
1095
  return a.createObjectLiteralExpression(
1096
1096
  t.map(
1097
- ([e, n]) => M(e, X(n))
1097
+ ([e, n]) => V(e, X(n))
1098
1098
  ),
1099
1099
  !0
1100
1100
  );
1101
1101
  }
1102
- function M(t, e) {
1102
+ function V(t, e) {
1103
1103
  return u.isIdentifier(e) && e.text === t ? a.createShorthandPropertyAssignment(t) : a.createPropertyAssignment(Te(t), e);
1104
1104
  }
1105
1105
  function me(...t) {
@@ -1169,7 +1169,7 @@ function Xe(t, {
1169
1169
  e,
1170
1170
  n,
1171
1171
  t,
1172
- _(i),
1172
+ H(i),
1173
1173
  r,
1174
1174
  c,
1175
1175
  s,
@@ -1187,13 +1187,13 @@ function F(t, {
1187
1187
  e,
1188
1188
  n,
1189
1189
  t,
1190
- _(i),
1190
+ H(i),
1191
1191
  r,
1192
1192
  s
1193
1193
  );
1194
1194
  }
1195
1195
  function Te(t) {
1196
- return typeof t == "string" ? H(t) ? a.createIdentifier(t) : a.createStringLiteral(t) : t;
1196
+ return typeof t == "string" ? W(t) ? a.createIdentifier(t) : a.createStringLiteral(t) : t;
1197
1197
  }
1198
1198
  function x({
1199
1199
  modifiers: t,
@@ -1204,7 +1204,7 @@ function x({
1204
1204
  return a.createPropertySignature(
1205
1205
  t,
1206
1206
  Te(e),
1207
- _(n),
1207
+ H(n),
1208
1208
  i
1209
1209
  );
1210
1210
  }
@@ -1219,7 +1219,7 @@ function Se(t, {
1219
1219
  t
1220
1220
  );
1221
1221
  }
1222
- function V(t) {
1222
+ function _(t) {
1223
1223
  return a.createObjectBindingPattern(
1224
1224
  t.map(
1225
1225
  ({ dotDotDotToken: e, propertyName: n, name: i, initializer: r }) => a.createBindingElement(
@@ -1257,7 +1257,7 @@ function Oe(t) {
1257
1257
  const e = u.getNameOfDeclaration(t.declarationList.declarations[0]);
1258
1258
  return e ? re(e) : "";
1259
1259
  }
1260
- function J(t, e) {
1260
+ function G(t, e) {
1261
1261
  const n = be(
1262
1262
  t,
1263
1263
  u.SyntaxKind.VariableStatement,
@@ -1319,7 +1319,7 @@ function tt(t) {
1319
1319
  function rt(t) {
1320
1320
  return ne.printFile(t);
1321
1321
  }
1322
- function H(t) {
1322
+ function W(t) {
1323
1323
  if (!t.length || t.trim() !== t)
1324
1324
  return !1;
1325
1325
  const e = u.parseIsolatedEntityName(t, u.ScriptTarget.Latest);
@@ -1332,7 +1332,7 @@ const ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1332
1332
  block: me,
1333
1333
  changePropertyValue: we,
1334
1334
  createArrowFunction: he,
1335
- createCall: C,
1335
+ createCall: q,
1336
1336
  createClassDeclaration: Ye,
1337
1337
  createConstructor: Ze,
1338
1338
  createEnumTypeNode: Z,
@@ -1340,22 +1340,22 @@ const ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1340
1340
  createIndexSignature: Se,
1341
1341
  createInterfaceAliasDeclaration: Je,
1342
1342
  createKeywordType: Qe,
1343
- createLiteral: Y,
1343
+ createLiteral: C,
1344
1344
  createMethod: Xe,
1345
1345
  createMethodCall: Ge,
1346
- createObjectBinding: V,
1346
+ createObjectBinding: _,
1347
1347
  createObjectLiteral: ee,
1348
1348
  createParameter: F,
1349
- createPropertyAssignment: M,
1349
+ createPropertyAssignment: V,
1350
1350
  createPropertySignature: x,
1351
- createQuestionToken: _,
1351
+ createQuestionToken: H,
1352
1352
  createTemplateString: te,
1353
- createTypeAliasDeclaration: B,
1354
- findFirstVariableDeclaration: J,
1353
+ createTypeAliasDeclaration: M,
1354
+ findFirstVariableDeclaration: G,
1355
1355
  findNode: be,
1356
1356
  getFirstDeclarationName: Oe,
1357
1357
  getName: re,
1358
- isValidIdentifier: H,
1358
+ isValidIdentifier: W,
1359
1359
  keywordType: l,
1360
1360
  modifier: P,
1361
1361
  printFile: rt,
@@ -1365,14 +1365,14 @@ const ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1365
1365
  toExpression: X
1366
1366
  }, Symbol.toStringTag, { value: "Module" }));
1367
1367
  export {
1368
- H as $,
1368
+ W as $,
1369
1369
  st as A,
1370
1370
  Je as B,
1371
1371
  X as C,
1372
- C as D,
1372
+ q as D,
1373
1373
  Ge as E,
1374
1374
  ee as F,
1375
- M as G,
1375
+ V as G,
1376
1376
  me as H,
1377
1377
  he as I,
1378
1378
  ge as J,
@@ -1382,18 +1382,18 @@ export {
1382
1382
  F as N,
1383
1383
  x as O,
1384
1384
  Se as P,
1385
- V as Q,
1385
+ _ as Q,
1386
1386
  te as R,
1387
1387
  be as S,
1388
1388
  re as T,
1389
1389
  Oe as U,
1390
- J as V,
1390
+ G as V,
1391
1391
  we as W,
1392
1392
  Ne as X,
1393
1393
  xe as Y,
1394
1394
  et as Z,
1395
1395
  tt as _,
1396
- G as a,
1396
+ Y as a,
1397
1397
  Pe as a0,
1398
1398
  qe as b,
1399
1399
  De as c,
@@ -1406,8 +1406,8 @@ export {
1406
1406
  w as j,
1407
1407
  He as k,
1408
1408
  pe as l,
1409
- z as m,
1410
- _ as n,
1409
+ B as m,
1410
+ H as n,
1411
1411
  l as o,
1412
1412
  rt as p,
1413
1413
  ye as q,
@@ -1417,8 +1417,8 @@ export {
1417
1417
  Qe as u,
1418
1418
  Ie as v,
1419
1419
  P as w,
1420
- Y as x,
1420
+ C as x,
1421
1421
  Z as y,
1422
- B as z
1422
+ M as z
1423
1423
  };
1424
- //# sourceMappingURL=tscodegen-Br0HzOMn.js.map
1424
+ //# sourceMappingURL=tscodegen-Cd0Ct4AR.js.map