export type ZcaCtx = { API_VERSION: number; API_TYPE: number; imei?: string; secretKey: string; cookie?: unknown; userAgent?: string; options?: { agent?: unknown; polyfill?: typeof fetch; }; }; export type ZcaUtils = { makeURL: (ctx: ZcaCtx, baseURL: string, params?: Record, apiVersion?: boolean) => string; encodeAES: (secretKey: string, data: string) => string | null; decodeAES: (secretKey: string, data: string, t?: number) => string | null; request: (ctx: ZcaCtx, url: string, options?: RequestInit, raw?: boolean) => Promise; resolve: (ctx: ZcaCtx, response: Response) => Promise; getClientMessageType: (msgType: string) => number; }; /** Timeout mặc định cho request Zalo API / CDN — tránh node treo vô hạn. */ export declare const ZCA_REQUEST_TIMEOUT_MS = 30000; /** * Nạp các hàm nội bộ của zca-js (makeURL/encodeAES/request/resolveResponse). * Không dùng subpath 'zca-js/dist/cjs/utils.cjs' vì bị chặn bởi "exports". * Thay vào đó resolve từ entry point rồi ghép đường dẫn utils.cjs tuyệt đối. */ export declare function loadZcaUtils(): ZcaUtils; export declare function zcaRequestWithTimeout(zcaUtils: ZcaUtils, ctx: ZcaCtx, url: string, options?: RequestInit, raw?: boolean, timeoutMs?: number): Promise;