api-core-lib 11.5.4 → 11.6.5

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.d.mts CHANGED
@@ -88,6 +88,7 @@ interface MiddlewareContext {
88
88
  req: InternalAxiosRequestConfig;
89
89
  res?: AxiosResponse;
90
90
  error?: any;
91
+ logger: Logger;
91
92
  custom?: Record<string, any>;
92
93
  }
93
94
  /**
@@ -229,12 +230,14 @@ interface ApiClientConfig {
229
230
  /** A callback function executed if the token refresh process fails. */
230
231
  onRefreshError?: (error: any) => void;
231
232
  /** A custom logger instance. Defaults to the browser `console`. */
233
+ logger?: Logger;
232
234
  /** An array of middleware functions to be executed with every request. */
233
235
  middleware?: Middleware[];
234
236
  /**
235
237
  * Sets the verbosity of the internal logger.
236
238
  * @default 'info'
237
239
  */
240
+ logLevel?: LogLevel;
238
241
  /**
239
242
  * If true, all requests will be treated as public by default.
240
243
  * A request can override this by explicitly setting `isPublic: false`.
@@ -567,7 +570,7 @@ declare const cacheManager: CacheManager;
567
570
  * @param responseOrError The raw Axios response or a pre-processed ApiError.
568
571
  * @returns A standardized `StandardResponse` object with direct access to `.data`.
569
572
  */
570
- declare const processResponse: <T>(responseOrError: AxiosResponse<any> | ApiError, log?: boolean) => StandardResponse<T>;
573
+ declare const processResponse: <T>(responseOrError: AxiosResponse<any> | ApiError) => StandardResponse<T>;
571
574
 
572
575
  declare function useApi<T>(axiosInstance: AxiosInstance, config: UseApiConfig<T>): UseApiReturn<T>;
573
576
 
package/dist/index.d.ts CHANGED
@@ -88,6 +88,7 @@ interface MiddlewareContext {
88
88
  req: InternalAxiosRequestConfig;
89
89
  res?: AxiosResponse;
90
90
  error?: any;
91
+ logger: Logger;
91
92
  custom?: Record<string, any>;
92
93
  }
93
94
  /**
@@ -229,12 +230,14 @@ interface ApiClientConfig {
229
230
  /** A callback function executed if the token refresh process fails. */
230
231
  onRefreshError?: (error: any) => void;
231
232
  /** A custom logger instance. Defaults to the browser `console`. */
233
+ logger?: Logger;
232
234
  /** An array of middleware functions to be executed with every request. */
233
235
  middleware?: Middleware[];
234
236
  /**
235
237
  * Sets the verbosity of the internal logger.
236
238
  * @default 'info'
237
239
  */
240
+ logLevel?: LogLevel;
238
241
  /**
239
242
  * If true, all requests will be treated as public by default.
240
243
  * A request can override this by explicitly setting `isPublic: false`.
@@ -567,7 +570,7 @@ declare const cacheManager: CacheManager;
567
570
  * @param responseOrError The raw Axios response or a pre-processed ApiError.
568
571
  * @returns A standardized `StandardResponse` object with direct access to `.data`.
569
572
  */
570
- declare const processResponse: <T>(responseOrError: AxiosResponse<any> | ApiError, log?: boolean) => StandardResponse<T>;
573
+ declare const processResponse: <T>(responseOrError: AxiosResponse<any> | ApiError) => StandardResponse<T>;
571
574
 
572
575
  declare function useApi<T>(axiosInstance: AxiosInstance, config: UseApiConfig<T>): UseApiReturn<T>;
573
576