Skip to content

Commit 16bb7db

Browse files
author
awstools
committed
feat(client-connectparticipant): This release adds support for the GetAuthenticationUrl and CancelParticipantAuthentication APIs used for customer authentication within Amazon Connect chats. There are also minor updates to the GetAttachment API.
1 parent a472246 commit 16bb7db

19 files changed

+815
-79
lines changed

clients/client-connectparticipant/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66

77
AWS SDK for JavaScript ConnectParticipant Client for Node.js, Browser and React Native.
88

9+
<ul>
10+
<li>
11+
<p>
12+
<a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html">Participant Service actions</a>
13+
</p>
14+
</li>
15+
<li>
16+
<p>
17+
<a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html">Participant Service data types</a>
18+
</p>
19+
</li>
20+
</ul>
921
<p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
1022
enables companies of any size to deliver superior customer service at a lower cost.
1123
Amazon Connect communications capabilities make it easy for companies to deliver
@@ -211,6 +223,14 @@ see LICENSE for more information.
211223

212224
## Client Commands (Operations List)
213225

226+
<details>
227+
<summary>
228+
CancelParticipantAuthentication
229+
</summary>
230+
231+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectparticipant/command/CancelParticipantAuthenticationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectparticipant/Interface/CancelParticipantAuthenticationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectparticipant/Interface/CancelParticipantAuthenticationCommandOutput/)
232+
233+
</details>
214234
<details>
215235
<summary>
216236
CompleteAttachmentUpload
@@ -250,6 +270,14 @@ GetAttachment
250270

251271
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectparticipant/command/GetAttachmentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectparticipant/Interface/GetAttachmentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectparticipant/Interface/GetAttachmentCommandOutput/)
252272

273+
</details>
274+
<details>
275+
<summary>
276+
GetAuthenticationUrl
277+
</summary>
278+
279+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectparticipant/command/GetAuthenticationUrlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectparticipant/Interface/GetAuthenticationUrlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectparticipant/Interface/GetAuthenticationUrlCommandOutput/)
280+
253281
</details>
254282
<details>
255283
<summary>

clients/client-connectparticipant/src/ConnectParticipant.ts

+59-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

