import Base, { MaybeRaw } from "../../../../Base"; import { PaginatedResponse, SearchParams } from "../../../../interfaces/global"; import { ApiKey, ApiKeyPermission, Database } from "../../../../interfaces/high5"; import { High5Document } from "./document"; export declare class High5Database extends Base { get document(): High5Document; private _document?; /** * Retrieves all Databases of a High5 Space which match the provided search filter(s). Will return all Databases of the Space if no filter is provided. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param filters (optional) Array of search filters * @param sorting (optional) Sorting object * @param limit (optional) Max number of results (1-100; defaults to 25) * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0) * @returns Object containing an array of Databases and the total number of results found in the database (independent of limit and page) */ searchDatabases({ orgName, spaceName, filters, sorting, limit, page }: SearchParams & { orgName: string; spaceName: string; }, raw?: { raw: R; }): Promise>>; /** * Retrieves a Database by its name. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @returns The requested Database */ getDatabase(orgName: string, spaceName: string, dbName: string, raw?: { raw: R; }): Promise>; /** * Creates a new Database in the provided Space. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param name Name of the new Database * @returns The created Database */ createDatabase(orgName: string, spaceName: string, name: string, raw?: { raw: R; }): Promise>; /** * Rename a Database * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param name New name of the Database * @returns Updated Database */ renameDatabase(orgName: string, spaceName: string, dbName: string, name: string, raw?: { raw: R; }): Promise>; /** * Deletes a Database by its name. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database */ deleteDatabase(orgName: string, spaceName: string, dbName: string, raw?: { raw: R; }): Promise>; /** * Generates a new API key for a specific database within the space * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param name Name of the API key * @param permission Permission level for the API key * @returns The created API key details */ createDatabaseApiKey(orgName: string, spaceName: string, dbName: string, name: string, permission: ApiKeyPermission, raw?: { raw: R; }): Promise>; /** * Removes an existing API key by its name, revoking access to the database * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param keyName Name of the API key to delete */ deleteDatabaseApiKey(orgName: string, spaceName: string, dbName: string, keyName: string, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }