@eudiplo/sdk-core 4.3.0 → 4.5.0

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.
@@ -34,10 +34,7 @@ var formDataBodySerializer = {
34
34
  }
35
35
  };
36
36
  var jsonBodySerializer = {
37
- bodySerializer: (body) => JSON.stringify(
38
- body,
39
- (_key, value) => typeof value === "bigint" ? value.toString() : value
40
- )
37
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
41
38
  };
42
39
  var urlSearchParamsBodySerializer = {
43
40
  bodySerializer: (body) => {
@@ -95,10 +92,10 @@ var stripEmptySlots = (params) => {
95
92
  };
96
93
  var buildClientParams = (args, fields) => {
97
94
  const params = {
98
- body: {},
99
- headers: {},
100
- path: {},
101
- query: {}
95
+ body: /* @__PURE__ */ Object.create(null),
96
+ headers: /* @__PURE__ */ Object.create(null),
97
+ path: /* @__PURE__ */ Object.create(null),
98
+ query: /* @__PURE__ */ Object.create(null)
102
99
  };
103
100
  const map = buildKeyMap(fields);
104
101
  let config;
@@ -130,9 +127,7 @@ var buildClientParams = (args, fields) => {
130
127
  params[field.map] = value;
131
128
  }
132
129
  } else {
133
- const extra = extraPrefixes.find(
134
- ([prefix]) => key.startsWith(prefix)
135
- );
130
+ const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
136
131
  if (extra) {
137
132
  const [prefix, slot] = extra;
138
133
  params[slot][key.slice(prefix.length)] = value;
@@ -184,9 +179,7 @@ var isPlainObject = (value) => {
184
179
  return prototype === Object.prototype || prototype === null;
185
180
  };
186
181
  var serializeSearchParams = (params) => {
187
- const entries = Array.from(params.entries()).sort(
188
- ([a], [b]) => a.localeCompare(b)
189
- );
182
+ const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));
190
183
  const result = {};
191
184
  for (const [key, value] of entries) {
192
185
  const existing = result[key];
@@ -271,10 +264,7 @@ function createSseClient({
271
264
  }
272
265
  const _fetch = options.fetch ?? globalThis.fetch;
273
266
  const response = await _fetch(request);
274
- if (!response.ok)
275
- throw new Error(
276
- `SSE failed: ${response.status} ${response.statusText}`
277
- );
267
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
278
268
  if (!response.body) throw new Error("No body in SSE response");
279
269
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
280
270
  let buffer = "";
@@ -305,10 +295,7 @@ function createSseClient({
305
295
  } else if (line.startsWith("id:")) {
306
296
  lastEventId = line.replace(/^id:\s*/, "");
307
297
  } else if (line.startsWith("retry:")) {
308
- const parsed = Number.parseInt(
309
- line.replace(/^retry:\s*/, ""),
310
- 10
311
- );
298
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
312
299
  if (!Number.isNaN(parsed)) {
313
300
  retryDelay = parsed;
314
301
  }
@@ -354,10 +341,7 @@ function createSseClient({
354
341
  if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
355
342
  break;
356
343
  }
357
- const backoff = Math.min(
358
- retryDelay * 2 ** (attempt - 1),
359
- sseMaxRetryDelay ?? 3e4
360
- );
344
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
361
345
  await sleep(backoff);
362
346
  }
363
347
  }
@@ -465,11 +449,7 @@ var serializeObjectParam = ({
465
449
  if (style !== "deepObject" && !explode) {
466
450
  let values = [];
467
451
  Object.entries(value).forEach(([key, v]) => {
468
- values = [
469
- ...values,
470
- key,
471
- allowReserved ? v : encodeURIComponent(v)
472
- ];
452
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
473
453
  });
474
454
  const joinedValues2 = values.join(",");
475
455
  switch (style) {
@@ -520,10 +500,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
520
500
  continue;
521
501
  }
522
502
  if (Array.isArray(value)) {
523
- url = url.replace(
524
- match,
525
- serializeArrayParam({ explode, name, style, value })
526
- );
503
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
527
504
  continue;
528
505
  }
529
506
  if (typeof value === "object") {
@@ -671,9 +648,7 @@ var getParseAs = (contentType) => {
671
648
  if (cleanContent === "multipart/form-data") {
672
649
  return "formData";
673
650
  }
674
- if (["application/", "audio/", "image/", "video/"].some(
675
- (type) => cleanContent.startsWith(type)
676
- )) {
651
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
677
652
  return "blob";
678
653
  }
679
654
  if (cleanContent.startsWith("text/")) {
@@ -690,11 +665,8 @@ var checkForExistence = (options, name) => {
690
665
  }
691
666
  return false;
692
667
  };
693
- var setAuthParams = async ({
694
- security,
695
- ...options
696
- }) => {
697
- for (const auth of security) {
668
+ async function setAuthParams(options) {
669
+ for (const auth of options.security ?? []) {
698
670
  if (checkForExistence(options, auth.name)) {
699
671
  continue;
700
672
  }
@@ -719,7 +691,7 @@ var setAuthParams = async ({
719
691
  break;
720
692
  }
721
693
  }
722
- };
694
+ }
723
695
  var buildUrl = (options) => getUrl({
724
696
  baseUrl: options.baseUrl,
725
697
  path: options.path,
@@ -845,10 +817,7 @@ var createClient = (config = {}) => {
845
817
  serializedBody: void 0
846
818
  };
847
819
  if (opts.security) {
848
- await setAuthParams({
849
- ...opts,
850
- security: opts.security
851
- });
820
+ await setAuthParams(opts);
852
821
  }
853
822
  if (opts.requestValidator) {
854
823
  await opts.requestValidator(opts);
@@ -961,12 +930,7 @@ var createClient = (config = {}) => {
961
930
  let finalError = error;
962
931
  for (const fn of interceptors.error.fns) {
963
932
  if (fn) {
964
- finalError = await fn(
965
- finalError,
966
- response,
967
- request2,
968
- options
969
- );
933
+ finalError = await fn(finalError, response, request2, options);
970
934
  }
971
935
  }
972
936
  finalError = finalError || {};
@@ -32,10 +32,7 @@ var formDataBodySerializer = {
32
32
  }
33
33
  };
34
34
  var jsonBodySerializer = {
35
- bodySerializer: (body) => JSON.stringify(
36
- body,
37
- (_key, value) => typeof value === "bigint" ? value.toString() : value
38
- )
35
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
39
36
  };
40
37
  var urlSearchParamsBodySerializer = {
41
38
  bodySerializer: (body) => {
@@ -93,10 +90,10 @@ var stripEmptySlots = (params) => {
93
90
  };
94
91
  var buildClientParams = (args, fields) => {
95
92
  const params = {
96
- body: {},
97
- headers: {},
98
- path: {},
99
- query: {}
93
+ body: /* @__PURE__ */ Object.create(null),
94
+ headers: /* @__PURE__ */ Object.create(null),
95
+ path: /* @__PURE__ */ Object.create(null),
96
+ query: /* @__PURE__ */ Object.create(null)
100
97
  };
101
98
  const map = buildKeyMap(fields);
102
99
  let config;
@@ -128,9 +125,7 @@ var buildClientParams = (args, fields) => {
128
125
  params[field.map] = value;
129
126
  }
130
127
  } else {
131
- const extra = extraPrefixes.find(
132
- ([prefix]) => key.startsWith(prefix)
133
- );
128
+ const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
134
129
  if (extra) {
135
130
  const [prefix, slot] = extra;
136
131
  params[slot][key.slice(prefix.length)] = value;
@@ -182,9 +177,7 @@ var isPlainObject = (value) => {
182
177
  return prototype === Object.prototype || prototype === null;
183
178
  };
184
179
  var serializeSearchParams = (params) => {
185
- const entries = Array.from(params.entries()).sort(
186
- ([a], [b]) => a.localeCompare(b)
187
- );
180
+ const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));
188
181
  const result = {};
189
182
  for (const [key, value] of entries) {
190
183
  const existing = result[key];
@@ -269,10 +262,7 @@ function createSseClient({
269
262
  }
270
263
  const _fetch = options.fetch ?? globalThis.fetch;
271
264
  const response = await _fetch(request);
272
- if (!response.ok)
273
- throw new Error(
274
- `SSE failed: ${response.status} ${response.statusText}`
275
- );
265
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
276
266
  if (!response.body) throw new Error("No body in SSE response");
277
267
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
278
268
  let buffer = "";
@@ -303,10 +293,7 @@ function createSseClient({
303
293
  } else if (line.startsWith("id:")) {
304
294
  lastEventId = line.replace(/^id:\s*/, "");
305
295
  } else if (line.startsWith("retry:")) {
306
- const parsed = Number.parseInt(
307
- line.replace(/^retry:\s*/, ""),
308
- 10
309
- );
296
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
310
297
  if (!Number.isNaN(parsed)) {
311
298
  retryDelay = parsed;
312
299
  }
@@ -352,10 +339,7 @@ function createSseClient({
352
339
  if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
353
340
  break;
354
341
  }
355
- const backoff = Math.min(
356
- retryDelay * 2 ** (attempt - 1),
357
- sseMaxRetryDelay ?? 3e4
358
- );
342
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
359
343
  await sleep(backoff);
360
344
  }
361
345
  }
@@ -463,11 +447,7 @@ var serializeObjectParam = ({
463
447
  if (style !== "deepObject" && !explode) {
464
448
  let values = [];
465
449
  Object.entries(value).forEach(([key, v]) => {
466
- values = [
467
- ...values,
468
- key,
469
- allowReserved ? v : encodeURIComponent(v)
470
- ];
450
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
471
451
  });
472
452
  const joinedValues2 = values.join(",");
473
453
  switch (style) {
@@ -518,10 +498,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
518
498
  continue;
519
499
  }
520
500
  if (Array.isArray(value)) {
521
- url = url.replace(
522
- match,
523
- serializeArrayParam({ explode, name, style, value })
524
- );
501
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
525
502
  continue;
526
503
  }
527
504
  if (typeof value === "object") {
@@ -669,9 +646,7 @@ var getParseAs = (contentType) => {
669
646
  if (cleanContent === "multipart/form-data") {
670
647
  return "formData";
671
648
  }
672
- if (["application/", "audio/", "image/", "video/"].some(
673
- (type) => cleanContent.startsWith(type)
674
- )) {
649
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
675
650
  return "blob";
676
651
  }
677
652
  if (cleanContent.startsWith("text/")) {
@@ -688,11 +663,8 @@ var checkForExistence = (options, name) => {
688
663
  }
689
664
  return false;
690
665
  };
691
- var setAuthParams = async ({
692
- security,
693
- ...options
694
- }) => {
695
- for (const auth of security) {
666
+ async function setAuthParams(options) {
667
+ for (const auth of options.security ?? []) {
696
668
  if (checkForExistence(options, auth.name)) {
697
669
  continue;
698
670
  }
@@ -717,7 +689,7 @@ var setAuthParams = async ({
717
689
  break;
718
690
  }
719
691
  }
720
- };
692
+ }
721
693
  var buildUrl = (options) => getUrl({
722
694
  baseUrl: options.baseUrl,
723
695
  path: options.path,
@@ -843,10 +815,7 @@ var createClient = (config = {}) => {
843
815
  serializedBody: void 0
844
816
  };
845
817
  if (opts.security) {
846
- await setAuthParams({
847
- ...opts,
848
- security: opts.security
849
- });
818
+ await setAuthParams(opts);
850
819
  }
851
820
  if (opts.requestValidator) {
852
821
  await opts.requestValidator(opts);
@@ -959,12 +928,7 @@ var createClient = (config = {}) => {
959
928
  let finalError = error;
960
929
  for (const fn of interceptors.error.fns) {
961
930
  if (fn) {
962
- finalError = await fn(
963
- finalError,
964
- response,
965
- request2,
966
- options
967
- );
931
+ finalError = await fn(finalError, response, request2, options);
968
932
  }
969
933
  }
970
934
  finalError = finalError || {};
@@ -1 +1 @@
1
- export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-DKrNRB-E.mjs';
1
+ export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-Cc6DtXw9.mjs';
@@ -1 +1 @@
1
- export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-DKrNRB-E.js';
1
+ export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-Cc6DtXw9.js';
@@ -1,5 +1,5 @@
1
- import { C as Client, a as ClientOptions, b as Config } from '../types.gen-DKrNRB-E.mjs';
2
- import { aj as ClientOptions$1 } from '../types.gen-DWk5kPkH.mjs';
1
+ import { C as Client, a as ClientOptions, b as Config } from '../types.gen-Cc6DtXw9.mjs';
2
+ import { C as ClientOptions$1 } from '../types.gen-z3We9JHj.mjs';
3
3
 
4
4
  /**
5
5
  * The `createClientConfig()` function will be called on client initialization
@@ -1,5 +1,5 @@
1
- import { C as Client, a as ClientOptions, b as Config } from '../types.gen-DKrNRB-E.js';
2
- import { aj as ClientOptions$1 } from '../types.gen-DWk5kPkH.js';
1
+ import { C as Client, a as ClientOptions, b as Config } from '../types.gen-Cc6DtXw9.js';
2
+ import { C as ClientOptions$1 } from '../types.gen-z3We9JHj.js';
3
3
 
4
4
  /**
5
5
  * The `createClientConfig()` function will be called on client initialization
@@ -2,10 +2,7 @@
2
2
 
3
3
  // src/api/core/bodySerializer.gen.ts
4
4
  var jsonBodySerializer = {
5
- bodySerializer: (body) => JSON.stringify(
6
- body,
7
- (_key, value) => typeof value === "bigint" ? value.toString() : value
8
- )
5
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
9
6
  };
10
7
 
11
8
  // src/api/core/serverSentEvents.gen.ts
@@ -49,10 +46,7 @@ function createSseClient({
49
46
  }
50
47
  const _fetch = options.fetch ?? globalThis.fetch;
51
48
  const response = await _fetch(request);
52
- if (!response.ok)
53
- throw new Error(
54
- `SSE failed: ${response.status} ${response.statusText}`
55
- );
49
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
56
50
  if (!response.body) throw new Error("No body in SSE response");
57
51
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
58
52
  let buffer = "";
@@ -83,10 +77,7 @@ function createSseClient({
83
77
  } else if (line.startsWith("id:")) {
84
78
  lastEventId = line.replace(/^id:\s*/, "");
85
79
  } else if (line.startsWith("retry:")) {
86
- const parsed = Number.parseInt(
87
- line.replace(/^retry:\s*/, ""),
88
- 10
89
- );
80
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
90
81
  if (!Number.isNaN(parsed)) {
91
82
  retryDelay = parsed;
92
83
  }
@@ -132,10 +123,7 @@ function createSseClient({
132
123
  if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
133
124
  break;
134
125
  }
135
- const backoff = Math.min(
136
- retryDelay * 2 ** (attempt - 1),
137
- sseMaxRetryDelay ?? 3e4
138
- );
126
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
139
127
  await sleep(backoff);
140
128
  }
141
129
  }
@@ -243,11 +231,7 @@ var serializeObjectParam = ({
243
231
  if (style !== "deepObject" && !explode) {
244
232
  let values = [];
245
233
  Object.entries(value).forEach(([key, v]) => {
246
- values = [
247
- ...values,
248
- key,
249
- allowReserved ? v : encodeURIComponent(v)
250
- ];
234
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
251
235
  });
252
236
  const joinedValues2 = values.join(",");
253
237
  switch (style) {
@@ -298,10 +282,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
298
282
  continue;
299
283
  }
300
284
  if (Array.isArray(value)) {
301
- url = url.replace(
302
- match,
303
- serializeArrayParam({ explode, name, style, value })
304
- );
285
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
305
286
  continue;
306
287
  }
307
288
  if (typeof value === "object") {
@@ -449,9 +430,7 @@ var getParseAs = (contentType) => {
449
430
  if (cleanContent === "multipart/form-data") {
450
431
  return "formData";
451
432
  }
452
- if (["application/", "audio/", "image/", "video/"].some(
453
- (type) => cleanContent.startsWith(type)
454
- )) {
433
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
455
434
  return "blob";
456
435
  }
457
436
  if (cleanContent.startsWith("text/")) {
@@ -468,11 +447,8 @@ var checkForExistence = (options, name) => {
468
447
  }
469
448
  return false;
470
449
  };
471
- var setAuthParams = async ({
472
- security,
473
- ...options
474
- }) => {
475
- for (const auth of security) {
450
+ async function setAuthParams(options) {
451
+ for (const auth of options.security ?? []) {
476
452
  if (checkForExistence(options, auth.name)) {
477
453
  continue;
478
454
  }
@@ -497,7 +473,7 @@ var setAuthParams = async ({
497
473
  break;
498
474
  }
499
475
  }
500
- };
476
+ }
501
477
  var buildUrl = (options) => getUrl({
502
478
  baseUrl: options.baseUrl,
503
479
  path: options.path,
@@ -623,10 +599,7 @@ var createClient = (config = {}) => {
623
599
  serializedBody: void 0
624
600
  };
625
601
  if (opts.security) {
626
- await setAuthParams({
627
- ...opts,
628
- security: opts.security
629
- });
602
+ await setAuthParams(opts);
630
603
  }
631
604
  if (opts.requestValidator) {
632
605
  await opts.requestValidator(opts);
@@ -739,12 +712,7 @@ var createClient = (config = {}) => {
739
712
  let finalError = error;
740
713
  for (const fn of interceptors.error.fns) {
741
714
  if (fn) {
742
- finalError = await fn(
743
- finalError,
744
- response,
745
- request2,
746
- options
747
- );
715
+ finalError = await fn(finalError, response, request2, options);
748
716
  }
749
717
  }
750
718
  finalError = finalError || {};
@@ -809,9 +777,7 @@ var createClient = (config = {}) => {
809
777
  };
810
778
 
811
779
  // src/api/client.gen.ts
812
- var client = createClient(
813
- createConfig({ throwOnError: true })
814
- );
780
+ var client = createClient(createConfig({ throwOnError: true }));
815
781
 
816
782
  exports.client = client;
817
783
  //# sourceMappingURL=client.gen.js.map
@@ -1,9 +1,6 @@
1
1
  // src/api/core/bodySerializer.gen.ts
2
2
  var jsonBodySerializer = {
3
- bodySerializer: (body) => JSON.stringify(
4
- body,
5
- (_key, value) => typeof value === "bigint" ? value.toString() : value
6
- )
3
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
7
4
  };
8
5
 
9
6
  // src/api/core/serverSentEvents.gen.ts
@@ -47,10 +44,7 @@ function createSseClient({
47
44
  }
48
45
  const _fetch = options.fetch ?? globalThis.fetch;
49
46
  const response = await _fetch(request);
50
- if (!response.ok)
51
- throw new Error(
52
- `SSE failed: ${response.status} ${response.statusText}`
53
- );
47
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
54
48
  if (!response.body) throw new Error("No body in SSE response");
55
49
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
56
50
  let buffer = "";
@@ -81,10 +75,7 @@ function createSseClient({
81
75
  } else if (line.startsWith("id:")) {
82
76
  lastEventId = line.replace(/^id:\s*/, "");
83
77
  } else if (line.startsWith("retry:")) {
84
- const parsed = Number.parseInt(
85
- line.replace(/^retry:\s*/, ""),
86
- 10
87
- );
78
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
88
79
  if (!Number.isNaN(parsed)) {
89
80
  retryDelay = parsed;
90
81
  }
@@ -130,10 +121,7 @@ function createSseClient({
130
121
  if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
131
122
  break;
132
123
  }
133
- const backoff = Math.min(
134
- retryDelay * 2 ** (attempt - 1),
135
- sseMaxRetryDelay ?? 3e4
136
- );
124
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
137
125
  await sleep(backoff);
138
126
  }
139
127
  }
@@ -241,11 +229,7 @@ var serializeObjectParam = ({
241
229
  if (style !== "deepObject" && !explode) {
242
230
  let values = [];
243
231
  Object.entries(value).forEach(([key, v]) => {
244
- values = [
245
- ...values,
246
- key,
247
- allowReserved ? v : encodeURIComponent(v)
248
- ];
232
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
249
233
  });
250
234
  const joinedValues2 = values.join(",");
251
235
  switch (style) {
@@ -296,10 +280,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
296
280
  continue;
297
281
  }
298
282
  if (Array.isArray(value)) {
299
- url = url.replace(
300
- match,
301
- serializeArrayParam({ explode, name, style, value })
302
- );
283
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
303
284
  continue;
304
285
  }
305
286
  if (typeof value === "object") {
@@ -447,9 +428,7 @@ var getParseAs = (contentType) => {
447
428
  if (cleanContent === "multipart/form-data") {
448
429
  return "formData";
449
430
  }
450
- if (["application/", "audio/", "image/", "video/"].some(
451
- (type) => cleanContent.startsWith(type)
452
- )) {
431
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
453
432
  return "blob";
454
433
  }
455
434
  if (cleanContent.startsWith("text/")) {
@@ -466,11 +445,8 @@ var checkForExistence = (options, name) => {
466
445
  }
467
446
  return false;
468
447
  };
469
- var setAuthParams = async ({
470
- security,
471
- ...options
472
- }) => {
473
- for (const auth of security) {
448
+ async function setAuthParams(options) {
449
+ for (const auth of options.security ?? []) {
474
450
  if (checkForExistence(options, auth.name)) {
475
451
  continue;
476
452
  }
@@ -495,7 +471,7 @@ var setAuthParams = async ({
495
471
  break;
496
472
  }
497
473
  }
498
- };
474
+ }
499
475
  var buildUrl = (options) => getUrl({
500
476
  baseUrl: options.baseUrl,
501
477
  path: options.path,
@@ -621,10 +597,7 @@ var createClient = (config = {}) => {
621
597
  serializedBody: void 0
622
598
  };
623
599
  if (opts.security) {
624
- await setAuthParams({
625
- ...opts,
626
- security: opts.security
627
- });
600
+ await setAuthParams(opts);
628
601
  }
629
602
  if (opts.requestValidator) {
630
603
  await opts.requestValidator(opts);
@@ -737,12 +710,7 @@ var createClient = (config = {}) => {
737
710
  let finalError = error;
738
711
  for (const fn of interceptors.error.fns) {
739
712
  if (fn) {
740
- finalError = await fn(
741
- finalError,
742
- response,
743
- request2,
744
- options
745
- );
713
+ finalError = await fn(finalError, response, request2, options);
746
714
  }
747
715
  }
748
716
  finalError = finalError || {};
@@ -807,9 +775,7 @@ var createClient = (config = {}) => {
807
775
  };
808
776
 
809
777
  // src/api/client.gen.ts
810
- var client = createClient(
811
- createConfig({ throwOnError: true })
812
- );
778
+ var client = createClient(createConfig({ throwOnError: true }));
813
779
 
814
780
  export { client };
815
781
  //# sourceMappingURL=client.gen.mjs.map