Whether agents with this routing profile + * will have their routing order calculated based on + * time since their last inbound + * contact or longest idle + * time.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, UpdateRoutingProfileAgentAvailabilityTimerCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, UpdateRoutingProfileAgentAvailabilityTimerCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const input = { // UpdateRoutingProfileAgentAvailabilityTimerRequest + * InstanceId: "STRING_VALUE", // required + * RoutingProfileId: "STRING_VALUE", // required + * AgentAvailabilityTimer: "TIME_SINCE_LAST_ACTIVITY" || "TIME_SINCE_LAST_INBOUND", // required + * }; + * const command = new UpdateRoutingProfileAgentAvailabilityTimerCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateRoutingProfileAgentAvailabilityTimerCommandInput - {@link UpdateRoutingProfileAgentAvailabilityTimerCommandInput} + * @returns {@link UpdateRoutingProfileAgentAvailabilityTimerCommandOutput} + * @see {@link UpdateRoutingProfileAgentAvailabilityTimerCommandInput} for command's `input` shape. + * @see {@link UpdateRoutingProfileAgentAvailabilityTimerCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + * @throws {@link InternalServiceException} (server fault) + *Request processing failed because of an error or failure with the service.
+ * + * @throws {@link InvalidParameterException} (client fault) + *One or more of the specified parameters are not valid.
+ * + * @throws {@link InvalidRequestException} (client fault) + *The request is not valid.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource was not found.
+ * + * @throws {@link ThrottlingException} (client fault) + *The throttling limit has been exceeded.
+ * + * @throws {@link ConnectServiceException} + *Base exception class for all service exceptions from Connect service.
+ * + */ +export class UpdateRoutingProfileAgentAvailabilityTimerCommand extends $Command< + UpdateRoutingProfileAgentAvailabilityTimerCommandInput, + UpdateRoutingProfileAgentAvailabilityTimerCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateRoutingProfileAgentAvailabilityTimerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe tags used to organize, track, or control access for this resource. For example, \{ "tags": \{"key1":"value1", "key2":"value2"\} \}.
*/ Tags?: RecordWhether agents with this routing profile + * will have their routing order calculated based on + * time since their last inbound + * contact or longest idle + * time.
+ */ + AgentAvailabilityTimer?: AgentAvailabilityTimer | string; } /** @@ -6260,6 +6284,16 @@ export interface RoutingProfile { *The number of associated users in routing profile.
*/ NumberOfAssociatedUsers?: number; + + /** + * @public + *Whether agents with this routing profile + * will have their routing order calculated based on + * time since their last inbound + * contact or longest idle + * time.
+ */ + AgentAvailabilityTimer?: AgentAvailabilityTimer | string; } /** @@ -7320,20 +7354,6 @@ export const Grouping = { */ export type Grouping = (typeof Grouping)[keyof typeof Grouping]; -/** - * @public - * @enum - */ -export const SortOrder = { - ASCENDING: "ASCENDING", - DESCENDING: "DESCENDING", -} as const; - -/** - * @public - */ -export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]; - /** * @internal */ diff --git a/clients/client-connect/src/models/models_1.ts b/clients/client-connect/src/models/models_1.ts index 58073858cd28..d5eaa5104149 100644 --- a/clients/client-connect/src/models/models_1.ts +++ b/clients/client-connect/src/models/models_1.ts @@ -4,6 +4,7 @@ import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from " import { ConnectServiceException as __BaseException } from "./ConnectServiceException"; import { ActionSummary, + AgentAvailabilityTimer, AgentContactReference, AgentStatusReference, AgentStatusState, @@ -56,7 +57,6 @@ import { RoutingProfileQueueConfig, RuleAction, RulePublishStatus, - SortOrder, SourceType, TaskTemplateConstraints, TaskTemplateDefaults, @@ -71,6 +71,20 @@ import { VocabularyState, } from "./models_0"; +/** + * @public + * @enum + */ +export const SortOrder = { + ASCENDING: "ASCENDING", + DESCENDING: "DESCENDING", +} as const; + +/** + * @public + */ +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]; + /** * @public *The way to sort the resulting response based on metrics. By default resources are sorted @@ -7746,6 +7760,33 @@ export interface UpdateQuickConnectNameRequest { Description?: string; } +/** + * @public + */ +export interface UpdateRoutingProfileAgentAvailabilityTimerRequest { + /** + * @public + *
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
+ */ + InstanceId: string | undefined; + + /** + * @public + *The identifier of the routing profile.
+ */ + RoutingProfileId: string | undefined; + + /** + * @public + *Whether agents with this routing profile + * will have their routing order calculated based on + * time since their last inbound + * contact or longest idle + * time.
+ */ + AgentAvailabilityTimer: AgentAvailabilityTimer | string | undefined; +} + /** * @public */ @@ -8529,82 +8570,6 @@ export interface EvaluationForm { Tags?: RecordInformation about an evaluation form used in a contact evaluation.
- */ -export interface EvaluationFormContent { - /** - * @public - *A version of the evaluation form.
- */ - EvaluationFormVersion: number | undefined; - - /** - * @public - *The unique identifier for the evaluation form.
- */ - EvaluationFormId: string | undefined; - - /** - * @public - *The Amazon Resource Name (ARN) for the evaluation form resource.
- */ - EvaluationFormArn: string | undefined; - - /** - * @public - *A title of the evaluation form.
- */ - Title: string | undefined; - - /** - * @public - *The description of the evaluation form.
- */ - Description?: string; - - /** - * @public - *Items that are part of the evaluation form. The total number of sections and questions must not exceed 100 each. Questions must be contained in a section.
- */ - Items: EvaluationFormItem[] | undefined; - - /** - * @public - *A scoring strategy of the evaluation form.
- */ - ScoringStrategy?: EvaluationFormScoringStrategy; -} - -/** - * @public - *The search criteria to be used to return hours of operations.
- */ -export interface HoursOfOperationSearchCriteria { - /** - * @public - *A list of conditions which would be applied together with an OR condition.
- */ - OrConditions?: HoursOfOperationSearchCriteria[]; - - /** - * @public - *A list of conditions which would be applied together with an AND condition.
- */ - AndConditions?: HoursOfOperationSearchCriteria[]; - - /** - * @public - *A leaf node condition which can be used to specify a string condition.
- *The currently supported values for FieldName
are name
,
- * description
, timezone
, and resourceID
.
Information about an evaluation form used in a contact evaluation.
+ */ +export interface EvaluationFormContent { + /** + * @public + *A version of the evaluation form.
+ */ + EvaluationFormVersion: number | undefined; + + /** + * @public + *The unique identifier for the evaluation form.
+ */ + EvaluationFormId: string | undefined; + + /** + * @public + *The Amazon Resource Name (ARN) for the evaluation form resource.
+ */ + EvaluationFormArn: string | undefined; + + /** + * @public + *A title of the evaluation form.
+ */ + Title: string | undefined; + + /** + * @public + *The description of the evaluation form.
+ */ + Description?: string; + + /** + * @public + *Items that are part of the evaluation form. The total number of sections and questions must not exceed 100 each. Questions must be contained in a section.
+ */ + Items: EvaluationFormItem[] | undefined; + + /** + * @public + *A scoring strategy of the evaluation form.
+ */ + ScoringStrategy?: EvaluationFormScoringStrategy; +} + +/** + * @public + *The search criteria to be used to return hours of operations.
+ */ +export interface HoursOfOperationSearchCriteria { + /** + * @public + *A list of conditions which would be applied together with an OR condition.
+ */ + OrConditions?: HoursOfOperationSearchCriteria[]; + + /** + * @public + *A list of conditions which would be applied together with an AND condition.
+ */ + AndConditions?: HoursOfOperationSearchCriteria[]; + + /** + * @public + *A leaf node condition which can be used to specify a string condition.
+ *The currently supported values for FieldName
are name
,
+ * description
, timezone
, and resourceID
.
The search criteria to be used to return prompts.
diff --git a/clients/client-connect/src/protocols/Aws_restJson1.ts b/clients/client-connect/src/protocols/Aws_restJson1.ts index d0deaff36fd7..0fff84735fce 100644 --- a/clients/client-connect/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect/src/protocols/Aws_restJson1.ts @@ -521,6 +521,10 @@ import { UpdateQuickConnectNameCommandInput, UpdateQuickConnectNameCommandOutput, } from "../commands/UpdateQuickConnectNameCommand"; +import { + UpdateRoutingProfileAgentAvailabilityTimerCommandInput, + UpdateRoutingProfileAgentAvailabilityTimerCommandOutput, +} from "../commands/UpdateRoutingProfileAgentAvailabilityTimerCommand"; import { UpdateRoutingProfileConcurrencyCommandInput, UpdateRoutingProfileConcurrencyCommandOutput, @@ -683,7 +687,6 @@ import { Distribution, EvaluationAnswerInput, EvaluationForm, - EvaluationFormContent, EvaluationFormItem, EvaluationFormSection, EvaluationFormSummary, @@ -696,7 +699,6 @@ import { HistoricalMetric, HistoricalMetricData, HistoricalMetricResult, - HoursOfOperationSearchCriteria, HoursOfOperationSearchFilter, InstanceSummary, MaximumResultReturnedException, @@ -733,6 +735,8 @@ import { VoiceRecordingConfiguration, } from "../models/models_1"; import { + EvaluationFormContent, + HoursOfOperationSearchCriteria, PromptSearchCriteria, QueueSearchCriteria, QuickConnectSearchCriteria, @@ -1554,6 +1558,7 @@ export const se_CreateRoutingProfileCommand = async ( let body: any; body = JSON.stringify( take(input, { + AgentAvailabilityTimer: [], DefaultOutboundQueueId: [], Description: [], MediaConcurrencies: (_) => _json(_), @@ -6754,6 +6759,46 @@ export const se_UpdateQuickConnectNameCommand = async ( }); }; +/** + * serializeAws_restJson1UpdateRoutingProfileAgentAvailabilityTimerCommand + */ +export const se_UpdateRoutingProfileAgentAvailabilityTimerCommand = async ( + input: UpdateRoutingProfileAgentAvailabilityTimerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/routing-profiles/{InstanceId}/{RoutingProfileId}/agent-availability-timer"; + resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "RoutingProfileId", + () => input.RoutingProfileId!, + "{RoutingProfileId}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + AgentAvailabilityTimer: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1UpdateRoutingProfileConcurrencyCommand */ @@ -18007,6 +18052,61 @@ const de_UpdateQuickConnectNameCommandError = async ( } }; +/** + * deserializeAws_restJson1UpdateRoutingProfileAgentAvailabilityTimerCommand + */ +export const de_UpdateRoutingProfileAgentAvailabilityTimerCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): PromiseThe tags used to organize, track, or control access for this resource. For example, { \"tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }.
" } + }, + "AgentAvailabilityTimer": { + "target": "com.amazonaws.connect#AgentAvailabilityTimer", + "traits": { + "smithy.api#documentation": "Whether agents with this routing profile\n will have their routing order calculated based on\n time since their last inbound\n contact or longest idle\n time.
" + } } }, "traits": { @@ -21714,6 +21704,12 @@ "traits": { "smithy.api#documentation": "The number of associated users in routing profile.
" } + }, + "AgentAvailabilityTimer": { + "target": "com.amazonaws.connect#AgentAvailabilityTimer", + "traits": { + "smithy.api#documentation": "Whether agents with this routing profile\n will have their routing order calculated based on\n time since their last inbound\n contact or longest idle\n time.
" + } } }, "traits": { @@ -27989,6 +27985,71 @@ "smithy.api#input": {} } }, + "com.amazonaws.connect#UpdateRoutingProfileAgentAvailabilityTimer": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateRoutingProfileAgentAvailabilityTimerRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "Whether agents with this routing profile\n will have their routing order calculated based on\n time since their last inbound\n contact or longest idle\n time.
", + "smithy.api#http": { + "method": "POST", + "uri": "/routing-profiles/{InstanceId}/{RoutingProfileId}/agent-availability-timer", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateRoutingProfileAgentAvailabilityTimerRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "RoutingProfileId": { + "target": "com.amazonaws.connect#RoutingProfileId", + "traits": { + "smithy.api#documentation": "The identifier of the routing profile.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AgentAvailabilityTimer": { + "target": "com.amazonaws.connect#AgentAvailabilityTimer", + "traits": { + "smithy.api#documentation": "Whether agents with this routing profile\n will have their routing order calculated based on\n time since their last inbound\n contact or longest idle\n time.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, "com.amazonaws.connect#UpdateRoutingProfileConcurrency": { "type": "operation", "input": {