From 329a39d934a963883eeeabbe93cc8866645a35d9 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 20 Dec 2024 19:13:28 +0000 Subject: [PATCH] feat(client-connect): This release supports adding NotAttributeCondition and Range to the RoutingCriteria object. --- .../src/commands/DescribeContactCommand.ts | 42 ++++++++++++ .../UpdateContactRoutingDataCommand.ts | 42 ++++++++++++ .../src/commands/UpdateRuleCommand.ts | 2 +- clients/client-connect/src/models/models_1.ts | 43 ++++++------ clients/client-connect/src/models/models_2.ts | 67 ++++++------------- clients/client-connect/src/models/models_3.ts | 52 ++++++++++++++ .../src/protocols/Aws_restJson1.ts | 27 +++++++- codegen/sdk-codegen/aws-models/connect.json | 31 ++++++++- 8 files changed, 237 insertions(+), 69 deletions(-) diff --git a/clients/client-connect/src/commands/DescribeContactCommand.ts b/clients/client-connect/src/commands/DescribeContactCommand.ts index 1b9855b6a3d2..b0836d41393b 100644 --- a/clients/client-connect/src/commands/DescribeContactCommand.ts +++ b/clients/client-connect/src/commands/DescribeContactCommand.ts @@ -135,6 +135,10 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _ * // Name: "STRING_VALUE", * // Value: "STRING_VALUE", * // ProficiencyLevel: Number("float"), + * // Range: { // Range + * // MinProficiencyLevel: Number("float"), + * // MaxProficiencyLevel: Number("float"), + * // }, * // MatchCriteria: { // MatchCriteria * // AgentsCriteria: { // AgentsCriteria * // AgentIds: [ // AgentIds @@ -150,6 +154,10 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _ * // Name: "STRING_VALUE", * // Value: "STRING_VALUE", * // ProficiencyLevel: Number("float"), + * // Range: { + * // MinProficiencyLevel: Number("float"), + * // MaxProficiencyLevel: Number("float"), + * // }, * // MatchCriteria: { * // AgentsCriteria: { * // AgentIds: [ @@ -165,11 +173,45 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _ * // OrExpression: [ * // "", * // ], + * // NotAttributeCondition: { + * // Name: "STRING_VALUE", + * // Value: "STRING_VALUE", + * // ProficiencyLevel: Number("float"), + * // Range: { + * // MinProficiencyLevel: Number("float"), + * // MaxProficiencyLevel: Number("float"), + * // }, + * // MatchCriteria: { + * // AgentsCriteria: { + * // AgentIds: [ + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // ComparisonOperator: "STRING_VALUE", + * // }, * // }, * // ], * // OrExpression: [ * // "", * // ], + * // NotAttributeCondition: { + * // Name: "STRING_VALUE", + * // Value: "STRING_VALUE", + * // ProficiencyLevel: Number("float"), + * // Range: { + * // MinProficiencyLevel: Number("float"), + * // MaxProficiencyLevel: Number("float"), + * // }, + * // MatchCriteria: { + * // AgentsCriteria: { + * // AgentIds: [ + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // ComparisonOperator: "STRING_VALUE", + * // }, * // }, * // Status: "ACTIVE" || "INACTIVE" || "JOINED" || "EXPIRED", * // }, diff --git a/clients/client-connect/src/commands/UpdateContactRoutingDataCommand.ts b/clients/client-connect/src/commands/UpdateContactRoutingDataCommand.ts index 5177ced47fd7..20200a342568 100644 --- a/clients/client-connect/src/commands/UpdateContactRoutingDataCommand.ts +++ b/clients/client-connect/src/commands/UpdateContactRoutingDataCommand.ts @@ -64,6 +64,10 @@ export interface UpdateContactRoutingDataCommandOutput extends UpdateContactRout * Name: "STRING_VALUE", * Value: "STRING_VALUE", * ProficiencyLevel: Number("float"), + * Range: { // Range + * MinProficiencyLevel: Number("float"), + * MaxProficiencyLevel: Number("float"), + * }, * MatchCriteria: { // MatchCriteria * AgentsCriteria: { // AgentsCriteria * AgentIds: [ // AgentIds @@ -79,6 +83,10 @@ export interface UpdateContactRoutingDataCommandOutput extends UpdateContactRout * Name: "STRING_VALUE", * Value: "STRING_VALUE", * ProficiencyLevel: Number("float"), + * Range: { + * MinProficiencyLevel: Number("float"), + * MaxProficiencyLevel: Number("float"), + * }, * MatchCriteria: { * AgentsCriteria: { * AgentIds: [ @@ -94,11 +102,45 @@ export interface UpdateContactRoutingDataCommandOutput extends UpdateContactRout * OrExpression: [ * "", * ], + * NotAttributeCondition: { + * Name: "STRING_VALUE", + * Value: "STRING_VALUE", + * ProficiencyLevel: Number("float"), + * Range: { + * MinProficiencyLevel: Number("float"), + * MaxProficiencyLevel: Number("float"), + * }, + * MatchCriteria: { + * AgentsCriteria: { + * AgentIds: [ + * "STRING_VALUE", + * ], + * }, + * }, + * ComparisonOperator: "STRING_VALUE", + * }, * }, * ], * OrExpression: [ * "", * ], + * NotAttributeCondition: { + * Name: "STRING_VALUE", + * Value: "STRING_VALUE", + * ProficiencyLevel: Number("float"), + * Range: { + * MinProficiencyLevel: Number("float"), + * MaxProficiencyLevel: Number("float"), + * }, + * MatchCriteria: { + * AgentsCriteria: { + * AgentIds: [ + * "STRING_VALUE", + * ], + * }, + * }, + * ComparisonOperator: "STRING_VALUE", + * }, * }, * }, * ], diff --git a/clients/client-connect/src/commands/UpdateRuleCommand.ts b/clients/client-connect/src/commands/UpdateRuleCommand.ts index 88a1380e02ce..eca978d8e0c4 100644 --- a/clients/client-connect/src/commands/UpdateRuleCommand.ts +++ b/clients/client-connect/src/commands/UpdateRuleCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; import { commonParams } from "../endpoint/EndpointParameters"; -import { UpdateRuleRequest } from "../models/models_2"; +import { UpdateRuleRequest } from "../models/models_3"; import { de_UpdateRuleCommand, se_UpdateRuleCommand } from "../protocols/Aws_restJson1"; /** diff --git a/clients/client-connect/src/models/models_1.ts b/clients/client-connect/src/models/models_1.ts index 134b1a6dd4b0..88ca98aefa03 100644 --- a/clients/client-connect/src/models/models_1.ts +++ b/clients/client-connect/src/models/models_1.ts @@ -607,6 +607,24 @@ export interface MatchCriteria { AgentsCriteria?: AgentsCriteria | undefined; } +/** + *

