import { APIResource } from "../core/resource.js";
import { APIPromise } from "../core/api-promise.js";
import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
import { RequestOptions } from "../internal/request-options.js";
export declare class Contacts extends APIResource {
    /**
     * Get contact
     */
    retrieve(contactID: string, options?: RequestOptions): APIPromise<Contact>;
    /**
     * Update contact
     */
    update(contactID: string, body: ContactUpdateParams, options?: RequestOptions): APIPromise<Contact>;
    /**
     * List contacts with their communication channels.
     */
    list(query?: ContactListParams | null | undefined, options?: RequestOptions): PagePromise<ContactsCursor, Contact>;
    /**
     * Get contact by phone number
     */
    retrieveByPhone(phoneNumber: string, options?: RequestOptions): APIPromise<Contact>;
}
export type ContactsCursor = Cursor<Contact>;
export interface Contact {
    id: string;
    /**
     * List of available messaging channels for this contact.
     */
    availableChannels: Array<string>;
    createdAt: string;
    metadata: {
        [key: string]: string;
    };
    /**
     * Whether this contact has been verified.
     */
    verified: boolean;
    /**
     * All communication channels for this contact.
     */
    channels?: Array<Contact.Channel>;
    countryCode?: string;
    /**
     * Preferred channel for this contact.
     */
    defaultChannel?: 'sms' | 'whatsapp' | 'telegram' | 'email' | 'instagram' | 'voice';
    /**
     * Display name for the contact.
     */
    displayName?: string;
    /**
     * DEPRECATED: Use primaryPhone instead. Primary phone number in E.164 format.
     */
    phoneNumber?: string;
    /**
     * Primary email address.
     */
    primaryEmail?: string;
    /**
     * Primary phone number in E.164 format.
     */
    primaryPhone?: string;
    /**
     * Contact's WhatsApp profile name. Only available for WhatsApp contacts.
     */
    profileName?: string | null;
    /**
     * ID of a contact suggested for merging.
     */
    suggestedMergeWith?: string;
    updatedAt?: string;
}
export declare namespace Contact {
    /**
     * A communication channel for a contact.
     */
    interface Channel {
        id: string;
        /**
         * Channel type.
         */
        channel: 'sms' | 'whatsapp' | 'email' | 'telegram' | 'voice';
        createdAt: string;
        /**
         * Channel identifier (phone number or email address).
         */
        identifier: string;
        /**
         * Whether this is the primary channel for its type.
         */
        isPrimary: boolean;
        /**
         * Whether this channel has been verified.
         */
        verified: boolean;
        /**
         * ISO country code for phone numbers.
         */
        countryCode?: string;
        /**
         * Optional label for the channel.
         */
        label?: string;
        /**
         * Last time a message was received on this channel.
         */
        lastInboundAt?: string;
        metadata?: {
            [key: string]: string;
        };
        /**
         * Delivery metrics for this channel.
         */
        metrics?: Channel.Metrics;
        updatedAt?: string;
    }
    namespace Channel {
        /**
         * Delivery metrics for this channel.
         */
        interface Metrics {
            avgDeliveryTimeMs?: number;
            failureCount?: number;
            lastSuccessAt?: string;
            successCount?: number;
            totalAttempts?: number;
        }
    }
}
export interface ContactUpdateParams {
    /**
     * Preferred channel for this contact. Set to null to clear.
     */
    defaultChannel?: 'sms' | 'whatsapp' | 'telegram' | 'email' | 'instagram' | 'voice' | null;
    metadata?: {
        [key: string]: string;
    };
}
export interface ContactListParams extends CursorParams {
    phoneNumber?: string;
}
export declare namespace Contacts {
    export { type Contact as Contact, type ContactsCursor as ContactsCursor, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, };
}
//# sourceMappingURL=contacts.d.ts.map