/** * Legacy adapter that provides backward compatibility * Maps legacy API to the new core module */ import * as core from '../core_node/index.js'; import * as plugins from '../core_node/plugins.js'; export { type IExtendedIncomingMessage } from '../core_node/types.js'; export interface ISmartRequestOptions extends core.ICoreRequestOptions { autoJsonParse?: boolean; responseType?: 'json' | 'text' | 'binary' | 'stream'; } export interface IFormField { name: string; type: 'string' | 'filePath' | 'Buffer'; payload: string | Buffer; fileName?: string; contentType?: string; } /** * Legacy request function that returns IExtendedIncomingMessage */ export declare function request(urlArg: string, optionsArg?: ISmartRequestOptions, responseStreamArg?: boolean, requestDataFunc?: (req: plugins.http.ClientRequest) => void): Promise; /** * Safe GET request */ export declare function safeGet(urlArg: string): Promise; /** * GET JSON request */ export declare function getJson(urlArg: string, optionsArg?: ISmartRequestOptions): Promise>; /** * POST JSON request */ export declare function postJson(urlArg: string, optionsArg?: ISmartRequestOptions): Promise>; /** * PUT JSON request */ export declare function putJson(urlArg: string, optionsArg?: ISmartRequestOptions): Promise>; /** * DELETE JSON request */ export declare function delJson(urlArg: string, optionsArg?: ISmartRequestOptions): Promise>; /** * GET binary data */ export declare function getBinary(urlArg: string, optionsArg?: ISmartRequestOptions): Promise>; /** * POST form data */ export declare function postFormData(urlArg: string, formFields: IFormField[], optionsArg?: ISmartRequestOptions): Promise>; /** * POST URL encoded form data */ export declare function postFormDataUrlEncoded(urlArg: string, formFields: { key: string; content: string; }[], optionsArg?: ISmartRequestOptions): Promise>; /** * GET stream */ export declare function getStream(urlArg: string, optionsArg?: ISmartRequestOptions): Promise;