Skip to content

Commit

Permalink
feat(client-connectcampaigns): Amazon Connect outbound campaigns has …
Browse files Browse the repository at this point in the history
…launched agentless dialing mode which enables customers to make automated outbound calls without agent engagement. This release updates three of the campaign management API's to support the new agentless dialing mode and the new dialing capacity field.
  • Loading branch information
awstools committed Aug 31, 2023
1 parent 1552f49 commit 83abe06
Show file tree
Hide file tree
Showing 7 changed files with 515 additions and 276 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,20 @@ export interface CreateCampaignCommandOutput extends CreateCampaignResponse, __M
* dialerConfig: { // DialerConfig Union: only one key present
* progressiveDialerConfig: { // ProgressiveDialerConfig
* bandwidthAllocation: Number("double"), // required
* dialingCapacity: Number("double"),
* },
* predictiveDialerConfig: { // PredictiveDialerConfig
* bandwidthAllocation: Number("double"), // required
* dialingCapacity: Number("double"),
* },
* agentlessDialerConfig: { // AgentlessDialerConfig
* dialingCapacity: Number("double"),
* },
* },
* outboundCallConfig: { // OutboundCallConfig
* connectContactFlowId: "STRING_VALUE", // required
* connectSourcePhoneNumber: "STRING_VALUE",
* connectQueueId: "STRING_VALUE", // required
* connectQueueId: "STRING_VALUE",
* answerMachineDetectionConfig: { // AnswerMachineDetectionConfig
* enableAnswerMachineDetection: true || false, // required
* },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,20 @@ export interface DescribeCampaignCommandOutput extends DescribeCampaignResponse,
* // dialerConfig: { // DialerConfig Union: only one key present
* // progressiveDialerConfig: { // ProgressiveDialerConfig
* // bandwidthAllocation: Number("double"), // required
* // dialingCapacity: Number("double"),
* // },
* // predictiveDialerConfig: { // PredictiveDialerConfig
* // bandwidthAllocation: Number("double"), // required
* // dialingCapacity: Number("double"),
* // },
* // agentlessDialerConfig: { // AgentlessDialerConfig
* // dialingCapacity: Number("double"),
* // },
* // },
* // outboundCallConfig: { // OutboundCallConfig
* // connectContactFlowId: "STRING_VALUE", // required
* // connectSourcePhoneNumber: "STRING_VALUE",
* // connectQueueId: "STRING_VALUE", // required
* // connectQueueId: "STRING_VALUE",
* // answerMachineDetectionConfig: { // AnswerMachineDetectionConfig
* // enableAnswerMachineDetection: true || false, // required
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ export interface UpdateCampaignDialerConfigCommandOutput extends __MetadataBeare
* dialerConfig: { // DialerConfig Union: only one key present
* progressiveDialerConfig: { // ProgressiveDialerConfig
* bandwidthAllocation: Number("double"), // required
* dialingCapacity: Number("double"),
* },
* predictiveDialerConfig: { // PredictiveDialerConfig
* bandwidthAllocation: Number("double"), // required
* dialingCapacity: Number("double"),
* },
* agentlessDialerConfig: { // AgentlessDialerConfig
* dialingCapacity: Number("double"),
* },
* },
* };
Expand Down
35 changes: 18 additions & 17 deletions clients/client-connectcampaigns/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/connectcampaigns.json */

const p="required",
q="fn",
r="argv",
s="ref";
const a="PartitionResult",
const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e={[p]:false,"type":"String"},
f={[p]:true,"default":false,"type":"Boolean"},
g={[s]:"Endpoint"},
h={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
i={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
j={},
k={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsFIPS"]}]},
l={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsDualStack"]}]},
m=[g],
n=[h],
o=[i];
const _data={version:"1.0",parameters:{Region:e,UseDualStack:f,UseFIPS:f,Endpoint:e},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:a}],type:b,rules:[{conditions:[{[q]:"isSet",[r]:m},{[q]:"parseURL",[r]:m,assign:"url"}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:g,properties:j,headers:j},type:d}]}]},{conditions:[h,i],type:b,rules:[{conditions:[k,l],type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[k],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]};
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
export const ruleSet: RuleSetObject = _data;
43 changes: 42 additions & 1 deletion clients/client-connectcampaigns/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ export class AccessDeniedException extends __BaseException {
}
}

/**
* @public
* Agentless Dialer config
*/
export interface AgentlessDialerConfig {
/**
* @public
* Allocates dialing capacity for this campaign between multiple active campaigns
*/
dialingCapacity?: number;
}

/**
* @public
* The request could not be processed because of conflict in the current state of the resource.
Expand Down Expand Up @@ -67,6 +79,12 @@ export interface PredictiveDialerConfig {
* The bandwidth allocation of a queue resource.
*/
bandwidthAllocation: number | undefined;

/**
* @public
* Allocates dialing capacity for this campaign between multiple active campaigns
*/
dialingCapacity?: number;
}

/**
Expand All @@ -79,13 +97,20 @@ export interface ProgressiveDialerConfig {
* The bandwidth allocation of a queue resource.
*/
bandwidthAllocation: number | undefined;

/**
* @public
* Allocates dialing capacity for this campaign between multiple active campaigns
*/
dialingCapacity?: number;
}

/**
* @public
* The possible types of dialer config parameters
*/
export type DialerConfig =
| DialerConfig.AgentlessDialerConfigMember
| DialerConfig.PredictiveDialerConfigMember
| DialerConfig.ProgressiveDialerConfigMember
| DialerConfig.$UnknownMember;
Expand All @@ -101,6 +126,7 @@ export namespace DialerConfig {
export interface ProgressiveDialerConfigMember {
progressiveDialerConfig: ProgressiveDialerConfig;
predictiveDialerConfig?: never;
agentlessDialerConfig?: never;
$unknown?: never;
}

Expand All @@ -111,6 +137,18 @@ export namespace DialerConfig {
export interface PredictiveDialerConfigMember {
progressiveDialerConfig?: never;
predictiveDialerConfig: PredictiveDialerConfig;
agentlessDialerConfig?: never;
$unknown?: never;
}

/**
* @public
* Agentless Dialer config
*/
export interface AgentlessDialerConfigMember {
progressiveDialerConfig?: never;
predictiveDialerConfig?: never;
agentlessDialerConfig: AgentlessDialerConfig;
$unknown?: never;
}

Expand All @@ -120,19 +158,22 @@ export namespace DialerConfig {
export interface $UnknownMember {
progressiveDialerConfig?: never;
predictiveDialerConfig?: never;
agentlessDialerConfig?: never;
$unknown: [string, any];
}

export interface Visitor<T> {
progressiveDialerConfig: (value: ProgressiveDialerConfig) => T;
predictiveDialerConfig: (value: PredictiveDialerConfig) => T;
agentlessDialerConfig: (value: AgentlessDialerConfig) => T;
_: (name: string, value: any) => T;
}

export const visit = <T>(value: DialerConfig, visitor: Visitor<T>): T => {
if (value.progressiveDialerConfig !== undefined)
return visitor.progressiveDialerConfig(value.progressiveDialerConfig);
if (value.predictiveDialerConfig !== undefined) return visitor.predictiveDialerConfig(value.predictiveDialerConfig);
if (value.agentlessDialerConfig !== undefined) return visitor.agentlessDialerConfig(value.agentlessDialerConfig);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
}
Expand Down Expand Up @@ -170,7 +211,7 @@ export interface OutboundCallConfig {
* @public
* The queue for the call. If you specify a queue, the phone displayed for caller ID is the phone number specified in the queue. If you do not specify a queue, the queue defined in the contact flow is used. If you do not specify a queue, you must specify a source phone number.
*/
connectQueueId: string | undefined;
connectQueueId?: string;

/**
* @public
Expand Down
29 changes: 29 additions & 0 deletions clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import {
import { ConnectCampaignsServiceException as __BaseException } from "../models/ConnectCampaignsServiceException";
import {
AccessDeniedException,
AgentlessDialerConfig,
AnswerMachineDetectionConfig,
Campaign,
CampaignFilters,
Expand Down Expand Up @@ -2196,6 +2197,15 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
return __decorateServiceException(exception, parsedOutput.body);
};

/**
* serializeAws_restJson1AgentlessDialerConfig
*/
const se_AgentlessDialerConfig = (input: AgentlessDialerConfig, context: __SerdeContext): any => {
return take(input, {
dialingCapacity: __serializeFloat,
});
};

// se_AnswerMachineDetectionConfig omitted.

// se_Attributes omitted.
Expand All @@ -2209,6 +2219,7 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
*/
const se_DialerConfig = (input: DialerConfig, context: __SerdeContext): any => {
return DialerConfig.visit(input, {
agentlessDialerConfig: (value) => ({ agentlessDialerConfig: se_AgentlessDialerConfig(value, context) }),
predictiveDialerConfig: (value) => ({ predictiveDialerConfig: se_PredictiveDialerConfig(value, context) }),
progressiveDialerConfig: (value) => ({ progressiveDialerConfig: se_ProgressiveDialerConfig(value, context) }),
_: (name, value) => ({ name: value } as any),
Expand Down Expand Up @@ -2250,6 +2261,7 @@ const se_DialRequestList = (input: DialRequest[], context: __SerdeContext): any
const se_PredictiveDialerConfig = (input: PredictiveDialerConfig, context: __SerdeContext): any => {
return take(input, {
bandwidthAllocation: __serializeFloat,
dialingCapacity: __serializeFloat,
});
};

Expand All @@ -2259,11 +2271,21 @@ const se_PredictiveDialerConfig = (input: PredictiveDialerConfig, context: __Ser
const se_ProgressiveDialerConfig = (input: ProgressiveDialerConfig, context: __SerdeContext): any => {
return take(input, {
bandwidthAllocation: __serializeFloat,
dialingCapacity: __serializeFloat,
});
};

// se_TagMap omitted.

/**
* deserializeAws_restJson1AgentlessDialerConfig
*/
const de_AgentlessDialerConfig = (output: any, context: __SerdeContext): AgentlessDialerConfig => {
return take(output, {
dialingCapacity: __limitedParseDouble,
}) as any;
};

// de_AnswerMachineDetectionConfig omitted.

/**
Expand All @@ -2289,6 +2311,11 @@ const de_Campaign = (output: any, context: __SerdeContext): Campaign => {
* deserializeAws_restJson1DialerConfig
*/
const de_DialerConfig = (output: any, context: __SerdeContext): DialerConfig => {
if (output.agentlessDialerConfig != null) {
return {
agentlessDialerConfig: de_AgentlessDialerConfig(output.agentlessDialerConfig, context),
};
}
if (output.predictiveDialerConfig != null) {
return {
predictiveDialerConfig: de_PredictiveDialerConfig(output.predictiveDialerConfig, context),
Expand Down Expand Up @@ -2324,6 +2351,7 @@ const de_DialerConfig = (output: any, context: __SerdeContext): DialerConfig =>
const de_PredictiveDialerConfig = (output: any, context: __SerdeContext): PredictiveDialerConfig => {
return take(output, {
bandwidthAllocation: __limitedParseDouble,
dialingCapacity: __limitedParseDouble,
}) as any;
};

Expand All @@ -2333,6 +2361,7 @@ const de_PredictiveDialerConfig = (output: any, context: __SerdeContext): Predic
const de_ProgressiveDialerConfig = (output: any, context: __SerdeContext): ProgressiveDialerConfig => {
return take(output, {
bandwidthAllocation: __limitedParseDouble,
dialingCapacity: __limitedParseDouble,
}) as any;
};

Expand Down
Loading

0 comments on commit 83abe06

Please sign in to comment.