@ahoo-wang/fetcher 1.6.1 → 1.6.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.
package/dist/index.es.js CHANGED
@@ -1,29 +1,29 @@
1
- function F(r) {
1
+ function C(r) {
2
2
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
3
3
  }
4
- function C(r, e) {
5
- return F(e) ? e : e ? r.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : r;
4
+ function U(r, t) {
5
+ return C(t) ? t : t ? r.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : r;
6
6
  }
7
- var U = /* @__PURE__ */ ((r) => (r[r.UriTemplate = 0] = "UriTemplate", r[r.Express = 1] = "Express", r))(U || {});
8
- function v(r) {
9
- return r === 1 ? D : x;
7
+ var v = /* @__PURE__ */ ((r) => (r[r.UriTemplate = 0] = "UriTemplate", r[r.Express = 1] = "Express", r))(v || {});
8
+ function D(r) {
9
+ return r === 1 ? M : L;
10
10
  }
11
- function q(r, e, t) {
12
- return t ? r.replace(e, (s, o) => {
13
- const n = t[o];
11
+ function w(r, t, e) {
12
+ return e ? r.replace(t, (s, o) => {
13
+ const n = e[o];
14
14
  if (n === void 0)
15
15
  throw new Error(`Missing required path parameter: ${o}`);
16
16
  return encodeURIComponent(n);
17
17
  }) : r;
18
18
  }
19
- function w(r, e) {
20
- const t = [];
19
+ function N(r, t) {
20
+ const e = [];
21
21
  let s;
22
- for (; (s = e.exec(r)) !== null; )
23
- t.push(s[1]);
24
- return t;
22
+ for (; (s = t.exec(r)) !== null; )
23
+ e.push(s[1]);
24
+ return e;
25
25
  }
26
- const h = class h {
26
+ const a = class a {
27
27
  /**
28
28
  * Extracts path parameters from a URL string.
29
29
  *
@@ -47,10 +47,10 @@ const h = class h {
47
47
  * // noParams = []
48
48
  * ```
49
49
  */
50
- extractPathParams(e) {
51
- return w(
52
- e,
53
- h.PATH_PARAM_REGEX
50
+ extractPathParams(t) {
51
+ return N(
52
+ t,
53
+ a.PATH_PARAM_REGEX
54
54
  );
55
55
  }
56
56
  /**
@@ -89,17 +89,17 @@ const h = class h {
89
89
  * }
90
90
  * ```
91
91
  */
92
- resolve(e, t) {
93
- return q(
94
- e,
95
- h.PATH_PARAM_REGEX,
96
- t
92
+ resolve(t, e) {
93
+ return w(
94
+ t,
95
+ a.PATH_PARAM_REGEX,
96
+ e
97
97
  );
98
98
  }
99
99
  };
100
- h.PATH_PARAM_REGEX = /{([^}]+)}/g;
101
- let P = h;
102
- const x = new P(), l = class l {
100
+ a.PATH_PARAM_REGEX = /{([^}]+)}/g;
101
+ let f = a;
102
+ const L = new f(), h = class h {
103
103
  /**
104
104
  * Extracts path parameters from an Express-style URL string.
105
105
  *
@@ -119,10 +119,10 @@ const x = new P(), l = class l {
119
119
  * // noParams = []
120
120
  * ```
121
121
  */
122
- extractPathParams(e) {
123
- return w(
124
- e,
125
- l.PATH_PARAM_REGEX
122
+ extractPathParams(t) {
123
+ return N(
124
+ t,
125
+ h.PATH_PARAM_REGEX
126
126
  );
127
127
  }
128
128
  /**
@@ -157,18 +157,18 @@ const x = new P(), l = class l {
157
157
  * }
158
158
  * ```
159
159
  */
160
- resolve(e, t) {
161
- return q(
162
- e,
163
- l.PATH_PARAM_REGEX,
164
- t
160
+ resolve(t, e) {
161
+ return w(
162
+ t,
163
+ h.PATH_PARAM_REGEX,
164
+ e
165
165
  );
166
166
  }
167
167
  };
168
- l.PATH_PARAM_REGEX = /:([^/]+)/g;
169
- let A = l;
170
- const D = new A();
171
- class L {
168
+ h.PATH_PARAM_REGEX = /:([^/]+)/g;
169
+ let P = h;
170
+ const M = new P();
171
+ class G {
172
172
  /**
173
173
  * Initializes a new UrlBuilder instance.
174
174
  *
@@ -186,8 +186,8 @@ class L {
186
186
  * const expressUrlBuilder = new UrlBuilder('https://api.example.com', UrlTemplateStyle.Express);
187
187
  * ```
188
188
  */
189
- constructor(e, t) {
190
- this.baseURL = e, this.urlTemplateResolver = v(t);
189
+ constructor(t, e) {
190
+ this.baseURL = t, this.urlTemplateResolver = D(e);
191
191
  }
192
192
  /**
193
193
  * Builds a complete URL, including path parameter replacement and query parameter addition.
@@ -207,14 +207,14 @@ class L {
207
207
  * // Result: https://api.example.com/users/123/posts/456?filter=active&limit=10
208
208
  * ```
209
209
  */
210
- build(e, t) {
211
- const s = t?.path, o = t?.query, n = C(this.baseURL, e);
212
- let u = this.urlTemplateResolver.resolve(n, s);
210
+ build(t, e) {
211
+ const s = e?.path, o = e?.query, n = U(this.baseURL, t);
212
+ let i = this.urlTemplateResolver.resolve(n, s);
213
213
  if (o) {
214
- const a = new URLSearchParams(o).toString();
215
- a && (u += "?" + a);
214
+ const u = new URLSearchParams(o).toString();
215
+ u && (i += "?" + u);
216
216
  }
217
- return u;
217
+ return i;
218
218
  }
219
219
  /**
220
220
  * Resolves a complete URL from a FetchRequest.
@@ -225,82 +225,82 @@ class L {
225
225
  * @param request - The FetchRequest containing URL and URL parameters
226
226
  * @returns Complete resolved URL string
227
227
  */
228
- resolveRequestUrl(e) {
229
- return this.build(e.url, e.urlParams);
228
+ resolveRequestUrl(t) {
229
+ return this.build(t.url, t.urlParams);
230
230
  }
231
231
  }
232
- class d extends Error {
232
+ class l extends Error {
233
233
  /**
234
234
  * Creates a new FetcherError instance.
235
235
  *
236
236
  * @param errorMsg - Optional error message. If not provided, will use the cause's message or a default message.
237
237
  * @param cause - Optional underlying error that caused this error.
238
238
  */
239
- constructor(e, t) {
240
- const s = e || t?.message || "An error occurred in the fetcher";
241
- super(s), this.cause = t, this.name = "FetcherError", t?.stack && (this.stack = t.stack), Object.setPrototypeOf(this, d.prototype);
239
+ constructor(t, e) {
240
+ const s = t || e?.message || "An error occurred in the fetcher";
241
+ super(s), this.cause = e, this.name = "FetcherError", e?.stack && (this.stack = e.stack), Object.setPrototypeOf(this, l.prototype);
242
242
  }
243
243
  }
244
- class b extends d {
244
+ class b extends l {
245
245
  /**
246
246
  * Creates a new FetchTimeoutError instance.
247
247
  *
248
248
  * @param request - The request options that timed out
249
249
  */
250
- constructor(e) {
251
- const t = e.method || "GET", s = `Request timeout of ${e.timeout}ms exceeded for ${t} ${e.url}`;
252
- super(s), this.name = "FetchTimeoutError", this.request = e, Object.setPrototypeOf(this, b.prototype);
250
+ constructor(t) {
251
+ const e = t.method || "GET", s = `Request timeout of ${t.timeout}ms exceeded for ${e} ${t.url}`;
252
+ super(s), this.name = "FetchTimeoutError", this.request = t, Object.setPrototypeOf(this, b.prototype);
253
253
  }
254
254
  }
255
- function G(r, e) {
256
- return typeof r < "u" ? r : e;
255
+ function H(r, t) {
256
+ return typeof r < "u" ? r : t;
257
257
  }
258
- async function M(r) {
259
- const e = r.url, t = r.timeout, s = r;
258
+ async function j(r) {
259
+ const t = r.url, e = r.timeout, s = r;
260
260
  if (r.signal)
261
- return fetch(e, s);
262
- if (!t)
263
- return r.abortController && (s.signal = r.abortController.signal), fetch(e, s);
261
+ return fetch(t, s);
262
+ if (!e)
263
+ return r.abortController && (s.signal = r.abortController.signal), fetch(t, s);
264
264
  const o = r.abortController ?? new AbortController();
265
265
  s.signal = o.signal;
266
266
  let n = null;
267
- const u = new Promise((a, m) => {
267
+ const i = new Promise((u, p) => {
268
268
  n = setTimeout(() => {
269
269
  n && clearTimeout(n);
270
- const g = new b(r);
271
- o.abort(g), m(g);
272
- }, t);
270
+ const I = new b(r);
271
+ o.abort(I), p(I);
272
+ }, e);
273
273
  });
274
274
  try {
275
- return await Promise.race([fetch(e, s), u]);
275
+ return await Promise.race([fetch(t, s), i]);
276
276
  } finally {
277
277
  n && clearTimeout(n);
278
278
  }
279
279
  }
280
- const H = "UrlResolveInterceptor", N = Number.MIN_SAFE_INTEGER + 1e3;
281
- class j {
280
+ const B = "UrlResolveInterceptor", S = Number.MIN_SAFE_INTEGER + 1e3;
281
+ class $ {
282
282
  constructor() {
283
- this.name = H, this.order = N;
283
+ this.name = B, this.order = S;
284
284
  }
285
285
  /**
286
286
  * Resolves the final URL by combining the base URL, path parameters, and query parameters.
287
287
  *
288
288
  * @param exchange - The fetch exchange containing the request information
289
289
  */
290
- intercept(e) {
291
- const t = e.request;
292
- t.url = e.fetcher.urlBuilder.resolveRequestUrl(t);
290
+ intercept(t) {
291
+ const e = t.request;
292
+ e.url = t.fetcher.urlBuilder.resolveRequestUrl(e);
293
293
  }
294
294
  }
295
295
  var c = /* @__PURE__ */ ((r) => (r.GET = "GET", r.POST = "POST", r.PUT = "PUT", r.DELETE = "DELETE", r.PATCH = "PATCH", r.HEAD = "HEAD", r.OPTIONS = "OPTIONS", r))(c || {});
296
- const ce = "Content-Type", R = class R {
296
+ const Et = "Content-Type", d = class d {
297
297
  };
298
- R.APPLICATION_JSON = "application/json", R.TEXT_EVENT_STREAM = "text/event-stream";
299
- let E = R;
300
- const B = "RequestBodyInterceptor", $ = N + 1e3;
301
- class X {
298
+ d.APPLICATION_JSON = "application/json", d.TEXT_EVENT_STREAM = "text/event-stream";
299
+ let E = d;
300
+ const X = "RequestBodyInterceptor", V = S + 1e3;
301
+ class k {
302
302
  constructor() {
303
- this.name = B, this.order = $;
303
+ this.name = X, this.order = V;
304
304
  }
305
305
  /**
306
306
  * Attempts to convert request body to a valid fetch API body type.
@@ -339,20 +339,20 @@ class X {
339
339
  * // exchange.request.body will be '{"name":"John","age":30}'
340
340
  * // exchange.request.headers will include 'Content-Type: application/json'
341
341
  */
342
- intercept(e) {
343
- const t = e.request;
344
- if (t.body === void 0 || t.body === null || typeof t.body != "object" || t.body instanceof ArrayBuffer || ArrayBuffer.isView(t.body) || // Includes TypedArray and DataView
345
- t.body instanceof Blob || t.body instanceof File || t.body instanceof URLSearchParams || t.body instanceof FormData || t.body instanceof ReadableStream)
342
+ intercept(t) {
343
+ const e = t.request;
344
+ if (e.body === void 0 || e.body === null || typeof e.body != "object" || e.body instanceof ArrayBuffer || ArrayBuffer.isView(e.body) || // Includes TypedArray and DataView
345
+ e.body instanceof Blob || e.body instanceof File || e.body instanceof URLSearchParams || e.body instanceof FormData || e.body instanceof ReadableStream)
346
346
  return;
347
- e.request.body = JSON.stringify(t.body);
348
- const s = e.ensureRequestHeaders();
347
+ t.request.body = JSON.stringify(e.body);
348
+ const s = t.ensureRequestHeaders();
349
349
  s["Content-Type"] || (s["Content-Type"] = E.APPLICATION_JSON);
350
350
  }
351
351
  }
352
- const V = "FetchInterceptor", J = Number.MAX_SAFE_INTEGER - 1e3;
353
- class k {
352
+ const J = "FetchInterceptor", Q = Number.MAX_SAFE_INTEGER - 1e3;
353
+ class Y {
354
354
  constructor() {
355
- this.name = V, this.order = J;
355
+ this.name = J, this.order = Q;
356
356
  }
357
357
  /**
358
358
  * Intercept and process HTTP requests.
@@ -379,14 +379,14 @@ class k {
379
379
  * await fetchInterceptor.intercept(exchange);
380
380
  * console.log(exchange.response); // HTTP response object
381
381
  */
382
- async intercept(e) {
383
- e.response = await M(e.request);
382
+ async intercept(t) {
383
+ t.response = await j(t.request);
384
384
  }
385
385
  }
386
- function T(r, e) {
387
- return e ? r.filter(e).sort((t, s) => t.order - s.order) : [...r].sort((t, s) => t.order - s.order);
386
+ function T(r, t) {
387
+ return t ? r.filter(t).sort((e, s) => e.order - s.order) : [...r].sort((e, s) => e.order - s.order);
388
388
  }
389
- class f {
389
+ class m {
390
390
  /**
391
391
  * Initializes a new InterceptorRegistry instance.
392
392
  *
@@ -396,8 +396,8 @@ class f {
396
396
  * The provided interceptors will be sorted by their order property immediately
397
397
  * upon construction.
398
398
  */
399
- constructor(e = []) {
400
- this.sortedInterceptors = [], this.sortedInterceptors = T(e);
399
+ constructor(t = []) {
400
+ this.sortedInterceptors = [], this.sortedInterceptors = T(t);
401
401
  }
402
402
  /**
403
403
  * Gets the name of this interceptor registry.
@@ -434,10 +434,10 @@ class f {
434
434
  *
435
435
  * After adding, interceptors are automatically sorted by their order property.
436
436
  */
437
- use(e) {
438
- return this.sortedInterceptors.some((t) => t.name === e.name) ? !1 : (this.sortedInterceptors = T([
437
+ use(t) {
438
+ return this.sortedInterceptors.some((e) => e.name === t.name) ? !1 : (this.sortedInterceptors = T([
439
439
  ...this.sortedInterceptors,
440
- e
440
+ t
441
441
  ]), !0);
442
442
  }
443
443
  /**
@@ -447,12 +447,12 @@ class f {
447
447
  * @returns True if an interceptor was removed, false if no interceptor with the
448
448
  * given name was found
449
449
  */
450
- eject(e) {
451
- const t = this.sortedInterceptors;
450
+ eject(t) {
451
+ const e = this.sortedInterceptors;
452
452
  return this.sortedInterceptors = T(
453
- t,
454
- (s) => s.name !== e
455
- ), t.length !== this.sortedInterceptors.length;
453
+ e,
454
+ (s) => s.name !== t
455
+ ), e.length !== this.sortedInterceptors.length;
456
456
  }
457
457
  /**
458
458
  * Removes all interceptors from this registry.
@@ -474,27 +474,27 @@ class f {
474
474
  * If any interceptor throws an error, the execution chain is broken and the error
475
475
  * is propagated to the caller.
476
476
  */
477
- async intercept(e) {
478
- for (const t of this.sortedInterceptors)
479
- await t.intercept(e);
477
+ async intercept(t) {
478
+ for (const e of this.sortedInterceptors)
479
+ await e.intercept(t);
480
480
  }
481
481
  }
482
- class I extends d {
483
- constructor(e) {
482
+ class _ extends l {
483
+ constructor(t) {
484
484
  super(
485
- `Request failed with status code ${e.response?.status} for ${e.request.url}`
486
- ), this.exchange = e, this.name = "HttpStatusValidationError", Object.setPrototypeOf(this, I.prototype);
485
+ `Request failed with status code ${t.response?.status} for ${t.request.url}`
486
+ ), this.exchange = t, this.name = "HttpStatusValidationError", Object.setPrototypeOf(this, _.prototype);
487
487
  }
488
488
  }
489
- const Y = (r) => r >= 200 && r < 300, z = "ValidateStatusInterceptor", Q = Number.MAX_SAFE_INTEGER - 1e3;
490
- class K {
489
+ const z = (r) => r >= 200 && r < 300, K = "ValidateStatusInterceptor", W = Number.MAX_SAFE_INTEGER - 1e3;
490
+ class Z {
491
491
  /**
492
492
  * Creates a new ValidateStatusInterceptor instance.
493
493
  *
494
494
  * @param validateStatus - Function that determines if a status code is valid
495
495
  */
496
- constructor(e = Y) {
497
- this.validateStatus = e;
496
+ constructor(t = z) {
497
+ this.validateStatus = t;
498
498
  }
499
499
  /**
500
500
  * Gets the name of this interceptor.
@@ -502,7 +502,7 @@ class K {
502
502
  * @returns The name of this interceptor
503
503
  */
504
504
  get name() {
505
- return z;
505
+ return K;
506
506
  }
507
507
  /**
508
508
  * Gets the order of this interceptor.
@@ -510,7 +510,7 @@ class K {
510
510
  * @returns VALIDATE_STATUS_INTERCEPTOR_ORDER, indicating this interceptor should execute early
511
511
  */
512
512
  get order() {
513
- return Q;
513
+ return W;
514
514
  }
515
515
  /**
516
516
  * Validates the response status code.
@@ -525,35 +525,35 @@ class K {
525
525
  * preventing other response handlers from attempting to process them. Valid responses
526
526
  * proceed through the rest of the response interceptor chain normally.
527
527
  */
528
- intercept(e) {
529
- if (!e.response)
528
+ intercept(t) {
529
+ if (!t.response)
530
530
  return;
531
- const t = e.response.status;
532
- if (!this.validateStatus(t))
533
- throw new I(e);
531
+ const e = t.response.status;
532
+ if (!this.validateStatus(e))
533
+ throw new _(t);
534
534
  }
535
535
  }
536
- class p extends d {
536
+ class R extends l {
537
537
  /**
538
538
  * Creates a new ExchangeError instance.
539
539
  *
540
540
  * @param exchange - The FetchExchange object containing request/response/error information.
541
541
  * @param errorMsg - An optional error message.
542
542
  */
543
- constructor(e, t) {
544
- const s = t || e.error?.message || e.response?.statusText || `Request to ${e.request.url} failed during exchange`;
545
- super(s, e.error), this.exchange = e, this.name = "ExchangeError", Object.setPrototypeOf(this, p.prototype);
543
+ constructor(t, e) {
544
+ const s = e || t.error?.message || t.response?.statusText || `Request to ${t.request.url} failed during exchange`;
545
+ super(s, t.error), this.exchange = t, this.name = "ExchangeError", Object.setPrototypeOf(this, R.prototype);
546
546
  }
547
547
  }
548
- class W {
548
+ class tt {
549
549
  constructor() {
550
- this.request = new f([
551
- new j(),
552
- new X(),
553
- new k()
554
- ]), this.response = new f([
555
- new K()
556
- ]), this.error = new f();
550
+ this.request = new m([
551
+ new $(),
552
+ new k(),
553
+ new Y()
554
+ ]), this.response = new m([
555
+ new Z()
556
+ ]), this.error = new m();
557
557
  }
558
558
  /**
559
559
  * Processes a FetchExchange through the interceptor pipeline.
@@ -641,25 +641,41 @@ class W {
641
641
  * const result = await fetcher.exchange(exchange);
642
642
  * ```
643
643
  */
644
- async exchange(e) {
644
+ async exchange(t) {
645
645
  try {
646
- return await this.request.intercept(e), await this.response.intercept(e), e;
647
- } catch (t) {
648
- if (e.error = t, await this.error.intercept(e), !e.hasError())
649
- return e;
650
- throw new p(e);
646
+ return await this.request.intercept(t), await this.response.intercept(t), t;
647
+ } catch (e) {
648
+ if (t.error = e, await this.error.intercept(t), !t.hasError())
649
+ return t;
650
+ throw new R(t);
651
651
  }
652
652
  }
653
653
  }
654
- const Z = (r) => r, ee = (r) => r.requiredResponse, te = (r) => r.requiredResponse.json(), re = (r) => r.requiredResponse.text(), i = {
655
- Exchange: Z,
656
- Response: ee,
657
- Json: te,
658
- Text: re
654
+ const et = (r) => r, rt = (r) => r.requiredResponse, st = (r) => r.requiredResponse.json(), ot = (r) => r.requiredResponse.text(), O = {
655
+ Exchange: et,
656
+ Response: rt,
657
+ Json: st,
658
+ Text: ot
659
659
  };
660
- class se {
661
- constructor(e) {
662
- this.fetcher = e.fetcher, this.request = e.request, this.resultExtractor = e.resultExtractor ?? i.Exchange, this.attributes = e.attributes ?? {}, this._response = e.response, this.error = e.error;
660
+ function g(r, t) {
661
+ if (!(r === void 0 && t === void 0))
662
+ return t === void 0 ? r : r === void 0 ? t : { ...r, ...t };
663
+ }
664
+ function nt(r, t) {
665
+ if (t ??= /* @__PURE__ */ new Map(), !r)
666
+ return t;
667
+ if (r instanceof Map) {
668
+ for (const [e, s] of r)
669
+ t.set(e, s);
670
+ return t;
671
+ }
672
+ for (const [e, s] of Object.entries(r))
673
+ t.set(e, s);
674
+ return t;
675
+ }
676
+ class it {
677
+ constructor(t) {
678
+ this.fetcher = t.fetcher, this.request = t.request, this.resultExtractor = t.resultExtractor ?? O.Exchange, this.attributes = nt(t.attributes), this._response = t.response, this.error = t.error;
663
679
  }
664
680
  /**
665
681
  * Ensures that request headers object exists, creating it if necessary.
@@ -705,8 +721,8 @@ class se {
705
721
  *
706
722
  * @param response - The Response object to set, or undefined to clear the response
707
723
  */
708
- set response(e) {
709
- this._response = e, this.cachedExtractedResult = void 0;
724
+ set response(t) {
725
+ this._response = t, this.cachedExtractedResult = void 0;
710
726
  }
711
727
  /**
712
728
  * Gets the response object for this exchange.
@@ -736,29 +752,61 @@ class se {
736
752
  */
737
753
  get requiredResponse() {
738
754
  if (!this.response)
739
- throw new p(
755
+ throw new R(
740
756
  this,
741
757
  `Request to ${this.request.url} failed with no response`
742
758
  );
743
759
  return this.response;
744
760
  }
745
761
  /**
746
- * Gets the extracted result by applying the result extractor to the exchange.
747
- * The result is cached after the first computation.
762
+ * Extracts the result by applying the result extractor to the exchange.
763
+ * The result is cached after the first computation to avoid repeated computations.
748
764
  *
749
- * @returns The extracted result or null if extraction failed
765
+ * @returns The extracted result
750
766
  */
751
- typedExtractedResult() {
767
+ extractResult() {
752
768
  return this.cachedExtractedResult !== void 0 ? this.cachedExtractedResult : (this.cachedExtractedResult = this.resultExtractor(this), this.cachedExtractedResult);
753
769
  }
754
770
  }
755
- const y = {
771
+ function dt(r, t) {
772
+ if (Object.keys(r).length === 0)
773
+ return t;
774
+ if (Object.keys(t).length === 0)
775
+ return r;
776
+ const e = {
777
+ path: g(r.urlParams?.path, t.urlParams?.path),
778
+ query: g(r.urlParams?.query, t.urlParams?.query)
779
+ }, s = {
780
+ ...r.headers,
781
+ ...t.headers
782
+ }, o = t.method ?? r.method, n = t.body ?? r.body, i = t.timeout ?? r.timeout, u = t.signal ?? r.signal, p = t.abortController ?? r.abortController;
783
+ return {
784
+ ...r,
785
+ ...t,
786
+ method: o,
787
+ urlParams: e,
788
+ headers: s,
789
+ body: n,
790
+ timeout: i,
791
+ signal: u,
792
+ abortController: p
793
+ };
794
+ }
795
+ function q(r, t) {
796
+ return t && t.resultExtractor && t.attributes ? t : {
797
+ resultExtractor: t?.resultExtractor ?? r?.resultExtractor ?? x.resultExtractor,
798
+ attributes: t?.attributes ?? r?.attributes
799
+ };
800
+ }
801
+ const A = {
756
802
  "Content-Type": E.APPLICATION_JSON
757
- }, S = {
803
+ }, F = {
758
804
  baseURL: "",
759
- headers: y
805
+ headers: A
806
+ }, x = { resultExtractor: O.Exchange }, ut = {
807
+ resultExtractor: O.Response
760
808
  };
761
- class oe {
809
+ class ct {
762
810
  /**
763
811
  * Initializes a new Fetcher instance with optional configuration.
764
812
  *
@@ -766,9 +814,14 @@ class oe {
766
814
  * If no interceptors are provided, a default set of interceptors will be used.
767
815
  *
768
816
  * @param options - Configuration options for the Fetcher instance
817
+ * @param options.baseURL - The base URL to prepend to all requests. Defaults to empty string.
818
+ * @param options.headers - Default headers to include in all requests. Defaults to JSON content type.
819
+ * @param options.timeout - Default timeout for requests in milliseconds. No timeout by default.
820
+ * @param options.urlTemplateStyle - Style for URL template parameter interpolation.
821
+ * @param options.interceptors - Interceptor manager for processing requests and responses.
769
822
  */
770
- constructor(e = S) {
771
- this.headers = y, this.urlBuilder = new L(e.baseURL, e.urlTemplateStyle), this.headers = e.headers ?? y, this.timeout = e.timeout, this.interceptors = e.interceptors ?? new W();
823
+ constructor(t = F) {
824
+ this.headers = A, this.urlBuilder = new G(t.baseURL, t.urlTemplateStyle), this.headers = t.headers ?? A, this.timeout = t.timeout, this.interceptors = t.interceptors ?? new tt();
772
825
  }
773
826
  /**
774
827
  * Processes an HTTP request through the Fetcher's internal workflow.
@@ -777,51 +830,57 @@ class oe {
777
830
  * creates a FetchExchange object, and passes it through the exchange method
778
831
  * for interceptor processing.
779
832
  *
833
+ * @template R - The type of the result to be returned
780
834
  * @param request - Complete request configuration object
781
- * @param resultExtractor - Function to extract the desired result from the exchange.
782
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
783
- * @param attributes - Optional shared attributes that can be accessed by interceptors
784
- * throughout the request lifecycle. These attributes allow passing
785
- * custom data between different interceptors.
835
+ * @param options - Request options including result extractor and attributes
836
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
837
+ * Defaults to ExchangeResultExtractor which returns the entire exchange object.
838
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
839
+ * throughout the request lifecycle. These attributes allow passing
840
+ * custom data between different interceptors.
786
841
  * @returns Promise that resolves to the extracted result based on resultExtractor
787
842
  * @throws Error if an unhandled error occurs during request processing
788
843
  */
789
- async request(e, t = i.Exchange, s) {
790
- const o = {
844
+ async request(t, e) {
845
+ const s = {
791
846
  ...this.headers,
792
- ...e.headers
793
- }, n = {
794
- ...e,
795
- headers: o,
796
- timeout: G(e.timeout, this.timeout)
797
- }, u = new se({
847
+ ...t.headers
848
+ }, o = {
849
+ ...t,
850
+ headers: s,
851
+ timeout: H(t.timeout, this.timeout)
852
+ }, {
853
+ resultExtractor: n,
854
+ attributes: i
855
+ } = q(x, e), u = new it({
798
856
  fetcher: this,
799
- request: n,
800
- resultExtractor: t,
801
- attributes: s
857
+ request: o,
858
+ resultExtractor: n,
859
+ attributes: i
802
860
  });
803
- return await this.interceptors.exchange(u), u.typedExtractedResult();
861
+ return await this.interceptors.exchange(u), u.extractResult();
804
862
  }
805
863
  /**
806
- * Executes an HTTP request with the specified URL and options.
807
- *
808
- * This is the primary method for making HTTP requests. It processes the request
809
- * through the interceptor chain and returns the resulting Response.
810
- *
811
- * @param url - The URL path for the request (relative to baseURL if set)
812
- * @param request - Request configuration including headers, body, parameters, etc.
813
- * @param resultExtractor - Function to extract the desired result from the exchange.
814
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
815
- * @param attributes - Optional shared attributes that can be accessed by interceptors
816
- * throughout the request lifecycle. These attributes allow passing
817
- * custom data between different interceptors.
818
-
819
- * @returns Promise that resolves to the HTTP response
820
- * @throws FetchError if the request fails and no response is generated
821
- */
822
- async fetch(e, t = {}, s = i.Response, o) {
823
- const n = t;
824
- return n.url = e, this.request(n, s, o);
864
+ * Executes an HTTP request with the specified URL and options.
865
+ *
866
+ * This is the primary method for making HTTP requests. It processes the request
867
+ * through the interceptor chain and returns the resulting Response.
868
+ *
869
+ * @template R - The type of the result to be returned
870
+ * @param url - The URL path for the request (relative to baseURL if set)
871
+ * @param request - Request configuration including headers, body, parameters, etc.
872
+ * @param options - Request options including result extractor and attributes
873
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
874
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
875
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
876
+ * throughout the request lifecycle. These attributes allow passing
877
+ * custom data between different interceptors.
878
+ * @returns Promise that resolves to the HTTP response
879
+ * @throws FetchError if the request fails and no response is generated
880
+ */
881
+ async fetch(t, e = {}, s) {
882
+ const o = e;
883
+ return o.url = t, this.request(o, q(ut, s));
825
884
  }
826
885
  /**
827
886
  * Internal helper method for making HTTP requests with a specific method.
@@ -829,25 +888,26 @@ class oe {
829
888
  * This private method is used by the public HTTP method methods (get, post, etc.)
830
889
  * to execute requests with the appropriate HTTP verb.
831
890
  *
891
+ * @template R - The type of the result to be returned
832
892
  * @param method - The HTTP method to use for the request
833
893
  * @param url - The URL path for the request
834
894
  * @param request - Additional request options
835
- * @param resultExtractor - Function to extract the desired result from the exchange.
836
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
837
- * @param attributes - Optional shared attributes that can be accessed by interceptors
838
- * throughout the request lifecycle. These attributes allow passing
839
- * custom data between different interceptors.
895
+ * @param options - Request options including result extractor and attributes
896
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
897
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
898
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
899
+ * throughout the request lifecycle. These attributes allow passing
900
+ * custom data between different interceptors.
840
901
  * @returns Promise that resolves to the HTTP response
841
902
  */
842
- async methodFetch(e, t, s = {}, o = i.Response, n) {
903
+ async methodFetch(t, e, s = {}, o) {
843
904
  return this.fetch(
844
- t,
905
+ e,
845
906
  {
846
907
  ...s,
847
- method: e
908
+ method: t
848
909
  },
849
- o,
850
- n
910
+ o
851
911
  );
852
912
  }
853
913
  /**
@@ -856,85 +916,95 @@ class oe {
856
916
  * Convenience method for making GET requests. The request body is omitted
857
917
  * as GET requests should not contain a body according to HTTP specification.
858
918
  *
919
+ * @template R - The type of the result to be returned
859
920
  * @param url - The URL path for the request
860
921
  * @param request - Request options excluding method and body
861
- * @param resultExtractor - Function to extract the desired result from the exchange.
862
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
863
- * @param attributes - Optional shared attributes that can be accessed by interceptors
864
- * throughout the request lifecycle. These attributes allow passing
865
- * custom data between different interceptors.
922
+ * @param options - Request options including result extractor and attributes
923
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
924
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
925
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
926
+ * throughout the request lifecycle. These attributes allow passing
927
+ * custom data between different interceptors.
866
928
  * @returns Promise that resolves to the HTTP response
867
929
  */
868
- async get(e, t = {}, s = i.Response, o) {
869
- return this.methodFetch(c.GET, e, t, s, o);
930
+ async get(t, e = {}, s) {
931
+ return this.methodFetch(c.GET, t, e, s);
870
932
  }
871
933
  /**
872
- * Makes a POST HTTP request.
934
+ * Makes a PUT HTTP request.
873
935
  *
874
- * Convenience method for making POST requests, commonly used for creating resources.
936
+ * Convenience method for making PUT requests, commonly used for updating resources.
875
937
  *
938
+ * @template R - The type of the result to be returned
876
939
  * @param url - The URL path for the request
877
940
  * @param request - Request options including body and other parameters
878
- * @param resultExtractor - Function to extract the desired result from the exchange.
879
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
880
- * @param attributes - Optional shared attributes that can be accessed by interceptors
881
- * throughout the request lifecycle. These attributes allow passing
882
- * custom data between different interceptors.
941
+ * @param options - Request options including result extractor and attributes
942
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
943
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
944
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
945
+ * throughout the request lifecycle. These attributes allow passing
946
+ * custom data between different interceptors.
883
947
  * @returns Promise that resolves to the HTTP response
884
948
  */
885
- async post(e, t = {}, s = i.Response, o) {
886
- return this.methodFetch(c.POST, e, t, s, o);
949
+ async put(t, e = {}, s) {
950
+ return this.methodFetch(c.PUT, t, e, s);
887
951
  }
888
952
  /**
889
- * Makes a PUT HTTP request.
953
+ * Makes a POST HTTP request.
890
954
  *
891
- * Convenience method for making PUT requests, commonly used for updating resources.
955
+ * Convenience method for making POST requests, commonly used for creating resources.
892
956
  *
957
+ * @template R - The type of the result to be returned
893
958
  * @param url - The URL path for the request
894
959
  * @param request - Request options including body and other parameters
895
- * @param resultExtractor - Function to extract the desired result from the exchange.
896
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
897
- * @param attributes - Optional shared attributes that can be accessed by interceptors
898
- * throughout the request lifecycle. These attributes allow passing
899
- * custom data between different interceptors.
960
+ * @param options - Request options including result extractor and attributes
961
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
962
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
963
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
964
+ * throughout the request lifecycle. These attributes allow passing
965
+ * custom data between different interceptors.
900
966
  * @returns Promise that resolves to the HTTP response
901
967
  */
902
- async put(e, t = {}, s = i.Response, o) {
903
- return this.methodFetch(c.PUT, e, t, s, o);
968
+ async post(t, e = {}, s) {
969
+ return this.methodFetch(c.POST, t, e, s);
904
970
  }
905
971
  /**
906
- * Makes a DELETE HTTP request.
972
+ * Makes a PATCH HTTP request.
907
973
  *
908
- * Convenience method for making DELETE requests, commonly used for deleting resources.
974
+ * Convenience method for making PATCH requests, commonly used for partial updates.
909
975
  *
976
+ * @template R - The type of the result to be returned
910
977
  * @param url - The URL path for the request
911
- * @param request - Request options excluding method and body
912
- * @param resultExtractor - Function to extract the desired result from the exchange.
913
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
914
- * @param attributes - Optional shared attributes that can be accessed by interceptors
915
- * throughout the request lifecycle. These attributes allow passing
916
- * custom data between different interceptors.
978
+ * @param request - Request options including body and other parameters
979
+ * @param options - Request options including result extractor and attributes
980
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
981
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
982
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
983
+ * throughout the request lifecycle. These attributes allow passing
984
+ * custom data between different interceptors.
917
985
  * @returns Promise that resolves to the HTTP response
918
986
  */
919
- async delete(e, t = {}, s = i.Response, o) {
920
- return this.methodFetch(c.DELETE, e, t, s, o);
987
+ async patch(t, e = {}, s) {
988
+ return this.methodFetch(c.PATCH, t, e, s);
921
989
  }
922
990
  /**
923
- * Makes a PATCH HTTP request.
991
+ * Makes a DELETE HTTP request.
924
992
  *
925
- * Convenience method for making PATCH requests, commonly used for partial updates.
993
+ * Convenience method for making DELETE requests, commonly used for deleting resources.
926
994
  *
995
+ * @template R - The type of the result to be returned
927
996
  * @param url - The URL path for the request
928
- * @param request - Request options including body and other parameters
929
- * @param resultExtractor - Function to extract the desired result from the exchange.
930
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
931
- * @param attributes - Optional shared attributes that can be accessed by interceptors
932
- * throughout the request lifecycle. These attributes allow passing
933
- * custom data between different interceptors.
997
+ * @param request - Request options excluding method and body
998
+ * @param options - Request options including result extractor and attributes
999
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
1000
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
1001
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
1002
+ * throughout the request lifecycle. These attributes allow passing
1003
+ * custom data between different interceptors.
934
1004
  * @returns Promise that resolves to the HTTP response
935
1005
  */
936
- async patch(e, t = {}, s = i.Response, o) {
937
- return this.methodFetch(c.PATCH, e, t, s, o);
1006
+ async delete(t, e = {}, s) {
1007
+ return this.methodFetch(c.DELETE, t, e, s);
938
1008
  }
939
1009
  /**
940
1010
  * Makes a HEAD HTTP request.
@@ -942,17 +1012,19 @@ class oe {
942
1012
  * Convenience method for making HEAD requests, which retrieve headers only.
943
1013
  * The request body is omitted as HEAD requests should not contain a body.
944
1014
  *
1015
+ * @template R - The type of the result to be returned
945
1016
  * @param url - The URL path for the request
946
1017
  * @param request - Request options excluding method and body
947
- * @param resultExtractor - Function to extract the desired result from the exchange.
948
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
949
- * @param attributes - Optional shared attributes that can be accessed by interceptors
950
- * throughout the request lifecycle. These attributes allow passing
951
- * custom data between different interceptors.
1018
+ * @param options - Request options including result extractor and attributes
1019
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
1020
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
1021
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
1022
+ * throughout the request lifecycle. These attributes allow passing
1023
+ * custom data between different interceptors.
952
1024
  * @returns Promise that resolves to the HTTP response
953
1025
  */
954
- async head(e, t = {}, s = i.Response, o) {
955
- return this.methodFetch(c.HEAD, e, t, s, o);
1026
+ async head(t, e = {}, s) {
1027
+ return this.methodFetch(c.HEAD, t, e, s);
956
1028
  }
957
1029
  /**
958
1030
  * Makes an OPTIONS HTTP request.
@@ -960,21 +1032,23 @@ class oe {
960
1032
  * Convenience method for making OPTIONS requests, commonly used for CORS preflight.
961
1033
  * The request body is omitted as OPTIONS requests typically don't contain a body.
962
1034
  *
1035
+ * @template R - The type of the result to be returned
963
1036
  * @param url - The URL path for the request
964
1037
  * @param request - Request options excluding method and body
965
- * @param resultExtractor - Function to extract the desired result from the exchange.
966
- * Defaults to ExchangeResultExtractor which returns the entire exchange object.
967
- * @param attributes - Optional shared attributes that can be accessed by interceptors
968
- * throughout the request lifecycle. These attributes allow passing
969
- * custom data between different interceptors.
1038
+ * @param options - Request options including result extractor and attributes
1039
+ * @param options.resultExtractor - Function to extract the desired result from the exchange.
1040
+ * Defaults to ResponseResultExtractor which returns the entire exchange object.
1041
+ * @param options.attributes - Optional shared attributes that can be accessed by interceptors
1042
+ * throughout the request lifecycle. These attributes allow passing
1043
+ * custom data between different interceptors.
970
1044
  * @returns Promise that resolves to the HTTP response
971
1045
  */
972
- async options(e, t = {}, s = i.Response, o) {
973
- return this.methodFetch(c.OPTIONS, e, t, s, o);
1046
+ async options(t, e = {}, s) {
1047
+ return this.methodFetch(c.OPTIONS, t, e, s);
974
1048
  }
975
1049
  }
976
- const _ = "default";
977
- class ne {
1050
+ const y = "default";
1051
+ class at {
978
1052
  constructor() {
979
1053
  this.registrar = /* @__PURE__ */ new Map();
980
1054
  }
@@ -987,8 +1061,8 @@ class ne {
987
1061
  * const fetcher = new Fetcher({ baseURL: 'https://api.example.com' });
988
1062
  * fetcherRegistrar.register('api', fetcher);
989
1063
  */
990
- register(e, t) {
991
- this.registrar.set(e, t);
1064
+ register(t, e) {
1065
+ this.registrar.set(t, e);
992
1066
  }
993
1067
  /**
994
1068
  * Unregister a Fetcher instance by name
@@ -1001,8 +1075,8 @@ class ne {
1001
1075
  * console.log('Fetcher unregistered successfully');
1002
1076
  * }
1003
1077
  */
1004
- unregister(e) {
1005
- return this.registrar.delete(e);
1078
+ unregister(t) {
1079
+ return this.registrar.delete(t);
1006
1080
  }
1007
1081
  /**
1008
1082
  * Get a Fetcher instance by name
@@ -1015,8 +1089,8 @@ class ne {
1015
1089
  * // Use the fetcher
1016
1090
  * }
1017
1091
  */
1018
- get(e) {
1019
- return this.registrar.get(e);
1092
+ get(t) {
1093
+ return this.registrar.get(t);
1020
1094
  }
1021
1095
  /**
1022
1096
  * Get a Fetcher instance by name, throwing an error if not found
@@ -1032,11 +1106,11 @@ class ne {
1032
1106
  * console.error('Fetcher not found:', error.message);
1033
1107
  * }
1034
1108
  */
1035
- requiredGet(e) {
1036
- const t = this.get(e);
1037
- if (!t)
1038
- throw new Error(`Fetcher ${e} not found`);
1039
- return t;
1109
+ requiredGet(t) {
1110
+ const e = this.get(t);
1111
+ if (!e)
1112
+ throw new Error(`Fetcher ${t} not found`);
1113
+ return e;
1040
1114
  }
1041
1115
  /**
1042
1116
  * Get the default Fetcher instance
@@ -1047,7 +1121,7 @@ class ne {
1047
1121
  * const defaultFetcher = fetcherRegistrar.default;
1048
1122
  */
1049
1123
  get default() {
1050
- return this.requiredGet(_);
1124
+ return this.requiredGet(y);
1051
1125
  }
1052
1126
  /**
1053
1127
  * Set the default Fetcher instance
@@ -1057,8 +1131,8 @@ class ne {
1057
1131
  * const fetcher = new Fetcher({ baseURL: 'https://api.example.com' });
1058
1132
  * fetcherRegistrar.default = fetcher;
1059
1133
  */
1060
- set default(e) {
1061
- this.register(_, e);
1134
+ set default(t) {
1135
+ this.register(y, t);
1062
1136
  }
1063
1137
  /**
1064
1138
  * Get a copy of all registered fetchers
@@ -1074,36 +1148,8 @@ class ne {
1074
1148
  return new Map(this.registrar);
1075
1149
  }
1076
1150
  }
1077
- const ie = new ne();
1078
- function O(r, e) {
1079
- if (!(r === void 0 && e === void 0))
1080
- return e === void 0 ? r : r === void 0 ? e : { ...r, ...e };
1081
- }
1082
- function ae(r, e) {
1083
- if (Object.keys(r).length === 0)
1084
- return e;
1085
- if (Object.keys(e).length === 0)
1086
- return r;
1087
- const t = {
1088
- path: O(r.urlParams?.path, e.urlParams?.path),
1089
- query: O(r.urlParams?.query, e.urlParams?.query)
1090
- }, s = {
1091
- ...r.headers,
1092
- ...e.headers
1093
- }, o = e.method ?? r.method, n = e.body ?? r.body, u = e.timeout ?? r.timeout, a = e.signal ?? r.signal, m = e.abortController ?? r.abortController;
1094
- return {
1095
- ...r,
1096
- ...e,
1097
- method: o,
1098
- urlParams: t,
1099
- headers: s,
1100
- body: n,
1101
- timeout: u,
1102
- signal: a,
1103
- abortController: m
1104
- };
1105
- }
1106
- class ue extends oe {
1151
+ const ht = new at();
1152
+ class lt extends ct {
1107
1153
  /**
1108
1154
  * Create a NamedFetcher instance and automatically register it with the global fetcherRegistrar
1109
1155
  *
@@ -1121,61 +1167,65 @@ class ue extends oe {
1121
1167
  * headers: { 'Authorization': 'Bearer token' }
1122
1168
  * });
1123
1169
  */
1124
- constructor(e, t = S) {
1125
- super(t), this.name = e, ie.register(e, this);
1170
+ constructor(t, e = F) {
1171
+ super(e), this.name = t, ht.register(t, this);
1126
1172
  }
1127
1173
  }
1128
- const he = new ue(_);
1174
+ const Rt = new lt(y);
1129
1175
  export {
1130
- ce as CONTENT_TYPE_HEADER,
1176
+ Et as CONTENT_TYPE_HEADER,
1131
1177
  E as ContentTypeValues,
1132
- _ as DEFAULT_FETCHER_NAME,
1133
- S as DEFAULT_OPTIONS,
1134
- p as ExchangeError,
1135
- Z as ExchangeResultExtractor,
1136
- A as ExpressUrlTemplateResolver,
1137
- V as FETCH_INTERCEPTOR_NAME,
1138
- J as FETCH_INTERCEPTOR_ORDER,
1139
- se as FetchExchange,
1140
- k as FetchInterceptor,
1178
+ y as DEFAULT_FETCHER_NAME,
1179
+ ut as DEFAULT_FETCH_OPTIONS,
1180
+ F as DEFAULT_OPTIONS,
1181
+ x as DEFAULT_REQUEST_OPTIONS,
1182
+ R as ExchangeError,
1183
+ et as ExchangeResultExtractor,
1184
+ P as ExpressUrlTemplateResolver,
1185
+ J as FETCH_INTERCEPTOR_NAME,
1186
+ Q as FETCH_INTERCEPTOR_ORDER,
1187
+ it as FetchExchange,
1188
+ Y as FetchInterceptor,
1141
1189
  b as FetchTimeoutError,
1142
- oe as Fetcher,
1143
- d as FetcherError,
1144
- ne as FetcherRegistrar,
1190
+ ct as Fetcher,
1191
+ l as FetcherError,
1192
+ at as FetcherRegistrar,
1145
1193
  c as HttpMethod,
1146
- I as HttpStatusValidationError,
1147
- W as InterceptorManager,
1148
- f as InterceptorRegistry,
1149
- te as JsonResultExtractor,
1150
- ue as NamedFetcher,
1151
- B as REQUEST_BODY_INTERCEPTOR_NAME,
1152
- $ as REQUEST_BODY_INTERCEPTOR_ORDER,
1153
- X as RequestBodyInterceptor,
1154
- ee as ResponseResultExtractor,
1155
- i as ResultExtractors,
1156
- re as TextResultExtractor,
1157
- H as URL_RESOLVE_INTERCEPTOR_NAME,
1158
- N as URL_RESOLVE_INTERCEPTOR_ORDER,
1159
- P as UriTemplateResolver,
1160
- L as UrlBuilder,
1161
- j as UrlResolveInterceptor,
1162
- U as UrlTemplateStyle,
1163
- z as VALIDATE_STATUS_INTERCEPTOR_NAME,
1164
- Q as VALIDATE_STATUS_INTERCEPTOR_ORDER,
1165
- K as ValidateStatusInterceptor,
1166
- C as combineURLs,
1167
- D as expressUrlTemplateResolver,
1168
- he as fetcher,
1169
- ie as fetcherRegistrar,
1170
- v as getUrlTemplateResolver,
1171
- F as isAbsoluteURL,
1172
- O as mergeRecords,
1173
- ae as mergeRequest,
1174
- G as resolveTimeout,
1175
- M as timeoutFetch,
1194
+ _ as HttpStatusValidationError,
1195
+ tt as InterceptorManager,
1196
+ m as InterceptorRegistry,
1197
+ st as JsonResultExtractor,
1198
+ lt as NamedFetcher,
1199
+ X as REQUEST_BODY_INTERCEPTOR_NAME,
1200
+ V as REQUEST_BODY_INTERCEPTOR_ORDER,
1201
+ k as RequestBodyInterceptor,
1202
+ rt as ResponseResultExtractor,
1203
+ O as ResultExtractors,
1204
+ ot as TextResultExtractor,
1205
+ B as URL_RESOLVE_INTERCEPTOR_NAME,
1206
+ S as URL_RESOLVE_INTERCEPTOR_ORDER,
1207
+ f as UriTemplateResolver,
1208
+ G as UrlBuilder,
1209
+ $ as UrlResolveInterceptor,
1210
+ v as UrlTemplateStyle,
1211
+ K as VALIDATE_STATUS_INTERCEPTOR_NAME,
1212
+ W as VALIDATE_STATUS_INTERCEPTOR_ORDER,
1213
+ Z as ValidateStatusInterceptor,
1214
+ U as combineURLs,
1215
+ M as expressUrlTemplateResolver,
1216
+ Rt as fetcher,
1217
+ ht as fetcherRegistrar,
1218
+ D as getUrlTemplateResolver,
1219
+ C as isAbsoluteURL,
1220
+ nt as mergeRecordToMap,
1221
+ g as mergeRecords,
1222
+ dt as mergeRequest,
1223
+ q as mergeRequestOptions,
1224
+ H as resolveTimeout,
1225
+ j as timeoutFetch,
1176
1226
  T as toSorted,
1177
- x as uriTemplateResolver,
1178
- w as urlTemplateRegexExtract,
1179
- q as urlTemplateRegexResolve
1227
+ L as uriTemplateResolver,
1228
+ N as urlTemplateRegexExtract,
1229
+ w as urlTemplateRegexResolve
1180
1230
  };
1181
1231
  //# sourceMappingURL=index.es.js.map