import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; import type { StartChatContactRequest, StartChatContactResponse } from "../models/models_3"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link StartChatContactCommand}. */ export interface StartChatContactCommandInput extends StartChatContactRequest { } /** * @public * * The output of {@link StartChatContactCommand}. */ export interface StartChatContactCommandOutput extends StartChatContactResponse, __MetadataBearer { } declare const StartChatContactCommand_base: { new (input: StartChatContactCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: StartChatContactCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Initiates a flow to start a new chat for the customer. Response of this API provides a token required to obtain * credentials from the CreateParticipantConnection API in the Amazon Connect Participant Service.

*

When a new chat contact is successfully created, clients must subscribe to the participant’s connection for the * created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS.

*

A 429 error occurs in the following situations:

* *

If you use the ChatDurationInMinutes parameter and receive a 400 error, your account may not * support the ability to configure custom chat durations. For more information, contact Amazon Web Services Support.

*

For more information about chat, see the following topics in the Amazon Connect * Administrator Guide:

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ConnectClient, StartChatContactCommand } from "@aws-sdk/client-connect"; // ES Modules import * // const { ConnectClient, StartChatContactCommand } = require("@aws-sdk/client-connect"); // CommonJS import * // import type { ConnectClientConfig } from "@aws-sdk/client-connect"; * const config = {}; // type is ConnectClientConfig * const client = new ConnectClient(config); * const input = { // StartChatContactRequest * InstanceId: "STRING_VALUE", // required * ContactFlowId: "STRING_VALUE", // required * Attributes: { // Attributes * "": "STRING_VALUE", * }, * ParticipantDetails: { // ParticipantDetails * DisplayName: "STRING_VALUE", // required * }, * ParticipantConfiguration: { // ParticipantConfiguration * ResponseMode: "INCREMENTAL" || "COMPLETE", * }, * InitialMessage: { // ChatMessage * ContentType: "STRING_VALUE", // required * Content: "STRING_VALUE", // required * }, * ClientToken: "STRING_VALUE", * ChatDurationInMinutes: Number("int"), * SupportedMessagingContentTypes: [ // SupportedMessagingContentTypes * "STRING_VALUE", * ], * PersistentChat: { // PersistentChat * RehydrationType: "ENTIRE_PAST_SESSION" || "FROM_SEGMENT", * SourceContactId: "STRING_VALUE", * }, * RelatedContactId: "STRING_VALUE", * SegmentAttributes: { // SegmentAttributes * "": { // SegmentAttributeValue * ValueString: "STRING_VALUE", * ValueMap: { // SegmentAttributeValueMap * "": { * ValueString: "STRING_VALUE", * ValueMap: { * "": "", * }, * ValueInteger: Number("int"), * ValueList: [ // SegmentAttributeValueList * "", * ], * ValueArn: "STRING_VALUE", * }, * }, * ValueInteger: Number("int"), * ValueList: [ * "", * ], * ValueArn: "STRING_VALUE", * }, * }, * CustomerId: "STRING_VALUE", * DisconnectOnCustomerExit: [ // DisconnectOnCustomerExit * "AGENT", * ], * }; * const command = new StartChatContactCommand(input); * const response = await client.send(command); * // { // StartChatContactResponse * // ContactId: "STRING_VALUE", * // ParticipantId: "STRING_VALUE", * // ParticipantToken: "STRING_VALUE", * // ContinuedFromContactId: "STRING_VALUE", * // }; * * ``` * * @param StartChatContactCommandInput - {@link StartChatContactCommandInput} * @returns {@link StartChatContactCommandOutput} * @see {@link StartChatContactCommandInput} for command's `input` shape. * @see {@link StartChatContactCommandOutput} for command's `response` shape. * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. * * @throws {@link InternalServiceException} (server fault) *

Request processing failed because of an error or failure with the service.

* * @throws {@link InvalidParameterException} (client fault) *

One or more of the specified parameters are not valid.

* * @throws {@link InvalidRequestException} (client fault) *

The request is not valid.

* * @throws {@link LimitExceededException} (client fault) *

The allowed limit for the resource has been exceeded.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource was not found.

* * @throws {@link ConnectServiceException} *

Base exception class for all service exceptions from Connect service.

* * * @public */ export declare class StartChatContactCommand extends StartChatContactCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: StartChatContactRequest; output: StartChatContactResponse; }; sdk: { input: StartChatContactCommandInput; output: StartChatContactCommandOutput; }; }; }