Skip to content

Commit

Permalink
feat(client-connectcampaignsv2): Amazon Connect Outbound Campaigns V2…
Browse files Browse the repository at this point in the history
… / Features : Adds support for Event-Triggered Campaigns.
  • Loading branch information
awstools committed Dec 2, 2024
1 parent 7447521 commit 1bea595
Show file tree
Hide file tree
Showing 11 changed files with 673 additions and 1 deletion.
8 changes: 8 additions & 0 deletions clients/client-connectcampaignsv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ PutOutboundRequestBatch

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/PutOutboundRequestBatchCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutOutboundRequestBatchCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutOutboundRequestBatchCommandOutput/)

</details>
<details>
<summary>
PutProfileOutboundRequestBatch
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/PutProfileOutboundRequestBatchCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutProfileOutboundRequestBatchCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutProfileOutboundRequestBatchCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-connectcampaignsv2/src/ConnectCampaignsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ import {
PutOutboundRequestBatchCommandInput,
PutOutboundRequestBatchCommandOutput,
} from "./commands/PutOutboundRequestBatchCommand";
import {
PutProfileOutboundRequestBatchCommand,
PutProfileOutboundRequestBatchCommandInput,
PutProfileOutboundRequestBatchCommandOutput,
} from "./commands/PutProfileOutboundRequestBatchCommand";
import {
ResumeCampaignCommand,
ResumeCampaignCommandInput,
Expand Down Expand Up @@ -180,6 +185,7 @@ const commands = {
PauseCampaignCommand,
PutConnectInstanceIntegrationCommand,
PutOutboundRequestBatchCommand,
PutProfileOutboundRequestBatchCommand,
ResumeCampaignCommand,
StartCampaignCommand,
StartInstanceOnboardingJobCommand,
Expand Down Expand Up @@ -502,6 +508,23 @@ export interface ConnectCampaignsV2 {
cb: (err: any, data?: PutOutboundRequestBatchCommandOutput) => void
): void;

/**
* @see {@link PutProfileOutboundRequestBatchCommand}
*/
putProfileOutboundRequestBatch(
args: PutProfileOutboundRequestBatchCommandInput,
options?: __HttpHandlerOptions
): Promise<PutProfileOutboundRequestBatchCommandOutput>;
putProfileOutboundRequestBatch(
args: PutProfileOutboundRequestBatchCommandInput,
cb: (err: any, data?: PutProfileOutboundRequestBatchCommandOutput) => void
): void;
putProfileOutboundRequestBatch(
args: PutProfileOutboundRequestBatchCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PutProfileOutboundRequestBatchCommandOutput) => void
): void;

/**
* @see {@link ResumeCampaignCommand}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ import {
PutOutboundRequestBatchCommandInput,
PutOutboundRequestBatchCommandOutput,
} from "./commands/PutOutboundRequestBatchCommand";
import {
PutProfileOutboundRequestBatchCommandInput,
PutProfileOutboundRequestBatchCommandOutput,
} from "./commands/PutProfileOutboundRequestBatchCommand";
import { ResumeCampaignCommandInput, ResumeCampaignCommandOutput } from "./commands/ResumeCampaignCommand";
import { StartCampaignCommandInput, StartCampaignCommandOutput } from "./commands/StartCampaignCommand";
import {
Expand Down Expand Up @@ -179,6 +183,7 @@ export type ServiceInputTypes =
| PauseCampaignCommandInput
| PutConnectInstanceIntegrationCommandInput
| PutOutboundRequestBatchCommandInput
| PutProfileOutboundRequestBatchCommandInput
| ResumeCampaignCommandInput
| StartCampaignCommandInput
| StartInstanceOnboardingJobCommandInput
Expand Down Expand Up @@ -216,6 +221,7 @@ export type ServiceOutputTypes =
| PauseCampaignCommandOutput
| PutConnectInstanceIntegrationCommandOutput
| PutOutboundRequestBatchCommandOutput
| PutProfileOutboundRequestBatchCommandOutput
| ResumeCampaignCommandOutput
| StartCampaignCommandOutput
| StartInstanceOnboardingJobCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export interface CreateCampaignCommandOutput extends CreateCampaignResponse, __M
* },
* source: { // Source Union: only one key present
* customerProfilesSegmentArn: "STRING_VALUE",
* eventTrigger: { // EventTrigger
* customerProfilesDomainArn: "STRING_VALUE",
* },
* },
* connectCampaignFlowArn: "STRING_VALUE",
* schedule: { // Schedule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ export interface DescribeCampaignCommandOutput extends DescribeCampaignResponse,
* // },
* // source: { // Source Union: only one key present
* // customerProfilesSegmentArn: "STRING_VALUE",
* // eventTrigger: { // EventTrigger
* // customerProfilesDomainArn: "STRING_VALUE",
* // },
* // },
* // connectCampaignFlowArn: "STRING_VALUE",
* // schedule: { // Schedule
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
// 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 {
ConnectCampaignsV2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes,
} from "../ConnectCampaignsV2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { PutProfileOutboundRequestBatchRequest, PutProfileOutboundRequestBatchResponse } from "../models/models_0";
import {
de_PutProfileOutboundRequestBatchCommand,
se_PutProfileOutboundRequestBatchCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link PutProfileOutboundRequestBatchCommand}.
*/
export interface PutProfileOutboundRequestBatchCommandInput extends PutProfileOutboundRequestBatchRequest {}
/**
* @public
*
* The output of {@link PutProfileOutboundRequestBatchCommand}.
*/
export interface PutProfileOutboundRequestBatchCommandOutput
extends PutProfileOutboundRequestBatchResponse,
__MetadataBearer {}

/**
* Takes in a list of profile outbound requests to be placed as part of an outbound campaign. This API is idempotent.
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ConnectCampaignsV2Client, PutProfileOutboundRequestBatchCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import
* // const { ConnectCampaignsV2Client, PutProfileOutboundRequestBatchCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import
* const client = new ConnectCampaignsV2Client(config);
* const input = { // PutProfileOutboundRequestBatchRequest
* id: "STRING_VALUE", // required
* profileOutboundRequests: [ // ProfileOutboundRequestList // required
* { // ProfileOutboundRequest
* clientToken: "STRING_VALUE", // required
* profileId: "STRING_VALUE", // required
* expirationTime: new Date("TIMESTAMP"),
* },
* ],
* };
* const command = new PutProfileOutboundRequestBatchCommand(input);
* const response = await client.send(command);
* // { // PutProfileOutboundRequestBatchResponse
* // successfulRequests: [ // SuccessfulProfileOutboundRequestList
* // { // SuccessfulProfileOutboundRequest
* // clientToken: "STRING_VALUE",
* // id: "STRING_VALUE",
* // },
* // ],
* // failedRequests: [ // FailedProfileOutboundRequestList
* // { // FailedProfileOutboundRequest
* // clientToken: "STRING_VALUE",
* // id: "STRING_VALUE",
* // failureCode: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
*
* @param PutProfileOutboundRequestBatchCommandInput - {@link PutProfileOutboundRequestBatchCommandInput}
* @returns {@link PutProfileOutboundRequestBatchCommandOutput}
* @see {@link PutProfileOutboundRequestBatchCommandInput} for command's `input` shape.
* @see {@link PutProfileOutboundRequestBatchCommandOutput} for command's `response` shape.
* @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* You do not have sufficient access to perform this action.
*
* @throws {@link ConflictException} (client fault)
* The request could not be processed because of conflict in the current state of the resource.
*
* @throws {@link InternalServerException} (server fault)
* Request processing failed because of an error or failure with the service.
*
* @throws {@link InvalidCampaignStateException} (client fault)
* The request could not be processed because of conflict in the current state of the campaign.
*
* @throws {@link ResourceNotFoundException} (client fault)
* The specified resource was not found.
*
* @throws {@link ThrottlingException} (client fault)
* The request was denied due to request throttling.
*
* @throws {@link ValidationException} (client fault)
* The input fails to satisfy the constraints specified by an AWS service.
*
* @throws {@link ConnectCampaignsV2ServiceException}
* <p>Base exception class for all service exceptions from ConnectCampaignsV2 service.</p>
*
* @public
*/
export class PutProfileOutboundRequestBatchCommand extends $Command
.classBuilder<
PutProfileOutboundRequestBatchCommandInput,
PutProfileOutboundRequestBatchCommandOutput,
ConnectCampaignsV2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonConnectCampaignServiceV2", "PutProfileOutboundRequestBatch", {})
.n("ConnectCampaignsV2Client", "PutProfileOutboundRequestBatchCommand")
.f(void 0, void 0)
.ser(se_PutProfileOutboundRequestBatchCommand)
.de(de_PutProfileOutboundRequestBatchCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: PutProfileOutboundRequestBatchRequest;
output: PutProfileOutboundRequestBatchResponse;
};
sdk: {
input: PutProfileOutboundRequestBatchCommandInput;
output: PutProfileOutboundRequestBatchCommandOutput;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export interface UpdateCampaignSourceCommandOutput extends __MetadataBearer {}
* id: "STRING_VALUE", // required
* source: { // Source Union: only one key present
* customerProfilesSegmentArn: "STRING_VALUE",
* eventTrigger: { // EventTrigger
* customerProfilesDomainArn: "STRING_VALUE",
* },
* },
* };
* const command = new UpdateCampaignSourceCommand(input);
Expand Down
1 change: 1 addition & 0 deletions clients/client-connectcampaignsv2/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export * from "./ListTagsForResourceCommand";
export * from "./PauseCampaignCommand";
export * from "./PutConnectInstanceIntegrationCommand";
export * from "./PutOutboundRequestBatchCommand";
export * from "./PutProfileOutboundRequestBatchCommand";
export * from "./ResumeCampaignCommand";
export * from "./StartCampaignCommand";
export * from "./StartInstanceOnboardingJobCommand";
Expand Down
Loading

0 comments on commit 1bea595

Please sign in to comment.