import { ConnectClientConfig, ConnectClientConfigDeprecated, ConnectClientWithOptionalConfig } from "@amazon-connect/core"; import { ParticipantState } from "./states"; import { AddParticipantResult, AgentQuickConnect, ContactAttributeFilter, ContactChannelType, ContactClearedHandler, ContactConnectedHandler, ContactData, ContactDestroyedHandler, ContactIncomingHandler, ContactMissedHandler, ContactStartingAcwHandler, ContactType, GetPreviewConfigurationResponse, InstanceDetails, ListContactsResult, ParticipantAddedHandler, ParticipantData, ParticipantDisconnectedHandler, ParticipantStateChangedHandler, Queue, QueueQuickConnect, QuickConnect } from "./types"; export declare class ContactClient extends ConnectClientWithOptionalConfig { /** * Creates a new ContactClient instance with the specified configuration. * * @param config - The configuration for the client. Can be provided as: * - An AmazonConnectProvider instance directly: `new ContactClient(provider)` * - An object with provider: `new ContactClient({ provider })` * * @example * ```typescript * // Recommended: Pass provider directly * const client = new ContactClient(provider); * * // Alternative: Pass as object * const client = new ContactClient({ provider }); * ``` */ constructor(config: ConnectClientConfig); /** * @deprecated Calling ContactClient without AmazonConnectProvider is deprecated and will be removed in a future version. * Please provide an AmazonConnectProvider instance: `new ContactClient(provider)` */ constructor(config?: ConnectClientConfigDeprecated); getAttributes(contactId: string, attributes: ContactAttributeFilter): Promise>; getAttribute(contactId: string, attribute: string): Promise; getInitialContactId(contactId: string): Promise; /** * @deprecated Use `getChannelType` instead. */ getType(contactId: string): Promise; getStateDuration(contactId: string): Promise; getQueue(contactId: string): Promise; getQueueTimestamp(contactId: string): Promise; onStartingAcw(handler: ContactStartingAcwHandler, contactId?: string): void; /** * @deprecated Use `onCleared` instead. */ onDestroyed(handler: ContactDestroyedHandler, contactId?: string): void; onConnected(handler: ContactConnectedHandler, contactId?: string): void; onMissed(handler: ContactMissedHandler, contactId?: string): void; onIncoming(handler: ContactIncomingHandler, contactId?: string): void; offStartingAcw(handler: ContactStartingAcwHandler, contactId?: string): void; /** * @deprecated Use `offCleared` instead. */ offDestroyed(handler: ContactDestroyedHandler, contactId?: string): void; offMissed(handler: ContactMissedHandler, contactId?: string): void; offIncoming(handler: ContactIncomingHandler, contactId?: string): void; offConnected(handler: ContactConnectedHandler, contactId?: string): void; getChannelType(contactId: string): Promise; addParticipant(contactId: string, quickConnect: QuickConnect): Promise; transfer(contactId: string, quickConnect: AgentQuickConnect | QueueQuickConnect): Promise; onCleared(handler: ContactClearedHandler, contactId?: string): void; offCleared(handler: ContactClearedHandler, contactId?: string): void; accept(contactId: string): Promise; clear(contactId: string): Promise; isPreviewMode(contactId: string): Promise; getPreviewConfiguration(contactId: string): Promise; engagePreviewContact(contactId: string): Promise; getContactRegion(contactId: string): Promise; getInstanceDetails(contactId: string): Promise; /** * Retrieves all participants associated with a specific contact. * @param contactId - The unique identifier for the contact * @returns Promise resolving to array of participant information */ listParticipants(contactId: string): Promise; /** * Retrieves information for a specific participant. * @param participantId - The unique identifier for the participant * @returns Promise resolving to participant information */ getParticipant(participantId: string): Promise; /** * Retrieves the current state of a specific participant. * @param participantId - The unique identifier for the participant * @returns Promise resolving to current participant state */ getParticipantState(participantId: string): Promise; /** * Disconnects a specific participant from the contact. * @param participantId - The unique identifier for the participant to disconnect * @returns Promise resolving when the participant is disconnected */ disconnectParticipant(participantId: string): Promise; /** * Retrieves detailed information for a specific contact by its ID. * @param contactId - The unique identifier for the contact * @returns Promise resolving to detailed contact information */ getContact(contactId: string): Promise; /** * Lists all contacts for the current agent. * @returns Promise resolving to array of contact information */ listContacts(): Promise; /** * Subscribes to participant added events. * @param handler - Event handler function to call when participants are added * @param contactId - Optional contact ID to filter events for a specific contact */ onParticipantAdded(handler: ParticipantAddedHandler, contactId?: string): void; /** * Unsubscribes from participant added events. * @param handler - Event handler function to remove * @param contactId - Optional contact ID to unsubscribe from specific contact events */ offParticipantAdded(handler: ParticipantAddedHandler, contactId?: string): void; /** * Subscribes to participant disconnected events. * @param handler - Event handler function to call when participants disconnect * @param contactId - Optional contact ID to filter events for a specific contact */ onParticipantDisconnected(handler: ParticipantDisconnectedHandler, contactId?: string): void; /** * Unsubscribes from participant disconnected events. * @param handler - Event handler function to remove * @param contactId - Optional contact ID to unsubscribe from specific contact events */ offParticipantDisconnected(handler: ParticipantDisconnectedHandler, contactId?: string): void; /** * Subscribes to participant state change events. * @param handler - Event handler function to call when participant state changes * @param participantId - Optional participant ID to filter events for a specific participant */ onParticipantStateChanged(handler: ParticipantStateChangedHandler, participantId?: string): void; /** * Unsubscribes from participant state change events. * @param handler - Event handler function to remove * @param participantId - Optional participant ID to unsubscribe from specific participant events */ offParticipantStateChanged(handler: ParticipantStateChangedHandler, participantId?: string): void; } //# sourceMappingURL=contact-client.d.ts.map