Skip to content

Commit

Permalink
feat(client-connect): Amazon Connect introduces StartOutboundChatCont…
Browse files Browse the repository at this point in the history
…act API allowing customers to initiate outbound chat contacts
  • Loading branch information
awstools committed Sep 30, 2024
1 parent 2491872 commit 54f160e
Show file tree
Hide file tree
Showing 17 changed files with 603 additions and 40 deletions.
8 changes: 8 additions & 0 deletions clients/client-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,14 @@ StartContactStreaming

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/StartContactStreamingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartContactStreamingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartContactStreamingCommandOutput/)

</details>
<details>
<summary>
StartOutboundChatContact
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/StartOutboundChatContactCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartOutboundChatContactCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartOutboundChatContactCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-connect/src/Connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,11 @@ import {
StartContactStreamingCommandInput,
StartContactStreamingCommandOutput,
} from "./commands/StartContactStreamingCommand";
import {
StartOutboundChatContactCommand,
StartOutboundChatContactCommandInput,
StartOutboundChatContactCommandOutput,
} from "./commands/StartOutboundChatContactCommand";
import {
StartOutboundVoiceContactCommand,
StartOutboundVoiceContactCommandInput,
Expand Down Expand Up @@ -1395,6 +1400,7 @@ const commands = {
StartContactEvaluationCommand,
StartContactRecordingCommand,
StartContactStreamingCommand,
StartOutboundChatContactCommand,
StartOutboundVoiceContactCommand,
StartTaskContactCommand,
StartWebRTCContactCommand,
Expand Down Expand Up @@ -4530,6 +4536,23 @@ export interface Connect {
cb: (err: any, data?: StartContactStreamingCommandOutput) => void
): void;

/**
* @see {@link StartOutboundChatContactCommand}
*/
startOutboundChatContact(
args: StartOutboundChatContactCommandInput,
options?: __HttpHandlerOptions
): Promise<StartOutboundChatContactCommandOutput>;
startOutboundChatContact(
args: StartOutboundChatContactCommandInput,
cb: (err: any, data?: StartOutboundChatContactCommandOutput) => void
): void;
startOutboundChatContact(
args: StartOutboundChatContactCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartOutboundChatContactCommandOutput) => void
): void;

/**
* @see {@link StartOutboundVoiceContactCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-connect/src/ConnectClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ import {
StartContactStreamingCommandInput,
StartContactStreamingCommandOutput,
} from "./commands/StartContactStreamingCommand";
import {
StartOutboundChatContactCommandInput,
StartOutboundChatContactCommandOutput,
} from "./commands/StartOutboundChatContactCommand";
import {
StartOutboundVoiceContactCommandInput,
StartOutboundVoiceContactCommandOutput,
Expand Down Expand Up @@ -977,6 +981,7 @@ export type ServiceInputTypes =
| StartContactEvaluationCommandInput
| StartContactRecordingCommandInput
| StartContactStreamingCommandInput
| StartOutboundChatContactCommandInput
| StartOutboundVoiceContactCommandInput
| StartTaskContactCommandInput
| StartWebRTCContactCommandInput
Expand Down Expand Up @@ -1237,6 +1242,7 @@ export type ServiceOutputTypes =
| StartContactEvaluationCommandOutput
| StartContactRecordingCommandOutput
| StartContactStreamingCommandOutput
| StartOutboundChatContactCommandOutput
| StartOutboundVoiceContactCommandOutput
| StartTaskContactCommandOutput
| StartWebRTCContactCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export interface AssociateAnalyticsDataSetCommandInput extends AssociateAnalytic
export interface AssociateAnalyticsDataSetCommandOutput extends AssociateAnalyticsDataSetResponse, __MetadataBearer {}

/**
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
* <p>Associates the specified dataset for a Amazon Connect instance with the target account.
* <p>Associates the specified dataset for a Amazon Connect instance with the target account.
* You can associate only one dataset in a single call.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export interface BatchAssociateAnalyticsDataSetCommandOutput
__MetadataBearer {}

/**
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
* <p>Associates a list of analytics datasets for a given Amazon Connect instance to a target
* <p>Associates a list of analytics datasets for a given Amazon Connect instance to a target
* account. You can associate multiple datasets in a single call.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export interface BatchDisassociateAnalyticsDataSetCommandOutput
__MetadataBearer {}

/**
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
* <p>Removes a list of analytics datasets associated with a given Amazon Connect instance.
* <p>Removes a list of analytics datasets associated with a given Amazon Connect instance.
* You can disassociate multiple datasets in a single call.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
4 changes: 2 additions & 2 deletions clients/client-connect/src/commands/BatchPutContactCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export interface BatchPutContactCommandOutput extends BatchPutContactResponse, _
* ContactDataRequestList: [ // ContactDataRequestList // required
* { // ContactDataRequest
* SystemEndpoint: { // Endpoint
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW",
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
* Address: "STRING_VALUE",
* },
* CustomerEndpoint: {
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW",
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
* Address: "STRING_VALUE",
* },
* RequestIdentifier: "STRING_VALUE",
Expand Down
7 changes: 3 additions & 4 deletions clients/client-connect/src/commands/DescribeContactCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
* <p>Describes the specified contact. </p>
* <important>
* <p>Contact information remains available in Amazon Connect for 24 months, and then it is
* deleted.</p>
* <p>Only data from November 12, 2021, and later is returned by this
* API.</p>
* <p>Contact information remains available in Amazon Connect for 24 months from the
* InitiationTimestamp, and then it is deleted. Only contact information that is available in
* Amazon Connect is returned by this API</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export interface DisassociateAnalyticsDataSetCommandInput extends DisassociateAn
export interface DisassociateAnalyticsDataSetCommandOutput extends __MetadataBearer {}

/**
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
* <p>Removes the dataset ID associated with a given Amazon Connect instance.</p>
* <p>Removes the dataset ID associated with a given Amazon Connect instance.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export interface ListAnalyticsDataAssociationsCommandOutput
__MetadataBearer {}

/**
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
* <p>Lists the association status of requested dataset ID for a given Amazon Connect
* <p>Lists the association status of requested dataset ID for a given Amazon Connect
* instance.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
168 changes: 168 additions & 0 deletions clients/client-connect/src/commands/StartOutboundChatContactCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { StartOutboundChatContactRequest, StartOutboundChatContactResponse } from "../models/models_2";
import { de_StartOutboundChatContactCommand, se_StartOutboundChatContactCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link StartOutboundChatContactCommand}.
*/
export interface StartOutboundChatContactCommandInput extends StartOutboundChatContactRequest {}
/**
* @public
*
* The output of {@link StartOutboundChatContactCommand}.
*/
export interface StartOutboundChatContactCommandOutput extends StartOutboundChatContactResponse, __MetadataBearer {}

/**
* <p>Initiates a new outbound SMS contact to a customer. Response of this API provides the
* ContactId of the outbound SMS contact created.</p>
* <p>
* <b>SourceEndpoint</b> only supports Endpoints with
* <code>CONNECT_PHONENUMBER_ARN</code> as Type and <b>DestinationEndpoint</b> only supports Endpoints with <code>TELEPHONE_NUMBER</code> as
* Type. <b>ContactFlowId</b> initiates the flow to manage the new SMS
* contact created.</p>
* <p>This API can be used to initiate outbound SMS contacts for an agent or it can also deflect
* an ongoing contact to an outbound SMS contact by using the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundChatContact.html">StartOutboundChatContact</a> Flow Action.</p>
* <p>For more information about using SMS in Amazon Connect, see the following topics in the
* <i>Amazon Connect Administrator Guide</i>:</p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-sms-messaging.html">Set
* up SMS messaging</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/adminguide/sms-number.html">Request an
* SMS-enabled phone number through AWS End User Messaging SMS</a>
* </p>
* </li>
* </ul>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ConnectClient, StartOutboundChatContactCommand } from "@aws-sdk/client-connect"; // ES Modules import
* // const { ConnectClient, StartOutboundChatContactCommand } = require("@aws-sdk/client-connect"); // CommonJS import
* const client = new ConnectClient(config);
* const input = { // StartOutboundChatContactRequest
* SourceEndpoint: { // Endpoint
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
* Address: "STRING_VALUE",
* },
* DestinationEndpoint: {
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
* Address: "STRING_VALUE",
* },
* InstanceId: "STRING_VALUE", // required
* SegmentAttributes: { // SegmentAttributes // required
* "<keys>": { // SegmentAttributeValue
* ValueString: "STRING_VALUE",
* },
* },
* Attributes: { // Attributes
* "<keys>": "STRING_VALUE",
* },
* ContactFlowId: "STRING_VALUE", // required
* ChatDurationInMinutes: Number("int"),
* ParticipantDetails: { // ParticipantDetails
* DisplayName: "STRING_VALUE", // required
* },
* InitialSystemMessage: { // ChatMessage
* ContentType: "STRING_VALUE", // required
* Content: "STRING_VALUE", // required
* },
* RelatedContactId: "STRING_VALUE",
* SupportedMessagingContentTypes: [ // SupportedMessagingContentTypes
* "STRING_VALUE",
* ],
* ClientToken: "STRING_VALUE",
* };
* const command = new StartOutboundChatContactCommand(input);
* const response = await client.send(command);
* // { // StartOutboundChatContactResponse
* // ContactId: "STRING_VALUE",
* // };
*
* ```
*
* @param StartOutboundChatContactCommandInput - {@link StartOutboundChatContactCommandInput}
* @returns {@link StartOutboundChatContactCommandOutput}
* @see {@link StartOutboundChatContactCommandInput} for command's `input` shape.
* @see {@link StartOutboundChatContactCommandOutput} for command's `response` shape.
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient permissions to perform this action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>Operation cannot be performed at this time as there is a conflict with another operation or
* contact state.</p>
*
* @throws {@link InternalServiceException} (server fault)
* <p>Request processing failed because of an error or failure with the service.</p>
*
* @throws {@link InvalidRequestException} (client fault)
* <p>The request is not valid.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>The allowed limit for the resource has been exceeded.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource was not found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The throttling limit has been exceeded.</p>
*
* @throws {@link ConnectServiceException}
* <p>Base exception class for all service exceptions from Connect service.</p>
*
* @public
*/
export class StartOutboundChatContactCommand extends $Command
.classBuilder<
StartOutboundChatContactCommandInput,
StartOutboundChatContactCommandOutput,
ConnectClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonConnectService", "StartOutboundChatContact", {})
.n("ConnectClient", "StartOutboundChatContactCommand")
.f(void 0, void 0)
.ser(se_StartOutboundChatContactCommand)
.de(de_StartOutboundChatContactCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: StartOutboundChatContactRequest;
output: StartOutboundChatContactResponse;
};
sdk: {
input: StartOutboundChatContactCommandInput;
output: StartOutboundChatContactCommandOutput;
};
};
}
1 change: 1 addition & 0 deletions clients/client-connect/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export * from "./StartChatContactCommand";
export * from "./StartContactEvaluationCommand";
export * from "./StartContactRecordingCommand";
export * from "./StartContactStreamingCommand";
export * from "./StartOutboundChatContactCommand";
export * from "./StartOutboundVoiceContactCommand";
export * from "./StartTaskContactCommand";
export * from "./StartWebRTCContactCommand";
Expand Down
3 changes: 2 additions & 1 deletion clients/client-connect/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,7 @@ export interface Campaign {
* @enum
*/
export const EndpointType = {
CONNECT_PHONENUMBER_ARN: "CONNECT_PHONENUMBER_ARN",
CONTACT_FLOW: "CONTACT_FLOW",
TELEPHONE_NUMBER: "TELEPHONE_NUMBER",
VOIP: "VOIP",
Expand Down Expand Up @@ -2955,7 +2956,7 @@ export type NumericQuestionPropertyAutomationLabel =
* <li>
* <p> Duration labels, such as <code>NON_TALK_TIME</code>, <code>CONTACT_DURATION</code>,
* <code>AGENT_INTERACTION_DURATION</code>, <code>CUSTOMER_HOLD_TIME</code> have a minimum value
* of 0 and maximum value of 28800.</p>
* of 0 and maximum value of 63072000.</p>
* </li>
* <li>
* <p>Percentages have a minimum value of 0 and maximum value of 100. </p>
Expand Down
Loading

0 comments on commit 54f160e

Please sign in to comment.