import { APIResource } from "../../core/resource.js"; import * as Shared from "../shared.js"; import { UsersCursorSearch } from "../shared.js"; import { APIPromise } from "../../core/api-promise.js"; import { type CursorSearchParams, PagePromise } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Manage contacts on a specific account */ export declare class BaseContacts extends APIResource { static readonly _key: readonly ['accounts', 'contacts']; /** * List merged contacts for a specific account with cursor-based pagination. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const user of client.accounts.contacts.list( * 'accountID', * )) { * // ... * } * ``` */ list(accountID: string, query?: ContactListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Search contacts on a specific account using merged account contacts, network * search, and exact identifier lookup. The exact lookup only runs when the query * is a phone number, email address, or username; pass one of those to resolve a * specific person. * * @example * ```ts * const response = await client.accounts.contacts.search( * 'accountID', * { query: 'x' }, * ); * ``` */ search(accountID: string, query: ContactSearchParams, options?: RequestOptions): APIPromise; } /** * Manage contacts on a specific account */ export declare class Contacts extends BaseContacts { } export interface ContactSearchResponse { items: Array; } export interface ContactListParams extends CursorSearchParams { /** * Optional search query for contact lookup. */ query?: string; } export interface ContactSearchParams { /** * Text to search contacts by. A phone number, email address, or username written * with a leading @ is additionally looked up as an exact identifier on the * network; any other text, such as a bare handle or a person or business name, * searches existing contacts only. Matching behavior depends on the network. */ query: string; } export declare namespace Contacts { export { type ContactSearchResponse as ContactSearchResponse, type ContactListParams as ContactListParams, type ContactSearchParams as ContactSearchParams, }; } export { type UsersCursorSearch }; //# sourceMappingURL=contacts.d.ts.map