import type { RequestOptionsWithHooks } from './types.mts'; import type { HttpResponse } from '@socketsecurity/lib/http-request/response-types'; import type { ReadStream } from 'node:fs'; /** * Structural type for the multipart form the SDK builds. Deliberately NOT the * `form-data` package's own type: the runtime class ships inside the bundle * (see `getFormData`), and the published declarations must not import a * package consumers never install. `pipe` and `getHeaders` stay on the * shape because the HTTP layer duck-types stream bodies through them. */ export interface MultipartForm { append(name: string, value: unknown, options?: { contentType?: string | undefined; filename?: string | undefined; } | undefined): void; getHeaders(): Record; pipe(destination: T): T; } export type MultipartFormConstructor = new () => MultipartForm; export declare function createRequestBodyForBlobs(entries: Array<{ absPath: string; hash: string; name: string; }>): MultipartForm; export declare function createRequestBodyForFilepaths(filepaths: string[], basePath: string): MultipartForm; export declare function createUploadRequest(baseUrl: string, urlPath: string, form: MultipartForm, options?: RequestOptionsWithHooks | undefined): Promise; export declare function getFormData(): MultipartFormConstructor; export declare function openFileReadStreamOrThrow(absPath: string): ReadStream;