An Object to define the minimum and maximum proficiency levels.

+ * @public + */ +export interface Range { + /** + *

The minimum proficiency level of the range.

+ * @public + */ + MinProficiencyLevel?: number | undefined; + + /** + *

The maximum proficiency level of the range.

+ * @public + */ + MaxProficiencyLevel?: number | undefined; +} + /** *

An object to specify the predefined attribute condition.

* @public @@ -630,6 +648,12 @@ export interface AttributeCondition { */ ProficiencyLevel?: number | undefined; + /** + *

An Object to define the minimum and maximum proficiency levels.

+ * @public + */ + Range?: Range | undefined; + /** *

An object to define AgentsCriteria.

* @public @@ -9821,25 +9845,6 @@ export const RealTimeContactAnalysisOutputType = { export type RealTimeContactAnalysisOutputType = (typeof RealTimeContactAnalysisOutputType)[keyof typeof RealTimeContactAnalysisOutputType]; -/** - * @public - * @enum - */ -export const RealTimeContactAnalysisSegmentType = { - Attachments: "Attachments", - Categories: "Categories", - Event: "Event", - Issues: "Issues", - PostContactSummary: "PostContactSummary", - Transcript: "Transcript", -} as const; - -/** - * @public - */ -export type RealTimeContactAnalysisSegmentType = - (typeof RealTimeContactAnalysisSegmentType)[keyof typeof RealTimeContactAnalysisSegmentType]; - /** * @internal */ diff --git a/clients/client-connect/src/models/models_2.ts b/clients/client-connect/src/models/models_2.ts index 14c1fe8c8cc3..4b4139a159ca 100644 --- a/clients/client-connect/src/models/models_2.ts +++ b/clients/client-connect/src/models/models_2.ts @@ -32,7 +32,6 @@ import { Reference, RehydrationType, RoutingProfileQueueConfig, - RuleAction, RulePublishStatus, StringComparisonType, StringCondition, @@ -67,12 +66,30 @@ import { QueueStatus, QuickConnect, RealTimeContactAnalysisOutputType, - RealTimeContactAnalysisSegmentType, RoutingProfile, SortOrder, TrafficDistributionGroupStatus, } from "./models_1"; +/** + * @public + * @enum + */ +export const RealTimeContactAnalysisSegmentType = { + Attachments: "Attachments", + Categories: "Categories", + Event: "Event", + Issues: "Issues", + PostContactSummary: "PostContactSummary", + Transcript: "Transcript", +} as const; + +/** + * @public + */ +export type RealTimeContactAnalysisSegmentType = + (typeof RealTimeContactAnalysisSegmentType)[keyof typeof RealTimeContactAnalysisSegmentType]; + /** * @public */ @@ -4872,7 +4889,7 @@ export interface StartAttachedFileUploadResponse { CreatedBy?: CreatedByInfo | undefined; /** - *

Information to be used while uploading the attached file.

+ *

The headers to be provided while uploading the file to the URL.

* @public */ UploadUrlMetadata?: UploadUrlMetadata | undefined; @@ -7646,50 +7663,6 @@ export interface UpdateRoutingProfileQueuesRequest { QueueConfigs: RoutingProfileQueueConfig[] | undefined; } -/** - * @public - */ -export interface UpdateRuleRequest { - /** - *

A unique identifier for the rule.

- * @public - */ - RuleId: string | undefined; - - /** - *

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

- * @public - */ - InstanceId: string | undefined; - - /** - *

The name of the rule. You can change the name only if TriggerEventSource is one - * of the following values: OnZendeskTicketCreate | - * OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate - *

- * @public - */ - Name: string | undefined; - - /** - *

The conditions of the rule.

- * @public - */ - Function: string | undefined; - - /** - *

A list of actions to be run when the rule is triggered.

- * @public - */ - Actions: RuleAction[] | undefined; - - /** - *

The publish status of the rule.

- * @public - */ - PublishStatus: RulePublishStatus | undefined; -} - /** * @internal */ diff --git a/clients/client-connect/src/models/models_3.ts b/clients/client-connect/src/models/models_3.ts index 7042351f9e7c..d69e4d5ed435 100644 --- a/clients/client-connect/src/models/models_3.ts +++ b/clients/client-connect/src/models/models_3.ts @@ -17,6 +17,8 @@ import { EvaluationFormScoringStrategy, InitiateAs, Reference, + RuleAction, + RulePublishStatus, StringCondition, TaskTemplateConstraints, TaskTemplateDefaults, @@ -85,6 +87,50 @@ import { UserSearchFilter, } from "./models_2"; +/** + * @public + */ +export interface UpdateRuleRequest { + /** + *

A unique identifier for the rule.

+ * @public + */ + RuleId: string | undefined; + + /** + *

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

+ * @public + */ + InstanceId: string | undefined; + + /** + *

The name of the rule. You can change the name only if TriggerEventSource is one + * of the following values: OnZendeskTicketCreate | + * OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate + *

+ * @public + */ + Name: string | undefined; + + /** + *

The conditions of the rule.

+ * @public + */ + Function: string | undefined; + + /** + *

A list of actions to be run when the rule is triggered.

+ * @public + */ + Actions: RuleAction[] | undefined; + + /** + *

The publish status of the rule.

+ * @public + */ + PublishStatus: RulePublishStatus | undefined; +} + /** * @public */ @@ -1212,6 +1258,12 @@ export interface Expression { * @public */ OrExpression?: Expression[] | undefined; + + /** + *

An object to specify the predefined attribute condition.

+ * @public + */ + NotAttributeCondition?: AttributeCondition | undefined; } /** diff --git a/clients/client-connect/src/protocols/Aws_restJson1.ts b/clients/client-connect/src/protocols/Aws_restJson1.ts index bbe5e5aa30a8..d7e5346e476f 100644 --- a/clients/client-connect/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect/src/protocols/Aws_restJson1.ts @@ -1005,7 +1005,7 @@ import { QueueSummary, QuickConnect, QuickConnectSummary, - RealTimeContactAnalysisSegmentType, + Range, RoutingProfile, Rule, SecurityProfile, @@ -1073,6 +1073,7 @@ import { RealTimeContactAnalysisSegmentAttachments, RealTimeContactAnalysisSegmentEvent, RealTimeContactAnalysisSegmentTranscript, + RealTimeContactAnalysisSegmentType, RealTimeContactAnalysisTimeData, ResourceTagsSearchCriteria, RoutingCriteriaInputStepExpiry, @@ -13893,6 +13894,7 @@ const se_AttributeCondition = (input: AttributeCondition, context: __SerdeContex MatchCriteria: _json, Name: [], ProficiencyLevel: __serializeFloat, + Range: (_) => se_Range(_, context), Value: [], }); }; @@ -14196,6 +14198,7 @@ const se_Expression = (input: Expression, context: __SerdeContext): any => { return take(input, { AndExpression: (_) => se_Expressions(_, context), AttributeCondition: (_) => se_AttributeCondition(_, context), + NotAttributeCondition: (_) => se_AttributeCondition(_, context), OrExpression: (_) => se_Expressions(_, context), }); }; @@ -14580,6 +14583,16 @@ const se_QuickConnectSearchCriteria = (input: QuickConnectSearchCriteria, contex // se_QuickConnectsList omitted. +/** + * serializeAws_restJson1Range + */ +const se_Range = (input: Range, context: __SerdeContext): any => { + return take(input, { + MaxProficiencyLevel: __serializeFloat, + MinProficiencyLevel: __serializeFloat, + }); +}; + // se_ReadOnlyFieldInfo omitted. // se_ReadOnlyTaskTemplateFields omitted. @@ -15199,6 +15212,7 @@ const de_AttributeCondition = (output: any, context: __SerdeContext): AttributeC MatchCriteria: _json, Name: __expectString, ProficiencyLevel: __limitedParseFloat32, + Range: (_: any) => de_Range(_, context), Value: __expectString, }) as any; }; @@ -15901,6 +15915,7 @@ const de_Expression = (output: any, context: __SerdeContext): Expression => { return take(output, { AndExpression: (_: any) => de_Expressions(_, context), AttributeCondition: (_: any) => de_AttributeCondition(_, context), + NotAttributeCondition: (_: any) => de_AttributeCondition(_, context), OrExpression: (_: any) => de_Expressions(_, context), }) as any; }; @@ -16629,6 +16644,16 @@ const de_QuickConnectSummaryList = (output: any, context: __SerdeContext): Quick return retVal; }; +/** + * deserializeAws_restJson1Range + */ +const de_Range = (output: any, context: __SerdeContext): Range => { + return take(output, { + MaxProficiencyLevel: __limitedParseFloat32, + MinProficiencyLevel: __limitedParseFloat32, + }) as any; +}; + // de_ReadOnlyFieldInfo omitted. // de_ReadOnlyTaskTemplateFields omitted. diff --git a/codegen/sdk-codegen/aws-models/connect.json b/codegen/sdk-codegen/aws-models/connect.json index 1998ec67043b..53f8bf7a4eea 100644 --- a/codegen/sdk-codegen/aws-models/connect.json +++ b/codegen/sdk-codegen/aws-models/connect.json @@ -4130,6 +4130,12 @@ "smithy.api#documentation": "

The proficiency level of the condition.

" } }, + "Range": { + "target": "com.amazonaws.connect#Range", + "traits": { + "smithy.api#documentation": "

An Object to define the minimum and maximum proficiency levels.

" + } + }, "MatchCriteria": { "target": "com.amazonaws.connect#MatchCriteria", "traits": { @@ -17684,6 +17690,9 @@ "traits": { "smithy.api#documentation": "

List of routing expressions which will be OR-ed together.

" } + }, + "NotAttributeCondition": { + "target": "com.amazonaws.connect#AttributeCondition" } }, "traits": { @@ -31141,6 +31150,26 @@ } } }, + "com.amazonaws.connect#Range": { + "type": "structure", + "members": { + "MinProficiencyLevel": { + "target": "com.amazonaws.connect#NullableProficiencyLevel", + "traits": { + "smithy.api#documentation": "

The minimum proficiency level of the range.

" + } + }, + "MaxProficiencyLevel": { + "target": "com.amazonaws.connect#NullableProficiencyLevel", + "traits": { + "smithy.api#documentation": "

The maximum proficiency level of the range.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An Object to define the minimum and maximum proficiency levels.

" + } + }, "com.amazonaws.connect#ReadOnlyFieldInfo": { "type": "structure", "members": { @@ -36880,7 +36909,7 @@ "UploadUrlMetadata": { "target": "com.amazonaws.connect#UploadUrlMetadata", "traits": { - "smithy.api#documentation": "

Information to be used while uploading the attached file.

" + "smithy.api#documentation": "

The headers to be provided while uploading the file to the URL.

" } } },