import type { Contact } from './Contact'; import type { Group } from './Group'; /** * Represents the account type of a container. */ export type ContainerType = 'local' | 'exchange' | 'cardDAV' | 'unassigned' | 'unknown'; export declare class Container { /** * Constructor for Container instance. * While you can instantiate this class directly if you have an ID, the recommended way to obtain a `Container` instance * is to use static methods like `Container.getAll` or `Container.getDefault`. * * @param id - The unique identifier of the container. * @platform ios */ constructor(id: string); /** * The unique identifier for the container. * @platform ios */ readonly id: string; /** * Retrieves the name of the container. * @returns a promise resolving to the container name string (for example, "iCloud", "Gmail") or `null` if not available. * @platform ios * @example * ```ts * const name = await container.getName(); // 'iCloud' * ``` */ getName(): Promise; /** * Retrieves the type of the container. * @returns a promise resolving to the [`ContainerType`](#containertype) (for example, 'cardDAV', 'exchange') or `null`. * @platform ios * @example * ```ts * const type = await container.getType(); // 'cardDAV' * ``` */ getType(): Promise; /** * Retrieves all groups associated with this container. * @returns a promise resolving to an array of [`Group`](#group) instances within this container. * @platform ios * @example * ```ts * const groups = await container.getGroups(); * ``` */ getGroups(): Promise; /** * Retrieves all contacts stored in this container. * @returns a promise resolving to an array of [`Contact`](#contact) instances within this container. * @platform ios * @example * ```ts * const contacts = await container.getContacts(); * ``` */ getContacts(): Promise; /** * A static method that retrieves all contact containers available on the device. * @returns a promise resolving to an array of [`Container`](#container) instances. * @platform ios * @example * ```ts * const containers = await Container.getAll(); * ``` */ static getAll(): Promise; /** * A static method that retrieves the default container. * The default container is where new contacts are added if no specific container is specified. * @returns a promise resolving to the default [`Container`](#container) instance or `null` if not found. * @platform ios * @example * ```ts * const defaultContainer = await Container.getDefault(); * ``` */ static getDefault(): Promise; } export declare class FallbackContainer { constructor(id: string); readonly id: string; getName(): Promise; getType(): Promise; getGroups(): Promise; getContacts(): Promise; static getAll(): Promise; static getDefault(): Promise; } //# sourceMappingURL=Container.d.ts.map