/** * API context/environment to use for requests * - 'web6dot0': Web context * - 'android': Android context */ export type ClientContext = 'web6dot0' | 'android'; /** * Parameters for making an API request to JioSaavn */ export interface FetchParams { /** API call to op (e.g., 'song.getDetails') */ call: string; /** Query parameters for the API call */ params?: Record; /** API context to use (default: 'web6dot0') */ context?: ClientContext; /** Base URL for the JioSaavn API (e.g. your own proxy) */ baseUrl?: string; /** Custom HTTP headers to include in request */ headers?: Record; /** Custom User-Agent strings to rotate from (optional) */ userAgents?: string[]; /** Custom fetch implementation (e.g., for environments without global fetch) */ fetch?: typeof fetch; /** Optional timeout in milliseconds */ timeoutMs?: number; } export interface FetchResponse { data: unknown; ok: boolean; status: number; } /** * Fetch data from JioSaavn API * @param params Fetch parameters * @returns Fetch response containing data, ok status, and HTTP status code */ export declare const fetchFromSaavn: ({ call, params, context, baseUrl, headers, userAgents, timeoutMs, fetch: fetchImpl, }: FetchParams) => Promise; /** * Set global configuration for fetch requests * @param config Configuration object */ export declare const setFetchConfig: (config: { baseUrl?: string; defaultHeaders?: Record; userAgents?: string[]; }) => void;