Skip to content

Commit

Permalink
feat(client-connect): Adds relatedContactId field to StartOutboundVoi…
Browse files Browse the repository at this point in the history
…ceContact API input. Introduces PauseContact API and ResumeContact API for Task contacts. Adds pause duration, number of pauses, timestamps for last paused and resumed events to DescribeContact API response. Adds new Rule type and new Rule action.
  • Loading branch information
awstools committed Dec 15, 2023
1 parent a239723 commit 370ac57
Show file tree
Hide file tree
Showing 23 changed files with 2,129 additions and 555 deletions.
16 changes: 16 additions & 0 deletions clients/client-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,14 @@ MonitorContact

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

</details>
<details>
<summary>
PauseContact
</summary>

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

</details>
<details>
<summary>
Expand All @@ -1468,6 +1476,14 @@ ReplicateInstance

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

</details>
<details>
<summary>
ResumeContact
</summary>

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

</details>
<details>
<summary>
Expand Down
34 changes: 34 additions & 0 deletions clients/client-connect/src/Connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,11 @@ import {
MonitorContactCommandInput,
MonitorContactCommandOutput,
} from "./commands/MonitorContactCommand";
import {
PauseContactCommand,
PauseContactCommandInput,
PauseContactCommandOutput,
} from "./commands/PauseContactCommand";
import {
PutUserStatusCommand,
PutUserStatusCommandInput,
Expand All @@ -727,6 +732,11 @@ import {
ReplicateInstanceCommandInput,
ReplicateInstanceCommandOutput,
} from "./commands/ReplicateInstanceCommand";
import {
ResumeContactCommand,
ResumeContactCommandInput,
ResumeContactCommandOutput,
} from "./commands/ResumeContactCommand";
import {
ResumeContactRecordingCommand,
ResumeContactRecordingCommandInput,
Expand Down Expand Up @@ -1224,9 +1234,11 @@ const commands = {
ListViewsCommand,
ListViewVersionsCommand,
MonitorContactCommand,
PauseContactCommand,
PutUserStatusCommand,
ReleasePhoneNumberCommand,
ReplicateInstanceCommand,
ResumeContactCommand,
ResumeContactRecordingCommand,
SearchAvailablePhoneNumbersCommand,
SearchHoursOfOperationsCommand,
Expand Down Expand Up @@ -3716,6 +3728,17 @@ export interface Connect {
cb: (err: any, data?: MonitorContactCommandOutput) => void
): void;

/**
* @see {@link PauseContactCommand}
*/
pauseContact(args: PauseContactCommandInput, options?: __HttpHandlerOptions): Promise<PauseContactCommandOutput>;
pauseContact(args: PauseContactCommandInput, cb: (err: any, data?: PauseContactCommandOutput) => void): void;
pauseContact(
args: PauseContactCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PauseContactCommandOutput) => void
): void;

/**
* @see {@link PutUserStatusCommand}
*/
Expand Down Expand Up @@ -3761,6 +3784,17 @@ export interface Connect {
cb: (err: any, data?: ReplicateInstanceCommandOutput) => void
): void;

/**
* @see {@link ResumeContactCommand}
*/
resumeContact(args: ResumeContactCommandInput, options?: __HttpHandlerOptions): Promise<ResumeContactCommandOutput>;
resumeContact(args: ResumeContactCommandInput, cb: (err: any, data?: ResumeContactCommandOutput) => void): void;
resumeContact(
args: ResumeContactCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ResumeContactCommandOutput) => void
): void;

/**
* @see {@link ResumeContactRecordingCommand}
*/
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 @@ -457,9 +457,11 @@ import { ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUs
import { ListViewsCommandInput, ListViewsCommandOutput } from "./commands/ListViewsCommand";
import { ListViewVersionsCommandInput, ListViewVersionsCommandOutput } from "./commands/ListViewVersionsCommand";
import { MonitorContactCommandInput, MonitorContactCommandOutput } from "./commands/MonitorContactCommand";
import { PauseContactCommandInput, PauseContactCommandOutput } from "./commands/PauseContactCommand";
import { PutUserStatusCommandInput, PutUserStatusCommandOutput } from "./commands/PutUserStatusCommand";
import { ReleasePhoneNumberCommandInput, ReleasePhoneNumberCommandOutput } from "./commands/ReleasePhoneNumberCommand";
import { ReplicateInstanceCommandInput, ReplicateInstanceCommandOutput } from "./commands/ReplicateInstanceCommand";
import { ResumeContactCommandInput, ResumeContactCommandOutput } from "./commands/ResumeContactCommand";
import {
ResumeContactRecordingCommandInput,
ResumeContactRecordingCommandOutput,
Expand Down Expand Up @@ -845,9 +847,11 @@ export type ServiceInputTypes =
| ListViewVersionsCommandInput
| ListViewsCommandInput
| MonitorContactCommandInput
| PauseContactCommandInput
| PutUserStatusCommandInput
| ReleasePhoneNumberCommandInput
| ReplicateInstanceCommandInput
| ResumeContactCommandInput
| ResumeContactRecordingCommandInput
| SearchAvailablePhoneNumbersCommandInput
| SearchHoursOfOperationsCommandInput
Expand Down Expand Up @@ -1079,9 +1083,11 @@ export type ServiceOutputTypes =
| ListViewVersionsCommandOutput
| ListViewsCommandOutput
| MonitorContactCommandOutput
| PauseContactCommandOutput
| PutUserStatusCommandOutput
| ReleasePhoneNumberCommandOutput
| ReplicateInstanceCommandOutput
| ResumeContactCommandOutput
| ResumeContactRecordingCommandOutput
| SearchAvailablePhoneNumbersCommandOutput
| SearchHoursOfOperationsCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface CreateIntegrationAssociationCommandOutput
* IntegrationArn: "STRING_VALUE", // required
* SourceApplicationUrl: "STRING_VALUE",
* SourceApplicationName: "STRING_VALUE",
* SourceType: "SALESFORCE" || "ZENDESK",
* SourceType: "SALESFORCE" || "ZENDESK" || "CASES",
* Tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
Expand Down
32 changes: 30 additions & 2 deletions clients/client-connect/src/commands/CreateRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ export interface CreateRuleCommandOutput extends CreateRuleResponse, __MetadataB
* InstanceId: "STRING_VALUE", // required
* Name: "STRING_VALUE", // required
* TriggerEventSource: { // RuleTriggerEventSource
* EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate", // required
* EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate" || "OnCaseCreate" || "OnCaseUpdate", // required
* IntegrationAssociationId: "STRING_VALUE",
* },
* Function: "STRING_VALUE", // required
* Actions: [ // RuleActions // required
* { // RuleAction
* ActionType: "CREATE_TASK" || "ASSIGN_CONTACT_CATEGORY" || "GENERATE_EVENTBRIDGE_EVENT" || "SEND_NOTIFICATION", // required
* ActionType: "CREATE_TASK" || "ASSIGN_CONTACT_CATEGORY" || "GENERATE_EVENTBRIDGE_EVENT" || "SEND_NOTIFICATION" || "CREATE_CASE" || "UPDATE_CASE" || "END_ASSOCIATED_TASKS", // required
* TaskAction: { // TaskActionDefinition
* Name: "STRING_VALUE", // required
* Description: "STRING_VALUE",
Expand Down Expand Up @@ -86,6 +86,34 @@ export interface CreateRuleCommandOutput extends CreateRuleResponse, __MetadataB
* ],
* },
* },
* CreateCaseAction: { // CreateCaseActionDefinition
* Fields: [ // FieldValues // required
* { // FieldValue
* Id: "STRING_VALUE", // required
* Value: { // FieldValueUnion
* BooleanValue: true || false,
* DoubleValue: Number("double"),
* EmptyValue: {},
* StringValue: "STRING_VALUE",
* },
* },
* ],
* TemplateId: "STRING_VALUE", // required
* },
* UpdateCaseAction: { // UpdateCaseActionDefinition
* Fields: [ // required
* {
* Id: "STRING_VALUE", // required
* Value: {
* BooleanValue: true || false,
* DoubleValue: Number("double"),
* EmptyValue: {},
* StringValue: "STRING_VALUE",
* },
* },
* ],
* },
* EndAssociatedTasksAction: {},
* },
* ],
* PublishStatus: "DRAFT" || "PUBLISHED", // required
Expand Down
5 changes: 5 additions & 0 deletions clients/client-connect/src/commands/DescribeContactCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,15 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _
* // AgentInfo: { // AgentInfo
* // Id: "STRING_VALUE",
* // ConnectedToAgentTimestamp: new Date("TIMESTAMP"),
* // AgentPauseDurationInSeconds: Number("int"),
* // },
* // InitiationTimestamp: new Date("TIMESTAMP"),
* // DisconnectTimestamp: new Date("TIMESTAMP"),
* // LastUpdateTimestamp: new Date("TIMESTAMP"),
* // LastPausedTimestamp: new Date("TIMESTAMP"),
* // LastResumedTimestamp: new Date("TIMESTAMP"),
* // TotalPauseCount: Number("int"),
* // TotalPauseDurationInSeconds: Number("int"),
* // ScheduledTimestamp: new Date("TIMESTAMP"),
* // RelatedContactId: "STRING_VALUE",
* // WisdomInfo: { // WisdomInfo
Expand Down
3 changes: 2 additions & 1 deletion clients/client-connect/src/commands/DescribePromptCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
} from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { DescribePromptRequest, DescribePromptResponse } from "../models/models_0";
import { DescribePromptRequest } from "../models/models_0";
import { DescribePromptResponse } from "../models/models_1";
import { de_DescribePromptCommand, se_DescribePromptCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { DescribeQueueRequest, DescribeQueueResponse } from "../models/models_0";
import { DescribeQueueRequest, DescribeQueueResponse } from "../models/models_1";
import { de_DescribeQueueCommand, se_DescribeQueueCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
32 changes: 30 additions & 2 deletions clients/client-connect/src/commands/DescribeRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ export interface DescribeRuleCommandOutput extends DescribeRuleResponse, __Metad
* // RuleId: "STRING_VALUE", // required
* // RuleArn: "STRING_VALUE", // required
* // TriggerEventSource: { // RuleTriggerEventSource
* // EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate", // required
* // EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate" || "OnCaseCreate" || "OnCaseUpdate", // required
* // IntegrationAssociationId: "STRING_VALUE",
* // },
* // Function: "STRING_VALUE", // required
* // Actions: [ // RuleActions // required
* // { // RuleAction
* // ActionType: "CREATE_TASK" || "ASSIGN_CONTACT_CATEGORY" || "GENERATE_EVENTBRIDGE_EVENT" || "SEND_NOTIFICATION", // required
* // ActionType: "CREATE_TASK" || "ASSIGN_CONTACT_CATEGORY" || "GENERATE_EVENTBRIDGE_EVENT" || "SEND_NOTIFICATION" || "CREATE_CASE" || "UPDATE_CASE" || "END_ASSOCIATED_TASKS", // required
* // TaskAction: { // TaskActionDefinition
* // Name: "STRING_VALUE", // required
* // Description: "STRING_VALUE",
Expand Down Expand Up @@ -92,6 +92,34 @@ export interface DescribeRuleCommandOutput extends DescribeRuleResponse, __Metad
* // ],
* // },
* // },
* // CreateCaseAction: { // CreateCaseActionDefinition
* // Fields: [ // FieldValues // required
* // { // FieldValue
* // Id: "STRING_VALUE", // required
* // Value: { // FieldValueUnion
* // BooleanValue: true || false,
* // DoubleValue: Number("double"),
* // EmptyValue: {},
* // StringValue: "STRING_VALUE",
* // },
* // },
* // ],
* // TemplateId: "STRING_VALUE", // required
* // },
* // UpdateCaseAction: { // UpdateCaseActionDefinition
* // Fields: [ // required
* // {
* // Id: "STRING_VALUE", // required
* // Value: {
* // BooleanValue: true || false,
* // DoubleValue: Number("double"),
* // EmptyValue: {},
* // StringValue: "STRING_VALUE",
* // },
* // },
* // ],
* // },
* // EndAssociatedTasksAction: {},
* // },
* // ],
* // PublishStatus: "DRAFT" || "PUBLISHED", // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface ListIntegrationAssociationsCommandOutput
* // IntegrationArn: "STRING_VALUE",
* // SourceApplicationUrl: "STRING_VALUE",
* // SourceApplicationName: "STRING_VALUE",
* // SourceType: "SALESFORCE" || "ZENDESK",
* // SourceType: "SALESFORCE" || "ZENDESK" || "CASES",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
6 changes: 3 additions & 3 deletions clients/client-connect/src/commands/ListRulesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface ListRulesCommandOutput extends ListRulesResponse, __MetadataBea
* const input = { // ListRulesRequest
* InstanceId: "STRING_VALUE", // required
* PublishStatus: "DRAFT" || "PUBLISHED",
* EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate",
* EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate" || "OnCaseCreate" || "OnCaseUpdate",
* MaxResults: Number("int"),
* NextToken: "STRING_VALUE",
* };
Expand All @@ -59,11 +59,11 @@ export interface ListRulesCommandOutput extends ListRulesResponse, __MetadataBea
* // Name: "STRING_VALUE", // required
* // RuleId: "STRING_VALUE", // required
* // RuleArn: "STRING_VALUE", // required
* // EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate", // required
* // EventSourceName: "OnPostCallAnalysisAvailable" || "OnRealTimeCallAnalysisAvailable" || "OnRealTimeChatAnalysisAvailable" || "OnPostChatAnalysisAvailable" || "OnZendeskTicketCreate" || "OnZendeskTicketStatusUpdate" || "OnSalesforceCaseCreate" || "OnContactEvaluationSubmit" || "OnMetricDataUpdate" || "OnCaseCreate" || "OnCaseUpdate", // required
* // PublishStatus: "DRAFT" || "PUBLISHED", // required
* // ActionSummaries: [ // ActionSummaries // required
* // { // ActionSummary
* // ActionType: "CREATE_TASK" || "ASSIGN_CONTACT_CATEGORY" || "GENERATE_EVENTBRIDGE_EVENT" || "SEND_NOTIFICATION", // required
* // ActionType: "CREATE_TASK" || "ASSIGN_CONTACT_CATEGORY" || "GENERATE_EVENTBRIDGE_EVENT" || "SEND_NOTIFICATION" || "CREATE_CASE" || "UPDATE_CASE" || "END_ASSOCIATED_TASKS", // required
* // },
* // ],
* // CreatedTime: new Date("TIMESTAMP"), // required
Expand Down
Loading

0 comments on commit 370ac57

Please sign in to comment.