@hyper-fetch/core 5.4.1 → 5.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.
@@ -2301,22 +2301,42 @@ var Client = class {
2301
2301
  this.__onAuthCallbacks.push(callback);
2302
2302
  return this;
2303
2303
  };
2304
+ this.removeOnAuthInterceptors = (callbacks) => {
2305
+ this.__onAuthCallbacks = this.__onAuthCallbacks.filter((callback) => !callbacks.includes(callback));
2306
+ return this;
2307
+ };
2304
2308
  this.onError = (callback) => {
2305
2309
  this.__onErrorCallbacks.push(callback);
2306
2310
  return this;
2307
2311
  };
2312
+ this.removeOnErrorInterceptors = (callbacks) => {
2313
+ this.__onErrorCallbacks = this.__onErrorCallbacks.filter((callback) => !callbacks.includes(callback));
2314
+ return this;
2315
+ };
2308
2316
  this.onSuccess = (callback) => {
2309
2317
  this.__onSuccessCallbacks.push(callback);
2310
2318
  return this;
2311
2319
  };
2320
+ this.removeOnSuccessInterceptors = (callbacks) => {
2321
+ this.__onSuccessCallbacks = this.__onSuccessCallbacks.filter((callback) => !callbacks.includes(callback));
2322
+ return this;
2323
+ };
2312
2324
  this.onRequest = (callback) => {
2313
2325
  this.__onRequestCallbacks.push(callback);
2314
2326
  return this;
2315
2327
  };
2328
+ this.removeOnRequestInterceptors = (callbacks) => {
2329
+ this.__onRequestCallbacks = this.__onRequestCallbacks.filter((callback) => !callbacks.includes(callback));
2330
+ return this;
2331
+ };
2316
2332
  this.onResponse = (callback) => {
2317
2333
  this.__onResponseCallbacks.push(callback);
2318
2334
  return this;
2319
2335
  };
2336
+ this.removeOnResponseInterceptors = (callbacks) => {
2337
+ this.__onResponseCallbacks = this.__onResponseCallbacks.filter((callback) => !callbacks.includes(callback));
2338
+ return this;
2339
+ };
2320
2340
  this.addEffect = (effect) => {
2321
2341
  this.effects = this.effects.concat(effect);
2322
2342
  return this;