import Base, { MaybeRaw } from "../../../../../Base"; import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global"; import { Document, DocumentCreateDto, DocumentPatchDto, DocumentUpsertDto } from "../../../../../interfaces/high5"; import { High5DocumentCollection } from "./collection"; import { High5DocumentNumber } from "./number"; export declare class High5Document extends Base { get number(): High5DocumentNumber; private _number?; get collection(): High5DocumentCollection; private _collection?; /** * Retrieves all Documents of a High5 Database which match the provided search filter(s). Will return all Documents of the Database if no filter is provided. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @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 Documents and the total number of results found in the database (independent of limit and page) */ searchDocuments({ orgName, spaceName, dbName, filters, sorting, limit, page }: SearchParams & { orgName: string; spaceName: string; dbName: string; }, raw?: { raw: R; }): Promise>>; /** * Retrieves a Document by its name. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param key Key of the Document * @returns The requested Document */ getDocument(orgName: string, spaceName: string, dbName: string, key: string, raw?: { raw: R; }): Promise>; /** * Creates a new Document in the provided Database. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param document New document details * @returns The created Document */ createDocument(orgName: string, spaceName: string, dbName: string, document: DocumentCreateDto, raw?: { raw: R; }): Promise>; /** * Update existing Document * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param key Key of the Document * @param document New value to update the Document * @returns Updated Document */ updateDocument(orgName: string, spaceName: string, dbName: string, key: string, document: DocumentPatchDto, raw?: { raw: R; }): Promise>; /** * Creates the document if it does not exist, or updates it if it does * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param key Key of the Document * @param document New value to upsert the Document * @returns Updated or created Document */ upsertDocument(orgName: string, spaceName: string, dbName: string, key: string, document: DocumentUpsertDto, raw?: { raw: R; }): Promise>; /** * Deletes a Document by its key. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param key Key of the Document */ deleteDocument(orgName: string, spaceName: string, dbName: string, key: string, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }