@eudiplo/sdk-core 1.14.0-main.e2df792 → 1.14.0-main.e38b728

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,4 +1,4 @@
1
- import { b as Config, C as Client } from '../../types.gen-DKrNRB-E.mjs';
1
+ import { b as Config, C as Client } from '../../types.gen-Cc6DtXw9.mjs';
2
2
 
3
3
  declare const createClient: (config?: Config) => Client;
4
4
 
@@ -1,4 +1,4 @@
1
- import { b as Config, C as Client } from '../../types.gen-DKrNRB-E.js';
1
+ import { b as Config, C as Client } from '../../types.gen-Cc6DtXw9.js';
2
2
 
3
3
  declare const createClient: (config?: Config) => Client;
4
4
 
@@ -41,10 +41,7 @@ function createSseClient({
41
41
  }
42
42
  const _fetch = options.fetch ?? globalThis.fetch;
43
43
  const response = await _fetch(request);
44
- if (!response.ok)
45
- throw new Error(
46
- `SSE failed: ${response.status} ${response.statusText}`
47
- );
44
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
48
45
  if (!response.body) throw new Error("No body in SSE response");
49
46
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
50
47
  let buffer = "";
@@ -75,10 +72,7 @@ function createSseClient({
75
72
  } else if (line.startsWith("id:")) {
76
73
  lastEventId = line.replace(/^id:\s*/, "");
77
74
  } else if (line.startsWith("retry:")) {
78
- const parsed = Number.parseInt(
79
- line.replace(/^retry:\s*/, ""),
80
- 10
81
- );
75
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
82
76
  if (!Number.isNaN(parsed)) {
83
77
  retryDelay = parsed;
84
78
  }
@@ -124,10 +118,7 @@ function createSseClient({
124
118
  if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
125
119
  break;
126
120
  }
127
- const backoff = Math.min(
128
- retryDelay * 2 ** (attempt - 1),
129
- sseMaxRetryDelay ?? 3e4
130
- );
121
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
131
122
  await sleep(backoff);
132
123
  }
133
124
  }
@@ -235,11 +226,7 @@ var serializeObjectParam = ({
235
226
  if (style !== "deepObject" && !explode) {
236
227
  let values = [];
237
228
  Object.entries(value).forEach(([key, v]) => {
238
- values = [
239
- ...values,
240
- key,
241
- allowReserved ? v : encodeURIComponent(v)
242
- ];
229
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
243
230
  });
244
231
  const joinedValues2 = values.join(",");
245
232
  switch (style) {
@@ -290,10 +277,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
290
277
  continue;
291
278
  }
292
279
  if (Array.isArray(value)) {
293
- url = url.replace(
294
- match,
295
- serializeArrayParam({ explode, name, style, value })
296
- );
280
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
297
281
  continue;
298
282
  }
299
283
  if (typeof value === "object") {
@@ -381,10 +365,7 @@ var getAuthToken = async (auth, callback) => {
381
365
 
382
366
  // src/api/core/bodySerializer.gen.ts
383
367
  var jsonBodySerializer = {
384
- bodySerializer: (body) => JSON.stringify(
385
- body,
386
- (_key, value) => typeof value === "bigint" ? value.toString() : value
387
- )
368
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
388
369
  };
389
370
 
390
371
  // src/api/client/utils.gen.ts
@@ -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 || {};
@@ -39,10 +39,7 @@ function createSseClient({
39
39
  }
40
40
  const _fetch = options.fetch ?? globalThis.fetch;
41
41
  const response = await _fetch(request);
42
- if (!response.ok)
43
- throw new Error(
44
- `SSE failed: ${response.status} ${response.statusText}`
45
- );
42
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
46
43
  if (!response.body) throw new Error("No body in SSE response");
47
44
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
48
45
  let buffer = "";
@@ -73,10 +70,7 @@ function createSseClient({
73
70
  } else if (line.startsWith("id:")) {
74
71
  lastEventId = line.replace(/^id:\s*/, "");
75
72
  } else if (line.startsWith("retry:")) {
76
- const parsed = Number.parseInt(
77
- line.replace(/^retry:\s*/, ""),
78
- 10
79
- );
73
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
80
74
  if (!Number.isNaN(parsed)) {
81
75
  retryDelay = parsed;
82
76
  }
@@ -122,10 +116,7 @@ function createSseClient({
122
116
  if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
123
117
  break;
124
118
  }
125
- const backoff = Math.min(
126
- retryDelay * 2 ** (attempt - 1),
127
- sseMaxRetryDelay ?? 3e4
128
- );
119
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
129
120
  await sleep(backoff);
130
121
  }
131
122
  }
@@ -233,11 +224,7 @@ var serializeObjectParam = ({
233
224
  if (style !== "deepObject" && !explode) {
234
225
  let values = [];
235
226
  Object.entries(value).forEach(([key, v]) => {
236
- values = [
237
- ...values,
238
- key,
239
- allowReserved ? v : encodeURIComponent(v)
240
- ];
227
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
241
228
  });
242
229
  const joinedValues2 = values.join(",");
243
230
  switch (style) {
@@ -288,10 +275,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
288
275
  continue;
289
276
  }
290
277
  if (Array.isArray(value)) {
291
- url = url.replace(
292
- match,
293
- serializeArrayParam({ explode, name, style, value })
294
- );
278
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
295
279
  continue;
296
280
  }
297
281
  if (typeof value === "object") {
@@ -379,10 +363,7 @@ var getAuthToken = async (auth, callback) => {
379
363
 
380
364
  // src/api/core/bodySerializer.gen.ts
381
365
  var jsonBodySerializer = {
382
- bodySerializer: (body) => JSON.stringify(
383
- body,
384
- (_key, value) => typeof value === "bigint" ? value.toString() : value
385
- )
366
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
386
367
  };
387
368
 
388
369
  // src/api/client/utils.gen.ts
@@ -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 || {};
@@ -1,9 +1,9 @@
1
- export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-DKrNRB-E.mjs';
1
+ export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-Cc6DtXw9.mjs';
2
2
  export { createClient } from './client.gen.mjs';
3
3
 
4
- type Slot = "body" | "headers" | "path" | "query";
4
+ type Slot = 'body' | 'headers' | 'path' | 'query';
5
5
  type Field = {
6
- in: Exclude<Slot, "body">;
6
+ in: Exclude<Slot, 'body'>;
7
7
  /**
8
8
  * Field name. This is the name we want the user to see and use.
9
9
  */
@@ -14,7 +14,7 @@ type Field = {
14
14
  */
15
15
  map?: string;
16
16
  } | {
17
- in: Extract<Slot, "body">;
17
+ in: Extract<Slot, 'body'>;
18
18
  /**
19
19
  * Key isn't required for bodies.
20
20
  */
@@ -1,9 +1,9 @@
1
- export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-DKrNRB-E.js';
1
+ export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-Cc6DtXw9.js';
2
2
  export { createClient } from './client.gen.js';
3
3
 
4
- type Slot = "body" | "headers" | "path" | "query";
4
+ type Slot = 'body' | 'headers' | 'path' | 'query';
5
5
  type Field = {
6
- in: Exclude<Slot, "body">;
6
+ in: Exclude<Slot, 'body'>;
7
7
  /**
8
8
  * Field name. This is the name we want the user to see and use.
9
9
  */
@@ -14,7 +14,7 @@ type Field = {
14
14
  */
15
15
  map?: string;
16
16
  } | {
17
- in: Extract<Slot, "body">;
17
+ in: Extract<Slot, 'body'>;
18
18
  /**
19
19
  * Key isn't required for bodies.
20
20
  */
@@ -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 { ar as ClientOptions$1 } from '../types.gen-DpwDhqbe.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-Cy96Gxj6.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 { ar as ClientOptions$1 } from '../types.gen-DpwDhqbe.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-Cy96Gxj6.js';
3
3
 
4
4
  /**
5
5
  * The `createClientConfig()` function will be called on client initialization