import { AxioDB } from "../../../Services/Indexation.operation"; import { ResponseBuilder } from "../../helper/responseBuilder.helper"; import { FastifyReply, FastifyRequest } from "fastify"; export default class DatabaseController { private AxioDBInstance; constructor(AxioDBInstance: AxioDB); getDatabases(): Promise; createDatabase(request: FastifyRequest): Promise; deleteDatabase(request: FastifyRequest): Promise; /** * Creates a temporary tar.gz of the database directory, streams it to the client, and * deletes the temp file once the stream closes (whether it finished or errored). */ exportDatabase(request: FastifyRequest, reply: FastifyReply): Promise; /** * Imports a database from an uploaded .tar.gz. * * Everything is staged outside the data directory and proven to be a genuine AxioDB * export before a single byte is promoted into place. That ordering is what lets a bad * upload be discarded completely: an archive that fails validation never existed as far * as the live data directory is concerned, so there is no partial database to clean up. */ importDatabase(request: FastifyRequest, reply: FastifyReply): Promise<{ message: string; database: string; file: string; }>; }