Skip to content

Commit

Permalink
feat(client-connectparticipant): This release adds support for the Ge…
Browse files Browse the repository at this point in the history
…tAuthenticationUrl and CancelParticipantAuthentication APIs used for customer authentication within Amazon Connect chats. There are also minor updates to the GetAttachment API.
  • Loading branch information
awstools committed Dec 18, 2024
1 parent a472246 commit 16bb7db
Show file tree
Hide file tree
Showing 19 changed files with 815 additions and 79 deletions.
28 changes: 28 additions & 0 deletions clients/client-connectparticipant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@

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

<ul>
<li>
<p>
<a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html">Participant Service actions</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html">Participant Service data types</a>
</p>
</li>
</ul>
<p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
enables companies of any size to deliver superior customer service at a lower cost.
Amazon Connect communications capabilities make it easy for companies to deliver
Expand Down Expand Up @@ -211,6 +223,14 @@ see LICENSE for more information.

## Client Commands (Operations List)

<details>
<summary>
CancelParticipantAuthentication
</summary>

[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/)

</details>
<details>
<summary>
CompleteAttachmentUpload
Expand Down Expand Up @@ -250,6 +270,14 @@ GetAttachment

[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/)

</details>
<details>
<summary>
GetAuthenticationUrl
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
60 changes: 59 additions & 1 deletion clients/client-connectparticipant/src/ConnectParticipant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import { createAggregatedClient } from "@smithy/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

import {
CancelParticipantAuthenticationCommand,
CancelParticipantAuthenticationCommandInput,
CancelParticipantAuthenticationCommandOutput,
} from "./commands/CancelParticipantAuthenticationCommand";
import {
CompleteAttachmentUploadCommand,
CompleteAttachmentUploadCommandInput,
Expand All @@ -27,6 +32,11 @@ import {
GetAttachmentCommandInput,
GetAttachmentCommandOutput,
} from "./commands/GetAttachmentCommand";
import {
GetAuthenticationUrlCommand,
GetAuthenticationUrlCommandInput,
GetAuthenticationUrlCommandOutput,
} from "./commands/GetAuthenticationUrlCommand";
import {
GetTranscriptCommand,
GetTranscriptCommandInput,
Expand All @@ -42,18 +52,37 @@ import {
import { ConnectParticipantClient, ConnectParticipantClientConfig } from "./ConnectParticipantClient";

const commands = {
CancelParticipantAuthenticationCommand,
CompleteAttachmentUploadCommand,
CreateParticipantConnectionCommand,
DescribeViewCommand,
DisconnectParticipantCommand,
GetAttachmentCommand,
GetAuthenticationUrlCommand,
GetTranscriptCommand,
SendEventCommand,
SendMessageCommand,
StartAttachmentUploadCommand,
};

export interface ConnectParticipant {
/**
* @see {@link CancelParticipantAuthenticationCommand}
*/
cancelParticipantAuthentication(
args: CancelParticipantAuthenticationCommandInput,
options?: __HttpHandlerOptions
): Promise<CancelParticipantAuthenticationCommandOutput>;
cancelParticipantAuthentication(
args: CancelParticipantAuthenticationCommandInput,
cb: (err: any, data?: CancelParticipantAuthenticationCommandOutput) => void
): void;
cancelParticipantAuthentication(
args: CancelParticipantAuthenticationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CancelParticipantAuthenticationCommandOutput) => void
): void;

/**
* @see {@link CompleteAttachmentUploadCommand}
*/
Expand Down Expand Up @@ -127,6 +156,23 @@ export interface ConnectParticipant {
cb: (err: any, data?: GetAttachmentCommandOutput) => void
): void;

/**
* @see {@link GetAuthenticationUrlCommand}
*/
getAuthenticationUrl(
args: GetAuthenticationUrlCommandInput,
options?: __HttpHandlerOptions
): Promise<GetAuthenticationUrlCommandOutput>;
getAuthenticationUrl(
args: GetAuthenticationUrlCommandInput,
cb: (err: any, data?: GetAuthenticationUrlCommandOutput) => void
): void;
getAuthenticationUrl(
args: GetAuthenticationUrlCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetAuthenticationUrlCommandOutput) => void
): void;

/**
* @see {@link GetTranscriptCommand}
*/
Expand Down Expand Up @@ -179,7 +225,19 @@ export interface ConnectParticipant {
}

/**
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html">Participant Service actions</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html">Participant Service data types</a>
* </p>
* </li>
* </ul>
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
* enables companies of any size to deliver superior customer service at a lower cost.
* Amazon Connect communications capabilities make it easy for companies to deliver
* personalized interactions across communication channels, including chat. </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ import {
HttpAuthSchemeResolvedConfig,
resolveHttpAuthSchemeConfig,
} from "./auth/httpAuthSchemeProvider";
import {
CancelParticipantAuthenticationCommandInput,
CancelParticipantAuthenticationCommandOutput,
} from "./commands/CancelParticipantAuthenticationCommand";
import {
CompleteAttachmentUploadCommandInput,
CompleteAttachmentUploadCommandOutput,
Expand All @@ -73,6 +77,10 @@ import {
DisconnectParticipantCommandOutput,
} from "./commands/DisconnectParticipantCommand";
import { GetAttachmentCommandInput, GetAttachmentCommandOutput } from "./commands/GetAttachmentCommand";
import {
GetAuthenticationUrlCommandInput,
GetAuthenticationUrlCommandOutput,
} from "./commands/GetAuthenticationUrlCommand";
import { GetTranscriptCommandInput, GetTranscriptCommandOutput } from "./commands/GetTranscriptCommand";
import { SendEventCommandInput, SendEventCommandOutput } from "./commands/SendEventCommand";
import { SendMessageCommandInput, SendMessageCommandOutput } from "./commands/SendMessageCommand";
Expand All @@ -95,11 +103,13 @@ export { __Client };
* @public
*/
export type ServiceInputTypes =
| CancelParticipantAuthenticationCommandInput
| CompleteAttachmentUploadCommandInput
| CreateParticipantConnectionCommandInput
| DescribeViewCommandInput
| DisconnectParticipantCommandInput
| GetAttachmentCommandInput
| GetAuthenticationUrlCommandInput
| GetTranscriptCommandInput
| SendEventCommandInput
| SendMessageCommandInput
Expand All @@ -109,11 +119,13 @@ export type ServiceInputTypes =
* @public
*/
export type ServiceOutputTypes =
| CancelParticipantAuthenticationCommandOutput
| CompleteAttachmentUploadCommandOutput
| CreateParticipantConnectionCommandOutput
| DescribeViewCommandOutput
| DisconnectParticipantCommandOutput
| GetAttachmentCommandOutput
| GetAuthenticationUrlCommandOutput
| GetTranscriptCommandOutput
| SendEventCommandOutput
| SendMessageCommandOutput
Expand Down Expand Up @@ -310,7 +322,19 @@ export type ConnectParticipantClientResolvedConfigType = __SmithyResolvedConfigu
export interface ConnectParticipantClientResolvedConfig extends ConnectParticipantClientResolvedConfigType {}

/**
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Operations_Amazon_Connect_Participant_Service.html">Participant Service actions</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_Types_Amazon_Connect_Participant_Service.html">Participant Service data types</a>
* </p>
* </li>
* </ul>
* <p>Amazon Connect is an easy-to-use omnichannel cloud contact center service that
* enables companies of any size to deliver superior customer service at a lower cost.
* Amazon Connect communications capabilities make it easy for companies to deliver
* personalized interactions across communication channels, including chat. </p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import {
ConnectParticipantClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../ConnectParticipantClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { CancelParticipantAuthenticationRequest, CancelParticipantAuthenticationResponse } from "../models/models_0";
import {
de_CancelParticipantAuthenticationCommand,
se_CancelParticipantAuthenticationCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link CancelParticipantAuthenticationCommand}.
*/
export interface CancelParticipantAuthenticationCommandInput extends CancelParticipantAuthenticationRequest {}
/**
* @public
*
* The output of {@link CancelParticipantAuthenticationCommand}.
*/
export interface CancelParticipantAuthenticationCommandOutput
extends CancelParticipantAuthenticationResponse,
__MetadataBearer {}

/**
* <p>Cancels the authentication session. The opted out branch of the Authenticate Customer
* flow block will be taken.</p>
* <note>
* <p>The current supported channel is chat. This API is not supported for Apple
* Messages for Business, WhatsApp, or SMS chats.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ConnectParticipantClient, CancelParticipantAuthenticationCommand } from "@aws-sdk/client-connectparticipant"; // ES Modules import
* // const { ConnectParticipantClient, CancelParticipantAuthenticationCommand } = require("@aws-sdk/client-connectparticipant"); // CommonJS import
* const client = new ConnectParticipantClient(config);
* const input = { // CancelParticipantAuthenticationRequest
* SessionId: "STRING_VALUE", // required
* ConnectionToken: "STRING_VALUE", // required
* };
* const command = new CancelParticipantAuthenticationCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param CancelParticipantAuthenticationCommandInput - {@link CancelParticipantAuthenticationCommandInput}
* @returns {@link CancelParticipantAuthenticationCommandOutput}
* @see {@link CancelParticipantAuthenticationCommandInput} for command's `input` shape.
* @see {@link CancelParticipantAuthenticationCommandOutput} for command's `response` shape.
* @see {@link ConnectParticipantClientResolvedConfig | config} for ConnectParticipantClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by Amazon Connect.</p>
*
* @throws {@link ConnectParticipantServiceException}
* <p>Base exception class for all service exceptions from ConnectParticipant service.</p>
*
* @public
*/
export class CancelParticipantAuthenticationCommand extends $Command
.classBuilder<
CancelParticipantAuthenticationCommandInput,
CancelParticipantAuthenticationCommandOutput,
ConnectParticipantClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: ConnectParticipantClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonConnectParticipantServiceLambda", "CancelParticipantAuthentication", {})
.n("ConnectParticipantClient", "CancelParticipantAuthenticationCommand")
.f(void 0, void 0)
.ser(se_CancelParticipantAuthenticationCommand)
.de(de_CancelParticipantAuthenticationCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: CancelParticipantAuthenticationRequest;
output: {};
};
sdk: {
input: CancelParticipantAuthenticationCommandInput;
output: CancelParticipantAuthenticationCommandOutput;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface CompleteAttachmentUploadCommandOutput extends CompleteAttachmen
* <p>Allows you to confirm that the attachment has been uploaded using the pre-signed URL
* provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment
* with that identifier is already being uploaded.</p>
* <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>
* <note>
* <p>
* <code>ConnectionToken</code> is used for invoking this API instead of
Expand Down Expand Up @@ -71,8 +72,8 @@ export interface CompleteAttachmentUploadCommandOutput extends CompleteAttachmen
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>The requested operation conflicts with the current state of a service
* resource associated with the request. </p>
* <p>The requested operation conflicts with the current state of a service resource
* associated with the request. </p>
*
* @throws {@link InternalServerException} (server fault)
* <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface CreateParticipantConnectionCommandOutput

/**
* <p>Creates the participant's connection. </p>
* <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>
* <note>
* <p>
* <code>ParticipantToken</code> is used for invoking this API instead of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface DescribeViewCommandOutput extends DescribeViewResponse, __Metad

/**
* <p>Retrieves the view for the specified view token.</p>
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface DisconnectParticipantCommandOutput extends DisconnectParticipan

/**
* <p>Disconnects a participant. </p>
* <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>
* <note>
* <p>
* <code>ConnectionToken</code> is used for invoking this API instead of
Expand Down
Loading

0 comments on commit 16bb7db

Please sign in to comment.