IOweb/node_modules/@iconify/tools/lib/download/api/config.d.mts
2026-07-03 15:07:38 -05:00

18 lines
607 B
TypeScript

import { RequestOptions } from 'node:http';
import { APIQueryParams } from './types.mjs';
/**
* Axios config, customisable
*/
declare const axiosConfig: Omit<RequestOptions, 'headers' | 'responseType' | 'url' | 'method' | 'data'>;
interface AxiosCallbacks {
onStart?: (url: string, params: APIQueryParams) => void;
onSuccess?: (url: string, params: APIQueryParams) => void;
onError?: (url: string, params: APIQueryParams, errorCode?: number) => void;
}
/**
* Customisable callbacks, used for logging
*/
declare const fetchCallbacks: AxiosCallbacks;
export { axiosConfig, fetchCallbacks };