import { ConnectClientConfig, ConnectClientConfigDeprecated, ConnectClientWithOptionalConfig } from "@amazon-connect/core"; import { CanResumeParticipantChangedHandler, CreateOutboundCallOptions, CreateOutboundCallResult, DialableCountry, ParticipantHoldHandler, ParticipantResumeHandler, VoiceEnhancementMode, VoiceEnhancementModeChangedHandler, VoiceEnhancementPaths } from "./types"; export declare class VoiceClient extends ConnectClientWithOptionalConfig { /** * Creates a new VoiceClient instance with the specified configuration. * * @param config - The configuration for the client. Can be provided as: * - An AmazonConnectProvider instance directly: `new VoiceClient(provider)` * - An object with provider: `new VoiceClient({ provider })` * * @example * ```typescript * // Recommended: Pass provider directly * const client = new VoiceClient(provider); * * // Alternative: Pass as object * const client = new VoiceClient({ provider }); * ``` */ constructor(config: ConnectClientConfig); /** * @deprecated Calling VoiceClient without AmazonConnectProvider is deprecated and will be removed in a future version. * Please provide an AmazonConnectProvider instance: `new VoiceClient(provider)` */ constructor(config?: ConnectClientConfigDeprecated); /** * @deprecated Use `getInitialCustomerPhoneNumber` instead. */ getPhoneNumber(contactId: string): Promise; getInitialCustomerPhoneNumber(contactId: string): Promise; listDialableCountries(): Promise; getOutboundCallPermission(): Promise; /** * @param phoneNumber phone number string in E.164 format */ createOutboundCall(phoneNumber: string, options?: CreateOutboundCallOptions): Promise; onVoiceEnhancementModeChanged(handler: VoiceEnhancementModeChangedHandler): void; offVoiceEnhancementModeChanged(handler: VoiceEnhancementModeChangedHandler): void; getVoiceEnhancementMode(): Promise; setVoiceEnhancementMode(voiceEnhancementMode: VoiceEnhancementMode): Promise; getVoiceEnhancementPaths(): Promise; conferenceParticipants(contactId: string): Promise; holdParticipant(participantId: string): Promise; resumeParticipant(participantId: string): Promise; holdSelf(contactId: string): Promise; resumeSelf(contactId: string): Promise; isParticipantOnHold(participantId: string): Promise; isSelfOnHold(contactId: string): Promise; canResumeSelf(contactId: string): Promise; canResumeParticipant(participantId: string): Promise; /** * Subscribes to events when any participant is put on hold on a contact. * Each contact has multiple participants, and any given participant can be put on hold or resumed. * * @param handler - Event handler function to call when participants are put on hold * @param participantId - Optional participant ID to filter events for a specific participant */ onParticipantHold(handler: ParticipantHoldHandler, participantId?: string): void; /** * Unsubscribes from events when any participant is put on hold. * Removes the specified handler from receiving notifications about participant hold events. * * @param handler - Event handler function to remove * @param participantId - Optional participant ID to unsubscribe from specific participant events */ offParticipantHold(handler: ParticipantHoldHandler, participantId?: string): void; /** * Subscribes to events when any participant is taken off hold on a contact. * Each contact has multiple participants, and any given participant can be put on hold or taken off hold. * * @param handler - Event handler function to call when participants are taken off hold * @param participantId - Optional participant ID to filter events for a specific participant */ onParticipantResume(handler: ParticipantResumeHandler, participantId?: string): void; /** * Unsubscribes from events when any participant is taken off hold. * Removes the specified handler from receiving notifications about participants being taken off hold. * * @param handler - Event handler function to remove * @param participantId - Optional participant ID to unsubscribe from specific participant events */ offParticipantResume(handler: ParticipantResumeHandler, participantId?: string): void; /** * Subscribes to events when the current user's participant is put on hold on a contact. * Each contact has multiple participants, and this event fires specifically when the participant * associated with the current user is put on hold, allowing specification by contact rather than participant ID. * * @param handler - Event handler function to call when the current user's participant is put on hold * @param contactId - Optional contact ID to filter events for a specific contact */ onSelfHold(handler: ParticipantHoldHandler, contactId?: string): void; /** * Unsubscribes from events when the current user's participant is put on hold. * Removes the specified handler from receiving notifications about the current user's participant hold events. * * @param handler - Event handler function to remove * @param contactId - Optional contact ID to unsubscribe from specific contact events */ offSelfHold(handler: ParticipantHoldHandler, contactId?: string): void; /** * Subscribes to events when the current user's participant is taken off hold on a contact. * Each contact has multiple participants, and this event fires specifically when the participant * associated with the current user is taken off hold, allowing specification by contact rather than participant ID. * * @param handler - Event handler function to call when the current user's participant is taken off hold * @param contactId - Optional contact ID to filter events for a specific contact */ onSelfResume(handler: ParticipantResumeHandler, contactId?: string): void; /** * Unsubscribes from events when the current user's participant is taken off hold. * Removes the specified handler from receiving notifications about the current user's participant being taken off hold. * * @param handler - Event handler function to remove * @param contactId - Optional contact ID to unsubscribe from specific contact events */ offSelfResume(handler: ParticipantResumeHandler, contactId?: string): void; /** * Subscribes to events when the current user's participant capability to be taken off hold changes on a contact. * Each contact has multiple participants, and this event fires specifically when the participant * associated with the current user's capability to be taken off hold changes, allowing specification by contact rather than participant ID. * * @param handler - Event handler function to call when the current user's participant capability to be taken off hold changes * @param contactId - Optional contact ID to filter events for a specific contact */ onCanResumeSelfChanged(handler: CanResumeParticipantChangedHandler, contactId?: string): void; /** * Unsubscribes from events when the current user's participant capability to be taken off hold changes. * Removes the specified handler from receiving notifications about the current user's participant capability to be taken off hold changes. * * @param handler - Event handler function to remove * @param contactId - Optional contact ID to unsubscribe from specific contact events */ offCanResumeSelfChanged(handler: CanResumeParticipantChangedHandler, contactId?: string): void; /** * Subscribes to events when a participant's capability to be taken off hold changes. * This event fires when the ability to resume a participant from hold changes, * which can happen due to various factors such as permissions or system state. * * @param handler - Event handler function to call when a participant's capability to be taken off hold changes * @param participantId - Optional participant ID to filter events for a specific participant */ onCanResumeParticipantChanged(handler: CanResumeParticipantChangedHandler, participantId?: string): void; /** * Unsubscribes from events when a participant's capability to be taken off hold changes. * Removes the specified handler from receiving notifications about participant capability to be taken off hold changes. * * @param handler - Event handler function to remove * @param participantId - Optional participant ID to unsubscribe from specific participant events */ offCanResumeParticipantChanged(handler: CanResumeParticipantChangedHandler, participantId?: string): void; } //# sourceMappingURL=voice-client.d.ts.map