Skip to content

Commit 1bea595

Browse files
author
awstools
committed
feat(client-connectcampaignsv2): Amazon Connect Outbound Campaigns V2 / Features : Adds support for Event-Triggered Campaigns.
1 parent 7447521 commit 1bea595

11 files changed

+673
-1
lines changed

clients/client-connectcampaignsv2/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,14 @@ PutOutboundRequestBatch
354354

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

357+
</details>
358+
<details>
359+
<summary>
360+
PutProfileOutboundRequestBatch
361+
</summary>
362+
363+
[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/)
364+
357365
</details>
358366
<details>
359367
<summary>

clients/client-connectcampaignsv2/src/ConnectCampaignsV2.ts

+23
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ import {
9797
PutOutboundRequestBatchCommandInput,
9898
PutOutboundRequestBatchCommandOutput,
9999
} from "./commands/PutOutboundRequestBatchCommand";
100+
import {
101+
PutProfileOutboundRequestBatchCommand,
102+
PutProfileOutboundRequestBatchCommandInput,
103+
PutProfileOutboundRequestBatchCommandOutput,
104+
} from "./commands/PutProfileOutboundRequestBatchCommand";
100105
import {
101106
ResumeCampaignCommand,
102107
ResumeCampaignCommandInput,
@@ -180,6 +185,7 @@ const commands = {
180185
PauseCampaignCommand,
181186
PutConnectInstanceIntegrationCommand,
182187
PutOutboundRequestBatchCommand,
188+
PutProfileOutboundRequestBatchCommand,
183189
ResumeCampaignCommand,
184190
StartCampaignCommand,
185191
StartInstanceOnboardingJobCommand,
@@ -502,6 +508,23 @@ export interface ConnectCampaignsV2 {
502508
cb: (err: any, data?: PutOutboundRequestBatchCommandOutput) => void
503509
): void;
504510

511+
/**
512+
* @see {@link PutProfileOutboundRequestBatchCommand}
513+
*/
514+
putProfileOutboundRequestBatch(
515+
args: PutProfileOutboundRequestBatchCommandInput,
516+
options?: __HttpHandlerOptions
517+
): Promise<PutProfileOutboundRequestBatchCommandOutput>;
518+
putProfileOutboundRequestBatch(
519+
args: PutProfileOutboundRequestBatchCommandInput,
520+
cb: (err: any, data?: PutProfileOutboundRequestBatchCommandOutput) => void
521+
): void;
522+
putProfileOutboundRequestBatch(
523+
args: PutProfileOutboundRequestBatchCommandInput,
524+
options: __HttpHandlerOptions,
525+
cb: (err: any, data?: PutProfileOutboundRequestBatchCommandOutput) => void
526+
): void;
527+
505528
/**
506529
* @see {@link ResumeCampaignCommand}
507530
*/

clients/client-connectcampaignsv2/src/ConnectCampaignsV2Client.ts

+6
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ import {
111111
PutOutboundRequestBatchCommandInput,
112112
PutOutboundRequestBatchCommandOutput,
113113
} from "./commands/PutOutboundRequestBatchCommand";
114+
import {
115+
PutProfileOutboundRequestBatchCommandInput,
116+
PutProfileOutboundRequestBatchCommandOutput,
117+
} from "./commands/PutProfileOutboundRequestBatchCommand";
114118
import { ResumeCampaignCommandInput, ResumeCampaignCommandOutput } from "./commands/ResumeCampaignCommand";
115119
import { StartCampaignCommandInput, StartCampaignCommandOutput } from "./commands/StartCampaignCommand";
116120
import {
@@ -179,6 +183,7 @@ export type ServiceInputTypes =
179183
| PauseCampaignCommandInput
180184
| PutConnectInstanceIntegrationCommandInput
181185
| PutOutboundRequestBatchCommandInput
186+
| PutProfileOutboundRequestBatchCommandInput
182187
| ResumeCampaignCommandInput
183188
| StartCampaignCommandInput
184189
| StartInstanceOnboardingJobCommandInput
@@ -216,6 +221,7 @@ export type ServiceOutputTypes =
216221
| PauseCampaignCommandOutput
217222
| PutConnectInstanceIntegrationCommandOutput
218223
| PutOutboundRequestBatchCommandOutput
224+
| PutProfileOutboundRequestBatchCommandOutput
219225
| ResumeCampaignCommandOutput
220226
| StartCampaignCommandOutput
221227
| StartInstanceOnboardingJobCommandOutput

clients/client-connectcampaignsv2/src/commands/CreateCampaignCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ export interface CreateCampaignCommandOutput extends CreateCampaignResponse, __M
9292
* },
9393
* source: { // Source Union: only one key present
9494
* customerProfilesSegmentArn: "STRING_VALUE",
95+
* eventTrigger: { // EventTrigger
96+
* customerProfilesDomainArn: "STRING_VALUE",
97+
* },
9598
* },
9699
* connectCampaignFlowArn: "STRING_VALUE",
97100
* schedule: { // Schedule

clients/client-connectcampaignsv2/src/commands/DescribeCampaignCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ export interface DescribeCampaignCommandOutput extends DescribeCampaignResponse,
100100
* // },
101101
* // source: { // Source Union: only one key present
102102
* // customerProfilesSegmentArn: "STRING_VALUE",
103+
* // eventTrigger: { // EventTrigger
104+
* // customerProfilesDomainArn: "STRING_VALUE",
105+
* // },
103106
* // },
104107
* // connectCampaignFlowArn: "STRING_VALUE",
105108
* // schedule: { // Schedule
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
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+
ConnectCampaignsV2ClientResolvedConfig,
9+
ServiceInputTypes,
10+
ServiceOutputTypes,
11+
} from "../ConnectCampaignsV2Client";
12+
import { commonParams } from "../endpoint/EndpointParameters";
13+
import { PutProfileOutboundRequestBatchRequest, PutProfileOutboundRequestBatchResponse } from "../models/models_0";
14+
import {
15+
de_PutProfileOutboundRequestBatchCommand,
16+
se_PutProfileOutboundRequestBatchCommand,
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 PutProfileOutboundRequestBatchCommand}.
28+
*/
29+
export interface PutProfileOutboundRequestBatchCommandInput extends PutProfileOutboundRequestBatchRequest {}
30+
/**
31+
* @public
32+
*
33+
* The output of {@link PutProfileOutboundRequestBatchCommand}.
34+
*/
35+
export interface PutProfileOutboundRequestBatchCommandOutput
36+
extends PutProfileOutboundRequestBatchResponse,
37+
__MetadataBearer {}
38+
39+
/**
40+
* Takes in a list of profile outbound requests to be placed as part of an outbound campaign. This API is idempotent.
41+
* @example
42+
* Use a bare-bones client and the command you need to make an API call.
43+
* ```javascript
44+
* import { ConnectCampaignsV2Client, PutProfileOutboundRequestBatchCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import
45+
* // const { ConnectCampaignsV2Client, PutProfileOutboundRequestBatchCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import
46+
* const client = new ConnectCampaignsV2Client(config);
47+
* const input = { // PutProfileOutboundRequestBatchRequest
48+
* id: "STRING_VALUE", // required
49+
* profileOutboundRequests: [ // ProfileOutboundRequestList // required
50+
* { // ProfileOutboundRequest
51+
* clientToken: "STRING_VALUE", // required
52+
* profileId: "STRING_VALUE", // required
53+
* expirationTime: new Date("TIMESTAMP"),
54+
* },
55+
* ],
56+
* };
57+
* const command = new PutProfileOutboundRequestBatchCommand(input);
58+
* const response = await client.send(command);
59+
* // { // PutProfileOutboundRequestBatchResponse
60+
* // successfulRequests: [ // SuccessfulProfileOutboundRequestList
61+
* // { // SuccessfulProfileOutboundRequest
62+
* // clientToken: "STRING_VALUE",
63+
* // id: "STRING_VALUE",
64+
* // },
65+
* // ],
66+
* // failedRequests: [ // FailedProfileOutboundRequestList
67+
* // { // FailedProfileOutboundRequest
68+
* // clientToken: "STRING_VALUE",
69+
* // id: "STRING_VALUE",
70+
* // failureCode: "STRING_VALUE",
71+
* // },
72+
* // ],
73+
* // };
74+
*
75+
* ```
76+
*
77+
* @param PutProfileOutboundRequestBatchCommandInput - {@link PutProfileOutboundRequestBatchCommandInput}
78+
* @returns {@link PutProfileOutboundRequestBatchCommandOutput}
79+
* @see {@link PutProfileOutboundRequestBatchCommandInput} for command's `input` shape.
80+
* @see {@link PutProfileOutboundRequestBatchCommandOutput} for command's `response` shape.
81+
* @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape.
82+
*
83+
* @throws {@link AccessDeniedException} (client fault)
84+
* You do not have sufficient access to perform this action.
85+
*
86+
* @throws {@link ConflictException} (client fault)
87+
* The request could not be processed because of conflict in the current state of the resource.
88+
*
89+
* @throws {@link InternalServerException} (server fault)
90+
* Request processing failed because of an error or failure with the service.
91+
*
92+
* @throws {@link InvalidCampaignStateException} (client fault)
93+
* The request could not be processed because of conflict in the current state of the campaign.
94+
*
95+
* @throws {@link ResourceNotFoundException} (client fault)
96+
* The specified resource was not found.
97+
*
98+
* @throws {@link ThrottlingException} (client fault)
99+
* The request was denied due to request throttling.
100+
*
101+
* @throws {@link ValidationException} (client fault)
102+
* The input fails to satisfy the constraints specified by an AWS service.
103+
*
104+
* @throws {@link ConnectCampaignsV2ServiceException}
105+
* <p>Base exception class for all service exceptions from ConnectCampaignsV2 service.</p>
106+
*
107+
* @public
108+
*/
109+
export class PutProfileOutboundRequestBatchCommand extends $Command
110+
.classBuilder<
111+
PutProfileOutboundRequestBatchCommandInput,
112+
PutProfileOutboundRequestBatchCommandOutput,
113+
ConnectCampaignsV2ClientResolvedConfig,
114+
ServiceInputTypes,
115+
ServiceOutputTypes
116+
>()
117+
.ep(commonParams)
118+
.m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) {
119+
return [
120+
getSerdePlugin(config, this.serialize, this.deserialize),
121+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
122+
];
123+
})
124+
.s("AmazonConnectCampaignServiceV2", "PutProfileOutboundRequestBatch", {})
125+
.n("ConnectCampaignsV2Client", "PutProfileOutboundRequestBatchCommand")
126+
.f(void 0, void 0)
127+
.ser(se_PutProfileOutboundRequestBatchCommand)
128+
.de(de_PutProfileOutboundRequestBatchCommand)
129+
.build() {
130+
/** @internal type navigation helper, not in runtime. */
131+
protected declare static __types: {
132+
api: {
133+
input: PutProfileOutboundRequestBatchRequest;
134+
output: PutProfileOutboundRequestBatchResponse;
135+
};
136+
sdk: {
137+
input: PutProfileOutboundRequestBatchCommandInput;
138+
output: PutProfileOutboundRequestBatchCommandOutput;
139+
};
140+
};
141+
}

clients/client-connectcampaignsv2/src/commands/UpdateCampaignSourceCommand.ts

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ export interface UpdateCampaignSourceCommandOutput extends __MetadataBearer {}
4343
* id: "STRING_VALUE", // required
4444
* source: { // Source Union: only one key present
4545
* customerProfilesSegmentArn: "STRING_VALUE",
46+
* eventTrigger: { // EventTrigger
47+
* customerProfilesDomainArn: "STRING_VALUE",
48+
* },
4649
* },
4750
* };
4851
* const command = new UpdateCampaignSourceCommand(input);

clients/client-connectcampaignsv2/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export * from "./ListTagsForResourceCommand";
1818
export * from "./PauseCampaignCommand";
1919
export * from "./PutConnectInstanceIntegrationCommand";
2020
export * from "./PutOutboundRequestBatchCommand";
21+
export * from "./PutProfileOutboundRequestBatchCommand";
2122
export * from "./ResumeCampaignCommand";
2223
export * from "./StartCampaignCommand";
2324
export * from "./StartInstanceOnboardingJobCommand";

0 commit comments

Comments
 (0)