import Base, { MaybeRaw } from "../../../Base"; import { AddressBook, AddressBookCreate, AddressBookMemberInput, 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 List of address books for the requested page */ 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 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 members Members to add (e-mail + optional display name, min 1) * @returns The updated AddressBook */ addAddressBookMembers(orgName: string, spaceName: string, bookId: string, members: AddressBookMemberInput[], 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>; /** * Add one or more internal team references to an Address Book. Team membership stays live: changes to a * referenced team are reflected in the address book's recipients. * @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 teamIds List of internal team IDs to add (min 1) * @returns The updated AddressBook */ addAddressBookTeams(orgName: string, spaceName: string, bookId: string, teamIds: string[], raw?: { raw: R; }): Promise>; /** * Remove one or more internal team references 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 teamIds List of internal team IDs to remove (min 1) * @returns The updated AddressBook */ removeAddressBookTeams(orgName: string, spaceName: string, bookId: string, teamIds: string[], raw?: { raw: R; }): Promise>; /** * Updates the avatar of the specified Address Book. * @param orgName Name of the Organization * @param spaceName Name of the Space * @param bookId ID of the Address Book * @param file Image as Javascript File * @returns AddressBook details with updated avatar */ updateAvatar(orgName: string, spaceName: string, bookId: string, file: File, raw?: { raw: R; }): Promise>; }