import Base, { MaybeRaw } from "../../../Base"; import { AddressBook, AddressBookCreate, AddressBookUpdate } from "../../../interfaces/cosmo/addressBook"; import { SearchFilter, Sorting } from "../../../interfaces/global/SearchFilters"; /** * @class CosmoAddressBook * @extends Base * * @remarks * **Under development, breaking changes possible** * * Represents an Address Book resource in Cosmo, providing methods to interact with the Address Book API. * Address books exist on space level and hold named groups of e-mail addresses (members). */ export declare class CosmoAddressBook extends Base { protected getEndpoint(endpoint: string): string; private basePath; /** * Search address books of a Space with optional filters, sorting and pagination. * @remarks * **Under development, breaking changes possible** * @param orgName Name of the Organization * @param spaceName Name of the Space * @param filters Optional search filters * @param sorting Optional sorting definition * @param limit Maximum number of results per page (default 100) * @param page Zero-based page number (default 0) * @returns Paginated result with items and total count */ searchAddressBooks(orgName: string, spaceName: string, { filters, sorting, limit, page }?: { filters?: SearchFilter[]; sorting?: Sorting; limit?: number; page?: number; }, raw?: { raw: R; }): Promise>; /** * Create a new Address Book inside the specified Space. * @remarks * **Under development, breaking changes possible** * @param orgName Name of the Organization * @param spaceName Name of the Space * @param data Address book creation payload * @returns The created AddressBook */ createAddressBook(orgName: string, spaceName: string, data: AddressBookCreate, raw?: { raw: R; }): Promise>; /** * Get a single Address Book by its ID. * @remarks * **Under development, breaking changes possible** * @param orgName Name of the Organization * @param spaceName Name of the Space * @param bookId ID of the Address Book * @returns The requested AddressBook */ getAddressBook(orgName: string, spaceName: string, bookId: string, raw?: { raw: R; }): Promise>; /** * Update an existing Address Book (rename / change description). * @remarks * **Under development, breaking changes possible** * @param orgName Name of the Organization * @param spaceName Name of the Space * @param bookId ID of the Address Book * @param data Fields to update * @returns The updated AddressBook */ updateAddressBook(orgName: string, spaceName: string, bookId: string, data: AddressBookUpdate, raw?: { raw: R; }): Promise>; /** * Delete an Address Book by its ID. * @remarks * **Under development, breaking changes possible** * @param orgName Name of the Organization * @param spaceName Name of the Space * @param bookId ID of the Address Book to delete * @returns 204 No Content on success */ deleteAddressBook(orgName: string, spaceName: string, bookId: string, raw?: { raw: R; }): Promise>; /** * Add one or more members (by e-mail) to an Address Book. * @remarks * **Under development, breaking changes possible** * @param orgName Name of the Organization * @param spaceName Name of the Space * @param bookId ID of the Address Book * @param emails List of e-mail addresses to add (min 1) * @returns The updated AddressBook */ addAddressBookMembers(orgName: string, spaceName: string, bookId: string, emails: string[], raw?: { raw: R; }): Promise>; /** * Remove one or more members (by e-mail) from an Address Book. * @remarks * **Under development, breaking changes possible** * @param orgName Name of the Organization * @param spaceName Name of the Space * @param bookId ID of the Address Book * @param emails List of e-mail addresses to remove (min 1) * @returns The updated AddressBook */ removeAddressBookMembers(orgName: string, spaceName: string, bookId: string, emails: string[], raw?: { raw: R; }): Promise>; }