Skip to content

Commit e10c8ed

Browse files
author
awstools
committed
feat(client-connect): This release adds the following features: 1) New APIs to manage (create, list, update) task template resources, 2) Updates to startTaskContact API to support task templates, and 3) new TransferContact API to programmatically transfer in-progress tasks via a contact flow.
1 parent fd798b0 commit e10c8ed

34 files changed

+5283
-826
lines changed

clients/client-connect/src/Connect.ts

+277-22
Large diffs are not rendered by default.

clients/client-connect/src/ConnectClient.ts

+18
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ import {
112112
CreateSecurityProfileCommandInput,
113113
CreateSecurityProfileCommandOutput,
114114
} from "./commands/CreateSecurityProfileCommand";
115+
import { CreateTaskTemplateCommandInput, CreateTaskTemplateCommandOutput } from "./commands/CreateTaskTemplateCommand";
115116
import { CreateUseCaseCommandInput, CreateUseCaseCommandOutput } from "./commands/CreateUseCaseCommand";
116117
import { CreateUserCommandInput, CreateUserCommandOutput } from "./commands/CreateUserCommand";
117118
import {
@@ -138,6 +139,7 @@ import {
138139
DeleteSecurityProfileCommandInput,
139140
DeleteSecurityProfileCommandOutput,
140141
} from "./commands/DeleteSecurityProfileCommand";
142+
import { DeleteTaskTemplateCommandInput, DeleteTaskTemplateCommandOutput } from "./commands/DeleteTaskTemplateCommand";
141143
import { DeleteUseCaseCommandInput, DeleteUseCaseCommandOutput } from "./commands/DeleteUseCaseCommand";
142144
import { DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand";
143145
import {
@@ -238,6 +240,7 @@ import {
238240
} from "./commands/GetCurrentMetricDataCommand";
239241
import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
240242
import { GetMetricDataCommandInput, GetMetricDataCommandOutput } from "./commands/GetMetricDataCommand";
243+
import { GetTaskTemplateCommandInput, GetTaskTemplateCommandOutput } from "./commands/GetTaskTemplateCommand";
241244
import { ListAgentStatusesCommandInput, ListAgentStatusesCommandOutput } from "./commands/ListAgentStatusesCommand";
242245
import {
243246
ListApprovedOriginsCommandInput,
@@ -309,6 +312,7 @@ import {
309312
ListTagsForResourceCommandInput,
310313
ListTagsForResourceCommandOutput,
311314
} from "./commands/ListTagsForResourceCommand";
315+
import { ListTaskTemplatesCommandInput, ListTaskTemplatesCommandOutput } from "./commands/ListTaskTemplatesCommand";
312316
import { ListUseCasesCommandInput, ListUseCasesCommandOutput } from "./commands/ListUseCasesCommand";
313317
import {
314318
ListUserHierarchyGroupsCommandInput,
@@ -355,6 +359,7 @@ import {
355359
SuspendContactRecordingCommandOutput,
356360
} from "./commands/SuspendContactRecordingCommand";
357361
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
362+
import { TransferContactCommandInput, TransferContactCommandOutput } from "./commands/TransferContactCommand";
358363
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
359364
import { UpdateAgentStatusCommandInput, UpdateAgentStatusCommandOutput } from "./commands/UpdateAgentStatusCommand";
360365
import {
@@ -441,6 +446,7 @@ import {
441446
UpdateSecurityProfileCommandInput,
442447
UpdateSecurityProfileCommandOutput,
443448
} from "./commands/UpdateSecurityProfileCommand";
449+
import { UpdateTaskTemplateCommandInput, UpdateTaskTemplateCommandOutput } from "./commands/UpdateTaskTemplateCommand";
444450
import {
445451
UpdateUserHierarchyCommandInput,
446452
UpdateUserHierarchyCommandOutput,
@@ -493,6 +499,7 @@ export type ServiceInputTypes =
493499
| CreateQuickConnectCommandInput
494500
| CreateRoutingProfileCommandInput
495501
| CreateSecurityProfileCommandInput
502+
| CreateTaskTemplateCommandInput
496503
| CreateUseCaseCommandInput
497504
| CreateUserCommandInput
498505
| CreateUserHierarchyGroupCommandInput
@@ -504,6 +511,7 @@ export type ServiceInputTypes =
504511
| DeleteIntegrationAssociationCommandInput
505512
| DeleteQuickConnectCommandInput
506513
| DeleteSecurityProfileCommandInput
514+
| DeleteTaskTemplateCommandInput
507515
| DeleteUseCaseCommandInput
508516
| DeleteUserCommandInput
509517
| DeleteUserHierarchyGroupCommandInput
@@ -538,6 +546,7 @@ export type ServiceInputTypes =
538546
| GetCurrentMetricDataCommandInput
539547
| GetFederationTokenCommandInput
540548
| GetMetricDataCommandInput
549+
| GetTaskTemplateCommandInput
541550
| ListAgentStatusesCommandInput
542551
| ListApprovedOriginsCommandInput
543552
| ListBotsCommandInput
@@ -564,6 +573,7 @@ export type ServiceInputTypes =
564573
| ListSecurityProfilePermissionsCommandInput
565574
| ListSecurityProfilesCommandInput
566575
| ListTagsForResourceCommandInput
576+
| ListTaskTemplatesCommandInput
567577
| ListUseCasesCommandInput
568578
| ListUserHierarchyGroupsCommandInput
569579
| ListUsersCommandInput
@@ -583,6 +593,7 @@ export type ServiceInputTypes =
583593
| StopContactStreamingCommandInput
584594
| SuspendContactRecordingCommandInput
585595
| TagResourceCommandInput
596+
| TransferContactCommandInput
586597
| UntagResourceCommandInput
587598
| UpdateAgentStatusCommandInput
588599
| UpdateContactAttributesCommandInput
@@ -609,6 +620,7 @@ export type ServiceInputTypes =
609620
| UpdateRoutingProfileNameCommandInput
610621
| UpdateRoutingProfileQueuesCommandInput
611622
| UpdateSecurityProfileCommandInput
623+
| UpdateTaskTemplateCommandInput
612624
| UpdateUserHierarchyCommandInput
613625
| UpdateUserHierarchyGroupNameCommandInput
614626
| UpdateUserHierarchyStructureCommandInput
@@ -639,6 +651,7 @@ export type ServiceOutputTypes =
639651
| CreateQuickConnectCommandOutput
640652
| CreateRoutingProfileCommandOutput
641653
| CreateSecurityProfileCommandOutput
654+
| CreateTaskTemplateCommandOutput
642655
| CreateUseCaseCommandOutput
643656
| CreateUserCommandOutput
644657
| CreateUserHierarchyGroupCommandOutput
@@ -650,6 +663,7 @@ export type ServiceOutputTypes =
650663
| DeleteIntegrationAssociationCommandOutput
651664
| DeleteQuickConnectCommandOutput
652665
| DeleteSecurityProfileCommandOutput
666+
| DeleteTaskTemplateCommandOutput
653667
| DeleteUseCaseCommandOutput
654668
| DeleteUserCommandOutput
655669
| DeleteUserHierarchyGroupCommandOutput
@@ -684,6 +698,7 @@ export type ServiceOutputTypes =
684698
| GetCurrentMetricDataCommandOutput
685699
| GetFederationTokenCommandOutput
686700
| GetMetricDataCommandOutput
701+
| GetTaskTemplateCommandOutput
687702
| ListAgentStatusesCommandOutput
688703
| ListApprovedOriginsCommandOutput
689704
| ListBotsCommandOutput
@@ -710,6 +725,7 @@ export type ServiceOutputTypes =
710725
| ListSecurityProfilePermissionsCommandOutput
711726
| ListSecurityProfilesCommandOutput
712727
| ListTagsForResourceCommandOutput
728+
| ListTaskTemplatesCommandOutput
713729
| ListUseCasesCommandOutput
714730
| ListUserHierarchyGroupsCommandOutput
715731
| ListUsersCommandOutput
@@ -729,6 +745,7 @@ export type ServiceOutputTypes =
729745
| StopContactStreamingCommandOutput
730746
| SuspendContactRecordingCommandOutput
731747
| TagResourceCommandOutput
748+
| TransferContactCommandOutput
732749
| UntagResourceCommandOutput
733750
| UpdateAgentStatusCommandOutput
734751
| UpdateContactAttributesCommandOutput
@@ -755,6 +772,7 @@ export type ServiceOutputTypes =
755772
| UpdateRoutingProfileNameCommandOutput
756773
| UpdateRoutingProfileQueuesCommandOutput
757774
| UpdateSecurityProfileCommandOutput
775+
| UpdateTaskTemplateCommandOutput
758776
| UpdateUserHierarchyCommandOutput
759777
| UpdateUserHierarchyGroupNameCommandOutput
760778
| UpdateUserHierarchyStructureCommandOutput

clients/client-connect/src/commands/AssociateDefaultVocabularyCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export interface AssociateDefaultVocabularyCommandInput extends AssociateDefault
2323
export interface AssociateDefaultVocabularyCommandOutput extends AssociateDefaultVocabularyResponse, __MetadataBearer {}
2424

2525
/**
26-
* <p>Associates an existing vocabulary as the default. Contact Lens for Amazon Connect uses the vocabulary in post-call and real-time analysis sessions for the given language.</p>
26+
* <p>Associates an existing vocabulary as the default. Contact Lens for Amazon Connect uses the vocabulary in post-call
27+
* and real-time analysis sessions for the given language.</p>
2728
* @example
2829
* Use a bare-bones client and the command you need to make an API call.
2930
* ```javascript
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
16+
import { CreateTaskTemplateRequest, CreateTaskTemplateResponse } from "../models/models_0";
17+
import {
18+
deserializeAws_restJson1CreateTaskTemplateCommand,
19+
serializeAws_restJson1CreateTaskTemplateCommand,
20+
} from "../protocols/Aws_restJson1";
21+
22+
export interface CreateTaskTemplateCommandInput extends CreateTaskTemplateRequest {}
23+
export interface CreateTaskTemplateCommandOutput extends CreateTaskTemplateResponse, __MetadataBearer {}
24+
25+
/**
26+
* <p>Creates a new task template in the specified Amazon Connect instance.</p>
27+
* @example
28+
* Use a bare-bones client and the command you need to make an API call.
29+
* ```javascript
30+
* import { ConnectClient, CreateTaskTemplateCommand } from "@aws-sdk/client-connect"; // ES Modules import
31+
* // const { ConnectClient, CreateTaskTemplateCommand } = require("@aws-sdk/client-connect"); // CommonJS import
32+
* const client = new ConnectClient(config);
33+
* const command = new CreateTaskTemplateCommand(input);
34+
* const response = await client.send(command);
35+
* ```
36+
*
37+
* @see {@link CreateTaskTemplateCommandInput} for command's `input` shape.
38+
* @see {@link CreateTaskTemplateCommandOutput} for command's `response` shape.
39+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
40+
*
41+
*/
42+
export class CreateTaskTemplateCommand extends $Command<
43+
CreateTaskTemplateCommandInput,
44+
CreateTaskTemplateCommandOutput,
45+
ConnectClientResolvedConfig
46+
> {
47+
// Start section: command_properties
48+
// End section: command_properties
49+
50+
constructor(readonly input: CreateTaskTemplateCommandInput) {
51+
// Start section: command_constructor
52+
super();
53+
// End section: command_constructor
54+
}
55+
56+
/**
57+
* @internal
58+
*/
59+
resolveMiddleware(
60+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
61+
configuration: ConnectClientResolvedConfig,
62+
options?: __HttpHandlerOptions
63+
): Handler<CreateTaskTemplateCommandInput, CreateTaskTemplateCommandOutput> {
64+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
65+
66+
const stack = clientStack.concat(this.middlewareStack);
67+
68+
const { logger } = configuration;
69+
const clientName = "ConnectClient";
70+
const commandName = "CreateTaskTemplateCommand";
71+
const handlerExecutionContext: HandlerExecutionContext = {
72+
logger,
73+
clientName,
74+
commandName,
75+
inputFilterSensitiveLog: CreateTaskTemplateRequest.filterSensitiveLog,
76+
outputFilterSensitiveLog: CreateTaskTemplateResponse.filterSensitiveLog,
77+
};
78+
const { requestHandler } = configuration;
79+
return stack.resolve(
80+
(request: FinalizeHandlerArguments<any>) =>
81+
requestHandler.handle(request.request as __HttpRequest, options || {}),
82+
handlerExecutionContext
83+
);
84+
}
85+
86+
private serialize(input: CreateTaskTemplateCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
87+
return serializeAws_restJson1CreateTaskTemplateCommand(input, context);
88+
}
89+
90+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateTaskTemplateCommandOutput> {
91+
return deserializeAws_restJson1CreateTaskTemplateCommand(output, context);
92+
}
93+
94+
// Start section: command_body_extra
95+
// End section: command_body_extra
96+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
16+
import { DeleteTaskTemplateRequest, DeleteTaskTemplateResponse } from "../models/models_0";
17+
import {
18+
deserializeAws_restJson1DeleteTaskTemplateCommand,
19+
serializeAws_restJson1DeleteTaskTemplateCommand,
20+
} from "../protocols/Aws_restJson1";
21+
22+
export interface DeleteTaskTemplateCommandInput extends DeleteTaskTemplateRequest {}
23+
export interface DeleteTaskTemplateCommandOutput extends DeleteTaskTemplateResponse, __MetadataBearer {}
24+
25+
/**
26+
* <p>Deletes the task template.</p>
27+
* @example
28+
* Use a bare-bones client and the command you need to make an API call.
29+
* ```javascript
30+
* import { ConnectClient, DeleteTaskTemplateCommand } from "@aws-sdk/client-connect"; // ES Modules import
31+
* // const { ConnectClient, DeleteTaskTemplateCommand } = require("@aws-sdk/client-connect"); // CommonJS import
32+
* const client = new ConnectClient(config);
33+
* const command = new DeleteTaskTemplateCommand(input);
34+
* const response = await client.send(command);
35+
* ```
36+
*
37+
* @see {@link DeleteTaskTemplateCommandInput} for command's `input` shape.
38+
* @see {@link DeleteTaskTemplateCommandOutput} for command's `response` shape.
39+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
40+
*
41+
*/
42+
export class DeleteTaskTemplateCommand extends $Command<
43+
DeleteTaskTemplateCommandInput,
44+
DeleteTaskTemplateCommandOutput,
45+
ConnectClientResolvedConfig
46+
> {
47+
// Start section: command_properties
48+
// End section: command_properties
49+
50+
constructor(readonly input: DeleteTaskTemplateCommandInput) {
51+
// Start section: command_constructor
52+
super();
53+
// End section: command_constructor
54+
}
55+
56+
/**
57+
* @internal
58+
*/
59+
resolveMiddleware(
60+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
61+
configuration: ConnectClientResolvedConfig,
62+
options?: __HttpHandlerOptions
63+
): Handler<DeleteTaskTemplateCommandInput, DeleteTaskTemplateCommandOutput> {
64+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
65+
66+
const stack = clientStack.concat(this.middlewareStack);
67+
68+
const { logger } = configuration;
69+
const clientName = "ConnectClient";
70+
const commandName = "DeleteTaskTemplateCommand";
71+
const handlerExecutionContext: HandlerExecutionContext = {
72+
logger,
73+
clientName,
74+
commandName,
75+
inputFilterSensitiveLog: DeleteTaskTemplateRequest.filterSensitiveLog,
76+
outputFilterSensitiveLog: DeleteTaskTemplateResponse.filterSensitiveLog,
77+
};
78+
const { requestHandler } = configuration;
79+
return stack.resolve(
80+
(request: FinalizeHandlerArguments<any>) =>
81+
requestHandler.handle(request.request as __HttpRequest, options || {}),
82+
handlerExecutionContext
83+
);
84+
}
85+
86+
private serialize(input: DeleteTaskTemplateCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
87+
return serializeAws_restJson1DeleteTaskTemplateCommand(input, context);
88+
}
89+
90+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteTaskTemplateCommandOutput> {
91+
return deserializeAws_restJson1DeleteTaskTemplateCommand(output, context);
92+
}
93+
94+
// Start section: command_body_extra
95+
// End section: command_body_extra
96+
}

clients/client-connect/src/commands/DisassociatePhoneNumberContactFlowCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export interface DisassociatePhoneNumberContactFlowCommandInput extends Disassoc
2323
export interface DisassociatePhoneNumberContactFlowCommandOutput extends __MetadataBearer {}
2424

2525
/**
26-
* <p>Removes the contact flow association from a phone number claimed to your Amazon Connect instance, if a contact flow association exists.</p>
26+
* <p>Removes the contact flow association from a phone number claimed to your Amazon Connect instance, if
27+
* a contact flow association exists.</p>
2728
* @example
2829
* Use a bare-bones client and the command you need to make an API call.
2930
* ```javascript

0 commit comments

Comments
 (0)