import { RestCommand } from "../../types.js"; //#region src/rest/commands/utils/import.d.ts /** * Import multiple records from a JSON or CSV file into a collection. * @returns Nothing * @throws Will throw if collection is empty */ declare const utilsImport: (collection: keyof Schema, data: FormData) => RestCommand; interface ImportBatchOptions { mode?: "add" | "merge"; dryRun?: boolean; dangerouslyAllowDelete?: boolean; } interface ImportBatchCollectionResult { existing: (string | number)[]; new: (string | number)[]; deleted: (string | number)[]; mapped: Record; } interface ImportBatchResult { applied: boolean; mode: "add" | "merge"; collections: Record; } /** * Import flat data for multiple related collections in a single request. The payload is uploaded as a * JSON file (`multipart/form-data`); build the `FormData` with a single file field containing an array * of `{ collection, items }` objects. * * @param data A FormData object holding the JSON file to import. * @param options Import mode, dry-run, and destructive-delete flags. * @returns Per-collection summary of the changes: existing, new, deleted, and remapped primary keys. */ declare const utilsImportBatch: (data: FormData, options?: ImportBatchOptions) => RestCommand; //#endregion export { ImportBatchCollectionResult, ImportBatchOptions, ImportBatchResult, utilsImport, utilsImportBatch }; //# sourceMappingURL=import.d.ts.map