import { Entity, FnFilter } from '../../../admin/src/models/Entity'; /** * Service class that manages CRUD operations on entities stored in a JSON file. */ declare class EntityService { private filePath; constructor(filePath?: string); /** * Reads the data from the JSON file asynchronously. * @returns The parsed JSON data. */ private readFile; /** * Writes the provided data to the JSON file asynchronously. * @param data The data to write. */ private writeFile; /** * Selects records from the JSON file based on the provided filter function or key. * If no filter is specified, returns all records. * @param filter The filter function or key to apply to the selection. * @returns A list of matching entities. */ select(filter?: FnFilter | string): Promise; /** * Finds a single entity from the JSON file based on the provided filter function. * @param filter The filter function to apply. * @returns A single matching entity or null if not found. */ findOne(filter: FnFilter): Promise; /** * Performs a bulk create operation, adding multiple records to the JSON file. * @param entities The entities to create. */ bulkCreate(entities: T[]): Promise; /** * Performs a bulk delete operation, removing multiple records from the JSON file. * @param entityNames The names of the entities to delete. */ bulkDelete(entityNames: string[]): Promise; /** * Performs a bulk update operation, updating multiple records in the JSON file. * @param updatedEntities The entities with the updated values. */ bulkUpdate(updatedEntities: Entity[]): Promise; } declare const _default: EntityService; export default _default; export { EntityService };