Skip to content

Commit 0ca88f3

Browse files
author
awstools
committed
feat(client-connect): Amazon Connect Chat introduces Create Persistent Contact Association API, allowing customers to choose when to resume previous conversations from previous chats, eliminating the need to repeat themselves and allowing agents to provide personalized service with access to entire conversation history.
1 parent 9dd8d0f commit 0ca88f3

20 files changed

+831
-225
lines changed

clients/client-connect/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,14 @@ CreateParticipant
388388

389389
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/createparticipantcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/createparticipantcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/createparticipantcommandoutput.html)
390390

391+
</details>
392+
<details>
393+
<summary>
394+
CreatePersistentContactAssociation
395+
</summary>
396+
397+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/classes/createpersistentcontactassociationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/createpersistentcontactassociationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-connect/interfaces/createpersistentcontactassociationcommandoutput.html)
398+
391399
</details>
392400
<details>
393401
<summary>

clients/client-connect/src/Connect.ts

+23
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ import {
112112
CreateParticipantCommandInput,
113113
CreateParticipantCommandOutput,
114114
} from "./commands/CreateParticipantCommand";
115+
import {
116+
CreatePersistentContactAssociationCommand,
117+
CreatePersistentContactAssociationCommandInput,
118+
CreatePersistentContactAssociationCommandOutput,
119+
} from "./commands/CreatePersistentContactAssociationCommand";
115120
import {
116121
CreatePromptCommand,
117122
CreatePromptCommandInput,
@@ -1011,6 +1016,7 @@ const commands = {
10111016
CreateInstanceCommand,
10121017
CreateIntegrationAssociationCommand,
10131018
CreateParticipantCommand,
1019+
CreatePersistentContactAssociationCommand,
10141020
CreatePromptCommand,
10151021
CreateQueueCommand,
10161022
CreateQuickConnectCommand,
@@ -1566,6 +1572,23 @@ export interface Connect {
15661572
cb: (err: any, data?: CreateParticipantCommandOutput) => void
15671573
): void;
15681574

1575+
/**
1576+
* @see {@link CreatePersistentContactAssociationCommand}
1577+
*/
1578+
createPersistentContactAssociation(
1579+
args: CreatePersistentContactAssociationCommandInput,
1580+
options?: __HttpHandlerOptions
1581+
): Promise<CreatePersistentContactAssociationCommandOutput>;
1582+
createPersistentContactAssociation(
1583+
args: CreatePersistentContactAssociationCommandInput,
1584+
cb: (err: any, data?: CreatePersistentContactAssociationCommandOutput) => void
1585+
): void;
1586+
createPersistentContactAssociation(
1587+
args: CreatePersistentContactAssociationCommandInput,
1588+
options: __HttpHandlerOptions,
1589+
cb: (err: any, data?: CreatePersistentContactAssociationCommandOutput) => void
1590+
): void;
1591+
15691592
/**
15701593
* @see {@link CreatePromptCommand}
15711594
*/

clients/client-connect/src/ConnectClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ import {
117117
CreateIntegrationAssociationCommandOutput,
118118
} from "./commands/CreateIntegrationAssociationCommand";
119119
import { CreateParticipantCommandInput, CreateParticipantCommandOutput } from "./commands/CreateParticipantCommand";
120+
import {
121+
CreatePersistentContactAssociationCommandInput,
122+
CreatePersistentContactAssociationCommandOutput,
123+
} from "./commands/CreatePersistentContactAssociationCommand";
120124
import { CreatePromptCommandInput, CreatePromptCommandOutput } from "./commands/CreatePromptCommand";
121125
import { CreateQueueCommandInput, CreateQueueCommandOutput } from "./commands/CreateQueueCommand";
122126
import { CreateQuickConnectCommandInput, CreateQuickConnectCommandOutput } from "./commands/CreateQuickConnectCommand";
@@ -671,6 +675,7 @@ export type ServiceInputTypes =
671675
| CreateInstanceCommandInput
672676
| CreateIntegrationAssociationCommandInput
673677
| CreateParticipantCommandInput
678+
| CreatePersistentContactAssociationCommandInput
674679
| CreatePromptCommandInput
675680
| CreateQueueCommandInput
676681
| CreateQuickConnectCommandInput
@@ -888,6 +893,7 @@ export type ServiceOutputTypes =
888893
| CreateInstanceCommandOutput
889894
| CreateIntegrationAssociationCommandOutput
890895
| CreateParticipantCommandOutput
896+
| CreatePersistentContactAssociationCommandOutput
891897
| CreatePromptCommandOutput
892898
| CreateQueueCommandOutput
893899
| CreateQuickConnectCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
5+
import { Command as $Command } from "@smithy/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
SMITHY_CONTEXT_KEY,
15+
} from "@smithy/types";
16+
17+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
18+
import {
19+
CreatePersistentContactAssociationRequest,
20+
CreatePersistentContactAssociationResponse,
21+
} from "../models/models_0";
22+
import {
23+
de_CreatePersistentContactAssociationCommand,
24+
se_CreatePersistentContactAssociationCommand,
25+
} from "../protocols/Aws_restJson1";
26+
27+
/**
28+
* @public
29+
*/
30+
export { __MetadataBearer, $Command };
31+
/**
32+
* @public
33+
*
34+
* The input for {@link CreatePersistentContactAssociationCommand}.
35+
*/
36+
export interface CreatePersistentContactAssociationCommandInput extends CreatePersistentContactAssociationRequest {}
37+
/**
38+
* @public
39+
*
40+
* The output of {@link CreatePersistentContactAssociationCommand}.
41+
*/
42+
export interface CreatePersistentContactAssociationCommandOutput
43+
extends CreatePersistentContactAssociationResponse,
44+
__MetadataBearer {}
45+
46+
/**
47+
* @public
48+
* <p>Enables rehydration of chats for the lifespan of a contact. For more information about chat rehydration, see
49+
* <a href="https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html">Enable persistent chat</a> in the
50+
* <i>Amazon Connect Administrator Guide</i>.
51+
* </p>
52+
* @example
53+
* Use a bare-bones client and the command you need to make an API call.
54+
* ```javascript
55+
* import { ConnectClient, CreatePersistentContactAssociationCommand } from "@aws-sdk/client-connect"; // ES Modules import
56+
* // const { ConnectClient, CreatePersistentContactAssociationCommand } = require("@aws-sdk/client-connect"); // CommonJS import
57+
* const client = new ConnectClient(config);
58+
* const input = { // CreatePersistentContactAssociationRequest
59+
* InstanceId: "STRING_VALUE", // required
60+
* InitialContactId: "STRING_VALUE", // required
61+
* RehydrationType: "ENTIRE_PAST_SESSION" || "FROM_SEGMENT", // required
62+
* SourceContactId: "STRING_VALUE", // required
63+
* ClientToken: "STRING_VALUE",
64+
* };
65+
* const command = new CreatePersistentContactAssociationCommand(input);
66+
* const response = await client.send(command);
67+
* // { // CreatePersistentContactAssociationResponse
68+
* // ContinuedFromContactId: "STRING_VALUE",
69+
* // };
70+
*
71+
* ```
72+
*
73+
* @param CreatePersistentContactAssociationCommandInput - {@link CreatePersistentContactAssociationCommandInput}
74+
* @returns {@link CreatePersistentContactAssociationCommandOutput}
75+
* @see {@link CreatePersistentContactAssociationCommandInput} for command's `input` shape.
76+
* @see {@link CreatePersistentContactAssociationCommandOutput} for command's `response` shape.
77+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
78+
*
79+
* @throws {@link AccessDeniedException} (client fault)
80+
* <p>You do not have sufficient permissions to perform this action.</p>
81+
*
82+
* @throws {@link InternalServiceException} (server fault)
83+
* <p>Request processing failed because of an error or failure with the service.</p>
84+
*
85+
* @throws {@link InvalidParameterException} (client fault)
86+
* <p>One or more of the specified parameters are not valid.</p>
87+
*
88+
* @throws {@link InvalidRequestException} (client fault)
89+
* <p>The request is not valid.</p>
90+
*
91+
* @throws {@link ResourceNotFoundException} (client fault)
92+
* <p>The specified resource was not found.</p>
93+
*
94+
* @throws {@link ThrottlingException} (client fault)
95+
* <p>The throttling limit has been exceeded.</p>
96+
*
97+
* @throws {@link ConnectServiceException}
98+
* <p>Base exception class for all service exceptions from Connect service.</p>
99+
*
100+
*/
101+
export class CreatePersistentContactAssociationCommand extends $Command<
102+
CreatePersistentContactAssociationCommandInput,
103+
CreatePersistentContactAssociationCommandOutput,
104+
ConnectClientResolvedConfig
105+
> {
106+
// Start section: command_properties
107+
// End section: command_properties
108+
109+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
110+
return {
111+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
112+
Endpoint: { type: "builtInParams", name: "endpoint" },
113+
Region: { type: "builtInParams", name: "region" },
114+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
115+
};
116+
}
117+
118+
/**
119+
* @public
120+
*/
121+
constructor(readonly input: CreatePersistentContactAssociationCommandInput) {
122+
// Start section: command_constructor
123+
super();
124+
// End section: command_constructor
125+
}
126+
127+
/**
128+
* @internal
129+
*/
130+
resolveMiddleware(
131+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
132+
configuration: ConnectClientResolvedConfig,
133+
options?: __HttpHandlerOptions
134+
): Handler<CreatePersistentContactAssociationCommandInput, CreatePersistentContactAssociationCommandOutput> {
135+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
136+
this.middlewareStack.use(
137+
getEndpointPlugin(configuration, CreatePersistentContactAssociationCommand.getEndpointParameterInstructions())
138+
);
139+
140+
const stack = clientStack.concat(this.middlewareStack);
141+
142+
const { logger } = configuration;
143+
const clientName = "ConnectClient";
144+
const commandName = "CreatePersistentContactAssociationCommand";
145+
const handlerExecutionContext: HandlerExecutionContext = {
146+
logger,
147+
clientName,
148+
commandName,
149+
inputFilterSensitiveLog: (_: any) => _,
150+
outputFilterSensitiveLog: (_: any) => _,
151+
[SMITHY_CONTEXT_KEY]: {
152+
service: "AmazonConnectService",
153+
operation: "CreatePersistentContactAssociation",
154+
},
155+
};
156+
const { requestHandler } = configuration;
157+
return stack.resolve(
158+
(request: FinalizeHandlerArguments<any>) =>
159+
requestHandler.handle(request.request as __HttpRequest, options || {}),
160+
handlerExecutionContext
161+
);
162+
}
163+
164+
/**
165+
* @internal
166+
*/
167+
private serialize(
168+
input: CreatePersistentContactAssociationCommandInput,
169+
context: __SerdeContext
170+
): Promise<__HttpRequest> {
171+
return se_CreatePersistentContactAssociationCommand(input, context);
172+
}
173+
174+
/**
175+
* @internal
176+
*/
177+
private deserialize(
178+
output: __HttpResponse,
179+
context: __SerdeContext
180+
): Promise<CreatePersistentContactAssociationCommandOutput> {
181+
return de_CreatePersistentContactAssociationCommand(output, context);
182+
}
183+
184+
// Start section: command_body_extra
185+
// End section: command_body_extra
186+
}

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

+7-5
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ export interface CreateViewCommandOutput extends CreateViewResponse, __MetadataB
4242

4343
/**
4444
* @public
45-
* <p>Creates a new view with the possible status of <code>SAVED</code> or <code>PUBLISHED</code>.</p>
45+
* <p>Creates a new view with the possible status of <code>SAVED</code> or
46+
* <code>PUBLISHED</code>.</p>
4647
* <p>The views will have a unique name for each connect instance.</p>
47-
* <p>It performs basic content validation if the status is <code>SAVED</code> or full content validation if the status
48-
* is set to <code>PUBLISHED</code>. An error is returned if validation fails. It associates either
49-
* the <code>$SAVED</code> qualifier or both of the <code>$SAVED</code> and <code>$LATEST</code> qualifiers with the
50-
* provided view content based on the status. The view is idempotent if ClientToken is provided.</p>
48+
* <p>It performs basic content validation if the status is <code>SAVED</code> or full content
49+
* validation if the status is set to <code>PUBLISHED</code>. An error is returned if validation
50+
* fails. It associates either the <code>$SAVED</code> qualifier or both of the <code>$SAVED</code>
51+
* and <code>$LATEST</code> qualifiers with the provided view content based on the status. The view
52+
* is idempotent if ClientToken is provided.</p>
5153
* @example
5254
* Use a bare-bones client and the command you need to make an API call.
5355
* ```javascript

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export interface CreateViewVersionCommandOutput extends CreateViewVersionRespons
4343
* @public
4444
* <p>Publishes a new version of the view identifier.</p>
4545
* <p>Versions are immutable and monotonically increasing.</p>
46-
* <p>It returns the highest version if there is no change in content compared to that version. An error
47-
* is displayed if the supplied ViewContentSha256 is different from the ViewContentSha256 of the
48-
* <code>$LATEST</code> alias.</p>
46+
* <p>It returns the highest version if there is no change in content compared to that version. An
47+
* error is displayed if the supplied ViewContentSha256 is different from the ViewContentSha256 of
48+
* the <code>$LATEST</code> alias.</p>
4949
* @example
5050
* Use a bare-bones client and the command you need to make an API call.
5151
* ```javascript

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export interface DeleteViewCommandOutput extends DeleteViewResponse, __MetadataB
3737

3838
/**
3939
* @public
40-
* <p>Deletes the view entirely. It deletes the view and all associated qualifiers (versions and aliases).</p>
40+
* <p>Deletes the view entirely. It deletes the view and all associated qualifiers (versions and
41+
* aliases).</p>
4142
* @example
4243
* Use a bare-bones client and the command you need to make an API call.
4344
* ```javascript

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import {
1515
} from "@smithy/types";
1616

1717
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
18-
import { DescribeUserHierarchyGroupRequest, DescribeUserHierarchyGroupResponse } from "../models/models_0";
18+
import { DescribeUserHierarchyGroupRequest } from "../models/models_0";
19+
import { DescribeUserHierarchyGroupResponse } from "../models/models_1";
1920
import { de_DescribeUserHierarchyGroupCommand, se_DescribeUserHierarchyGroupCommand } from "../protocols/Aws_restJson1";
2021

2122
/**

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import {
1515
} from "@smithy/types";
1616

1717
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
18-
import { DescribeUserHierarchyStructureRequest } from "../models/models_0";
19-
import { DescribeUserHierarchyStructureResponse } from "../models/models_1";
18+
import { DescribeUserHierarchyStructureRequest, DescribeUserHierarchyStructureResponse } from "../models/models_1";
2019
import {
2120
de_DescribeUserHierarchyStructureCommand,
2221
se_DescribeUserHierarchyStructureCommand,

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ export interface DescribeViewCommandOutput extends DescribeViewResponse, __Metad
4141
* <p>The view identifier can be supplied as a ViewId or ARN.</p>
4242
* <p>
4343
* <code>$SAVED</code> needs to be supplied if a view is unpublished.</p>
44-
* <p>The view identifier can contain an optional qualifier, for example, <code><view-id>:$SAVED</code>, which
45-
* is either an actual version number or an Amazon Connect managed qualifier <code>$SAVED | $LATEST</code>.
46-
* If it is not supplied, then <code>$LATEST</code> is assumed for customer managed views and an error is
47-
* returned if there is no published content available. Version 1 is assumed for Amazon Web Services managed views.</p>
44+
* <p>The view identifier can contain an optional qualifier, for example,
45+
* <code><view-id>:$SAVED</code>, which is either an actual version number or an Amazon Connect managed qualifier <code>$SAVED | $LATEST</code>. If it is not supplied, then
46+
* <code>$LATEST</code> is assumed for customer managed views and an error is returned if there is
47+
* no published content available. Version 1 is assumed for Amazon Web Services managed views.</p>
4848
* @example
4949
* Use a bare-bones client and the command you need to make an API call.
5050
* ```javascript

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export interface ListViewVersionsCommandOutput extends ListViewVersionsResponse,
4141

4242
/**
4343
* @public
44-
* <p>Returns all the available versions for the specified Amazon Connect instance and view identifier.</p>
44+
* <p>Returns all the available versions for the specified Amazon Connect instance and view
45+
* identifier.</p>
4546
* <p>Results will be sorted from highest to lowest.</p>
4647
* @example
4748
* Use a bare-bones client and the command you need to make an API call.

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ export interface ReplicateInstanceCommandOutput extends ReplicateInstanceRespons
4141

4242
/**
4343
* @public
44-
* <p>Replicates an Amazon Connect instance in the specified Amazon Web Services Region
45-
* and copies configuration information for Amazon Connect resources across Amazon Web Services Regions.
46-
* </p>
44+
* <p>Replicates an Amazon Connect instance in the specified Amazon Web Services Region and
45+
* copies configuration information for Amazon Connect resources across Amazon Web Services Regions. </p>
4746
* <p>For more information about replicating an Amazon Connect instance, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/create-replica-connect-instance.html">Create
4847
* a replica of your existing Amazon Connect instance</a> in the <i>Amazon Connect
4948
* Administrator Guide</i>.</p>

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export interface SuspendContactRecordingCommandOutput extends SuspendContactReco
3939
* @public
4040
* <p>When a contact is being recorded, this API suspends recording whatever is selected in the
4141
* flow configuration: call, screen, or both. If only call recording or only screen recording is
42-
* enabled, then it would be suspended. For example, you might suspend the screen
43-
* recording while collecting sensitive information, such as a credit card number. Then use
44-
* ResumeContactRecording to restart recording the screen.</p>
42+
* enabled, then it would be suspended. For example, you might suspend the screen recording while
43+
* collecting sensitive information, such as a credit card number. Then use ResumeContactRecording
44+
* to restart recording the screen.</p>
4545
* <p>The period of time that the recording is suspended is filled with silence in the final
4646
* recording.</p>
4747
* <p>Voice and screen recordings are supported.</p>

0 commit comments

Comments
 (0)