5+
import {
6+
CancelParticipantAuthenticationCommand,
7+
CancelParticipantAuthenticationCommandInput,
8+
CancelParticipantAuthenticationCommandOutput,
9+
} from "./commands/CancelParticipantAuthenticationCommand";
510
import {
611
CompleteAttachmentUploadCommand,
712
CompleteAttachmentUploadCommandInput,
@@ -27,6 +32,11 @@ import {
2732
GetAttachmentCommandInput,
2833
GetAttachmentCommandOutput,
2934
} from "./commands/GetAttachmentCommand";
35+
import {
36+
GetAuthenticationUrlCommand,
37+
GetAuthenticationUrlCommandInput,
38+
GetAuthenticationUrlCommandOutput,
39+
} from "./commands/GetAuthenticationUrlCommand";
3040
import {
3141
GetTranscriptCommand,
3242
GetTranscriptCommandInput,
@@ -42,18 +52,37 @@ import {
4252
import { ConnectParticipantClient, ConnectParticipantClientConfig } from "./ConnectParticipantClient";
4353

4454
const commands = {
55+
CancelParticipantAuthenticationCommand,
4556
CompleteAttachmentUploadCommand,
4657
CreateParticipantConnectionCommand,
4758
DescribeViewCommand,
4859
DisconnectParticipantCommand,
4960
GetAttachmentCommand,
61+
GetAuthenticationUrlCommand,
5062
GetTranscriptCommand,
5163
SendEventCommand,
5264
SendMessageCommand,
5365
StartAttachmentUploadCommand,
5466
};
5567

5668
export interface ConnectParticipant {
69+
/**
70+
* @see {@link CancelParticipantAuthenticationCommand}
71+
*/
72+
cancelParticipantAuthentication(
73+
args: CancelParticipantAuthenticationCommandInput,
74+
options?: __HttpHandlerOptions
75+
): Promise<CancelParticipantAuthenticationCommandOutput>;
76+
cancelParticipantAuthentication(
77+
args: CancelParticipantAuthenticationCommandInput,
78+
cb: (err: any, data?: CancelParticipantAuthenticationCommandOutput) => void
79+
): void;
80+
cancelParticipantAuthentication(
81+
args: CancelParticipantAuthenticationCommandInput,
82+
options: __HttpHandlerOptions,
83+
cb: (err: any, data?: CancelParticipantAuthenticationCommandOutput) => void
84+
): void;
85+
5786
/**
5887
* @see {@link CompleteAttachmentUploadCommand}
5988
*/
@@ -127,6 +156,23 @@ export interface ConnectParticipant {
127156
cb: (err: any, data?: GetAttachmentCommandOutput) => void
128157
): void;
129158

159+
/**
160+
* @see {@link GetAuthenticationUrlCommand}
161+
*/
162+
getAuthenticationUrl(
163+
args: GetAuthenticationUrlCommandInput,
164+
options?: __HttpHandlerOptions
165+
): Promise<GetAuthenticationUrlCommandOutput>;
166+
getAuthenticationUrl(
167+
args: GetAuthenticationUrlCommandInput,
168+
cb: (err: any, data?: GetAuthenticationUrlCommandOutput) => void
169+
): void;
170+
getAuthenticationUrl(
171+
args: GetAuthenticationUrlCommandInput,
172+
options: __HttpHandlerOptions,
173+
cb: (err: any, data?: GetAuthenticationUrlCommandOutput) => void
174+
): void;
175+
130176
/**
131177
* @see {@link GetTranscriptCommand}
132178
*/
@@ -179,7 +225,19 @@ export interface ConnectParticipant {
179225
}
180226

181227
/**
182-
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
228+
* <ul>
229+
* <li>
230+
* <p>
231+
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html">Participant Service actions</a>
232+
* </p>
233+
* </li>
234+
* <li>
235+
* <p>
236+
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html">Participant Service data types</a>
237+
* </p>
238+
* </li>
239+
* </ul>
240+
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
183241
* enables companies of any size to deliver superior customer service at a lower cost.
184242
* Amazon Connect communications capabilities make it easy for companies to deliver
185243
* personalized interactions across communication channels, including chat. </p>

clients/client-connectparticipant/src/ConnectParticipantClient.ts

+25-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ import {
5959
HttpAuthSchemeResolvedConfig,
6060
resolveHttpAuthSchemeConfig,
6161
} from "./auth/httpAuthSchemeProvider";
62+
import {
63+
CancelParticipantAuthenticationCommandInput,
64+
CancelParticipantAuthenticationCommandOutput,
65+
} from "./commands/CancelParticipantAuthenticationCommand";
6266
import {
6367
CompleteAttachmentUploadCommandInput,
6468
CompleteAttachmentUploadCommandOutput,
@@ -73,6 +77,10 @@ import {
7377
DisconnectParticipantCommandOutput,
7478
} from "./commands/DisconnectParticipantCommand";
7579
import { GetAttachmentCommandInput, GetAttachmentCommandOutput } from "./commands/GetAttachmentCommand";
80+
import {
81+
GetAuthenticationUrlCommandInput,
82+
GetAuthenticationUrlCommandOutput,
83+
} from "./commands/GetAuthenticationUrlCommand";
7684
import { GetTranscriptCommandInput, GetTranscriptCommandOutput } from "./commands/GetTranscriptCommand";
7785
import { SendEventCommandInput, SendEventCommandOutput } from "./commands/SendEventCommand";
7886
import { SendMessageCommandInput, SendMessageCommandOutput } from "./commands/SendMessageCommand";
@@ -95,11 +103,13 @@ export { __Client };
95103
* @public
96104
*/
97105
export type ServiceInputTypes =
106+
| CancelParticipantAuthenticationCommandInput
98107
| CompleteAttachmentUploadCommandInput
99108
| CreateParticipantConnectionCommandInput
100109
| DescribeViewCommandInput
101110
| DisconnectParticipantCommandInput
102111
| GetAttachmentCommandInput
112+
| GetAuthenticationUrlCommandInput
103113
| GetTranscriptCommandInput
104114
| SendEventCommandInput
105115
| SendMessageCommandInput
@@ -109,11 +119,13 @@ export type ServiceInputTypes =
109119
* @public
110120
*/
111121
export type ServiceOutputTypes =
122+
| CancelParticipantAuthenticationCommandOutput
112123
| CompleteAttachmentUploadCommandOutput
113124
| CreateParticipantConnectionCommandOutput
114125
| DescribeViewCommandOutput
115126
| DisconnectParticipantCommandOutput
116127
| GetAttachmentCommandOutput
128+
| GetAuthenticationUrlCommandOutput
117129
| GetTranscriptCommandOutput
118130
| SendEventCommandOutput
119131
| SendMessageCommandOutput
@@ -310,7 +322,19 @@ export type ConnectParticipantClientResolvedConfigType = __SmithyResolvedConfigu
310322
export interface ConnectParticipantClientResolvedConfig extends ConnectParticipantClientResolvedConfigType {}
311323

312324
/**
313-
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
325+
* <ul>
326+
* <li>
327+
* <p>
328+
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html">Participant Service actions</a>
329+
* </p>
330+
* </li>
331+
* <li>
332+
* <p>
333+
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html">Participant Service data types</a>
334+
* </p>
335+
* </li>
336+
* </ul>
337+
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
314338
* enables companies of any size to deliver superior customer service at a lower cost.
315339
* Amazon Connect communications capabilities make it easy for companies to deliver
316340
* personalized interactions across communication channels, including chat. </p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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 {
8+
ConnectParticipantClientResolvedConfig,
9+
ServiceInputTypes,
10+
ServiceOutputTypes,
11+
} from "../ConnectParticipantClient";
12+
import { commonParams } from "../endpoint/EndpointParameters";
13+
import { CancelParticipantAuthenticationRequest, CancelParticipantAuthenticationResponse } from "../models/models_0";
14+
import {
15+
de_CancelParticipantAuthenticationCommand,
16+
se_CancelParticipantAuthenticationCommand,
17+
} from "../protocols/Aws_restJson1";
18+
19+
/**
20+
* @public
21+
*/
22+
export type { __MetadataBearer };
23+
export { $Command };
24+
/**
25+
* @public
26+
*
27+
* The input for {@link CancelParticipantAuthenticationCommand}.
28+
*/
29+
export interface CancelParticipantAuthenticationCommandInput extends CancelParticipantAuthenticationRequest {}
30+
/**
31+
* @public
32+
*
33+
* The output of {@link CancelParticipantAuthenticationCommand}.
34+
*/
35+
export interface CancelParticipantAuthenticationCommandOutput
36+
extends CancelParticipantAuthenticationResponse,
37+
__MetadataBearer {}
38+
39+
/**
40+
* <p>Cancels the authentication session. The opted out branch of the Authenticate Customer
41+
* flow block will be taken.</p>
42+
* <note>
43+
* <p>The current supported channel is chat. This API is not supported for Apple
44+
* Messages for Business, WhatsApp, or SMS chats.</p>
45+
* </note>
46+
* @example
47+
* Use a bare-bones client and the command you need to make an API call.
48+
* ```javascript
49+
* import { ConnectParticipantClient, CancelParticipantAuthenticationCommand } from "@aws-sdk/client-connectparticipant"; // ES Modules import
50+
* // const { ConnectParticipantClient, CancelParticipantAuthenticationCommand } = require("@aws-sdk/client-connectparticipant"); // CommonJS import
51+
* const client = new ConnectParticipantClient(config);
52+
* const input = { // CancelParticipantAuthenticationRequest
53+
* SessionId: "STRING_VALUE", // required
54+
* ConnectionToken: "STRING_VALUE", // required
55+
* };
56+
* const command = new CancelParticipantAuthenticationCommand(input);
57+
* const response = await client.send(command);
58+
* // {};
59+
*
60+
* ```
61+
*
62+
* @param CancelParticipantAuthenticationCommandInput - {@link CancelParticipantAuthenticationCommandInput}
63+
* @returns {@link CancelParticipantAuthenticationCommandOutput}
64+
* @see {@link CancelParticipantAuthenticationCommandInput} for command's `input` shape.
65+
* @see {@link CancelParticipantAuthenticationCommandOutput} for command's `response` shape.
66+
* @see {@link ConnectParticipantClientResolvedConfig | config} for ConnectParticipantClient's `config` shape.
67+
*
68+
* @throws {@link AccessDeniedException} (client fault)
69+
* <p>You do not have sufficient access to perform this action.</p>
70+
*
71+
* @throws {@link InternalServerException} (server fault)
72+
* <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>
73+
*
74+
* @throws {@link ThrottlingException} (client fault)
75+
* <p>The request was denied due to request throttling.</p>
76+
*
77+
* @throws {@link ValidationException} (client fault)
78+
* <p>The input fails to satisfy the constraints specified by Amazon Connect.</p>
79+
*
80+
* @throws {@link ConnectParticipantServiceException}
81+
* <p>Base exception class for all service exceptions from ConnectParticipant service.</p>
82+
*
83+
* @public
84+
*/
85+
export class CancelParticipantAuthenticationCommand extends $Command
86+
.classBuilder<
87+
CancelParticipantAuthenticationCommandInput,
88+
CancelParticipantAuthenticationCommandOutput,
89+
ConnectParticipantClientResolvedConfig,
90+
ServiceInputTypes,
91+
ServiceOutputTypes
92+
>()
93+
.ep(commonParams)
94+
.m(function (this: any, Command: any, cs: any, config: ConnectParticipantClientResolvedConfig, o: any) {
95+
return [
96+
getSerdePlugin(config, this.serialize, this.deserialize),
97+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
98+
];
99+
})
100+
.s("AmazonConnectParticipantServiceLambda", "CancelParticipantAuthentication", {})
101+
.n("ConnectParticipantClient", "CancelParticipantAuthenticationCommand")
102+
.f(void 0, void 0)
103+
.ser(se_CancelParticipantAuthenticationCommand)
104+
.de(de_CancelParticipantAuthenticationCommand)
105+
.build() {
106+
/** @internal type navigation helper, not in runtime. */
107+
protected declare static __types: {
108+
api: {
109+
input: CancelParticipantAuthenticationRequest;
110+
output: {};
111+
};
112+
sdk: {
113+
input: CancelParticipantAuthenticationCommandInput;
114+
output: CancelParticipantAuthenticationCommandOutput;
115+
};
116+
};
117+
}

clients/client-connectparticipant/src/commands/CompleteAttachmentUploadCommand.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface CompleteAttachmentUploadCommandOutput extends CompleteAttachmen
3535
* <p>Allows you to confirm that the attachment has been uploaded using the pre-signed URL
3636
* provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment
3737
* with that identifier is already being uploaded.</p>
38+
* <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Amazon Connect Chat security best practices</a>.</p>
3839
* <note>
3940
* <p>
4041
* <code>ConnectionToken</code> is used for invoking this API instead of
@@ -71,8 +72,8 @@ export interface CompleteAttachmentUploadCommandOutput extends CompleteAttachmen
7172
* <p>You do not have sufficient access to perform this action.</p>
7273
*
7374
* @throws {@link ConflictException} (client fault)
74-
* <p>The requested operation conflicts with the current state of a service
75-
* resource associated with the request. </p>
75+
* <p>The requested operation conflicts with the current state of a service resource
76+
* associated with the request. </p>
7677
*
7778
* @throws {@link InternalServerException} (server fault)
7879
* <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>

clients/client-connectparticipant/src/commands/CreateParticipantConnectionCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export interface CreateParticipantConnectionCommandOutput
3838

3939
/**
4040
* <p>Creates the participant's connection. </p>
41+
* <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Amazon Connect Chat security best practices</a>.</p>
4142
* <note>
4243
* <p>
4344
* <code>ParticipantToken</code> is used for invoking this API instead of

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

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface DescribeViewCommandOutput extends DescribeViewResponse, __Metad
3333

3434
/**
3535
* <p>Retrieves the view for the specified view token.</p>
36+
* <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Amazon Connect Chat security best practices</a>.</p>
3637
* @example
3738
* Use a bare-bones client and the command you need to make an API call.
3839
* ```javascript

clients/client-connectparticipant/src/commands/DisconnectParticipantCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface DisconnectParticipantCommandOutput extends DisconnectParticipan
3333

3434
/**
3535
* <p>Disconnects a participant. </p>
36+
* <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Amazon Connect Chat security best practices</a>.</p>
3637
* <note>
3738
* <p>
3839
* <code>ConnectionToken</code> is used for invoking this API instead of

0 commit comments

Comments
 (0)