Skip to content

Commit 3dbdb5f

Browse files
author
awstools
committed
feat(client-connect): Adds supports for manual contact picking (WorkList) operations on Routing Profiles, Agent Management and SearchContacts APIs.
1 parent 8ddf547 commit 3dbdb5f

35 files changed

+2624
-972
lines changed

clients/client-connect/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,14 @@ AssociateBot
257257

258258
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/AssociateBotCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/AssociateBotCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/AssociateBotCommandOutput/)
259259

260+
</details>
261+
<details>
262+
<summary>
263+
AssociateContactWithUser
264+
</summary>
265+
266+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/AssociateContactWithUserCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/AssociateContactWithUserCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/AssociateContactWithUserCommandOutput/)
267+
260268
</details>
261269
<details>
262270
<summary>
@@ -1553,6 +1561,14 @@ ListRealtimeContactAnalysisSegmentsV2
15531561

15541562
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/ListRealtimeContactAnalysisSegmentsV2Command/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/ListRealtimeContactAnalysisSegmentsV2CommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/ListRealtimeContactAnalysisSegmentsV2CommandOutput/)
15551563

1564+
</details>
1565+
<details>
1566+
<summary>
1567+
ListRoutingProfileManualAssignmentQueues
1568+
</summary>
1569+
1570+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/ListRoutingProfileManualAssignmentQueuesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/ListRoutingProfileManualAssignmentQueuesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/ListRoutingProfileManualAssignmentQueuesCommandOutput/)
1571+
15561572
</details>
15571573
<details>
15581574
<summary>

clients/client-connect/src/Connect.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ import {
2222
AssociateBotCommandInput,
2323
AssociateBotCommandOutput,
2424
} from "./commands/AssociateBotCommand";
25+
import {
26+
AssociateContactWithUserCommand,
27+
AssociateContactWithUserCommandInput,
28+
AssociateContactWithUserCommandOutput,
29+
} from "./commands/AssociateContactWithUserCommand";
2530
import {
2631
AssociateDefaultVocabularyCommand,
2732
AssociateDefaultVocabularyCommandInput,
@@ -784,6 +789,11 @@ import {
784789
ListRealtimeContactAnalysisSegmentsV2CommandInput,
785790
ListRealtimeContactAnalysisSegmentsV2CommandOutput,
786791
} from "./commands/ListRealtimeContactAnalysisSegmentsV2Command";
792+
import {
793+
ListRoutingProfileManualAssignmentQueuesCommand,
794+
ListRoutingProfileManualAssignmentQueuesCommandInput,
795+
ListRoutingProfileManualAssignmentQueuesCommandOutput,
796+
} from "./commands/ListRoutingProfileManualAssignmentQueuesCommand";
787797
import {
788798
ListRoutingProfileQueuesCommand,
789799
ListRoutingProfileQueuesCommandInput,
@@ -1344,6 +1354,7 @@ const commands = {
13441354
AssociateAnalyticsDataSetCommand,
13451355
AssociateApprovedOriginCommand,
13461356
AssociateBotCommand,
1357+
AssociateContactWithUserCommand,
13471358
AssociateDefaultVocabularyCommand,
13481359
AssociateFlowCommand,
13491360
AssociateInstanceStorageConfigCommand,
@@ -1506,6 +1517,7 @@ const commands = {
15061517
ListQueuesCommand,
15071518
ListQuickConnectsCommand,
15081519
ListRealtimeContactAnalysisSegmentsV2Command,
1520+
ListRoutingProfileManualAssignmentQueuesCommand,
15091521
ListRoutingProfileQueuesCommand,
15101522
ListRoutingProfilesCommand,
15111523
ListRulesCommand,
@@ -1688,6 +1700,23 @@ export interface Connect {
16881700
cb: (err: any, data?: AssociateBotCommandOutput) => void
16891701
): void;
16901702

1703+
/**
1704+
* @see {@link AssociateContactWithUserCommand}
1705+
*/
1706+
associateContactWithUser(
1707+
args: AssociateContactWithUserCommandInput,
1708+
options?: __HttpHandlerOptions
1709+
): Promise<AssociateContactWithUserCommandOutput>;
1710+
associateContactWithUser(
1711+
args: AssociateContactWithUserCommandInput,
1712+
cb: (err: any, data?: AssociateContactWithUserCommandOutput) => void
1713+
): void;
1714+
associateContactWithUser(
1715+
args: AssociateContactWithUserCommandInput,
1716+
options: __HttpHandlerOptions,
1717+
cb: (err: any, data?: AssociateContactWithUserCommandOutput) => void
1718+
): void;
1719+
16911720
/**
16921721
* @see {@link AssociateDefaultVocabularyCommand}
16931722
*/
@@ -4264,6 +4293,23 @@ export interface Connect {
42644293
cb: (err: any, data?: ListRealtimeContactAnalysisSegmentsV2CommandOutput) => void
42654294
): void;
42664295

4296+
/**
4297+
* @see {@link ListRoutingProfileManualAssignmentQueuesCommand}
4298+
*/
4299+
listRoutingProfileManualAssignmentQueues(
4300+
args: ListRoutingProfileManualAssignmentQueuesCommandInput,
4301+
options?: __HttpHandlerOptions
4302+
): Promise<ListRoutingProfileManualAssignmentQueuesCommandOutput>;
4303+
listRoutingProfileManualAssignmentQueues(
4304+
args: ListRoutingProfileManualAssignmentQueuesCommandInput,
4305+
cb: (err: any, data?: ListRoutingProfileManualAssignmentQueuesCommandOutput) => void
4306+
): void;
4307+
listRoutingProfileManualAssignmentQueues(
4308+
args: ListRoutingProfileManualAssignmentQueuesCommandInput,
4309+
options: __HttpHandlerOptions,
4310+
cb: (err: any, data?: ListRoutingProfileManualAssignmentQueuesCommandOutput) => void
4311+
): void;
4312+
42674313
/**
42684314
* @see {@link ListRoutingProfileQueuesCommand}
42694315
*/

clients/client-connect/src/ConnectClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ import {
6666
AssociateApprovedOriginCommandOutput,
6767
} from "./commands/AssociateApprovedOriginCommand";
6868
import { AssociateBotCommandInput, AssociateBotCommandOutput } from "./commands/AssociateBotCommand";
69+
import {
70+
AssociateContactWithUserCommandInput,
71+
AssociateContactWithUserCommandOutput,
72+
} from "./commands/AssociateContactWithUserCommand";
6973
import {
7074
AssociateDefaultVocabularyCommandInput,
7175
AssociateDefaultVocabularyCommandOutput,
@@ -516,6 +520,10 @@ import {
516520
ListRealtimeContactAnalysisSegmentsV2CommandInput,
517521
ListRealtimeContactAnalysisSegmentsV2CommandOutput,
518522
} from "./commands/ListRealtimeContactAnalysisSegmentsV2Command";
523+
import {
524+
ListRoutingProfileManualAssignmentQueuesCommandInput,
525+
ListRoutingProfileManualAssignmentQueuesCommandOutput,
526+
} from "./commands/ListRoutingProfileManualAssignmentQueuesCommand";
519527
import {
520528
ListRoutingProfileQueuesCommandInput,
521529
ListRoutingProfileQueuesCommandOutput,
@@ -877,6 +885,7 @@ export type ServiceInputTypes =
877885
| AssociateAnalyticsDataSetCommandInput
878886
| AssociateApprovedOriginCommandInput
879887
| AssociateBotCommandInput
888+
| AssociateContactWithUserCommandInput
880889
| AssociateDefaultVocabularyCommandInput
881890
| AssociateFlowCommandInput
882891
| AssociateInstanceStorageConfigCommandInput
@@ -1039,6 +1048,7 @@ export type ServiceInputTypes =
10391048
| ListQueuesCommandInput
10401049
| ListQuickConnectsCommandInput
10411050
| ListRealtimeContactAnalysisSegmentsV2CommandInput
1051+
| ListRoutingProfileManualAssignmentQueuesCommandInput
10421052
| ListRoutingProfileQueuesCommandInput
10431053
| ListRoutingProfilesCommandInput
10441054
| ListRulesCommandInput
@@ -1165,6 +1175,7 @@ export type ServiceOutputTypes =
11651175
| AssociateAnalyticsDataSetCommandOutput
11661176
| AssociateApprovedOriginCommandOutput
11671177
| AssociateBotCommandOutput
1178+
| AssociateContactWithUserCommandOutput
11681179
| AssociateDefaultVocabularyCommandOutput
11691180
| AssociateFlowCommandOutput
11701181
| AssociateInstanceStorageConfigCommandOutput
@@ -1327,6 +1338,7 @@ export type ServiceOutputTypes =
13271338
| ListQueuesCommandOutput
13281339
| ListQuickConnectsCommandOutput
13291340
| ListRealtimeContactAnalysisSegmentsV2CommandOutput
1341+
| ListRoutingProfileManualAssignmentQueuesCommandOutput
13301342
| ListRoutingProfileQueuesCommandOutput
13311343
| ListRoutingProfilesCommandOutput
13321344
| ListRulesCommandOutput
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { AssociateContactWithUserRequest, AssociateContactWithUserResponse } from "../models/models_0";
10+
import { de_AssociateContactWithUserCommand, se_AssociateContactWithUserCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link AssociateContactWithUserCommand}.
21+
*/
22+
export interface AssociateContactWithUserCommandInput extends AssociateContactWithUserRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link AssociateContactWithUserCommand}.
27+
*/
28+
export interface AssociateContactWithUserCommandOutput extends AssociateContactWithUserResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Associates a queued contact with an agent.</p>
32+
* <p>
33+
* <b>Use cases</b>
34+
* </p>
35+
* <p>Following are common uses cases for this API:</p>
36+
* <ul>
37+
* <li>
38+
* <p>Custom contact routing. You can build custom contact routing mechanisms beyond the default
39+
* system routing in Amazon Connect. You can create tailored contact distribution logic that
40+
* offers queued contacts directly to specific agents.</p>
41+
* </li>
42+
* <li>
43+
* <p>Manual contact assignment. You can programmatically assign queued contacts to available users. This
44+
* provides flexibility to contact centers that require manual oversight or specialized routing
45+
* workflows outside of standard queue management.</p>
46+
* <p>For information about how manual contact assignment works in the agent workspace, see the <a href="https://docs.aws.amazon.com/connect/latest/adminguide/worklist-app.html">Access the Worklist app in the Amazon Connect agent workspace</a> in the <i>Amazon Connect Administrator
47+
* Guide</i>. </p>
48+
* </li>
49+
* </ul>
50+
* <p>
51+
* <b>Important things to know</b>
52+
* </p>
53+
* <ul>
54+
* <li>
55+
* <p>Use this API chat/SMS, email, and task contacts. It does not support voice
56+
* contacts.</p>
57+
* </li>
58+
* <li>
59+
* <p>Use it to associate contacts with users regardless of their current state, including
60+
* custom states. Ensure your application logic accounts for user availability before making
61+
* associations.</p>
62+
* </li>
63+
* <li>
64+
* <p>It honors the IAM context key <code>connect:PreferredUserArn</code> to prevent
65+
* unauthorized contact associations.</p>
66+
* </li>
67+
* <li>
68+
* <p>It respects the IAM context key <code>connect:PreferredUserArn</code> to enforce
69+
* authorization controls and prevent unauthorized contact associations. Verify that your IAM
70+
* policies are properly configured to support your intended use cases.</p>
71+
* </li>
72+
* </ul>
73+
* <p>
74+
* <b>Endpoints</b>: See <a href="https://docs.aws.amazon.com/general/latest/gr/connect_region.html">Amazon Connect endpoints and
75+
* quotas</a>.</p>
76+
* @example
77+
* Use a bare-bones client and the command you need to make an API call.
78+
* ```javascript
79+
* import { ConnectClient, AssociateContactWithUserCommand } from "@aws-sdk/client-connect"; // ES Modules import
80+
* // const { ConnectClient, AssociateContactWithUserCommand } = require("@aws-sdk/client-connect"); // CommonJS import
81+
* // import type { ConnectClientConfig } from "@aws-sdk/client-connect";
82+
* const config = {}; // type is ConnectClientConfig
83+
* const client = new ConnectClient(config);
84+
* const input = { // AssociateContactWithUserRequest
85+
* InstanceId: "STRING_VALUE", // required
86+
* ContactId: "STRING_VALUE", // required
87+
* UserId: "STRING_VALUE", // required
88+
* };
89+
* const command = new AssociateContactWithUserCommand(input);
90+
* const response = await client.send(command);
91+
* // {};
92+
*
93+
* ```
94+
*
95+
* @param AssociateContactWithUserCommandInput - {@link AssociateContactWithUserCommandInput}
96+
* @returns {@link AssociateContactWithUserCommandOutput}
97+
* @see {@link AssociateContactWithUserCommandInput} for command's `input` shape.
98+
* @see {@link AssociateContactWithUserCommandOutput} for command's `response` shape.
99+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
100+
*
101+
* @throws {@link AccessDeniedException} (client fault)
102+
* <p>You do not have sufficient permissions to perform this action.</p>
103+
*
104+
* @throws {@link InternalServiceException} (server fault)
105+
* <p>Request processing failed because of an error or failure with the service.</p>
106+
*
107+
* @throws {@link InvalidParameterException} (client fault)
108+
* <p>One or more of the specified parameters are not valid.</p>
109+
*
110+
* @throws {@link InvalidRequestException} (client fault)
111+
* <p>The request is not valid.</p>
112+
*
113+
* @throws {@link ResourceNotFoundException} (client fault)
114+
* <p>The specified resource was not found.</p>
115+
*
116+
* @throws {@link ThrottlingException} (client fault)
117+
* <p>The throttling limit has been exceeded.</p>
118+
*
119+
* @throws {@link ConnectServiceException}
120+
* <p>Base exception class for all service exceptions from Connect service.</p>
121+
*
122+
*
123+
* @public
124+
*/
125+
export class AssociateContactWithUserCommand extends $Command
126+
.classBuilder<
127+
AssociateContactWithUserCommandInput,
128+
AssociateContactWithUserCommandOutput,
129+
ConnectClientResolvedConfig,
130+
ServiceInputTypes,
131+
ServiceOutputTypes
132+
>()
133+
.ep(commonParams)
134+
.m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) {
135+
return [
136+
getSerdePlugin(config, this.serialize, this.deserialize),
137+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
138+
];
139+
})
140+
.s("AmazonConnectService", "AssociateContactWithUser", {})
141+
.n("ConnectClient", "AssociateContactWithUserCommand")
142+
.f(void 0, void 0)
143+
.ser(se_AssociateContactWithUserCommand)
144+
.de(de_AssociateContactWithUserCommand)
145+
.build() {
146+
/** @internal type navigation helper, not in runtime. */
147+
protected declare static __types: {
148+
api: {
149+
input: AssociateContactWithUserRequest;
150+
output: {};
151+
};
152+
sdk: {
153+
input: AssociateContactWithUserCommandInput;
154+
output: AssociateContactWithUserCommandOutput;
155+
};
156+
};
157+
}

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface AssociateRoutingProfileQueuesCommandOutput extends __MetadataBe
4343
* const input = { // AssociateRoutingProfileQueuesRequest
4444
* InstanceId: "STRING_VALUE", // required
4545
* RoutingProfileId: "STRING_VALUE", // required
46-
* QueueConfigs: [ // RoutingProfileQueueConfigList // required
46+
* QueueConfigs: [ // RoutingProfileQueueConfigList
4747
* { // RoutingProfileQueueConfig
4848
* QueueReference: { // RoutingProfileQueueReference
4949
* QueueId: "STRING_VALUE", // required
@@ -53,6 +53,14 @@ export interface AssociateRoutingProfileQueuesCommandOutput extends __MetadataBe
5353
* Delay: Number("int"), // required
5454
* },
5555
* ],
56+
* ManualAssignmentQueueConfigs: [ // RoutingProfileManualAssignmentQueueConfigList
57+
* { // RoutingProfileManualAssignmentQueueConfig
58+
* QueueReference: {
59+
* QueueId: "STRING_VALUE", // required
60+
* Channel: "VOICE" || "CHAT" || "TASK" || "EMAIL", // required
61+
* },
62+
* },
63+
* ],
5664
* };
5765
* const command = new AssociateRoutingProfileQueuesCommand(input);
5866
* const response = await client.send(command);

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ export interface CreateRoutingProfileCommandOutput extends CreateRoutingProfileR
5252
* Delay: Number("int"), // required
5353
* },
5454
* ],
55+
* ManualAssignmentQueueConfigs: [ // RoutingProfileManualAssignmentQueueConfigList
56+
* { // RoutingProfileManualAssignmentQueueConfig
57+
* QueueReference: {
58+
* QueueId: "STRING_VALUE", // required
59+
* Channel: "VOICE" || "CHAT" || "TASK" || "EMAIL", // required
60+
* },
61+
* },
62+
* ],
5563
* MediaConcurrencies: [ // MediaConcurrencies // required
5664
* { // MediaConcurrency
5765
* Channel: "VOICE" || "CHAT" || "TASK" || "EMAIL", // required

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DeleteHoursOfOperationRequest } from "../models/models_0";
9+
import { DeleteHoursOfOperationRequest } from "../models/models_1";
1010
import { de_DeleteHoursOfOperationCommand, se_DeleteHoursOfOperationCommand } from "../protocols/Aws_restJson1";
1111

1212
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DeleteHoursOfOperationOverrideRequest } from "../models/models_0";
9+
import { DeleteHoursOfOperationOverrideRequest } from "../models/models_1";
1010
import {
1111
de_DeleteHoursOfOperationOverrideCommand,
1212
se_DeleteHoursOfOperationOverrideCommand,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DeleteInstanceRequest } from "../models/models_0";
9+
import { DeleteInstanceRequest } from "../models/models_1";
1010
import { de_DeleteInstanceCommand, se_DeleteInstanceCommand } from "../protocols/Aws_restJson1";
1111

1212
/**

0 commit comments

Comments
 (0)