import Base, { MaybeRaw } from "../../../../../../Base"; import { PaginatedResponse, SearchParams } from "../../../../../../interfaces/global"; import { Document } from "../../../../../../interfaces/high5"; export declare class High5DocumentCollection extends Base { /** * Retrieves all items of a specified array document which match the provided search filter(s). Will return all items of the array if no filter is provided. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param dbName Name of the Database * @param key Key of the Document (it should be document with Array) * @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 items and the total number of results found in the document (independent of limit and page) */ searchItems({ orgName, spaceName, dbName, key, filters, sorting, limit, page, }: SearchParams & { orgName: string; spaceName: string; dbName: string; key: string; }, raw?: { raw: R; }): Promise>>; /** * Retrieves an array item by its index. * @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 index Index of the arrays item * @returns The requested item of the array */ getItem(orgName: string, spaceName: string, dbName: string, key: string, index: number, raw?: { raw: R; }): Promise>; /** * Deletes an item of the specified array by its index. * @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 index Index of the item of the array */ deleteItem(orgName: string, spaceName: string, dbName: string, key: string, index: number, raw?: { raw: R; }): Promise>; /** * Pushes a list of items to the end of the specified array 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 items New array items to be added to the end of the specified array document * @returns Updated Document */ pushItems(orgName: string, spaceName: string, dbName: string, key: string, items: Array, raw?: { raw: R; }): Promise>; /** * Unshifts a list of items to the beginning of the specified array 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 items New array items to be inserted to the beginning of the specified array document * @returns Updated Document */ unshiftItems(orgName: string, spaceName: string, dbName: string, key: string, items: Array, raw?: { raw: R; }): Promise>; /** * Add or update one or more key/value pairs inside an object document without replacing the entire value. * @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 pairs Key/value pairs to upsert into the object document * @returns Updated Document */ upsertObjectPairs(orgName: string, spaceName: string, dbName: string, key: string, pairs: Record, raw?: { raw: R; }): Promise>; /** * Remove one or more keys from an object 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 keys List of keys to remove from the object document * @returns Updated Document */ deleteObjectKeys(orgName: string, spaceName: string, dbName: string, key: string, keys: string[], raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }