Skip to content

Commit

Permalink
feat(client-connect): Amazon Connect Service Feature: Add support to …
Browse files Browse the repository at this point in the history
…start screen sharing for a web calling contact.
  • Loading branch information
awstools committed Oct 23, 2024
1 parent fe1251e commit aa53886
Show file tree
Hide file tree
Showing 17 changed files with 462 additions and 106 deletions.
10 changes: 9 additions & 1 deletion clients/client-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ a list of Amazon Connect endpoints, see <a href="https://docs.aws.amazon.com/gen

## Installing

To install the this package, simply type add or install @aws-sdk/client-connect
To install this package, simply type add or install @aws-sdk/client-connect
using your favorite package manager:

- `npm install @aws-sdk/client-connect`
Expand Down Expand Up @@ -1801,6 +1801,14 @@ StartOutboundVoiceContact

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/StartOutboundVoiceContactCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartOutboundVoiceContactCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartOutboundVoiceContactCommandOutput/)

</details>
<details>
<summary>
StartScreenSharing
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/StartScreenSharingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartScreenSharingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartScreenSharingCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-connect/src/Connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,11 @@ import {
StartOutboundVoiceContactCommandInput,
StartOutboundVoiceContactCommandOutput,
} from "./commands/StartOutboundVoiceContactCommand";
import {
StartScreenSharingCommand,
StartScreenSharingCommandInput,
StartScreenSharingCommandOutput,
} from "./commands/StartScreenSharingCommand";
import {
StartTaskContactCommand,
StartTaskContactCommandInput,
Expand Down Expand Up @@ -1402,6 +1407,7 @@ const commands = {
StartContactStreamingCommand,
StartOutboundChatContactCommand,
StartOutboundVoiceContactCommand,
StartScreenSharingCommand,
StartTaskContactCommand,
StartWebRTCContactCommand,
StopContactCommand,
Expand Down Expand Up @@ -4570,6 +4576,23 @@ export interface Connect {
cb: (err: any, data?: StartOutboundVoiceContactCommandOutput) => void
): void;

/**
* @see {@link StartScreenSharingCommand}
*/
startScreenSharing(
args: StartScreenSharingCommandInput,
options?: __HttpHandlerOptions
): Promise<StartScreenSharingCommandOutput>;
startScreenSharing(
args: StartScreenSharingCommandInput,
cb: (err: any, data?: StartScreenSharingCommandOutput) => void
): void;
startScreenSharing(
args: StartScreenSharingCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartScreenSharingCommandOutput) => void
): void;

/**
* @see {@link StartTaskContactCommand}
*/
Expand Down
3 changes: 3 additions & 0 deletions clients/client-connect/src/ConnectClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ import {
StartOutboundVoiceContactCommandInput,
StartOutboundVoiceContactCommandOutput,
} from "./commands/StartOutboundVoiceContactCommand";
import { StartScreenSharingCommandInput, StartScreenSharingCommandOutput } from "./commands/StartScreenSharingCommand";
import { StartTaskContactCommandInput, StartTaskContactCommandOutput } from "./commands/StartTaskContactCommand";
import { StartWebRTCContactCommandInput, StartWebRTCContactCommandOutput } from "./commands/StartWebRTCContactCommand";
import { StopContactCommandInput, StopContactCommandOutput } from "./commands/StopContactCommand";
Expand Down Expand Up @@ -983,6 +984,7 @@ export type ServiceInputTypes =
| StartContactStreamingCommandInput
| StartOutboundChatContactCommandInput
| StartOutboundVoiceContactCommandInput
| StartScreenSharingCommandInput
| StartTaskContactCommandInput
| StartWebRTCContactCommandInput
| StopContactCommandInput
Expand Down Expand Up @@ -1244,6 +1246,7 @@ export type ServiceOutputTypes =
| StartContactStreamingCommandOutput
| StartOutboundChatContactCommandOutput
| StartOutboundVoiceContactCommandOutput
| StartScreenSharingCommandOutput
| StartTaskContactCommandOutput
| StartWebRTCContactCommandOutput
| StopContactCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export interface AssociateTrafficDistributionGroupUserCommandOutput
__MetadataBearer {}

/**
* <p>Associates an agent with a traffic distribution group.</p>
* <p>Associates an agent with a traffic distribution group. This API can be called only in the Region where the traffic distribution group is
* created.</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,7 +33,7 @@ export interface CreateTrafficDistributionGroupCommandOutput
__MetadataBearer {}

/**
* <p>Creates a traffic distribution group given an Amazon Connect instance that has been replicated. </p>
* <p>Creates a traffic distribution group given an Amazon Connect instance that has been replicated.</p>
* <note>
* <p>The <code>SignInConfig</code> distribution is available only on a
* default <code>TrafficDistributionGroup</code> (see the <code>IsDefault</code> parameter in the
Expand Down
2 changes: 2 additions & 0 deletions clients/client-connect/src/commands/DescribeContactCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _
* // },
* // Capabilities: { // ParticipantCapabilities
* // Video: "SEND",
* // ScreenShare: "SEND",
* // },
* // },
* // InitiationTimestamp: new Date("TIMESTAMP"),
Expand Down Expand Up @@ -172,6 +173,7 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _
* // },
* // Capabilities: {
* // Video: "SEND",
* // ScreenShare: "SEND",
* // },
* // },
* // Campaign: { // Campaign
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export interface DisassociateTrafficDistributionGroupUserCommandOutput
__MetadataBearer {}

/**
* <p>Disassociates an agent from a traffic distribution group.</p>
* <p>Disassociates an agent from a traffic distribution group. This API can be called only in the Region where the traffic distribution group is
* created.</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,7 +33,8 @@ export interface GetMetricDataV2CommandOutput extends GetMetricDataV2Response, _
* <code>GetMetricDataV2</code> offers more features than <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricData.html">GetMetricData</a>, the previous
* version of this API. It has new metrics, offers filtering at a metric level, and offers the
* ability to filter and group data by channels, queues, routing profiles, agents, and agent
* hierarchy levels. It can retrieve historical data for the last 3 months, at varying intervals. </p>
* hierarchy levels. It can retrieve historical data for the last 3 months, at varying intervals. It
* does not support agent queues.</p>
* <p>For a description of the historical metrics that are supported by
* <code>GetMetricDataV2</code> and <code>GetMetricData</code>, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html">Historical metrics
* definitions</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_1";
import { ListTagsForResourceRequest } from "../models/models_1";
import { ListTagsForResourceResponse } from "../models/models_2";
import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
111 changes: 111 additions & 0 deletions clients/client-connect/src/commands/StartScreenSharingCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
// 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 { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { StartScreenSharingRequest, StartScreenSharingResponse } from "../models/models_2";
import { de_StartScreenSharingCommand, se_StartScreenSharingCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link StartScreenSharingCommand}.
*/
export interface StartScreenSharingCommandInput extends StartScreenSharingRequest {}
/**
* @public
*
* The output of {@link StartScreenSharingCommand}.
*/
export interface StartScreenSharingCommandOutput extends StartScreenSharingResponse, __MetadataBearer {}

/**
* <p>Starts screen sharing for a contact. For more information about screen sharing, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/inapp-calling.html">Set up in-app, web,
* video calling, and screen sharing capabilities</a> in the <i>Amazon Connect Administrator Guide</i>. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ConnectClient, StartScreenSharingCommand } from "@aws-sdk/client-connect"; // ES Modules import
* // const { ConnectClient, StartScreenSharingCommand } = require("@aws-sdk/client-connect"); // CommonJS import
* const client = new ConnectClient(config);
* const input = { // StartScreenSharingRequest
* ClientToken: "STRING_VALUE",
* InstanceId: "STRING_VALUE", // required
* ContactId: "STRING_VALUE", // required
* };
* const command = new StartScreenSharingCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param StartScreenSharingCommandInput - {@link StartScreenSharingCommandInput}
* @returns {@link StartScreenSharingCommandOutput}
* @see {@link StartScreenSharingCommandInput} for command's `input` shape.
* @see {@link StartScreenSharingCommandOutput} for command's `response` shape.
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient permissions to perform this action.</p>
*
* @throws {@link InternalServiceException} (server fault)
* <p>Request processing failed because of an error or failure with the service.</p>
*
* @throws {@link InvalidParameterException} (client fault)
* <p>One or more of the specified parameters are not valid.</p>
*
* @throws {@link InvalidRequestException} (client fault)
* <p>The request is not valid.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource was not found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The throttling limit has been exceeded.</p>
*
* @throws {@link ConnectServiceException}
* <p>Base exception class for all service exceptions from Connect service.</p>
*
* @public
*/
export class StartScreenSharingCommand extends $Command
.classBuilder<
StartScreenSharingCommandInput,
StartScreenSharingCommandOutput,
ConnectClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonConnectService", "StartScreenSharing", {})
.n("ConnectClient", "StartScreenSharingCommand")
.f(void 0, void 0)
.ser(se_StartScreenSharingCommand)
.de(de_StartScreenSharingCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: StartScreenSharingRequest;
output: {};
};
sdk: {
input: StartScreenSharingCommandInput;
output: StartScreenSharingCommandOutput;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ export interface StartWebRTCContactCommandOutput extends StartWebRTCContactRespo
* AllowedCapabilities: { // AllowedCapabilities
* Customer: { // ParticipantCapabilities
* Video: "SEND",
* ScreenShare: "SEND",
* },
* Agent: {
* Video: "SEND",
* ScreenShare: "SEND",
* },
* },
* ParticipantDetails: { // ParticipantDetails
Expand Down
1 change: 1 addition & 0 deletions clients/client-connect/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export * from "./StartContactRecordingCommand";
export * from "./StartContactStreamingCommand";
export * from "./StartOutboundChatContactCommand";
export * from "./StartOutboundVoiceContactCommand";
export * from "./StartScreenSharingCommand";
export * from "./StartTaskContactCommand";
export * from "./StartWebRTCContactCommand";
export * from "./StopContactCommand";
Expand Down
Loading

0 comments on commit aa53886

Please sign in to comment.